Re: [PATCH v3 1/2] dt-bindings: at24: Add address-width property
From: Sakari Ailus
Date: Wed Jun 27 2018 - 05:40:27 EST
On Wed, Jun 27, 2018 at 10:19:38AM +0200, Bartosz Golaszewski wrote:
> 2018-06-27 7:46 GMT+02:00 <alanx.chiang@xxxxxxxxx>:
> > From: Alan Chiang <alanx.chiang@xxxxxxxxx>
> >
> > 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@xxxxxxxxx>
> > Signed-off-by: Andy Yeh <andy.yeh@xxxxxxxxx>
> >
> > ---
> > since v1:
> > -- Remove the address-width field in the example.
> > since v2:
> > -- Remove redundant space.
> >
> > ---
> > Documentation/devicetree/bindings/eeprom/at24.txt | 2 ++
> > 1 file changed, 2 insertions(+)
> >
> > 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 {
> > --
> > 2.7.4
> >
>
> Rob,
>
> we only have two possibilities here and the default is 8 bits.
>
> What do you think about introducing a boolean property here called:
> 'address-width-16' instead of an integer?
I'd have thought the same, but it turns out address-width is already being
used by the at25 bindings:
Documentation/devicetree/bindings/eeprom/at25.txt
--
Sakari Ailus
sakari.ailus@xxxxxxxxxxxxxxx