This patch modifies max8997 driver and each associated function driver,
to use regmap instead of operating directly on i2c bus. It will allow to
simplify IRQ handling using regmap-irq.
Signed-off-by: Robert Baldyga
---
Changelog:
v2:
- check devm_regmap_init_i2c() return value
- use proper regi
Hi Robert,
On Wed, Mar 05, 2014 at 03:58:17PM +0100, Robert Baldyga wrote:
>
> -int max8997_write_reg(struct i2c_client *i2c, u8 reg, u8 value)
> +int max8997_write_reg(struct regmap *map, u8 reg, u8 value)
Why don't you make read/write reg to take struct max8997_dev as argument
instead of regm
This patch has build error as following:
I added some comment in max8997_irq_init()
At least, you should test kernel build.
drivers/mfd/max8997-irq.c: In function ‘max8997_irq_init’:
drivers/mfd/max8997-irq.c:333:3: error: ‘i2c’ undeclared (first use in this
function)
drivers/mfd/max8997-irq.c:3
On Wed, Mar 05, 2014 at 10:54:39AM -0800, Dmitry Torokhov wrote:
> On Wed, Mar 05, 2014 at 03:58:17PM +0100, Robert Baldyga wrote:
> > -int max8997_write_reg(struct i2c_client *i2c, u8 reg, u8 value)
> > +int max8997_write_reg(struct regmap *map, u8 reg, u8 value)
> Why don't you make read/write
Hi,
On 03/05/2014 07:54 PM, Dmitry Torokhov wrote:
> Hi Robert,
>
> On Wed, Mar 05, 2014 at 03:58:17PM +0100, Robert Baldyga wrote:
>>
>> -int max8997_write_reg(struct i2c_client *i2c, u8 reg, u8 value)
>> +int max8997_write_reg(struct regmap *map, u8 reg, u8 value)
>
> Why don't you make read
Hi,
On 03/06/2014 03:44 AM, Chanwoo Choi wrote:
> This patch has build error as following:
> I added some comment in max8997_irq_init()
> At least, you should test kernel build.
>
> drivers/mfd/max8997-irq.c: In function ‘max8997_irq_init’:
> drivers/mfd/max8997-irq.c:333:3: error: ‘i2c’ undecla
On Thu, Mar 06, 2014 at 07:42:30AM +0100, Robert Baldyga wrote:
> Hi,
>
> On 03/05/2014 07:54 PM, Dmitry Torokhov wrote:
> > Hi Robert,
> >
> > On Wed, Mar 05, 2014 at 03:58:17PM +0100, Robert Baldyga wrote:
> >>
> >> -int max8997_write_reg(struct i2c_client *i2c, u8 reg, u8 value)
> >> +int ma
On 03/06/2014 05:29 PM, Dmitry Torokhov wrote:
> On Thu, Mar 06, 2014 at 07:42:30AM +0100, Robert Baldyga wrote:
>> Hi,
>>
>> On 03/05/2014 07:54 PM, Dmitry Torokhov wrote:
>>> Hi Robert,
>>>
>>> On Wed, Mar 05, 2014 at 03:58:17PM +0100, Robert Baldyga wrote:
-int max8997_write_reg(stru