When the adapter name is used as a parameter, some adapters share the same name. For instance, both /dev/i2c-0 and /dev/i2c-1 have the bus name "xxxx". This leads to only the first found I2C adapter being opened.
To increase flexibility, accept both the I2C master's name and number as parameters and parse accordingly.
Summary of the PR
In some scenarios, serveral i2c adapters share the same bus-name, which results in only the first founded i2c adapter being
opened.
To address this issue, introduced support for identification by names or numbers, providing users with a choice.
Requirements
Before submitting your PR, please make sure you addressed the following
requirements:
[x] All commits in this PR have Signed-Off-By trailers (with
git commit -s), and the commit message has max 60 characters for the
summary and max 75 characters for each description line.
[x] All added/changed functionality has a corresponding unit/integration
test.
[x] All added/changed public-facing functionality has entries in the "Upcoming
Release" section of CHANGELOG.md (if no such section exists, please create one).
[x] Any newly added unsafe code is properly documented.
When the adapter name is used as a parameter, some adapters share the same name. For instance, both /dev/i2c-0 and /dev/i2c-1 have the bus name "xxxx". This leads to only the first found I2C adapter being opened.
To increase flexibility, accept both the I2C master's name and number as parameters and parse accordingly.
Summary of the PR
In some scenarios, serveral i2c adapters share the same bus-name, which results in only the first founded i2c adapter being opened.
To address this issue, introduced support for identification by names or numbers, providing users with a choice.
Requirements
Before submitting your PR, please make sure you addressed the following requirements:
git commit -s
), and the commit message has max 60 characters for the summary and max 75 characters for each description line.unsafe
code is properly documented.