Re: [RFC PATCH 1/3] eeprom: Add a simple EEPROM framework

2015-02-26 Thread Srinivas Kandagatla
On 26/02/15 13:21, Maxime Ripard wrote: On Thu, Feb 26, 2015 at 09:16:27AM +, Srinivas Kandagatla wrote: I think we are making simple eeprom framework too smart which will break in future. IMHO, Anything on top of eeprom interface that interprets the data should not go into the eeprom fra

Re: [RFC PATCH 1/3] eeprom: Add a simple EEPROM framework

2015-02-26 Thread Maxime Ripard
On Thu, Feb 26, 2015 at 09:16:27AM +, Srinivas Kandagatla wrote: > I think we are making simple eeprom framework too smart which will > break in future. > > IMHO, Anything on top of eeprom interface that interprets the data should > not go into the eeprom framework itself, it can either live s

Re: [RFC PATCH 1/3] eeprom: Add a simple EEPROM framework

2015-02-26 Thread Maxime Ripard
On Tue, Feb 24, 2015 at 05:30:49PM -0800, Stephen Boyd wrote: > On 02/24, Maxime Ripard wrote: > > On Mon, Feb 23, 2015 at 03:11:40PM -0800, Stephen Boyd wrote: > > > >>> I would do something more simple that is just a list of keys and > > > >>> their location like this: > > > >>> > > > >>> device-

Re: [RFC PATCH 1/3] eeprom: Add a simple EEPROM framework

2015-02-26 Thread Srinivas Kandagatla
On 25/02/15 01:30, Stephen Boyd wrote: On 02/24, Maxime Ripard wrote: On Mon, Feb 23, 2015 at 03:11:40PM -0800, Stephen Boyd wrote: I would do something more simple that is just a list of keys and their location like this: device-serial-number = ; key1 = ; key2 = ; I'm sorry, but what's the

Re: [RFC PATCH 1/3] eeprom: Add a simple EEPROM framework

2015-02-24 Thread Stephen Boyd
On 02/24, Maxime Ripard wrote: > On Mon, Feb 23, 2015 at 03:11:40PM -0800, Stephen Boyd wrote: > > >>> I would do something more simple that is just a list of keys and > > >>> their location like this: > > >>> > > >>> device-serial-number = ; > > >>> key1 = ; > > >>> key2 = ; > > >> I'm sorry, but

Re: [RFC PATCH 1/3] eeprom: Add a simple EEPROM framework

2015-02-24 Thread Maxime Ripard
On Mon, Feb 23, 2015 at 03:11:40PM -0800, Stephen Boyd wrote: > >>> I would do something more simple that is just a list of keys and > >>> their location like this: > >>> > >>> device-serial-number = ; > >>> key1 = ; > >>> key2 = ; > >> I'm sorry, but what's the difference? > > It can describe the

Re: [RFC PATCH 1/3] eeprom: Add a simple EEPROM framework

2015-02-23 Thread Srinivas Kandagatla
Thanks Stephen for the comments. On 23/02/15 23:11, Stephen Boyd wrote: On 02/22/15 16:57, Rob Herring wrote: On Sun, Feb 22, 2015 at 8:32 AM, Maxime Ripard wrote: On Fri, Feb 20, 2015 at 04:01:55PM -0600, Rob Herring wrote: [...] += Data consumers = + +Required properties: + +eeproms: Lis

Re: [RFC PATCH 1/3] eeprom: Add a simple EEPROM framework

2015-02-23 Thread Stephen Boyd
On 02/22/15 16:57, Rob Herring wrote: > On Sun, Feb 22, 2015 at 8:32 AM, Maxime Ripard > wrote: >> On Fri, Feb 20, 2015 at 04:01:55PM -0600, Rob Herring wrote: >>> [...] >>> >> += Data consumers = >> + >> +Required properties: >> + >> +eeproms: List of phandle and data cell spe

Re: [RFC PATCH 1/3] eeprom: Add a simple EEPROM framework

2015-02-23 Thread Srinivas Kandagatla
Thankyou for the comments. On 23/02/15 15:04, Mark Brown wrote: On Thu, Feb 19, 2015 at 05:08:28PM +, Srinivas Kandagatla wrote: .../devicetree/bindings/eeprom/eeprom.txt | 48 drivers/Kconfig| 2 + drivers/Makefile

