Re: [RFC/RFT 01/10] i2c: add 'is_suspended' flag for i2c adapters

2018-12-19 Thread Wolfram Sang
On Wed, Dec 19, 2018 at 10:39:05AM +0100, Geert Uytterhoeven wrote: > Hi Wolfram, > > On Wed, Dec 19, 2018 at 12:34 AM Wolfram Sang wrote: > > > > + unsigned int is_suspended:1;/* owned by the I2C core */ > > > > > > When more stuff is added to this bit field (which always happens at > > >

Re: [RFC/RFT 01/10] i2c: add 'is_suspended' flag for i2c adapters

2018-12-19 Thread Geert Uytterhoeven
Hi Wolfram, On Wed, Dec 19, 2018 at 12:34 AM Wolfram Sang wrote: > > > + unsigned int is_suspended:1;/* owned by the I2C core */ > > > > When more stuff is added to this bit field (which always happens at > > some point) updates to all members of the bit field will have to use > > the same

Re: [RFC/RFT 01/10] i2c: add 'is_suspended' flag for i2c adapters

2018-12-18 Thread Wolfram Sang
> > + unsigned int is_suspended:1;/* owned by the I2C core */ > > When more stuff is added to this bit field (which always happens at > some point) updates to all members of the bit field will have to use > the same root-adapter-locking, or we will suffer from RMW-races. So > this feels

Re: [RFC/RFT 01/10] i2c: add 'is_suspended' flag for i2c adapters

2018-12-10 Thread Peter Rosin
On 2018-12-10 22:02, Wolfram Sang wrote: > Some drivers open code handling of suspended adapters. It should be > handled by the core, though, to ensure generic handling. This patch adds > the flag and an accessor function. > > Signed-off-by: Wolfram Sang > --- > drivers/i2c/i2c-core-base.c | 1

[RFC/RFT 01/10] i2c: add 'is_suspended' flag for i2c adapters

2018-12-10 Thread Wolfram Sang
Some drivers open code handling of suspended adapters. It should be handled by the core, though, to ensure generic handling. This patch adds the flag and an accessor function. Signed-off-by: Wolfram Sang --- drivers/i2c/i2c-core-base.c | 1 + include/linux/i2c.h | 9 + 2 files