Moving phosphor-power/tools/i2c into a separated repo

Brad Bishop bradleyb at fuzziesquirrel.com
Tue Oct 20 02:46:18 AEDT 2020


On Mon, 2020-10-19 at 17:39 +0800, Lei Yu wrote:
> This email is to propose to move the i2c library in phosphor-power to
> a separated repo.
> 
> In OpenBMC, some repos need i2c/SMBus access to various devices.
> E.g.
> * phosphor-power implements a C++ wrapper of libi2c in tools/i2c to
> talk to PSU.
> * dbus-sensors is going to have a wrapper to send smbus commands.
> * We have an internal (probably will be upstreamed later) repo using
> i2c to communicate with a CPLD.
> 
> The one in [phosphor-power][1] is a full C++ wrapper, that supports
> byte/word/block read/write, supports both I2C and SMBus
> communications, and provides a mocked interface for unit tests.
> It could be a good candidate for a separate repo so that it could be
> shared by other repos.
> 
> What do you think?
> 
> [1]: https://github.com/openbmc/phosphor-power/tree/master/tools/i2c
> 

In general I would rather see us working with the kernel community to
find a way to meet our needs.  To me i2c-dev (and libraries built on top
of it) feels like a workaround to missing kernel frameworks.

I realize that is hard, so in the absence of that I wonder if anyone has
ever tried to get something like this:

https://git.kernel.org/pub/scm/libs/libgpiod/libgpiod.git/tree/bindings/cxx

into i2c-tools:

https://git.kernel.org/pub/scm/utils/i2c-tools/i2c-tools.git/tree/


More information about the openbmc mailing list