Re: [PATCH v2] check: Add 10bit/slave i2c reg flags support

2020-06-02 Thread Wolfram Sang
> Easier to just duplicate the define here which Joel's patches do. Well, seems this case is closed then. Thanks everyone! signature.asc Description: PGP signature

Re: [PATCH v2] check: Add 10bit/slave i2c reg flags support

2020-06-01 Thread Rob Herring
On Sat, May 30, 2020 at 3:32 AM Wolfram Sang wrote: > > > > + addr = reg & 0x3FFFU; > > + snprintf(unit_addr, sizeof(unit_addr), "%x", addr); > > Hmm, this hardcoded value will not work if we ever need to add another > bit. I hope this will never happen, though. I had this concern

Re: [PATCH v2] check: Add 10bit/slave i2c reg flags support

2020-05-31 Thread Serge Semin
On Sat, May 30, 2020 at 11:31:52AM +0200, Wolfram Sang wrote: > > > + addr = reg & 0x3FFFU; > > + snprintf(unit_addr, sizeof(unit_addr), "%x", addr); > > Hmm, this hardcoded value will not work if we ever need to add another > bit. I hope this will never happen, though. > > > +

Re: [PATCH v2] check: Add 10bit/slave i2c reg flags support

2020-05-30 Thread Wolfram Sang
> + addr = reg & 0x3FFFU; > + snprintf(unit_addr, sizeof(unit_addr), "%x", addr); Hmm, this hardcoded value will not work if we ever need to add another bit. I hope this will never happen, though. > + if ((reg & (1U << 31)) && addr > 0x3ff) Same here with bit 31. I

[PATCH v2] check: Add 10bit/slave i2c reg flags support

2020-05-27 Thread Serge Semin
Recently the I2C-controllers slave interface support was added to the kernel I2C subsystem. In this case Linux can be used as, for example, a I2C EEPROM machine. See [1] for details. Other than instantiating the EEPROM-slave device from user-space there is a way to declare the device in dts. In