* [PATCH v3 00/21] eeprom: at24: Add OF device ID table
@ 2017-04-14 1:04 Javier Martinez Canillas
[not found] ` <20170414010445.21727-1-javier-JPH+aEBZ4P+UEJcrhfAQsw@public.gmane.org>
2017-04-20 0:12 ` [PATCH v3 00/21] eeprom: at24: Add OF device ID table Rob Herring
0 siblings, 2 replies; 6+ messages in thread
From: Javier Martinez Canillas @ 2017-04-14 1:04 UTC (permalink / raw)
To: linux-kernel
Cc: Mark Rutland, Andrew Lunn, Wolfram Sang, Tony Lindgren,
Catalin Marinas, Will Deacon, Russell King, Masahiro Yamada,
Alexandre Belloni, linux-i2c, Hongtao Jia, Mark Jackson,
Herbert Xu, Horia Geantă, Michael Ellerman, Magnus Damm,
Michal Simek, Javier Martinez Canillas, Andy Shevchenko,
linux-arm-kernel, Benjamin Herrenschmidt, Jason Cooper
Hello Wolfram,
This series is a follow-up to patch [0] that added an OF device ID table
to the at24 EEPROM driver. As you suggested [1], this version instead of
adding entries for every used <vendor,device> tuple, only adds a single
entry for each chip type using the "atmel" vendor as a generic fallback.
The first patch adds the OF device ID table for the at24 driver and the
next patches adds a generic fallback compatible string to each DTS that
defines a compatible I2C EEPROM device node.
Patches can be applied independently since the DTS change without the
driver change is a no-op and the OF device table won't be used without
the DTS changes.
[0]: https://lkml.org/lkml/2017/3/14/589
[1]: https://lkml.org/lkml/2017/3/15/99
Best regards,
Javier
Changes in v3:
- Fix wrong .data values for "atmel,24c02" and "atmel,24c64" entries.
- Add Peter Rosin acked-by tag.
- Add Geert Uytterhoeven reviewed-by tag.
- Add Geert Uytterhoeven reviewed-by tag.
Changes in v2:
- Only add a single OF device ID entry for each device type (Wolfram Sang).
Javier Martinez Canillas (21):
dt-bindings: i2c: eeprom: Document manufacturer used as generic
fallback
eeprom: at24: Add OF device ID table
ARM: dts: omap: Add generic compatible string for I2C EEPROM
ARM: dts: turris-omnia: Add generic compatible string for I2C EEPROM
ARM: dts: at91: Add generic compatible string for I2C EEPROM
ARM: dts: efm32: Add generic compatible string for I2C EEPROM
ARM: dts: imx: Add generic compatible string for I2C EEPROM
ARM: dts: keystone: Add generic compatible string for I2C EEPROM
ARM: dts: lpc18xx: Add generic compatible string for I2C EEPROM
ARM: dts: r7s72100: Add generic compatible string for I2C EEPROM
ARM: dts: koelsch: Add generic compatible string for I2C EEPROM
ARM: dts: socfpga: Add generic compatible string for I2C EEPROM
ARM: dts: uniphier: Add generic compatible string for I2C EEPROM
ARM: dts: zynq: Add generic compatible string for I2C EEPROM
arm64: dts: ls1043a: Add generic compatible string for I2C EEPROM
arm64: zynqmp: Add generic compatible string for I2C EEPROM
powerpc/5200: Add generic compatible string for I2C EEPROM
powerpc/fsl: Add generic compatible string for I2C EEPROM
powerpc/512x: Add generic compatible string for I2C EEPROM
powerpc/83xx: Add generic compatible string for I2C EEPROM
powerpc/44x: Add generic compatible string for I2C EEPROM
.../devicetree/bindings/eeprom/eeprom.txt | 3 +-
arch/arm/boot/dts/am335x-baltos.dtsi | 2 +-
arch/arm/boot/dts/am335x-base0033.dts | 2 +-
arch/arm/boot/dts/am335x-bone-common.dtsi | 10 ++--
arch/arm/boot/dts/am335x-nano.dts | 2 +-
arch/arm/boot/dts/am335x-pepper.dts | 2 +-
arch/arm/boot/dts/am335x-shc.dts | 2 +-
arch/arm/boot/dts/am335x-sl50.dts | 2 +-
arch/arm/boot/dts/am437x-idk-evm.dts | 2 +-
arch/arm/boot/dts/am437x-sk-evm.dts | 2 +-
arch/arm/boot/dts/am43x-epos-evm.dts | 2 +-
arch/arm/boot/dts/am57xx-beagle-x15-common.dtsi | 2 +-
arch/arm/boot/dts/armada-385-turris-omnia.dts | 2 +-
arch/arm/boot/dts/at91-linea.dtsi | 2 +-
arch/arm/boot/dts/at91-tse850-3.dts | 2 +-
arch/arm/boot/dts/efm32gg-dk3750.dts | 2 +-
arch/arm/boot/dts/imx27-phytec-phycard-s-som.dtsi | 2 +-
arch/arm/boot/dts/imx27-phytec-phycore-som.dtsi | 2 +-
arch/arm/boot/dts/imx28-evk.dts | 2 +-
arch/arm/boot/dts/imx53-tqma53.dtsi | 2 +-
arch/arm/boot/dts/imx6q-cm-fx6.dts | 2 +-
arch/arm/boot/dts/imx6q-utilite-pro.dts | 2 +-
arch/arm/boot/dts/keystone-k2e-evm.dts | 2 +-
arch/arm/boot/dts/keystone-k2hk-evm.dts | 2 +-
arch/arm/boot/dts/keystone-k2l-evm.dts | 2 +-
arch/arm/boot/dts/lpc4337-ciaa.dts | 6 +-
arch/arm/boot/dts/lpc4350-hitex-eval.dts | 2 +-
arch/arm/boot/dts/lpc4357-ea4357-devkit.dts | 2 +-
arch/arm/boot/dts/omap3-cm-t3x.dtsi | 2 +-
arch/arm/boot/dts/omap3-gta04.dtsi | 2 +-
arch/arm/boot/dts/omap3-sb-t35.dtsi | 2 +-
arch/arm/boot/dts/omap4-var-som-om44.dtsi | 2 +-
arch/arm/boot/dts/omap5-cm-t54.dts | 2 +-
arch/arm/boot/dts/omap5-sbc-t54.dts | 2 +-
arch/arm/boot/dts/r7s72100-genmai.dts | 2 +-
arch/arm/boot/dts/r8a7791-koelsch.dts | 2 +-
arch/arm/boot/dts/socfpga_cyclone5_vining_fpga.dts | 2 +-
arch/arm/boot/dts/uniphier-pro4-ace.dts | 2 +-
arch/arm/boot/dts/uniphier-pro4-sanji.dts | 2 +-
arch/arm/boot/dts/uniphier-pxs2-gentil.dts | 2 +-
arch/arm/boot/dts/zynq-zc702.dts | 2 +-
arch/arm/boot/dts/zynq-zc706.dts | 2 +-
arch/arm64/boot/dts/freescale/fsl-ls1043a-rdb.dts | 4 +-
arch/arm64/boot/dts/xilinx/zynqmp-ep108.dts | 4 +-
arch/powerpc/boot/dts/digsy_mtc.dts | 2 +-
arch/powerpc/boot/dts/fsl/b4qds.dtsi | 8 +--
arch/powerpc/boot/dts/fsl/c293pcie.dts | 2 +-
arch/powerpc/boot/dts/fsl/p1010rdb.dtsi | 2 +-
arch/powerpc/boot/dts/fsl/p1023rdb.dts | 2 +-
arch/powerpc/boot/dts/fsl/p2041rdb.dts | 4 +-
arch/powerpc/boot/dts/fsl/p3041ds.dts | 4 +-
arch/powerpc/boot/dts/fsl/p4080ds.dts | 4 +-
arch/powerpc/boot/dts/fsl/p5020ds.dts | 4 +-
arch/powerpc/boot/dts/fsl/p5040ds.dts | 4 +-
arch/powerpc/boot/dts/fsl/t208xqds.dtsi | 8 +--
arch/powerpc/boot/dts/fsl/t4240qds.dts | 12 ++--
arch/powerpc/boot/dts/fsl/t4240rdb.dts | 6 +-
arch/powerpc/boot/dts/mpc5121ads.dts | 2 +-
arch/powerpc/boot/dts/mpc8308_p1m.dts | 2 +-
arch/powerpc/boot/dts/mpc8349emitx.dts | 2 +-
arch/powerpc/boot/dts/mpc8377_rdb.dts | 2 +-
arch/powerpc/boot/dts/mpc8377_wlan.dts | 2 +-
arch/powerpc/boot/dts/mpc8378_rdb.dts | 2 +-
arch/powerpc/boot/dts/mpc8379_rdb.dts | 2 +-
arch/powerpc/boot/dts/pcm030.dts | 2 +-
arch/powerpc/boot/dts/pcm032.dts | 2 +-
arch/powerpc/boot/dts/warp.dts | 2 +-
drivers/misc/eeprom/at24.c | 65 +++++++++++++++++++++-
68 files changed, 158 insertions(+), 94 deletions(-)
--
2.9.3
^ permalink raw reply [flat|nested] 6+ messages in thread[parent not found: <20170414010445.21727-1-javier-JPH+aEBZ4P+UEJcrhfAQsw@public.gmane.org>]
* [PATCH v3 03/21] ARM: dts: omap: Add generic compatible string for I2C EEPROM [not found] ` <20170414010445.21727-1-javier-JPH+aEBZ4P+UEJcrhfAQsw@public.gmane.org> @ 2017-04-14 1:04 ` Javier Martinez Canillas [not found] ` <20170414010445.21727-4-javier-JPH+aEBZ4P+UEJcrhfAQsw@public.gmane.org> 0 siblings, 1 reply; 6+ messages in thread From: Javier Martinez Canillas @ 2017-04-14 1:04 UTC (permalink / raw) To: linux-kernel-u79uwXL29TY76Z2rM5mHXA Cc: Wolfram Sang, Javier Martinez Canillas, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Benoît Cousson, devicetree-u79uwXL29TY76Z2rM5mHXA, Rob Herring, Tony Lindgren, Mark Rutland, linux-omap-u79uwXL29TY76Z2rM5mHXA, Russell King, Mark Jackson The at24 driver allows to register I2C EEPROM chips using different vendor and devices, but the I2C subsystem does not take the vendor into account when matching using the I2C table since it only has device entries. But when matching using an OF table, both the vendor and device has to be taken into account so the driver defines only a set of compatible strings using the "atmel" vendor as a generic fallback for compatible I2C devices. So add this generic fallback to the device node compatible string to make the device to match the driver using the OF device ID table. Signed-off-by: Javier Martinez Canillas <javier-JPH+aEBZ4P+UEJcrhfAQsw@public.gmane.org> --- Changes in v3: None Changes in v2: None arch/arm/boot/dts/am335x-baltos.dtsi | 2 +- arch/arm/boot/dts/am335x-base0033.dts | 2 +- arch/arm/boot/dts/am335x-bone-common.dtsi | 10 +++++----- arch/arm/boot/dts/am335x-nano.dts | 2 +- arch/arm/boot/dts/am335x-pepper.dts | 2 +- arch/arm/boot/dts/am335x-shc.dts | 2 +- arch/arm/boot/dts/am335x-sl50.dts | 2 +- arch/arm/boot/dts/am437x-idk-evm.dts | 2 +- arch/arm/boot/dts/am437x-sk-evm.dts | 2 +- arch/arm/boot/dts/am43x-epos-evm.dts | 2 +- arch/arm/boot/dts/am57xx-beagle-x15-common.dtsi | 2 +- arch/arm/boot/dts/omap3-cm-t3x.dtsi | 2 +- arch/arm/boot/dts/omap3-gta04.dtsi | 2 +- arch/arm/boot/dts/omap3-sb-t35.dtsi | 2 +- arch/arm/boot/dts/omap4-var-som-om44.dtsi | 2 +- arch/arm/boot/dts/omap5-cm-t54.dts | 2 +- arch/arm/boot/dts/omap5-sbc-t54.dts | 2 +- 17 files changed, 21 insertions(+), 21 deletions(-) diff --git a/arch/arm/boot/dts/am335x-baltos.dtsi b/arch/arm/boot/dts/am335x-baltos.dtsi index d42b98f15e8b..6ca780d0623f 100644 --- a/arch/arm/boot/dts/am335x-baltos.dtsi +++ b/arch/arm/boot/dts/am335x-baltos.dtsi @@ -255,7 +255,7 @@ }; at24@50 { - compatible = "at24,24c02"; + compatible = "at24,24c02", "atmel,24c02"; pagesize = <8>; reg = <0x50>; }; diff --git a/arch/arm/boot/dts/am335x-base0033.dts b/arch/arm/boot/dts/am335x-base0033.dts index c2bee452dab8..062067251106 100644 --- a/arch/arm/boot/dts/am335x-base0033.dts +++ b/arch/arm/boot/dts/am335x-base0033.dts @@ -89,7 +89,7 @@ &i2c0 { eeprom: eeprom@50 { - compatible = "at,24c256"; + compatible = "at,24c256", "atmel,24c256"; reg = <0x50>; }; }; diff --git a/arch/arm/boot/dts/am335x-bone-common.dtsi b/arch/arm/boot/dts/am335x-bone-common.dtsi index bf6b26abe35b..49c8c9409ce3 100644 --- a/arch/arm/boot/dts/am335x-bone-common.dtsi +++ b/arch/arm/boot/dts/am335x-bone-common.dtsi @@ -232,7 +232,7 @@ }; baseboard_eeprom: baseboard_eeprom@50 { - compatible = "at,24c256"; + compatible = "at,24c256", "atmel,24c256"; reg = <0x50>; #address-cells = <1>; @@ -251,7 +251,7 @@ clock-frequency = <100000>; cape_eeprom0: cape_eeprom0@54 { - compatible = "at,24c256"; + compatible = "at,24c256", "atmel,24c256"; reg = <0x54>; #address-cells = <1>; #size-cells = <1>; @@ -261,7 +261,7 @@ }; cape_eeprom1: cape_eeprom1@55 { - compatible = "at,24c256"; + compatible = "at,24c256", "atmel,24c256"; reg = <0x55>; #address-cells = <1>; #size-cells = <1>; @@ -271,7 +271,7 @@ }; cape_eeprom2: cape_eeprom2@56 { - compatible = "at,24c256"; + compatible = "at,24c256", "atmel,24c256"; reg = <0x56>; #address-cells = <1>; #size-cells = <1>; @@ -281,7 +281,7 @@ }; cape_eeprom3: cape_eeprom3@57 { - compatible = "at,24c256"; + compatible = "at,24c256", "atmel,24c256"; reg = <0x57>; #address-cells = <1>; #size-cells = <1>; diff --git a/arch/arm/boot/dts/am335x-nano.dts b/arch/arm/boot/dts/am335x-nano.dts index 807494bc722b..946d7069f417 100644 --- a/arch/arm/boot/dts/am335x-nano.dts +++ b/arch/arm/boot/dts/am335x-nano.dts @@ -224,7 +224,7 @@ }; eeprom@53 { - compatible = "microchip,24c02"; + compatible = "microchip,24c02", "atmel,24c02"; reg = <0x53>; pagesize = <8>; }; diff --git a/arch/arm/boot/dts/am335x-pepper.dts b/arch/arm/boot/dts/am335x-pepper.dts index 30e2f8770aaf..368cef158a19 100644 --- a/arch/arm/boot/dts/am335x-pepper.dts +++ b/arch/arm/boot/dts/am335x-pepper.dts @@ -67,7 +67,7 @@ }; eeprom: eeprom@50 { - compatible = "at,24c256"; + compatible = "at,24c256", "atmel,24c256"; reg = <0x50>; }; diff --git a/arch/arm/boot/dts/am335x-shc.dts b/arch/arm/boot/dts/am335x-shc.dts index bf8727a19ece..6a14b8478af0 100644 --- a/arch/arm/boot/dts/am335x-shc.dts +++ b/arch/arm/boot/dts/am335x-shc.dts @@ -188,7 +188,7 @@ }; at24@50 { - compatible = "at24,24c32"; + compatible = "at24,24c32", "atmel,24c32"; pagesize = <32>; reg = <0x50>; }; diff --git a/arch/arm/boot/dts/am335x-sl50.dts b/arch/arm/boot/dts/am335x-sl50.dts index c5d2589c55fc..d03678de140c 100644 --- a/arch/arm/boot/dts/am335x-sl50.dts +++ b/arch/arm/boot/dts/am335x-sl50.dts @@ -309,7 +309,7 @@ }; eeprom: eeprom@50 { - compatible = "at,24c256"; + compatible = "at,24c256", "atmel,24c256"; reg = <0x50>; }; diff --git a/arch/arm/boot/dts/am437x-idk-evm.dts b/arch/arm/boot/dts/am437x-idk-evm.dts index c1f7f9336e64..6c831663a75f 100644 --- a/arch/arm/boot/dts/am437x-idk-evm.dts +++ b/arch/arm/boot/dts/am437x-idk-evm.dts @@ -339,7 +339,7 @@ clock-frequency = <400000>; at24@50 { - compatible = "at24,24c256"; + compatible = "at24,24c256", "atmel,24c256"; pagesize = <64>; reg = <0x50>; }; diff --git a/arch/arm/boot/dts/am437x-sk-evm.dts b/arch/arm/boot/dts/am437x-sk-evm.dts index 4dc54bee2f36..1531b295336e 100644 --- a/arch/arm/boot/dts/am437x-sk-evm.dts +++ b/arch/arm/boot/dts/am437x-sk-evm.dts @@ -511,7 +511,7 @@ }; at24@50 { - compatible = "at24,24c256"; + compatible = "at24,24c256", "atmel,24c256"; pagesize = <64>; reg = <0x50>; }; diff --git a/arch/arm/boot/dts/am43x-epos-evm.dts b/arch/arm/boot/dts/am43x-epos-evm.dts index 9acd4ccdec4e..ca9b11375298 100644 --- a/arch/arm/boot/dts/am43x-epos-evm.dts +++ b/arch/arm/boot/dts/am43x-epos-evm.dts @@ -477,7 +477,7 @@ }; at24@50 { - compatible = "at24,24c256"; + compatible = "at24,24c256", "atmel,24c256"; pagesize = <64>; reg = <0x50>; }; diff --git a/arch/arm/boot/dts/am57xx-beagle-x15-common.dtsi b/arch/arm/boot/dts/am57xx-beagle-x15-common.dtsi index 585d792a8fdd..6af022540300 100644 --- a/arch/arm/boot/dts/am57xx-beagle-x15-common.dtsi +++ b/arch/arm/boot/dts/am57xx-beagle-x15-common.dtsi @@ -388,7 +388,7 @@ }; eeprom: eeprom@50 { - compatible = "at,24c32"; + compatible = "at,24c32", "atmel,24c32"; reg = <0x50>; }; }; diff --git a/arch/arm/boot/dts/omap3-cm-t3x.dtsi b/arch/arm/boot/dts/omap3-cm-t3x.dtsi index 57b9a028a49a..d960f1b3b4b1 100644 --- a/arch/arm/boot/dts/omap3-cm-t3x.dtsi +++ b/arch/arm/boot/dts/omap3-cm-t3x.dtsi @@ -188,7 +188,7 @@ clock-frequency = <400000>; at24@50 { - compatible = "at24,24c02"; + compatible = "at24,24c02", "atmel,24c02"; pagesize = <16>; reg = <0x50>; }; diff --git a/arch/arm/boot/dts/omap3-gta04.dtsi b/arch/arm/boot/dts/omap3-gta04.dtsi index b3a8b1f24499..430ab832783b 100644 --- a/arch/arm/boot/dts/omap3-gta04.dtsi +++ b/arch/arm/boot/dts/omap3-gta04.dtsi @@ -418,7 +418,7 @@ /* RFID EEPROM */ m24lr64@50 { - compatible = "at,24c64"; + compatible = "at,24c64", "atmel,24c64"; reg = <0x50>; }; }; diff --git a/arch/arm/boot/dts/omap3-sb-t35.dtsi b/arch/arm/boot/dts/omap3-sb-t35.dtsi index 73643fabde5d..e54091fbd40b 100644 --- a/arch/arm/boot/dts/omap3-sb-t35.dtsi +++ b/arch/arm/boot/dts/omap3-sb-t35.dtsi @@ -90,7 +90,7 @@ clock-frequency = <400000>; at24@50 { - compatible = "at24,24c02"; + compatible = "at24,24c02", "atmel,24c02"; pagesize = <16>; reg = <0x50>; }; diff --git a/arch/arm/boot/dts/omap4-var-som-om44.dtsi b/arch/arm/boot/dts/omap4-var-som-om44.dtsi index 758b6eb7ae43..6500bfc8d130 100644 --- a/arch/arm/boot/dts/omap4-var-som-om44.dtsi +++ b/arch/arm/boot/dts/omap4-var-som-om44.dtsi @@ -241,7 +241,7 @@ }; eeprom@50 { - compatible = "microchip,24c32"; + compatible = "microchip,24c32", "atmel,24c32"; reg = <0x50>; }; }; diff --git a/arch/arm/boot/dts/omap5-cm-t54.dts b/arch/arm/boot/dts/omap5-cm-t54.dts index b153f604932a..e0e31bfbf0e0 100644 --- a/arch/arm/boot/dts/omap5-cm-t54.dts +++ b/arch/arm/boot/dts/omap5-cm-t54.dts @@ -404,7 +404,7 @@ clock-frequency = <400000>; at24@50 { - compatible = "at24,24c02"; + compatible = "at24,24c02", "atmel,24c02"; pagesize = <16>; reg = <0x50>; }; diff --git a/arch/arm/boot/dts/omap5-sbc-t54.dts b/arch/arm/boot/dts/omap5-sbc-t54.dts index 337bbbc01a35..efc70f80abae 100644 --- a/arch/arm/boot/dts/omap5-sbc-t54.dts +++ b/arch/arm/boot/dts/omap5-sbc-t54.dts @@ -44,7 +44,7 @@ clock-frequency = <400000>; at24@50 { - compatible = "at24,24c02"; + compatible = "at24,24c02", "atmel,24c02"; pagesize = <16>; reg = <0x50>; }; -- 2.9.3 -- 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] 6+ messages in thread
[parent not found: <20170414010445.21727-4-javier-JPH+aEBZ4P+UEJcrhfAQsw@public.gmane.org>]
* Re: [PATCH v3 03/21] ARM: dts: omap: Add generic compatible string for I2C EEPROM [not found] ` <20170414010445.21727-4-javier-JPH+aEBZ4P+UEJcrhfAQsw@public.gmane.org> @ 2017-04-14 14:17 ` Tony Lindgren 2017-04-19 23:56 ` Rob Herring 1 sibling, 0 replies; 6+ messages in thread From: Tony Lindgren @ 2017-04-14 14:17 UTC (permalink / raw) To: Javier Martinez Canillas Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA, Wolfram Sang, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Benoît Cousson, devicetree-u79uwXL29TY76Z2rM5mHXA, Rob Herring, Mark Rutland, linux-omap-u79uwXL29TY76Z2rM5mHXA, Russell King, Mark Jackson * Javier Martinez Canillas <javier-JPH+aEBZ4P+UEJcrhfAQsw@public.gmane.org> [170413 18:08]: > The at24 driver allows to register I2C EEPROM chips using different vendor > and devices, but the I2C subsystem does not take the vendor into account > when matching using the I2C table since it only has device entries. > > But when matching using an OF table, both the vendor and device has to be > taken into account so the driver defines only a set of compatible strings > using the "atmel" vendor as a generic fallback for compatible I2C devices. > > So add this generic fallback to the device node compatible string to make > the device to match the driver using the OF device ID table. > > Signed-off-by: Javier Martinez Canillas <javier-JPH+aEBZ4P+UEJcrhfAQsw@public.gmane.org> Looks good to me assuming this will get merged in a single series: Acked-by: Tony Lindgren <tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org> Or if you want me to pick this patch separately, let me know. Regards, Tony -- 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] 6+ messages in thread
* Re: [PATCH v3 03/21] ARM: dts: omap: Add generic compatible string for I2C EEPROM [not found] ` <20170414010445.21727-4-javier-JPH+aEBZ4P+UEJcrhfAQsw@public.gmane.org> 2017-04-14 14:17 ` Tony Lindgren @ 2017-04-19 23:56 ` Rob Herring 2017-05-15 10:55 ` Javier Martinez Canillas 1 sibling, 1 reply; 6+ messages in thread From: Rob Herring @ 2017-04-19 23:56 UTC (permalink / raw) To: Javier Martinez Canillas Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA, Wolfram Sang, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Benoît Cousson, devicetree-u79uwXL29TY76Z2rM5mHXA, Tony Lindgren, Mark Rutland, linux-omap-u79uwXL29TY76Z2rM5mHXA, Russell King, Mark Jackson On Thu, Apr 13, 2017 at 10:04:27PM -0300, Javier Martinez Canillas wrote: > The at24 driver allows to register I2C EEPROM chips using different vendor > and devices, but the I2C subsystem does not take the vendor into account > when matching using the I2C table since it only has device entries. > > But when matching using an OF table, both the vendor and device has to be > taken into account so the driver defines only a set of compatible strings > using the "atmel" vendor as a generic fallback for compatible I2C devices. > > So add this generic fallback to the device node compatible string to make > the device to match the driver using the OF device ID table. > > Signed-off-by: Javier Martinez Canillas <javier-JPH+aEBZ4P+UEJcrhfAQsw@public.gmane.org> > --- > > Changes in v3: None > Changes in v2: None > > arch/arm/boot/dts/am335x-baltos.dtsi | 2 +- > arch/arm/boot/dts/am335x-base0033.dts | 2 +- > arch/arm/boot/dts/am335x-bone-common.dtsi | 10 +++++----- > arch/arm/boot/dts/am335x-nano.dts | 2 +- > arch/arm/boot/dts/am335x-pepper.dts | 2 +- > arch/arm/boot/dts/am335x-shc.dts | 2 +- > arch/arm/boot/dts/am335x-sl50.dts | 2 +- > arch/arm/boot/dts/am437x-idk-evm.dts | 2 +- > arch/arm/boot/dts/am437x-sk-evm.dts | 2 +- > arch/arm/boot/dts/am43x-epos-evm.dts | 2 +- > arch/arm/boot/dts/am57xx-beagle-x15-common.dtsi | 2 +- > arch/arm/boot/dts/omap3-cm-t3x.dtsi | 2 +- > arch/arm/boot/dts/omap3-gta04.dtsi | 2 +- > arch/arm/boot/dts/omap3-sb-t35.dtsi | 2 +- > arch/arm/boot/dts/omap4-var-som-om44.dtsi | 2 +- > arch/arm/boot/dts/omap5-cm-t54.dts | 2 +- > arch/arm/boot/dts/omap5-sbc-t54.dts | 2 +- > 17 files changed, 21 insertions(+), 21 deletions(-) > > diff --git a/arch/arm/boot/dts/am335x-baltos.dtsi b/arch/arm/boot/dts/am335x-baltos.dtsi > index d42b98f15e8b..6ca780d0623f 100644 > --- a/arch/arm/boot/dts/am335x-baltos.dtsi > +++ b/arch/arm/boot/dts/am335x-baltos.dtsi > @@ -255,7 +255,7 @@ > }; > > at24@50 { > - compatible = "at24,24c02"; > + compatible = "at24,24c02", "atmel,24c02"; I think you can just drop the at24 compatibles. A new kernel doesn't need it. An old kernel ignores the manufacturer. I checked that u-boot only matches on "atmel,*", so okay there. Don't know about the *BSDs. I couldn't find anything. Minimally, the deprecated compatible should come last. Rob -- 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] 6+ messages in thread
* Re: [PATCH v3 03/21] ARM: dts: omap: Add generic compatible string for I2C EEPROM 2017-04-19 23:56 ` Rob Herring @ 2017-05-15 10:55 ` Javier Martinez Canillas 0 siblings, 0 replies; 6+ messages in thread From: Javier Martinez Canillas @ 2017-05-15 10:55 UTC (permalink / raw) To: Rob Herring Cc: Linux Kernel, Wolfram Sang, linux-arm-kernel@lists.infradead.org, Benoît Cousson, devicetree@vger.kernel.org, Tony Lindgren, Mark Rutland, linux-omap@vger.kernel.org, Russell King, Mark Jackson Hello Rob, On Thu, Apr 20, 2017 at 1:56 AM, Rob Herring <robh@kernel.org> wrote: > On Thu, Apr 13, 2017 at 10:04:27PM -0300, Javier Martinez Canillas wrote: >> The at24 driver allows to register I2C EEPROM chips using different vendor >> and devices, but the I2C subsystem does not take the vendor into account >> when matching using the I2C table since it only has device entries. >> >> But when matching using an OF table, both the vendor and device has to be >> taken into account so the driver defines only a set of compatible strings >> using the "atmel" vendor as a generic fallback for compatible I2C devices. >> >> So add this generic fallback to the device node compatible string to make >> the device to match the driver using the OF device ID table. >> >> Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> >> --- >> >> Changes in v3: None >> Changes in v2: None >> >> arch/arm/boot/dts/am335x-baltos.dtsi | 2 +- >> arch/arm/boot/dts/am335x-base0033.dts | 2 +- >> arch/arm/boot/dts/am335x-bone-common.dtsi | 10 +++++----- >> arch/arm/boot/dts/am335x-nano.dts | 2 +- >> arch/arm/boot/dts/am335x-pepper.dts | 2 +- >> arch/arm/boot/dts/am335x-shc.dts | 2 +- >> arch/arm/boot/dts/am335x-sl50.dts | 2 +- >> arch/arm/boot/dts/am437x-idk-evm.dts | 2 +- >> arch/arm/boot/dts/am437x-sk-evm.dts | 2 +- >> arch/arm/boot/dts/am43x-epos-evm.dts | 2 +- >> arch/arm/boot/dts/am57xx-beagle-x15-common.dtsi | 2 +- >> arch/arm/boot/dts/omap3-cm-t3x.dtsi | 2 +- >> arch/arm/boot/dts/omap3-gta04.dtsi | 2 +- >> arch/arm/boot/dts/omap3-sb-t35.dtsi | 2 +- >> arch/arm/boot/dts/omap4-var-som-om44.dtsi | 2 +- >> arch/arm/boot/dts/omap5-cm-t54.dts | 2 +- >> arch/arm/boot/dts/omap5-sbc-t54.dts | 2 +- >> 17 files changed, 21 insertions(+), 21 deletions(-) >> >> diff --git a/arch/arm/boot/dts/am335x-baltos.dtsi b/arch/arm/boot/dts/am335x-baltos.dtsi >> index d42b98f15e8b..6ca780d0623f 100644 >> --- a/arch/arm/boot/dts/am335x-baltos.dtsi >> +++ b/arch/arm/boot/dts/am335x-baltos.dtsi >> @@ -255,7 +255,7 @@ >> }; >> >> at24@50 { >> - compatible = "at24,24c02"; >> + compatible = "at24,24c02", "atmel,24c02"; > > I think you can just drop the at24 compatibles. A new kernel doesn't > need it. An old kernel ignores the manufacturer. I checked that u-boot > only matches on "atmel,*", so okay there. Don't know about the *BSDs. I > couldn't find anything. > That's a very good point, it doesn't make sense indeed to keep them, since the vendor prefix can as you said be ignored (until the OF modalias report is fixed). I'll re-spin the series dropping them. Thanks a lot. Best regards, Javier ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v3 00/21] eeprom: at24: Add OF device ID table 2017-04-14 1:04 [PATCH v3 00/21] eeprom: at24: Add OF device ID table Javier Martinez Canillas [not found] ` <20170414010445.21727-1-javier-JPH+aEBZ4P+UEJcrhfAQsw@public.gmane.org> @ 2017-04-20 0:12 ` Rob Herring 1 sibling, 0 replies; 6+ messages in thread From: Rob Herring @ 2017-04-20 0:12 UTC (permalink / raw) To: Javier Martinez Canillas Cc: Mark Rutland, Andrew Lunn, Wolfram Sang, Tony Lindgren, Catalin Marinas, Will Deacon, linux-kernel, Masahiro Yamada, Alexandre Belloni, linux-i2c, Hongtao Jia, Russell King, Mark Jackson, Herbert Xu, Horia Geantă, Michael Ellerman, Magnus Damm, Michal Simek, Andy Shevchenko, linux-arm-kernel, Benjamin Herrenschmidt, Jason Cooper On Thu, Apr 13, 2017 at 10:04:24PM -0300, Javier Martinez Canillas wrote: > Hello Wolfram, > > This series is a follow-up to patch [0] that added an OF device ID table > to the at24 EEPROM driver. As you suggested [1], this version instead of > adding entries for every used <vendor,device> tuple, only adds a single > entry for each chip type using the "atmel" vendor as a generic fallback. > > The first patch adds the OF device ID table for the at24 driver and the > next patches adds a generic fallback compatible string to each DTS that > defines a compatible I2C EEPROM device node. > > Patches can be applied independently since the DTS change without the > driver change is a no-op and the OF device table won't be used without > the DTS changes. > > [0]: https://lkml.org/lkml/2017/3/14/589 I don't have this patch in my inbox, but the i2c core will still match on compatibles with no vendor prefix? If not, those need to be added to the match table too. Rob ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2017-05-15 10:55 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-04-14 1:04 [PATCH v3 00/21] eeprom: at24: Add OF device ID table Javier Martinez Canillas
[not found] ` <20170414010445.21727-1-javier-JPH+aEBZ4P+UEJcrhfAQsw@public.gmane.org>
2017-04-14 1:04 ` [PATCH v3 03/21] ARM: dts: omap: Add generic compatible string for I2C EEPROM Javier Martinez Canillas
[not found] ` <20170414010445.21727-4-javier-JPH+aEBZ4P+UEJcrhfAQsw@public.gmane.org>
2017-04-14 14:17 ` Tony Lindgren
2017-04-19 23:56 ` Rob Herring
2017-05-15 10:55 ` Javier Martinez Canillas
2017-04-20 0:12 ` [PATCH v3 00/21] eeprom: at24: Add OF device ID table Rob Herring
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox