diff mbox series

[RESEND,v4,1/2] dt-bindings: at24: Add address-width property

Message ID 1530522740-2798-2-git-send-email-alanx.chiang@intel.com
State Superseded
Delegated to: Bartosz Golaszewski
Headers show
Series Add a property in at24.c | expand

Commit Message

Chiang, AlanX July 2, 2018, 9:12 a.m. UTC
From: Alan Chiang <alanx.chiang@intel.com>

The AT24 series chips use 8-bit address by default. If some
chips would like to support more than 8 bits, the at24 driver
should be added the compatible field for specfic chips.

Provide a flexible way to determine the addressing bits through
address-width in this patch.

Signed-off-by: Alan Chiang <alanx.chiang@intel.com>
Signed-off-by: Andy Yeh <andy.yeh@intel.com>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>

---
since v1:
-- Remove the address-width field in the example.
since v2:
-- Remove redundant space.
since v3:
-- Add Acked-by.

---
 Documentation/devicetree/bindings/eeprom/at24.txt | 2 ++
 1 file changed, 2 insertions(+)

Comments

Robert P. J. Day July 5, 2018, 8:24 p.m. UTC | #1
On Thu, 5 Jul 2018, Rob Herring wrote:

> On Mon, Jul 02, 2018 at 05:12:19PM +0800, alanx.chiang@intel.com wrote:
> > From: Alan Chiang <alanx.chiang@intel.com>
> >
> > The AT24 series chips use 8-bit address by default. If some
> > chips would like to support more than 8 bits, the at24 driver
> > should be added the compatible field for specfic chips.
> >
> > Provide a flexible way to determine the addressing bits through
> > address-width in this patch.
> >
> > Signed-off-by: Alan Chiang <alanx.chiang@intel.com>
> > Signed-off-by: Andy Yeh <andy.yeh@intel.com>
> > Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
> >
> > ---
> > since v1:
> > -- Remove the address-width field in the example.
> > since v2:
> > -- Remove redundant space.
> > since v3:
> > -- Add Acked-by.
> >
> > ---
> >  Documentation/devicetree/bindings/eeprom/at24.txt | 2 ++
> >  1 file changed, 2 insertions(+)
>
> Reviewed-by: Rob Herring <robh@kernel.org>

  "... should be added the compatible field ..."??

rday
Rob Herring July 5, 2018, 9:22 p.m. UTC | #2
On Mon, Jul 02, 2018 at 05:12:19PM +0800, alanx.chiang@intel.com wrote:
> From: Alan Chiang <alanx.chiang@intel.com>
> 
> The AT24 series chips use 8-bit address by default. If some
> chips would like to support more than 8 bits, the at24 driver
> should be added the compatible field for specfic chips.
> 
> Provide a flexible way to determine the addressing bits through
> address-width in this patch.
> 
> Signed-off-by: Alan Chiang <alanx.chiang@intel.com>
> Signed-off-by: Andy Yeh <andy.yeh@intel.com>
> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
> 
> ---
> since v1:
> -- Remove the address-width field in the example.
> since v2:
> -- Remove redundant space.
> since v3:
> -- Add Acked-by.
> 
> ---
>  Documentation/devicetree/bindings/eeprom/at24.txt | 2 ++
>  1 file changed, 2 insertions(+)

Reviewed-by: Rob Herring <robh@kernel.org>
Chiang, AlanX July 9, 2018, 3:12 a.m. UTC | #3
Hi Robert,

