Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1646934 > unrolled thread

[PATCH v4 19/20] powerpc/83xx: Add generic compatible string for I2C EEPROM

Started byJavier Martinez Canillas <javier@dowhile0.org>
First post2017-05-22 16:10 +0200
Last post2017-05-23 16:00 +0200
Articles 3 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH v4 19/20] powerpc/83xx: Add generic compatible string for I2C EEPROM Javier Martinez Canillas <javier@dowhile0.org> - 2017-05-22 16:10 +0200
    Re: [PATCH v4 19/20] powerpc/83xx: Add generic compatible string for  I2C EEPROM Rob Herring <robh@kernel.org> - 2017-05-23 15:50 +0200
      Re: [PATCH v4 19/20] powerpc/83xx: Add generic compatible string for  I2C EEPROM Javier Martinez Canillas <javier@dowhile0.org> - 2017-05-23 16:00 +0200

#1646934 — [PATCH v4 19/20] powerpc/83xx: Add generic compatible string for I2C EEPROM

FromJavier Martinez Canillas <javier@dowhile0.org>
Date2017-05-22 16:10 +0200
Subject[PATCH v4 19/20] powerpc/83xx: Add generic compatible string for I2C EEPROM
Message-ID<tJWc2-6Hl-21@gated-at.bofh.it>
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@dowhile0.org>

---

Changes in v4:
- Only use the atmel manufacturer in the compatible string instead of
  keeping the deprecated ones (Rob Herring).

Changes in v3: None
Changes in v2: None

 arch/powerpc/boot/dts/mpc8308_p1m.dts  | 2 +-
 arch/powerpc/boot/dts/mpc8349emitx.dts | 4 ++--
 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 +-
 6 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/arch/powerpc/boot/dts/mpc8308_p1m.dts b/arch/powerpc/boot/dts/mpc8308_p1m.dts
index 57f86cdf9f36..702ab4fc5b4a 100644
--- a/arch/powerpc/boot/dts/mpc8308_p1m.dts
+++ b/arch/powerpc/boot/dts/mpc8308_p1m.dts
@@ -123,7 +123,7 @@
 			interrupt-parent = <&ipic>;
 			dfsrr;
 			fram@50 {
-				compatible = "ramtron,24c64";
+				compatible = "atmel,24c64";
 				reg = <0x50>;
 			};
 		};
diff --git a/arch/powerpc/boot/dts/mpc8349emitx.dts b/arch/powerpc/boot/dts/mpc8349emitx.dts
index 90aed3ac2f69..f49d1cffd927 100644
--- a/arch/powerpc/boot/dts/mpc8349emitx.dts
+++ b/arch/powerpc/boot/dts/mpc8349emitx.dts
@@ -92,7 +92,7 @@
 			dfsrr;
 
 			eeprom: at24@50 {
-				compatible = "st,24c256";
+				compatible = "atmel,24c256";
 				reg = <0x50>;
 			};
 
@@ -130,7 +130,7 @@
 			};
 
 			spd: at24@51 {
-				compatible = "at24,spd";
+				compatible = "atmel,spd";
 				reg = <0x51>;
 			};
 
diff --git a/arch/powerpc/boot/dts/mpc8377_rdb.dts b/arch/powerpc/boot/dts/mpc8377_rdb.dts
index e32613963ab0..5e85d8c93bca 100644
--- a/arch/powerpc/boot/dts/mpc8377_rdb.dts
+++ b/arch/powerpc/boot/dts/mpc8377_rdb.dts
@@ -150,7 +150,7 @@
 				};
 
 				at24@50 {
-					compatible = "at24,24c256";
+					compatible = "atmel,24c256";
 					reg = <0x50>;
 				};
 
diff --git a/arch/powerpc/boot/dts/mpc8377_wlan.dts b/arch/powerpc/boot/dts/mpc8377_wlan.dts
index c0c790168b96..fee15fcbb46f 100644
--- a/arch/powerpc/boot/dts/mpc8377_wlan.dts
+++ b/arch/powerpc/boot/dts/mpc8377_wlan.dts
@@ -135,7 +135,7 @@
 				dfsrr;
 
 				at24@50 {
-					compatible = "at24,24c256";
+					compatible = "atmel,24c256";
 					reg = <0x50>;
 				};
 
diff --git a/arch/powerpc/boot/dts/mpc8378_rdb.dts b/arch/powerpc/boot/dts/mpc8378_rdb.dts
index 71842fcd621f..e973d61956b9 100644
--- a/arch/powerpc/boot/dts/mpc8378_rdb.dts
+++ b/arch/powerpc/boot/dts/mpc8378_rdb.dts
@@ -150,7 +150,7 @@
 				};
 
 				at24@50 {
-					compatible = "at24,24c256";
+					compatible = "atmel,24c256";
 					reg = <0x50>;
 				};
 
diff --git a/arch/powerpc/boot/dts/mpc8379_rdb.dts b/arch/powerpc/boot/dts/mpc8379_rdb.dts
index e442a29b2fe0..ed5d12ff2ee0 100644
--- a/arch/powerpc/boot/dts/mpc8379_rdb.dts
+++ b/arch/powerpc/boot/dts/mpc8379_rdb.dts
@@ -148,7 +148,7 @@
 				};
 
 				at24@50 {
-					compatible = "at24,24c256";
+					compatible = "atmel,24c256";
 					reg = <0x50>;
 				};
 
