openbmc.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* Moving phosphor-power/tools/i2c into a separated repo
@ 2020-10-19  9:39 Lei Yu
  2020-10-19 15:46 ` Brad Bishop
  0 siblings, 1 reply; 2+ messages in thread
From: Lei Yu @ 2020-10-19  9:39 UTC (permalink / raw)
  To: openbmc, Brad Bishop, Matt Spinler, Shawn McCarney, Jet_JC_Lee

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

-- 
BRs,
Lei YU

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Moving phosphor-power/tools/i2c into a separated repo
  2020-10-19  9:39 Moving phosphor-power/tools/i2c into a separated repo Lei Yu
@ 2020-10-19 15:46 ` Brad Bishop
  0 siblings, 0 replies; 2+ messages in thread
From: Brad Bishop @ 2020-10-19 15:46 UTC (permalink / raw)
  To: Lei Yu, openbmc, Matt Spinler, Shawn McCarney, Jet_JC_Lee

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/

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-10-19 15:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-19  9:39 Moving phosphor-power/tools/i2c into a separated repo Lei Yu
2020-10-19 15:46 ` Brad Bishop

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).