diff mbox

ARM: dts: OMAP5: Add i2c aliases

Message ID 1381856405-30970-1-git-send-email-nm@ti.com (mailing list archive)
State New, archived
Headers show

Commit Message

Nishanth Menon Oct. 15, 2013, 5 p.m. UTC
Currently, i2c1 and i2c5 defer probe due to pinctrl dependencies.
This changes the i2c ID each bus is registered with in i2c-dev
interface.

As a result of this, many userspace tools break and there is no
consistent manner to fix the same if the i2c dev interface have no
consistent numbering. Provide alias to allow ordering the i2c devices
correctly.

Signed-off-by: Nishanth Menon <nm@ti.com>
---

 arch/arm/boot/dts/omap5.dtsi |    5 +++++
 1 file changed, 5 insertions(+)

Comments

Rajendra Nayak Oct. 16, 2013, 11:37 a.m. UTC | #1
On Tuesday 15 October 2013 10:30 PM, Nishanth Menon wrote:
> Currently, i2c1 and i2c5 defer probe due to pinctrl dependencies.
> This changes the i2c ID each bus is registered with in i2c-dev
> interface.
> 
> As a result of this, many userspace tools break and there is no
> consistent manner to fix the same if the i2c dev interface have no
> consistent numbering. Provide alias to allow ordering the i2c devices
> correctly.

This looks good Nishanth. Shouldn't we just go ahead and fix these for
all OMAPs/AMxx devices which would have the same problem as OMAP5 ;)

Acked-by: Rajendra Nayak <rnayak@ti.com> 
> 
> Signed-off-by: Nishanth Menon <nm@ti.com>
> ---
> 
>  arch/arm/boot/dts/omap5.dtsi |    5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/omap5.dtsi b/arch/arm/boot/dts/omap5.dtsi
> index e18ee7e..8970deb 100644
> --- a/arch/arm/boot/dts/omap5.dtsi
> +++ b/arch/arm/boot/dts/omap5.dtsi
> @@ -21,6 +21,11 @@
>  	interrupt-parent = <&gic>;
>  
>  	aliases {
> +		i2c0 = &i2c1;
> +		i2c1 = &i2c2;
> +		i2c2 = &i2c3;
> +		i2c3 = &i2c4;
> +		i2c4 = &i2c5;
>  		serial0 = &uart1;
>  		serial1 = &uart2;
>  		serial2 = &uart3;
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Nishanth Menon Oct. 16, 2013, 12:58 p.m. UTC | #2
On 10/16/2013 06:37 AM, Rajendra Nayak wrote:
> On Tuesday 15 October 2013 10:30 PM, Nishanth Menon wrote:
>> Currently, i2c1 and i2c5 defer probe due to pinctrl dependencies.
>> This changes the i2c ID each bus is registered with in i2c-dev
>> interface.
>>
>> As a result of this, many userspace tools break and there is no
>> consistent manner to fix the same if the i2c dev interface have no
>> consistent numbering. Provide alias to allow ordering the i2c devices
>> correctly.
> 
> This looks good Nishanth. Shouldn't we just go ahead and fix these for
> all OMAPs/AMxx devices which would have the same problem as OMAP5 ;)

yes ofcourse. i can do a couple of patches:
1 - for all OMAPs
2 - for all AM platforms.

> 
> Acked-by: Rajendra Nayak <rnayak@ti.com> 
>>
>> Signed-off-by: Nishanth Menon <nm@ti.com>
>> ---
>>
>>  arch/arm/boot/dts/omap5.dtsi |    5 +++++
>>  1 file changed, 5 insertions(+)
>>
>> diff --git a/arch/arm/boot/dts/omap5.dtsi b/arch/arm/boot/dts/omap5.dtsi
>> index e18ee7e..8970deb 100644
>> --- a/arch/arm/boot/dts/omap5.dtsi
>> +++ b/arch/arm/boot/dts/omap5.dtsi
>> @@ -21,6 +21,11 @@
>>  	interrupt-parent = <&gic>;
>>  
>>  	aliases {
>> +		i2c0 = &i2c1;
>> +		i2c1 = &i2c2;
>> +		i2c2 = &i2c3;
>> +		i2c3 = &i2c4;
>> +		i2c4 = &i2c5;
>>  		serial0 = &uart1;
>>  		serial1 = &uart2;
>>  		serial2 = &uart3;
>>
>
Nishanth Menon Oct. 16, 2013, 8:21 p.m. UTC | #3
Add i2c aliases for OMAP and AM processor dts nodes to ensure proper
i2c ordering. Based on Benoit's for_13/dts branch[1]

Changes in V2:
	- Following Rajendra's suggestion, done for all OMAP and AM
	  series SoCs, where i2c is defined.

V1: https://patchwork.kernel.org/patch/3046671/

Nishanth Menon (2):
  ARM: dts: OMAP3+: Add i2c aliases
  ARM: dts: AM33xx+: Add i2c aliases

 arch/arm/boot/dts/am33xx.dtsi |    3 +++
 arch/arm/boot/dts/am4372.dtsi |    3 +++
 arch/arm/boot/dts/dra7.dtsi   |    5 +++++
 arch/arm/boot/dts/omap3.dtsi  |    3 +++
 arch/arm/boot/dts/omap4.dtsi  |    4 ++++
 arch/arm/boot/dts/omap5.dtsi  |    5 +++++
 6 files changed, 23 insertions(+)

[1] https://git.kernel.org/cgit/linux/kernel/git/bcousson/linux-omap-dt.git/log/?h=for_3.13/dts
Rajendra Nayak Oct. 21, 2013, 9:18 a.m. UTC | #4
On Thursday 17 October 2013 01:51 AM, Nishanth Menon wrote:
> Add i2c aliases for OMAP and AM processor dts nodes to ensure proper
> i2c ordering. Based on Benoit's for_13/dts branch[1]
> 
> Changes in V2:
> 	- Following Rajendra's suggestion, done for all OMAP and AM
> 	  series SoCs, where i2c is defined.

Thanks Nishanth.
Acked-by: Rajendra Nayak <rnayak@ti.com>

> 
> V1: https://patchwork.kernel.org/patch/3046671/
> 
> Nishanth Menon (2):
>   ARM: dts: OMAP3+: Add i2c aliases
>   ARM: dts: AM33xx+: Add i2c aliases
> 
>  arch/arm/boot/dts/am33xx.dtsi |    3 +++
>  arch/arm/boot/dts/am4372.dtsi |    3 +++
>  arch/arm/boot/dts/dra7.dtsi   |    5 +++++
>  arch/arm/boot/dts/omap3.dtsi  |    3 +++
>  arch/arm/boot/dts/omap4.dtsi  |    4 ++++
>  arch/arm/boot/dts/omap5.dtsi  |    5 +++++
>  6 files changed, 23 insertions(+)
> 
> [1] https://git.kernel.org/cgit/linux/kernel/git/bcousson/linux-omap-dt.git/log/?h=for_3.13/dts
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/arch/arm/boot/dts/omap5.dtsi b/arch/arm/boot/dts/omap5.dtsi
index e18ee7e..8970deb 100644
--- a/arch/arm/boot/dts/omap5.dtsi
+++ b/arch/arm/boot/dts/omap5.dtsi
@@ -21,6 +21,11 @@ 
 	interrupt-parent = <&gic>;
 
 	aliases {
+		i2c0 = &i2c1;
+		i2c1 = &i2c2;
+		i2c2 = &i2c3;
+		i2c3 = &i2c4;
+		i2c4 = &i2c5;
 		serial0 = &uart1;
 		serial1 = &uart2;
 		serial2 = &uart3;