Re: [RFC] regmap: allow volatile register writes with cached only read maps

2018-05-17 Thread Mark Brown
On Thu, May 17, 2018 at 09:12:49AM +0200, Jorge Ramirez-Ortiz wrote: > On 05/13/2018 04:22 AM, Mark Brown wrote: > > > So I dont see where/how your recommendation fits; maybe you could clarify > > > a > > > bit more please? > > As I've been saying if you explicitly need a write to happen don't

Re: [RFC] regmap: allow volatile register writes with cached only read maps

2018-05-17 Thread Mark Brown
On Thu, May 17, 2018 at 09:12:49AM +0200, Jorge Ramirez-Ortiz wrote: > On 05/13/2018 04:22 AM, Mark Brown wrote: > > > So I dont see where/how your recommendation fits; maybe you could clarify > > > a > > > bit more please? > > As I've been saying if you explicitly need a write to happen don't

Re: [RFC] regmap: allow volatile register writes with cached only read maps

2018-05-17 Thread Jorge Ramirez-Ortiz
On 05/13/2018 04:22 AM, Mark Brown wrote: On Fri, May 11, 2018 at 12:29:42PM +0200, Jorge Ramirez-Ortiz wrote: On 05/11/2018 04:00 AM, Mark Brown wrote: We don't currently suppress writes except when regmap_update_bits() notices that the modification was a noop. You probably want to be using

Re: [RFC] regmap: allow volatile register writes with cached only read maps

2018-05-17 Thread Jorge Ramirez-Ortiz
On 05/13/2018 04:22 AM, Mark Brown wrote: On Fri, May 11, 2018 at 12:29:42PM +0200, Jorge Ramirez-Ortiz wrote: On 05/11/2018 04:00 AM, Mark Brown wrote: We don't currently suppress writes except when regmap_update_bits() notices that the modification was a noop. You probably want to be using

Re: [RFC] regmap: allow volatile register writes with cached only read maps

2018-05-12 Thread Mark Brown
On Fri, May 11, 2018 at 12:29:42PM +0200, Jorge Ramirez-Ortiz wrote: > On 05/11/2018 04:00 AM, Mark Brown wrote: > > We don't currently suppress writes except when regmap_update_bits() > > notices that the modification was a noop. You probably want to be using > > regmap_write_bits() here

Re: [RFC] regmap: allow volatile register writes with cached only read maps

2018-05-12 Thread Mark Brown
On Fri, May 11, 2018 at 12:29:42PM +0200, Jorge Ramirez-Ortiz wrote: > On 05/11/2018 04:00 AM, Mark Brown wrote: > > We don't currently suppress writes except when regmap_update_bits() > > notices that the modification was a noop. You probably want to be using > > regmap_write_bits() here

Re: [RFC] regmap: allow volatile register writes with cached only read maps

2018-05-11 Thread Jorge Ramirez-Ortiz
On 05/11/2018 04:00 AM, Mark Brown wrote: On Wed, May 09, 2018 at 01:49:21PM +0200, Jorge Ramirez-Ortiz wrote: On 05/09/2018 10:39 AM, Mark Brown wrote: I don't understand what voltile access means for write only devices. Volatile means that we don't read the cache but go direct to the

Re: [RFC] regmap: allow volatile register writes with cached only read maps

2018-05-11 Thread Jorge Ramirez-Ortiz
On 05/11/2018 04:00 AM, Mark Brown wrote: On Wed, May 09, 2018 at 01:49:21PM +0200, Jorge Ramirez-Ortiz wrote: On 05/09/2018 10:39 AM, Mark Brown wrote: I don't understand what voltile access means for write only devices. Volatile means that we don't read the cache but go direct to the

Re: [RFC] regmap: allow volatile register writes with cached only read maps

2018-05-10 Thread Mark Brown
On Wed, May 09, 2018 at 01:49:21PM +0200, Jorge Ramirez-Ortiz wrote: > On 05/09/2018 10:39 AM, Mark Brown wrote: > > I don't understand what voltile access means for write only devices. > > Volatile means that we don't read the cache but go direct to the > > hardware so if we can't read the

Re: [RFC] regmap: allow volatile register writes with cached only read maps

2018-05-10 Thread Mark Brown
On Wed, May 09, 2018 at 01:49:21PM +0200, Jorge Ramirez-Ortiz wrote: > On 05/09/2018 10:39 AM, Mark Brown wrote: > > I don't understand what voltile access means for write only devices. > > Volatile means that we don't read the cache but go direct to the > > hardware so if we can't read the

Re: [RFC] regmap: allow volatile register writes with cached only read maps

2018-05-09 Thread Jorge Ramirez-Ortiz
On 05/09/2018 10:39 AM, Mark Brown wrote: On Wed, May 09, 2018 at 12:06:09AM +0200, Jorge Ramirez-Ortiz wrote: Regmap only allows volatile access to registers when the client supports both reads and writes. This commit bypasses that limitation and enables volatile writes to selected registers

Re: [RFC] regmap: allow volatile register writes with cached only read maps

2018-05-09 Thread Jorge Ramirez-Ortiz
On 05/09/2018 10:39 AM, Mark Brown wrote: On Wed, May 09, 2018 at 12:06:09AM +0200, Jorge Ramirez-Ortiz wrote: Regmap only allows volatile access to registers when the client supports both reads and writes. This commit bypasses that limitation and enables volatile writes to selected registers

Re: [RFC] regmap: allow volatile register writes with cached only read maps

2018-05-09 Thread Mark Brown
On Wed, May 09, 2018 at 12:06:09AM +0200, Jorge Ramirez-Ortiz wrote: > Regmap only allows volatile access to registers when the client > supports both reads and writes. > > This commit bypasses that limitation and enables volatile writes to > selected registers while maintaining cached accesses

Re: [RFC] regmap: allow volatile register writes with cached only read maps

2018-05-09 Thread Mark Brown
On Wed, May 09, 2018 at 12:06:09AM +0200, Jorge Ramirez-Ortiz wrote: > Regmap only allows volatile access to registers when the client > supports both reads and writes. > > This commit bypasses that limitation and enables volatile writes to > selected registers while maintaining cached accesses