Re: [RFC PATCH 1/3] eeprom: Add a simple EEPROM framework

2015-02-23 Thread Mark Brown
On Thu, Feb 19, 2015 at 05:08:28PM +, Srinivas Kandagatla wrote: > .../devicetree/bindings/eeprom/eeprom.txt | 48 > drivers/Kconfig| 2 + > drivers/Makefile | 1 + > drivers/eeprom/Kconfig

Re: [RFC PATCH 1/3] eeprom: Add a simple EEPROM framework

2015-02-23 Thread Sascha Hauer
On Fri, Feb 20, 2015 at 04:01:55PM -0600, Rob Herring wrote: > On Fri, Feb 20, 2015 at 1:25 PM, Srinivas Kandagatla > wrote: > > > > > > On 20/02/15 17:21, Rob Herring wrote: > >> > >> On Thu, Feb 19, 2015 at 11:08 AM, Srinivas Kandagatla > >> wrote: > >>> > >>> From: Maxime Ripard > >>> > >>> U

Re: [RFC PATCH 1/3] eeprom: Add a simple EEPROM framework

2015-02-22 Thread Rob Herring
On Sun, Feb 22, 2015 at 8:32 AM, Maxime Ripard wrote: > On Fri, Feb 20, 2015 at 04:01:55PM -0600, Rob Herring wrote: >> [...] >> >> >>> += Data consumers = >> >>> + >> >>> +Required properties: >> >>> + >> >>> +eeproms: List of phandle and data cell specifier triplet, one triplet >> >>> +f

Re: [RFC PATCH 1/3] eeprom: Add a simple EEPROM framework

2015-02-22 Thread Maxime Ripard
On Sat, Feb 21, 2015 at 11:31:49AM +, Srinivas Kandagatla wrote: > >I would do something more simple that is just a list of keys and their > >location like this: > > > >device-serial-number = ; > >key1 = ; > >key2 = ; > > > There are pros and cons doing it as list of keys. > > One reason for d

Re: [RFC PATCH 1/3] eeprom: Add a simple EEPROM framework

2015-02-22 Thread Maxime Ripard
On Fri, Feb 20, 2015 at 04:01:55PM -0600, Rob Herring wrote: > [...] > > >>> += Data consumers = > >>> + > >>> +Required properties: > >>> + > >>> +eeproms: List of phandle and data cell specifier triplet, one triplet > >>> +for each data cell the device might be interested in. The > >>> +

Re: [RFC PATCH 1/3] eeprom: Add a simple EEPROM framework

2015-02-21 Thread Srinivas Kandagatla
On 20/02/15 22:01, Rob Herring wrote: On Fri, Feb 20, 2015 at 1:25 PM, Srinivas Kandagatla wrote: On 20/02/15 17:21, Rob Herring wrote: On Thu, Feb 19, 2015 at 11:08 AM, Srinivas Kandagatla wrote: From: Maxime Ripard Up until now, EEPROM drivers were stored in drivers/misc, where the

Re: [RFC PATCH 1/3] eeprom: Add a simple EEPROM framework

2015-02-20 Thread Rob Herring
On Fri, Feb 20, 2015 at 1:25 PM, Srinivas Kandagatla wrote: > > > On 20/02/15 17:21, Rob Herring wrote: >> >> On Thu, Feb 19, 2015 at 11:08 AM, Srinivas Kandagatla >> wrote: >>> >>> From: Maxime Ripard >>> >>> Up until now, EEPROM drivers were stored in drivers/misc, where they all >>> had to >>

Re: [RFC PATCH 1/3] eeprom: Add a simple EEPROM framework

2015-02-20 Thread Srinivas Kandagatla
On 20/02/15 17:21, Rob Herring wrote: On Thu, Feb 19, 2015 at 11:08 AM, Srinivas Kandagatla wrote: From: Maxime Ripard Up until now, EEPROM drivers were stored in drivers/misc, where they all had to duplicate pretty much the same code to register a sysfs file, allow in-kernel users to acces

