* [PATCH v4 1/4] dt-bindings: at24: consistently document the compatible property
2017-12-28 10:49 [PATCH v4 0/4] eeprom: at24: device tree support fixes Bartosz Golaszewski
@ 2017-12-28 10:49 ` Bartosz Golaszewski
2017-12-28 11:57 ` Andy Shevchenko
2018-01-02 16:00 ` Rob Herring
2017-12-28 10:49 ` [PATCH v4 2/4] dt-bindings: at24: fix formatting and style Bartosz Golaszewski
` (2 subsequent siblings)
3 siblings, 2 replies; 11+ messages in thread
From: Bartosz Golaszewski @ 2017-12-28 10:49 UTC (permalink / raw)
To: Andy Shevchenko, Rob Herring, Mark Rutland,
Javier Martinez Canillas, David Lechner, Divagar Mohandass,
Peter Rosin
Cc: linux-i2c, devicetree, linux-kernel, Bartosz Golaszewski
Current description of the compatible property for at24 is quite vague.
State explicitly that any "<manufacturer>,<model>" pair is accepted as
long as a correct fallback is used for non-atmel chips.
Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
---
Documentation/devicetree/bindings/eeprom/at24.txt | 58 ++++++++++++++---------
1 file changed, 36 insertions(+), 22 deletions(-)
diff --git a/Documentation/devicetree/bindings/eeprom/at24.txt b/Documentation/devicetree/bindings/eeprom/at24.txt
index cbc80e194ac6..0c8e1341908f 100644
--- a/Documentation/devicetree/bindings/eeprom/at24.txt
+++ b/Documentation/devicetree/bindings/eeprom/at24.txt
@@ -2,28 +2,42 @@ EEPROMs (I2C)
Required properties:
- - compatible : should be "<manufacturer>,<type>", like these:
-
- "atmel,24c00", "atmel,24c01", "atmel,24c02", "atmel,24c04",
- "atmel,24c08", "atmel,24c16", "atmel,24c32", "atmel,24c64",
- "atmel,24c128", "atmel,24c256", "atmel,24c512", "atmel,24c1024"
-
- "catalyst,24c32"
-
- "microchip,24c128"
-
- "ramtron,24c64"
-
- "renesas,r1ex24002"
-
- The following manufacturers values have been deprecated:
- "at", "at24"
-
- If there is no specific driver for <manufacturer>, a generic
- device with <type> and manufacturer "atmel" should be used.
- Possible types are:
- "24c00", "24c01", "24c02", "24c04", "24c08", "24c16", "24c32", "24c64",
- "24c128", "24c256", "24c512", "24c1024", "spd"
+ - compatible: Must be a "<manufacturer>,<model>" pair. The following <model>
+ values are supported (assuming "atmel" as manufacturer):
+
+ "atmel,24c00",
+ "atmel,24c01",
+ "atmel,24c02",
+ "atmel,spd",
+ "atmel,24c04",
+ "atmel,24c08",
+ "atmel,24c16",
+ "atmel,24c32",
+ "atmel,24c64",
+ "atmel,24c128",
+ "atmel,24c256",
+ "atmel,24c512",
+ "atmel,24c1024",
+
+ If <manufacturer> is not "atmel", then a fallback must be used
+ with the same <type> and "atmel" as manufacturer.
+
+ Example:
+ compatible = "microchip,24c128", "atmel,24c128";
+
+ Supported manufacturers are:
+
+ "catalyst",
+ "microchip",
+ "ramtron",
+ "renesas",
+ "nxp",
+ "st",
+
+ Some vendors use different model names for chips which are just
+ variants of the above. Known such exceptions are listed below:
+
+ "renesas,r1ex24002" - the fallback is "atmel,24c02"
- reg : the I2C address of the EEPROM
--
2.15.1
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH v4 1/4] dt-bindings: at24: consistently document the compatible property
2017-12-28 10:49 ` [PATCH v4 1/4] dt-bindings: at24: consistently document the compatible property Bartosz Golaszewski
@ 2017-12-28 11:57 ` Andy Shevchenko
2018-01-02 16:00 ` Rob Herring
1 sibling, 0 replies; 11+ messages in thread
From: Andy Shevchenko @ 2017-12-28 11:57 UTC (permalink / raw)
To: Bartosz Golaszewski
Cc: Rob Herring, Mark Rutland, Javier Martinez Canillas,
David Lechner, Divagar Mohandass, Peter Rosin, linux-i2c,
devicetree, Linux Kernel Mailing List
On Thu, Dec 28, 2017 at 12:49 PM, Bartosz Golaszewski <brgl@bgdev.pl> wrote:
> Current description of the compatible property for at24 is quite vague.
>
> State explicitly that any "<manufacturer>,<model>" pair is accepted as
> long as a correct fallback is used for non-atmel chips.
> - "atmel,24c00", "atmel,24c01", "atmel,24c02", "atmel,24c04",
> - "atmel,24c08", "atmel,24c16", "atmel,24c32", "atmel,24c64",
> - "atmel,24c128", "atmel,24c256", "atmel,24c512", "atmel,24c1024"
> + "atmel,24c00",
> + "atmel,24c01",
> + "atmel,24c02",
> + "atmel,spd",
> + "atmel,24c04",
Just to whom it may concern, I still don't like the ordering.
By name is better to read and catch up the (un)supported chips.
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v4 1/4] dt-bindings: at24: consistently document the compatible property
2017-12-28 10:49 ` [PATCH v4 1/4] dt-bindings: at24: consistently document the compatible property Bartosz Golaszewski
2017-12-28 11:57 ` Andy Shevchenko
@ 2018-01-02 16:00 ` Rob Herring
1 sibling, 0 replies; 11+ messages in thread
From: Rob Herring @ 2018-01-02 16:00 UTC (permalink / raw)
To: Bartosz Golaszewski
Cc: Andy Shevchenko, Mark Rutland, Javier Martinez Canillas,
David Lechner, Divagar Mohandass, Peter Rosin, linux-i2c,
devicetree, linux-kernel
On Thu, Dec 28, 2017 at 11:49:10AM +0100, Bartosz Golaszewski wrote:
> Current description of the compatible property for at24 is quite vague.
>
> State explicitly that any "<manufacturer>,<model>" pair is accepted as
> long as a correct fallback is used for non-atmel chips.
>
> Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
> ---
> Documentation/devicetree/bindings/eeprom/at24.txt | 58 ++++++++++++++---------
> 1 file changed, 36 insertions(+), 22 deletions(-)
Reviewed-by: Rob Herring <robh@kernel.org>
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH v4 2/4] dt-bindings: at24: fix formatting and style
2017-12-28 10:49 [PATCH v4 0/4] eeprom: at24: device tree support fixes Bartosz Golaszewski
2017-12-28 10:49 ` [PATCH v4 1/4] dt-bindings: at24: consistently document the compatible property Bartosz Golaszewski
@ 2017-12-28 10:49 ` Bartosz Golaszewski
2018-01-02 16:01 ` Rob Herring
2017-12-28 10:49 ` Bartosz Golaszewski
2017-12-28 10:49 ` [PATCH v4 4/4] eeprom: at24: extend the list of chips supported in DT Bartosz Golaszewski
3 siblings, 1 reply; 11+ messages in thread
From: Bartosz Golaszewski @ 2017-12-28 10:49 UTC (permalink / raw)
To: Andy Shevchenko, Rob Herring, Mark Rutland,
Javier Martinez Canillas, David Lechner, Divagar Mohandass,
Peter Rosin
Cc: linux-i2c, devicetree, linux-kernel, Bartosz Golaszewski
Make formatting and style consistent for the entire document.
This patch doesn't change the content of the binding.
Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
---
Documentation/devicetree/bindings/eeprom/at24.txt | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/Documentation/devicetree/bindings/eeprom/at24.txt b/Documentation/devicetree/bindings/eeprom/at24.txt
index 0c8e1341908f..5e0dfd25b1e3 100644
--- a/Documentation/devicetree/bindings/eeprom/at24.txt
+++ b/Documentation/devicetree/bindings/eeprom/at24.txt
@@ -39,23 +39,23 @@ Required properties:
"renesas,r1ex24002" - the fallback is "atmel,24c02"
- - reg : the I2C address of the EEPROM
+ - reg: The I2C address of the EEPROM.
Optional properties:
- - pagesize : the length of the pagesize for writing. Please consult the
- manual of your device, that value varies a lot. A wrong value
- may result in data loss! If not specified, a safety value of
- '1' is used which will be very slow.
+ - pagesize: The length of the pagesize for writing. Please consult the
+ manual of your device, that value varies a lot. A wrong value
+ may result in data loss! If not specified, a safety value of
+ '1' is used which will be very slow.
- - read-only: this parameterless property disables writes to the eeprom
+ - read-only: This parameterless property disables writes to the eeprom.
- - size: total eeprom size in bytes
+ - size: Total eeprom size in bytes.
- - no-read-rollover:
- This parameterless property indicates that the multi-address
- eeprom does not automatically roll over reads to the next
- slave address. Please consult the manual of your device.
+ - no-read-rollover: This parameterless property indicates that the
+ multi-address eeprom does not automatically roll over
+ reads to the next slave address. Please consult the
+ manual of your device.
- wp-gpios: GPIO to which the write-protect pin of the chip is connected.
--
2.15.1
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH v4 2/4] dt-bindings: at24: fix formatting and style
2017-12-28 10:49 ` [PATCH v4 2/4] dt-bindings: at24: fix formatting and style Bartosz Golaszewski
@ 2018-01-02 16:01 ` Rob Herring
0 siblings, 0 replies; 11+ messages in thread
From: Rob Herring @ 2018-01-02 16:01 UTC (permalink / raw)
To: Bartosz Golaszewski
Cc: Andy Shevchenko, Mark Rutland, Javier Martinez Canillas,
David Lechner, Divagar Mohandass, Peter Rosin, linux-i2c,
devicetree, linux-kernel
On Thu, Dec 28, 2017 at 11:49:11AM +0100, Bartosz Golaszewski wrote:
> Make formatting and style consistent for the entire document.
>
> This patch doesn't change the content of the binding.
>
> Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
> Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
> ---
> Documentation/devicetree/bindings/eeprom/at24.txt | 22 +++++++++++-----------
> 1 file changed, 11 insertions(+), 11 deletions(-)
Reviewed-by: Rob Herring <robh@kernel.org>
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH v4 3/4] dt-bindings: at24: extend the list of supported chips
@ 2017-12-28 10:49 ` Bartosz Golaszewski
0 siblings, 0 replies; 11+ messages in thread
From: Bartosz Golaszewski @ 2017-12-28 10:49 UTC (permalink / raw)
To: Andy Shevchenko, Rob Herring, Mark Rutland,
Javier Martinez Canillas, David Lechner, Divagar Mohandass,
Peter Rosin
Cc: linux-i2c, devicetree, linux-kernel, Bartosz Golaszewski
Add other variants of at24 EEPROMs we support in the driver to the
list of allowed compatible fallbacks.
Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
---
Documentation/devicetree/bindings/eeprom/at24.txt | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/Documentation/devicetree/bindings/eeprom/at24.txt b/Documentation/devicetree/bindings/eeprom/at24.txt
index 5e0dfd25b1e3..6fc05e24fa7f 100644
--- a/Documentation/devicetree/bindings/eeprom/at24.txt
+++ b/Documentation/devicetree/bindings/eeprom/at24.txt
@@ -7,13 +7,22 @@ Required properties:
"atmel,24c00",
"atmel,24c01",
+ "atmel,24cs01",
"atmel,24c02",
+ "atmel,24cs02",
+ "atmel,24mac402",
+ "atmel,24mac602",
"atmel,spd",
"atmel,24c04",
+ "atmel,24cs04",
"atmel,24c08",
+ "atmel,24cs08",
"atmel,24c16",
+ "atmel,24cs16",
"atmel,24c32",
+ "atmel,24cs32",
"atmel,24c64",
+ "atmel,24cs64",
"atmel,24c128",
"atmel,24c256",
"atmel,24c512",
--
2.15.1
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH v4 3/4] dt-bindings: at24: extend the list of supported chips
@ 2017-12-28 10:49 ` Bartosz Golaszewski
0 siblings, 0 replies; 11+ messages in thread
From: Bartosz Golaszewski @ 2017-12-28 10:49 UTC (permalink / raw)
To: Andy Shevchenko, Rob Herring, Mark Rutland,
Javier Martinez Canillas, David Lechner, Divagar Mohandass,
Peter Rosin
Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA,
devicetree-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA, Bartosz Golaszewski
Add other variants of at24 EEPROMs we support in the driver to the
list of allowed compatible fallbacks.
Signed-off-by: Bartosz Golaszewski <brgl-ARrdPY/1zhM@public.gmane.org>
Reviewed-by: Javier Martinez Canillas <javierm-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
---
Documentation/devicetree/bindings/eeprom/at24.txt | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/Documentation/devicetree/bindings/eeprom/at24.txt b/Documentation/devicetree/bindings/eeprom/at24.txt
index 5e0dfd25b1e3..6fc05e24fa7f 100644
--- a/Documentation/devicetree/bindings/eeprom/at24.txt
+++ b/Documentation/devicetree/bindings/eeprom/at24.txt
@@ -7,13 +7,22 @@ Required properties:
"atmel,24c00",
"atmel,24c01",
+ "atmel,24cs01",
"atmel,24c02",
+ "atmel,24cs02",
+ "atmel,24mac402",
+ "atmel,24mac602",
"atmel,spd",
"atmel,24c04",
+ "atmel,24cs04",
"atmel,24c08",
+ "atmel,24cs08",
"atmel,24c16",
+ "atmel,24cs16",
"atmel,24c32",
+ "atmel,24cs32",
"atmel,24c64",
+ "atmel,24cs64",
"atmel,24c128",
"atmel,24c256",
"atmel,24c512",
--
2.15.1
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH v4 3/4] dt-bindings: at24: extend the list of supported chips
@ 2018-01-02 16:03 ` Rob Herring
0 siblings, 0 replies; 11+ messages in thread
From: Rob Herring @ 2018-01-02 16:03 UTC (permalink / raw)
To: Bartosz Golaszewski
Cc: Andy Shevchenko, Mark Rutland, Javier Martinez Canillas,
David Lechner, Divagar Mohandass, Peter Rosin, linux-i2c,
devicetree, linux-kernel
On Thu, Dec 28, 2017 at 11:49:12AM +0100, Bartosz Golaszewski wrote:
> Add other variants of at24 EEPROMs we support in the driver to the
> list of allowed compatible fallbacks.
>
> Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
> Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
> ---
> Documentation/devicetree/bindings/eeprom/at24.txt | 9 +++++++++
> 1 file changed, 9 insertions(+)
Reviewed-by: Rob Herring <robh@kernel.org>
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v4 3/4] dt-bindings: at24: extend the list of supported chips
@ 2018-01-02 16:03 ` Rob Herring
0 siblings, 0 replies; 11+ messages in thread
From: Rob Herring @ 2018-01-02 16:03 UTC (permalink / raw)
To: Bartosz Golaszewski
Cc: Andy Shevchenko, Mark Rutland, Javier Martinez Canillas,
David Lechner, Divagar Mohandass, Peter Rosin,
linux-i2c-u79uwXL29TY76Z2rM5mHXA,
devicetree-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA
On Thu, Dec 28, 2017 at 11:49:12AM +0100, Bartosz Golaszewski wrote:
> Add other variants of at24 EEPROMs we support in the driver to the
> list of allowed compatible fallbacks.
>
> Signed-off-by: Bartosz Golaszewski <brgl-ARrdPY/1zhM@public.gmane.org>
> Reviewed-by: Javier Martinez Canillas <javierm-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
> ---
> Documentation/devicetree/bindings/eeprom/at24.txt | 9 +++++++++
> 1 file changed, 9 insertions(+)
Reviewed-by: Rob Herring <robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH v4 4/4] eeprom: at24: extend the list of chips supported in DT
2017-12-28 10:49 [PATCH v4 0/4] eeprom: at24: device tree support fixes Bartosz Golaszewski
` (2 preceding siblings ...)
2017-12-28 10:49 ` Bartosz Golaszewski
@ 2017-12-28 10:49 ` Bartosz Golaszewski
3 siblings, 0 replies; 11+ messages in thread
From: Bartosz Golaszewski @ 2017-12-28 10:49 UTC (permalink / raw)
To: Andy Shevchenko, Rob Herring, Mark Rutland,
Javier Martinez Canillas, David Lechner, Divagar Mohandass,
Peter Rosin
Cc: linux-i2c, devicetree, linux-kernel, Bartosz Golaszewski
Add all supported at24 variants to the of_match table.
Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
---
drivers/misc/eeprom/at24.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/drivers/misc/eeprom/at24.c b/drivers/misc/eeprom/at24.c
index e79833d62284..01f9c4921c50 100644
--- a/drivers/misc/eeprom/at24.c
+++ b/drivers/misc/eeprom/at24.c
@@ -209,13 +209,22 @@ MODULE_DEVICE_TABLE(i2c, at24_ids);
static const struct of_device_id at24_of_match[] = {
{ .compatible = "atmel,24c00", .data = &at24_data_24c00 },
{ .compatible = "atmel,24c01", .data = &at24_data_24c01 },
+ { .compatible = "atmel,24cs01", .data = &at24_data_24cs01 },
{ .compatible = "atmel,24c02", .data = &at24_data_24c02 },
+ { .compatible = "atmel,24cs02", .data = &at24_data_24cs02 },
+ { .compatible = "atmel,24mac402", .data = &at24_data_24mac402 },
+ { .compatible = "atmel,24mac602", .data = &at24_data_24mac602 },
{ .compatible = "atmel,spd", .data = &at24_data_spd },
{ .compatible = "atmel,24c04", .data = &at24_data_24c04 },
+ { .compatible = "atmel,24cs04", .data = &at24_data_24cs04 },
{ .compatible = "atmel,24c08", .data = &at24_data_24c08 },
+ { .compatible = "atmel,24cs08", .data = &at24_data_24cs08 },
{ .compatible = "atmel,24c16", .data = &at24_data_24c16 },
+ { .compatible = "atmel,24cs16", .data = &at24_data_24cs16 },
{ .compatible = "atmel,24c32", .data = &at24_data_24c32 },
+ { .compatible = "atmel,24cs32", .data = &at24_data_24cs32 },
{ .compatible = "atmel,24c64", .data = &at24_data_24c64 },
+ { .compatible = "atmel,24cs64", .data = &at24_data_24cs64 },
{ .compatible = "atmel,24c128", .data = &at24_data_24c128 },
{ .compatible = "atmel,24c256", .data = &at24_data_24c256 },
{ .compatible = "atmel,24c512", .data = &at24_data_24c512 },
--
2.15.1
^ permalink raw reply related [flat|nested] 11+ messages in thread