Re: [PATCH 2/4] Input: pmic8xxx-keypad - use regmap_field for register access

2014-10-27 Thread Dmitry Torokhov
On Monday, October 27, 2014 06:20:31 PM Ivan T. Ivanov wrote: > On Mon, 2014-10-27 at 09:06 -0700, Dmitry Torokhov wrote: > > On Mon, Oct 27, 2014 at 05:30:41PM +0200, Ivan T. Ivanov wrote: > > > Hi Dmitry, > > > > > > On Mon, 2014-10-13 at 16:02 +0200, Mark Brown wrote: > > > > On Wed, Oct 08, 20

Re: [PATCH 2/4] Input: pmic8xxx-keypad - use regmap_field for register access

2014-10-27 Thread Ivan T. Ivanov
On Mon, 2014-10-27 at 09:06 -0700, Dmitry Torokhov wrote: > On Mon, Oct 27, 2014 at 05:30:41PM +0200, Ivan T. Ivanov wrote: > > Hi Dmitry, > > > > On Mon, 2014-10-13 at 16:02 +0200, Mark Brown wrote: > > > On Wed, Oct 08, 2014 at 01:32:33PM -0700, Dmitry Torokhov wrote: > > > > On Wed, Oct 08, 20

Re: [PATCH 2/4] Input: pmic8xxx-keypad - use regmap_field for register access

2014-10-27 Thread Dmitry Torokhov
On Mon, Oct 27, 2014 at 05:30:41PM +0200, Ivan T. Ivanov wrote: > > Hi Dmitry, > > On Mon, 2014-10-13 at 16:02 +0200, Mark Brown wrote: > > On Wed, Oct 08, 2014 at 01:32:33PM -0700, Dmitry Torokhov wrote: > > > On Wed, Oct 08, 2014 at 09:04:26PM +0100, Mark Brown wrote: > > > > On Wed, Oct 08, 2

Re: [PATCH 2/4] Input: pmic8xxx-keypad - use regmap_field for register access

2014-10-27 Thread Ivan T. Ivanov
Hi Dmitry, On Mon, 2014-10-13 at 16:02 +0200, Mark Brown wrote: > On Wed, Oct 08, 2014 at 01:32:33PM -0700, Dmitry Torokhov wrote: > > On Wed, Oct 08, 2014 at 09:04:26PM +0100, Mark Brown wrote: > > > On Wed, Oct 08, 2014 at 11:20:58AM -0700, Stephen Boyd wrote: > > > > > Srini/Mark, any reason

Re: [PATCH 2/4] Input: pmic8xxx-keypad - use regmap_field for register access

2014-10-13 Thread Mark Brown
On Wed, Oct 08, 2014 at 01:32:33PM -0700, Dmitry Torokhov wrote: > On Wed, Oct 08, 2014 at 09:04:26PM +0100, Mark Brown wrote: > > On Wed, Oct 08, 2014 at 11:20:58AM -0700, Stephen Boyd wrote: > > > Srini/Mark, any reason why the regmap_field structure is opaque? > > So you can't peer into it and

Re: [PATCH 2/4] Input: pmic8xxx-keypad - use regmap_field for register access

2014-10-08 Thread Dmitry Torokhov
On Wed, Oct 08, 2014 at 09:04:26PM +0100, Mark Brown wrote: > On Wed, Oct 08, 2014 at 11:20:58AM -0700, Stephen Boyd wrote: > > On 10/08/2014 11:13 AM, Dmitry Torokhov wrote: > > > >>>Oops. struct regmap_field is opaque. It seems that the allocation > > >>>is the only way that I could have instanc

Re: [PATCH 2/4] Input: pmic8xxx-keypad - use regmap_field for register access

2014-10-08 Thread Mark Brown
On Wed, Oct 08, 2014 at 11:20:58AM -0700, Stephen Boyd wrote: > On 10/08/2014 11:13 AM, Dmitry Torokhov wrote: > >>>Oops. struct regmap_field is opaque. It seems that the allocation > >>>is the only way that I could have instance of it. > >>Maybe we can add an API to allocate an array of fields?