> -----Original Message-----
> From: Robert P. J. Day [mailto:rpjday@crashcourse.ca]
> Sent: Friday, July 6, 2018 4:24 AM
> To: Rob Herring <robh@kernel.org>
> Cc: Chiang, AlanX <alanx.chiang@intel.com>; linux-i2c@vger.kernel.org; Yeh,
> Andy <andy.yeh@intel.com>; sakari.ailus@linux.intel.com;
> andriy.shevchenko@linux.intel.com; Shevchenko, Andriy
> <andriy.shevchenko@intel.com>; Mani, Rajmohan
> <rajmohan.mani@intel.com>; andy.shevchenko@gmail.com;
> tfiga@chromium.org; jcliang@chromium.org; brgl@bgdev.pl;
> mark.rutland@arm.com; arnd@arndb.de; gregkh@linuxfoundation.org;
> linux-kernel@vger.kernel.org; devicetree@vger.kernel.org
> Subject: Re: [RESEND PATCH v4 1/2] dt-bindings: at24: Add address-width
> property
> 
> On Thu, 5 Jul 2018, Rob Herring wrote:
> 
> > On Mon, Jul 02, 2018 at 05:12:19PM +0800, alanx.chiang@intel.com wrote:
> > > From: Alan Chiang <alanx.chiang@intel.com>
> > >
> > > The AT24 series chips use 8-bit address by default. If some chips
> > > would like to support more than 8 bits, the at24 driver should be
> > > added the compatible field for specfic chips.
> > >
> > > Provide a flexible way to determine the addressing bits through
> > > address-width in this patch.
> > >
> > > Signed-off-by: Alan Chiang <alanx.chiang@intel.com>
> > > Signed-off-by: Andy Yeh <andy.yeh@intel.com>
> > > Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
> > >
> > > ---
> > > since v1:
> > > -- Remove the address-width field in the example.
> > > since v2:
> > > -- Remove redundant space.
> > > since v3:
> > > -- Add Acked-by.
> > >
> > > ---
> > >  Documentation/devicetree/bindings/eeprom/at24.txt | 2 ++
> > >  1 file changed, 2 insertions(+)
> >
> > Reviewed-by: Rob Herring <robh@kernel.org>
> 
>   "... should be added the compatible field ..."??
> 
> rday

Maybe I should modify the sentence as below that makes it clear.
"The compatible field should be added in the at24.c for specific chips.".

I quote Andy's words in patch v2:
"The current at24 driver has no address width support, thus, reusing same
(allocated) IDs (non-DT case) is hard."

This is the reason that I submitted the patch.

Thanks

> 
> --
> 
> ==========================================================
> ==============
> Robert P. J. Day                                 Ottawa, Ontario, CANADA
>                   http://crashcourse.ca/dokuwiki
> 
> Twitter:                                       http://twitter.com/rpjday
> LinkedIn:                               http://ca.linkedin.com/in/rpjday
> ==========================================================
> ==============
Bartosz Golaszewski July 9, 2018, 8:52 a.m. UTC | #4
2018-07-09 5:12 GMT+02:00 Chiang, AlanX <alanx.chiang@intel.com>:
> Hi Robert,
>
>> -----Original Message-----
>> From: Robert P. J. Day [mailto:rpjday@crashcourse.ca]
>> Sent: Friday, July 6, 2018 4:24 AM
>> To: Rob Herring <robh@kernel.org>
>> Cc: Chiang, AlanX <alanx.chiang@intel.com>; linux-i2c@vger.kernel.org; Yeh,
>> Andy <andy.yeh@intel.com>; sakari.ailus@linux.intel.com;
>> andriy.shevchenko@linux.intel.com; Shevchenko, Andriy
>> <andriy.shevchenko@intel.com>; Mani, Rajmohan
>> <rajmohan.mani@intel.com>; andy.shevchenko@gmail.com;
>> tfiga@chromium.org; jcliang@chromium.org; brgl@bgdev.pl;
>> mark.rutland@arm.com; arnd@arndb.de; gregkh@linuxfoundation.org;
>> linux-kernel@vger.kernel.org; devicetree@vger.kernel.org
>> Subject: Re: [RESEND PATCH v4 1/2] dt-bindings: at24: Add address-width
>> property
>>
>> On Thu, 5 Jul 2018, Rob Herring wrote:
>>
>> > On Mon, Jul 02, 2018 at 05:12:19PM +0800, alanx.chiang@intel.com wrote:
>> > > From: Alan Chiang <alanx.chiang@intel.com>
>> > >
>> > > The AT24 series chips use 8-bit address by default. If some chips
>> > > would like to support more than 8 bits, the at24 driver should be
>> > > added the compatible field for specfic chips.
>> > >
>> > > Provide a flexible way to determine the addressing bits through
>> > > address-width in this patch.
>> > >
>> > > Signed-off-by: Alan Chiang <alanx.chiang@intel.com>
>> > > Signed-off-by: Andy Yeh <andy.yeh@intel.com>
>> > > Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
>> > >
>> > > ---
>> > > since v1:
>> > > -- Remove the address-width field in the example.
>> > > since v2:
>> > > -- Remove redundant space.
>> > > since v3:
>> > > -- Add Acked-by.
>> > >
>> > > ---
>> > >  Documentation/devicetree/bindings/eeprom/at24.txt | 2 ++
>> > >  1 file changed, 2 insertions(+)
>> >
>> > Reviewed-by: Rob Herring <robh@kernel.org>
>>
>>   "... should be added the compatible field ..."??
>>
>> rday
>
> Maybe I should modify the sentence as below that makes it clear.
> "The compatible field should be added in the at24.c for specific chips.".
>
> I quote Andy's words in patch v2:
> "The current at24 driver has no address width support, thus, reusing same
> (allocated) IDs (non-DT case) is hard."
>
> This is the reason that I submitted the patch.
>
> Thanks
>

