Re: [PATCH] regmap: allow to disable all locking mechanisms

2017-12-12 Thread Mark Brown
On Tue, Dec 12, 2017 at 01:21:46PM +0100, Bartosz Golaszewski wrote: > 2017-12-12 13:18 GMT+01:00 Mark Brown : > > That's true, and the debugfs is world readable too so we can't just say > > it's up to root to be sensible. > This lock is only taken when writing to cache_only and cache_bypass thou

Re: [PATCH] regmap: allow to disable all locking mechanisms

2017-12-12 Thread Bartosz Golaszewski
2017-12-12 13:18 GMT+01:00 Mark Brown : > On Tue, Dec 12, 2017 at 12:42:47PM +0100, Lars-Peter Clausen wrote: >> On 12/06/2017 03:26 PM, Bartosz Golaszewski wrote: > >> > + * @disable_locking: This regmap is either protected by external means or >> > + * is guaranteed not be be ac

Re: [PATCH] regmap: allow to disable all locking mechanisms

2017-12-12 Thread Mark Brown
On Tue, Dec 12, 2017 at 12:42:47PM +0100, Lars-Peter Clausen wrote: > On 12/06/2017 03:26 PM, Bartosz Golaszewski wrote: > > + * @disable_locking: This regmap is either protected by external means or > > + * is guaranteed not be be accessed from multiple > > threads. > To guara

Re: [PATCH] regmap: allow to disable all locking mechanisms

2017-12-12 Thread Lars-Peter Clausen
On 12/06/2017 03:26 PM, Bartosz Golaszewski wrote: [...] > + * @disable_locking: This regmap is either protected by external means or > + * is guaranteed not be be accessed from multiple threads. To guarantee this you need to make sure that a regmap instance with this flag set do

Re: [PATCH] regmap: allow to disable all locking mechanisms

2017-12-12 Thread Mark Brown
On Tue, Dec 12, 2017 at 01:12:05PM +0200, Andy Shevchenko wrote: > On Sun, Dec 10, 2017 at 5:14 PM, Bartosz Golaszewski wrote: > >>> +static void regmap_lock_unlock_empty(void *__map) > >> ..._none()? > > Too late, Mark already applied it. > Ah, Mark always works at speed of light! An increme

Re: [PATCH] regmap: allow to disable all locking mechanisms

2017-12-12 Thread Andy Shevchenko
On Sun, Dec 10, 2017 at 5:14 PM, Bartosz Golaszewski wrote: > 2017-12-10 14:10 GMT+01:00 Andy Shevchenko : >> On Wed, Dec 6, 2017 at 4:26 PM, Bartosz Golaszewski wrote: >>> We have a use case in the at24 EEPROM driver (recently converted to >>> using regmap instead of raw i2c/smbus calls) where w

Re: [PATCH] regmap: allow to disable all locking mechanisms

2017-12-10 Thread Bartosz Golaszewski
2017-12-10 14:10 GMT+01:00 Andy Shevchenko : > On Wed, Dec 6, 2017 at 4:26 PM, Bartosz Golaszewski wrote: >> We have a use case in the at24 EEPROM driver (recently converted to >> using regmap instead of raw i2c/smbus calls) where we read from/write >> to the regmap in a loop, while protecting the

Re: [PATCH] regmap: allow to disable all locking mechanisms

2017-12-10 Thread Andy Shevchenko
On Wed, Dec 6, 2017 at 4:26 PM, Bartosz Golaszewski wrote: > We have a use case in the at24 EEPROM driver (recently converted to > using regmap instead of raw i2c/smbus calls) where we read from/write > to the regmap in a loop, while protecting the entire loop with > a mutex. > > Currently this im