Re: [PATCH 2/4] Input: pmic8xxx-keypad - use regmap_field for register access

2014-10-08 Thread Stephen Boyd
Adding Mark and Srini On 10/08/2014 11:13 AM, Dmitry Torokhov wrote: On Wed, Oct 08, 2014 at 11:00:07AM -0700, Stephen Boyd wrote: On 10/08/2014 02:30 AM, Ivan T. Ivanov wrote: On Wed, 2014-10-08 at 12:13 +0300, Ivan T. Ivanov wrote: On Tue, 2014-10-07 at 10:26 -0700, Dmitry Torokhov wrote:

Re: [PATCH 2/4] Input: pmic8xxx-keypad - use regmap_field for register access

2014-10-08 Thread Dmitry Torokhov
On Wed, Oct 08, 2014 at 11:00:07AM -0700, Stephen Boyd wrote: > On 10/08/2014 02:30 AM, Ivan T. Ivanov wrote: > >On Wed, 2014-10-08 at 12:13 +0300, Ivan T. Ivanov wrote: > >>On Tue, 2014-10-07 at 10:26 -0700, Dmitry Torokhov wrote: > >>>Hi Ivan, > >>> > >>>On Tue, Oct 07, 2014 at 12:50:46PM +0300,

Re: [PATCH 2/4] Input: pmic8xxx-keypad - use regmap_field for register access

2014-10-08 Thread Stephen Boyd
On 10/08/2014 02:30 AM, Ivan T. Ivanov wrote: On Wed, 2014-10-08 at 12:13 +0300, Ivan T. Ivanov wrote: On Tue, 2014-10-07 at 10:26 -0700, Dmitry Torokhov wrote: Hi Ivan, On Tue, Oct 07, 2014 at 12:50:46PM +0300, Ivan T. Ivanov wrote: @@ -527,10 +538,55 @@ static int pmic8xxx_kp_probe(struct p

Re: [PATCH 2/4] Input: pmic8xxx-keypad - use regmap_field for register access

2014-10-08 Thread Ivan T. Ivanov
On Wed, 2014-10-08 at 12:13 +0300, Ivan T. Ivanov wrote: > On Tue, 2014-10-07 at 10:26 -0700, Dmitry Torokhov wrote: > > Hi Ivan, > > > > On Tue, Oct 07, 2014 at 12:50:46PM +0300, Ivan T. Ivanov wrote: > > > @@ -527,10 +538,55 @@ static int pmic8xxx_kp_probe(struct platform_device > > > *pdev) >

Re: [PATCH 2/4] Input: pmic8xxx-keypad - use regmap_field for register access

2014-10-08 Thread Ivan T. Ivanov
On Tue, 2014-10-07 at 10:26 -0700, Dmitry Torokhov wrote: > Hi Ivan, > > On Tue, Oct 07, 2014 at 12:50:46PM +0300, Ivan T. Ivanov wrote: > > @@ -527,10 +538,55 @@ static int pmic8xxx_kp_probe(struct platform_device > > *pdev) > > > > + > > + kp->row_hold = devm_regmap_field_alloc(kp->dev, kp

Re: [PATCH 2/4] Input: pmic8xxx-keypad - use regmap_field for register access

2014-10-07 Thread Dmitry Torokhov
Hi Ivan, On Tue, Oct 07, 2014 at 12:50:46PM +0300, Ivan T. Ivanov wrote: > @@ -527,10 +538,55 @@ static int pmic8xxx_kp_probe(struct platform_device > *pdev) > > platform_set_drvdata(pdev, kp); > > + if (rows < info->min_rows) > + rows = info->min_rows; > + > + if (c

[PATCH 2/4] Input: pmic8xxx-keypad - use regmap_field for register access

2014-10-07 Thread Ivan T. Ivanov
Abstract access to bit and register definitions to simplify adding support for similar controller, which be found on SPMI based pm8941. Group hardware capabilities to controller specific structure, and pass it to driver, based on compatible string. Pre-compute minimum number of rows and columns t