[coreboot-gerrit] Change in coreboot[master]: [RFC] Reinvent I2C ops

Nico Huber (Code Review) gerrit at coreboot.org
Wed Aug 9 13:57:34 CEST 2017


Nico Huber has uploaded a new patch set (#3). ( https://review.coreboot.org/20846 )

Change subject: [RFC] Reinvent I2C ops
......................................................................

[RFC] Reinvent I2C ops

Do not use the global platform_i2c_transfer() function that can only be
implemented by a single driver. Instead, make a `struct device` aware
transfer() function the only interface function for I2C controller dri-
vers to implement.

To not force the slave device drivers to be implemented either above
generic I2C or specialized SMBus operations, we support SMBus control-
lers in the slave device interface too.

We start with four simple slave functions: i2c_readb(), i2c_writeb(),
i2c_readb_at() and i2c_writeb_at(). They are all compatible to respec-
tive SMBus functions. But we keep aliases because it would be weird to
force e.g. an I2C EEPROM driver to call smbus_read_byte().

Change-Id: I98386f91bf4799ba3df84ec8bc0f64edd4142818
Signed-off-by: Nico Huber <nico.huber at secunet.com>
---
M src/device/Makefile.inc
M src/device/i2c.c
A src/device/i2c_bus.c
M src/include/device/i2c_bus.h
M src/include/device/i2c_simple.h
M src/soc/intel/common/block/i2c/i2c.c
M src/soc/intel/common/block/i2c/lpss_i2c.c
M src/soc/intel/common/block/i2c/lpss_i2c.h
8 files changed, 266 insertions(+), 108 deletions(-)


  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/46/20846/3
-- 
To view, visit https://review.coreboot.org/20846
To unsubscribe, visit https://review.coreboot.org/settings

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I98386f91bf4799ba3df84ec8bc0f64edd4142818
Gerrit-Change-Number: 20846
Gerrit-PatchSet: 3
Gerrit-Owner: Nico Huber <nico.h at gmx.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20170809/b441deb4/attachment.html>


More information about the coreboot-gerrit mailing list