Re: [PATCH v4 04/10] eeprom: Add a simple EEPROM framework for eeprom consumers

2015-05-07 Thread Sascha Hauer
On Tue, May 05, 2015 at 12:46:32PM +0100, Srinivas Kandagatla wrote: > Hi Stephen, > > Sorry I took so long to reply. > > > On 09/04/15 15:45, Stephen Boyd wrote: > >On 04/07, Srinivas Kandagatla wrote: > >>On 07/04/15 19:45, Stephen Boyd wrote: > >>>On 03/30, Srinivas Kandagatla wrote: > >>> >

Re: [PATCH v4 04/10] eeprom: Add a simple EEPROM framework for eeprom consumers

2015-05-07 Thread Sascha Hauer
On Tue, May 05, 2015 at 12:46:32PM +0100, Srinivas Kandagatla wrote: Hi Stephen, Sorry I took so long to reply. On 09/04/15 15:45, Stephen Boyd wrote: On 04/07, Srinivas Kandagatla wrote: On 07/04/15 19:45, Stephen Boyd wrote: On 03/30, Srinivas Kandagatla wrote: Do you have an

Re: [PATCH v4 04/10] eeprom: Add a simple EEPROM framework for eeprom consumers

2015-05-06 Thread Mark Brown
On Mon, Mar 30, 2015 at 10:57:50PM +0100, Srinivas Kandagatla wrote: > + > + for (i = 0; i < cell->nblocks; i++) { > + rc = regmap_raw_read(eeprom->regmap, cell->blocks[i].offset, > + buf + offset, cell->blocks[i].count); I *think* this is

Re: [PATCH v4 04/10] eeprom: Add a simple EEPROM framework for eeprom consumers

2015-05-06 Thread Mark Brown
On Mon, Mar 30, 2015 at 10:57:50PM +0100, Srinivas Kandagatla wrote: + + for (i = 0; i cell-nblocks; i++) { + rc = regmap_raw_read(eeprom-regmap, cell-blocks[i].offset, + buf + offset, cell-blocks[i].count); I *think* this is probably OK but

Re: [PATCH v4 04/10] eeprom: Add a simple EEPROM framework for eeprom consumers

2015-05-05 Thread Srinivas Kandagatla
Hi Stephen, Sorry I took so long to reply. On 09/04/15 15:45, Stephen Boyd wrote: On 04/07, Srinivas Kandagatla wrote: On 07/04/15 19:45, Stephen Boyd wrote: On 03/30, Srinivas Kandagatla wrote: Do you have an overview of how to use these APIs? Maybe some Documentation/ is in order? I'm

Re: [PATCH v4 04/10] eeprom: Add a simple EEPROM framework for eeprom consumers

2015-05-05 Thread Srinivas Kandagatla
Hi Stephen, Sorry I took so long to reply. On 09/04/15 15:45, Stephen Boyd wrote: On 04/07, Srinivas Kandagatla wrote: On 07/04/15 19:45, Stephen Boyd wrote: On 03/30, Srinivas Kandagatla wrote: Do you have an overview of how to use these APIs? Maybe some Documentation/ is in order? I'm

Re: [PATCH v4 04/10] eeprom: Add a simple EEPROM framework for eeprom consumers

2015-04-09 Thread Stephen Boyd
On 04/07, Srinivas Kandagatla wrote: > On 07/04/15 19:45, Stephen Boyd wrote: > >On 03/30, Srinivas Kandagatla wrote: > > > >Do you have an overview of how to use these APIs? Maybe some > >Documentation/ is in order? I'm mostly interested in how the > >blocks array is supposed to work and how this

Re: [PATCH v4 04/10] eeprom: Add a simple EEPROM framework for eeprom consumers

2015-04-09 Thread Stephen Boyd
On 04/07, Srinivas Kandagatla wrote: On 07/04/15 19:45, Stephen Boyd wrote: On 03/30, Srinivas Kandagatla wrote: Do you have an overview of how to use these APIs? Maybe some Documentation/ is in order? I'm mostly interested in how the blocks array is supposed to work and how this hooks up

Re: [PATCH v4 04/10] eeprom: Add a simple EEPROM framework for eeprom consumers

2015-04-07 Thread Srinivas Kandagatla
Thanks Stephen for review, On 07/04/15 19:45, Stephen Boyd wrote: On 03/30, Srinivas Kandagatla wrote: @@ -130,6 +138,37 @@ static struct class eeprom_class = { .dev_release= eeprom_release, }; +static int of_eeprom_match(struct device *dev, const void *eeprom_np) +{ +

Re: [PATCH v4 04/10] eeprom: Add a simple EEPROM framework for eeprom consumers

2015-04-07 Thread Stephen Boyd
On 03/30, Srinivas Kandagatla wrote: > @@ -130,6 +138,37 @@ static struct class eeprom_class = { > .dev_release= eeprom_release, > }; > > +static int of_eeprom_match(struct device *dev, const void *eeprom_np) > +{ > + return dev->of_node == eeprom_np; > +} > + > +static struct

Re: [PATCH v4 04/10] eeprom: Add a simple EEPROM framework for eeprom consumers

2015-04-07 Thread Stephen Boyd
On 03/30, Srinivas Kandagatla wrote: @@ -130,6 +138,37 @@ static struct class eeprom_class = { .dev_release= eeprom_release, }; +static int of_eeprom_match(struct device *dev, const void *eeprom_np) +{ + return dev-of_node == eeprom_np; +} + +static struct eeprom_device

Re: [PATCH v4 04/10] eeprom: Add a simple EEPROM framework for eeprom consumers

2015-04-07 Thread Srinivas Kandagatla
Thanks Stephen for review, On 07/04/15 19:45, Stephen Boyd wrote: On 03/30, Srinivas Kandagatla wrote: @@ -130,6 +138,37 @@ static struct class eeprom_class = { .dev_release= eeprom_release, }; +static int of_eeprom_match(struct device *dev, const void *eeprom_np) +{ +