-- 
2.9.3

[toc] | [next] | [standalone]


#1648070 — Re: [PATCH v4 19/20] powerpc/83xx: Add generic compatible string for I2C EEPROM

FromRob Herring <robh@kernel.org>
Date2017-05-23 15:50 +0200
SubjectRe: [PATCH v4 19/20] powerpc/83xx: Add generic compatible string for I2C EEPROM
Message-ID<tKimd-3Tp-7@gated-at.bofh.it>
In reply to#1646934
On Mon, May 22, 2017 at 9:02 AM, Javier Martinez Canillas
<javier@dowhile0.org> 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@dowhile0.org>
>
> ---
>
> Changes in v4:
> - Only use the atmel manufacturer in the compatible string instead of
>   keeping the deprecated ones (Rob Herring).
>
> Changes in v3: None
> Changes in v2: None
>
>  arch/powerpc/boot/dts/mpc8308_p1m.dts  | 2 +-
>  arch/powerpc/boot/dts/mpc8349emitx.dts | 4 ++--
>  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 +-
>  6 files changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/arch/powerpc/boot/dts/mpc8308_p1m.dts b/arch/powerpc/boot/dts/mpc8308_p1m.dts
> index 57f86cdf9f36..702ab4fc5b4a 100644
> --- a/arch/powerpc/boot/dts/mpc8308_p1m.dts
> +++ b/arch/powerpc/boot/dts/mpc8308_p1m.dts
> @@ -123,7 +123,7 @@
>                         interrupt-parent = <&ipic>;
>                         dfsrr;
>                         fram@50 {
> -                               compatible = "ramtron,24c64";
> +                               compatible = "atmel,24c64";

This should be '"ramtron,24c64", "atmel,24c64"'

>                                 reg = <0x50>;
>                         };
>                 };
> diff --git a/arch/powerpc/boot/dts/mpc8349emitx.dts b/arch/powerpc/boot/dts/mpc8349emitx.dts
> index 90aed3ac2f69..f49d1cffd927 100644
> --- a/arch/powerpc/boot/dts/mpc8349emitx.dts
> +++ b/arch/powerpc/boot/dts/mpc8349emitx.dts
> @@ -92,7 +92,7 @@
>                         dfsrr;
>
>                         eeprom: at24@50 {
> -                               compatible = "st,24c256";
> +                               compatible = "atmel,24c256";

Similar for this one.

>                                 reg = <0x50>;
>                         };
>
> @@ -130,7 +130,7 @@
>                         };
>
>                         spd: at24@51 {
> -                               compatible = "at24,spd";
> +                               compatible = "atmel,spd";

This is fine because at24 is not a vendor.

Rob

[toc] | [prev] | [next] | [standalone]


#1648081 — Re: [PATCH v4 19/20] powerpc/83xx: Add generic compatible string for I2C EEPROM

FromJavier Martinez Canillas <javier@dowhile0.org>
Date2017-05-23 16:00 +0200
SubjectRe: [PATCH v4 19/20] powerpc/83xx: Add generic compatible string for I2C EEPROM
Message-ID<tKivT-3WY-1@gated-at.bofh.it>
In reply to#1648070
Hello Rob,

On Tue, May 23, 2017 at 3:42 PM, Rob Herring <robh@kernel.org> wrote:
> On Mon, May 22, 2017 at 9:02 AM, Javier Martinez Canillas
> <javier@dowhile0.org> 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@dowhile0.org>
>>
>> ---
>>
>> Changes in v4:
>> - Only use the atmel manufacturer in the compatible string instead of
>>   keeping the deprecated ones (Rob Herring).
>>
>> Changes in v3: None
>> Changes in v2: None
>>
>>  arch/powerpc/boot/dts/mpc8308_p1m.dts  | 2 +-
>>  arch/powerpc/boot/dts/mpc8349emitx.dts | 4 ++--
>>  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 +-
>>  6 files changed, 7 insertions(+), 7 deletions(-)
>>
>> diff --git a/arch/powerpc/boot/dts/mpc8308_p1m.dts b/arch/powerpc/boot/dts/mpc8308_p1m.dts
>> index 57f86cdf9f36..702ab4fc5b4a 100644
>> --- a/arch/powerpc/boot/dts/mpc8308_p1m.dts
>> +++ b/arch/powerpc/boot/dts/mpc8308_p1m.dts
>> @@ -123,7 +123,7 @@
>>                         interrupt-parent = <&ipic>;
>>                         dfsrr;
>>                         fram@50 {
>> -                               compatible = "ramtron,24c64";
>> +                               compatible = "atmel,24c64";
>
> This should be '"ramtron,24c64", "atmel,24c64"'
>

Yes, I (hopefully) fixed all the occurrences in the v5 that I posted
today, you are cc'ed on that series too.

Again, sorry for misunderstanding your comment on v3.

Best regards,
Javier

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web