Make it something like:

Currently the only way to use a variant of a supported model with
a different address width is to define a new compatible string and the
corresponding chip data structure.

Provide a flexible way to specify the size of the address pointer by
defining a new property: address-width.

Best regards,
Bartosz Golaszewski

>>
>> --
>>
>> ==========================================================
>> ==============
>> Robert P. J. Day                                 Ottawa, Ontario, CANADA
>>                   http://crashcourse.ca/dokuwiki
>>
>> Twitter:                                       http://twitter.com/rpjday
>> LinkedIn:                               http://ca.linkedin.com/in/rpjday
>> ==========================================================
>> ==============
Bartosz Golaszewski July 17, 2018, 8:01 a.m. UTC | #5
2018-07-09 10:52 GMT+02:00 Bartosz Golaszewski <brgl@bgdev.pl>:
> 2018-07-09 5:12 GMT+02:00 Chiang, AlanX <alanx.chiang@intel.com>:
>> Hi Robert,
>>
>>> -----Original Message-----
>>> From: Robert P. J. Day [mailto:rpjday@crashcourse.ca]
>>> Sent: Friday, July 6, 2018 4:24 AM
>>> To: Rob Herring <robh@kernel.org>
>>> Cc: Chiang, AlanX <alanx.chiang@intel.com>; linux-i2c@vger.kernel.org; Yeh,
>>> Andy <andy.yeh@intel.com>; sakari.ailus@linux.intel.com;
>>> andriy.shevchenko@linux.intel.com; Shevchenko, Andriy
>>> <andriy.shevchenko@intel.com>; Mani, Rajmohan
>>> <rajmohan.mani@intel.com>; andy.shevchenko@gmail.com;
>>> tfiga@chromium.org; jcliang@chromium.org; brgl@bgdev.pl;
>>> mark.rutland@arm.com; arnd@arndb.de; gregkh@linuxfoundation.org;
>>> linux-kernel@vger.kernel.org; devicetree@vger.kernel.org
>>> Subject: Re: [RESEND PATCH v4 1/2] dt-bindings: at24: Add address-width
>>> property
>>>
>>> On Thu, 5 Jul 2018, Rob Herring wrote:
>>>
>>> > On Mon, Jul 02, 2018 at 05:12:19PM +0800, alanx.chiang@intel.com wrote:
>>> > > From: Alan Chiang <alanx.chiang@intel.com>
>>> > >
>>> > > The AT24 series chips use 8-bit address by default. If some chips
>>> > > would like to support more than 8 bits, the at24 driver should be
>>> > > added the compatible field for specfic chips.
>>> > >
>>> > > Provide a flexible way to determine the addressing bits through
>>> > > address-width in this patch.
>>> > >
>>> > > Signed-off-by: Alan Chiang <alanx.chiang@intel.com>
>>> > > Signed-off-by: Andy Yeh <andy.yeh@intel.com>
>>> > > Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
>>> > >
>>> > > ---
>>> > > since v1:
>>> > > -- Remove the address-width field in the example.
>>> > > since v2:
>>> > > -- Remove redundant space.
>>> > > since v3:
>>> > > -- Add Acked-by.
>>> > >
>>> > > ---
>>> > >  Documentation/devicetree/bindings/eeprom/at24.txt | 2 ++
>>> > >  1 file changed, 2 insertions(+)
>>> >
>>> > Reviewed-by: Rob Herring <robh@kernel.org>
>>>
>>>   "... should be added the compatible field ..."??
>>>
>>> rday
>>
>> Maybe I should modify the sentence as below that makes it clear.
>> "The compatible field should be added in the at24.c for specific chips.".
>>
>> I quote Andy's words in patch v2:
>> "The current at24 driver has no address width support, thus, reusing same
>> (allocated) IDs (non-DT case) is hard."
>>
>> This is the reason that I submitted the patch.
>>
>> Thanks
>>
>
> Make it something like:
>
> Currently the only way to use a variant of a supported model with
> a different address width is to define a new compatible string and the
> corresponding chip data structure.
>
> Provide a flexible way to specify the size of the address pointer by
> defining a new property: address-width.
>
> Best regards,
> Bartosz Golaszewski
>
>>>
>>> --
>>>
>>> ==========================================================
>>> ==============
>>> Robert P. J. Day                                 Ottawa, Ontario, CANADA
>>>                   http://crashcourse.ca/dokuwiki
>>>
>>> Twitter:                                       http://twitter.com/rpjday
>>> LinkedIn:                               http://ca.linkedin.com/in/rpjday
>>> ==========================================================
>>> ==============