Re: [RFC PATCH 1/3] eeprom: Add a simple EEPROM framework

2015-02-20 Thread Srinivas Kandagatla
On 20/02/15 17:46, Russell King - ARM Linux wrote: On Thu, Feb 19, 2015 at 05:08:28PM +, Srinivas Kandagatla wrote: +static struct class eeprom_class = { + .name = "eeprom", + .dev_groups = eeprom_dev_groups, +}; + +int eeprom_register(struct eeprom_device *eeprom

Re: [RFC PATCH 1/3] eeprom: Add a simple EEPROM framework

2015-02-20 Thread Russell King - ARM Linux
On Thu, Feb 19, 2015 at 05:08:28PM +, Srinivas Kandagatla wrote: > +static struct class eeprom_class = { > + .name = "eeprom", > + .dev_groups = eeprom_dev_groups, > +}; > + > +int eeprom_register(struct eeprom_device *eeprom) > +{ > + int rval; > + > + if (!eeprom

Re: [RFC PATCH 1/3] eeprom: Add a simple EEPROM framework

2015-02-20 Thread Rob Herring
On Thu, Feb 19, 2015 at 11:08 AM, Srinivas Kandagatla wrote: > From: Maxime Ripard > > Up until now, EEPROM drivers were stored in drivers/misc, where they all had > to > duplicate pretty much the same code to register a sysfs file, allow in-kernel > users to access the content of the devices th

Re: [RFC PATCH 1/3] eeprom: Add a simple EEPROM framework

2015-02-20 Thread Srinivas Kandagatla
On 20/02/15 08:14, Srinivas Kandagatla wrote: Doesn't this need some sort of select REGMAP somewhere? May be depends REGMAP would be good. You are right, just realized that it should be "select REGMAP" and for QFPROM it should be "select REGMAP_MMIO" --srini -- To unsubscribe from this lis

Re: [RFC PATCH 1/3] eeprom: Add a simple EEPROM framework

2015-02-20 Thread Srinivas Kandagatla
Thanks Andrew for your comments, On 19/02/15 18:12, Andrew Lunn wrote: + +Required properties: + +eeproms: List of phandle and data cell specifier triplet, one triplet +for each data cell the device might be interested in. The +triplet consists of the phandle to the eeprom provid

Re: [RFC PATCH 1/3] eeprom: Add a simple EEPROM framework

2015-02-20 Thread Srinivas Kandagatla
On 20/02/15 02:36, Stephen Boyd wrote: On 02/19/15 09:08, Srinivas Kandagatla wrote: diff --git a/drivers/Kconfig b/drivers/Kconfig index c70d6e4..d7afc82 100644 --- a/drivers/Kconfig +++ b/drivers/Kconfig @@ -184,4 +184,6 @@ source "drivers/thunderbolt/Kconfig" source "drivers/android/Kcon

Re: [RFC PATCH 1/3] eeprom: Add a simple EEPROM framework

2015-02-19 Thread Stephen Boyd
On 02/19/15 09:08, Srinivas Kandagatla wrote: > diff --git a/drivers/Kconfig b/drivers/Kconfig > index c70d6e4..d7afc82 100644 > --- a/drivers/Kconfig > +++ b/drivers/Kconfig > @@ -184,4 +184,6 @@ source "drivers/thunderbolt/Kconfig" > > source "drivers/android/Kconfig" > > +source "drivers/ee

Re: [RFC PATCH 1/3] eeprom: Add a simple EEPROM framework

2015-02-19 Thread Andrew Lunn
On Thu, Feb 19, 2015 at 05:08:28PM +, Srinivas Kandagatla wrote: > From: Maxime Ripard > > Up until now, EEPROM drivers were stored in drivers/misc, where they all had > to > duplicate pretty much the same code to register a sysfs file, allow in-kernel > users to access the content of the de

[RFC PATCH 1/3] eeprom: Add a simple EEPROM framework

2015-02-19 Thread Srinivas Kandagatla
From: Maxime Ripard Up until now, EEPROM drivers were stored in drivers/misc, where they all had to duplicate pretty much the same code to register a sysfs file, allow in-kernel users to access the content of the devices they were driving, etc. This was also a problem as far as other in-kernel u