Hi,

I will soon be sending my pull request to Wolfram, so if you still
want that applied for 4.19 - please resend with the commit message
fixed.

Thanks,
Bart
Sakari Ailus July 24, 2018, 11:07 a.m. UTC | #6
On Tue, Jul 17, 2018 at 10:01:17AM +0200, Bartosz Golaszewski wrote:
> I will soon be sending my pull request to Wolfram, so if you still
> want that applied for 4.19 - please resend with the commit message
> fixed.

Alan?

Not sure whether it's too late for 4.19 now though.
Bartosz Golaszewski July 24, 2018, 2:10 p.m. UTC | #7
2018-07-24 13:07 GMT+02:00 sakari.ailus@linux.intel.com
<sakari.ailus@linux.intel.com>:
> On Tue, Jul 17, 2018 at 10:01:17AM +0200, Bartosz Golaszewski wrote:
>> I will soon be sending my pull request to Wolfram, so if you still
>> want that applied for 4.19 - please resend with the commit message
>> fixed.
>
> Alan?
>
> Not sure whether it's too late for 4.19 now though.
>
> --
> Sakari Ailus
> sakari.ailus@linux.intel.com

I may still be ok until tomorrow if Alan resend it.

Bart
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/eeprom/at24.txt b/Documentation/devicetree/bindings/eeprom/at24.txt
index 61d833a..aededdb 100644
--- a/Documentation/devicetree/bindings/eeprom/at24.txt
+++ b/Documentation/devicetree/bindings/eeprom/at24.txt
@@ -72,6 +72,8 @@  Optional properties:
 
   - wp-gpios: GPIO to which the write-protect pin of the chip is connected.
 
+  - address-width: number of address bits (one of 8, 16).
+
 Example:
 
 eeprom@52 {