* [PATCH] i2c: efm32: correct namespacing of location property
[not found] ` <CAOesGMjgX5PWBSD2YP7mTGMWafxBjeMDmzZoPCXb27YPUHEcyw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2014-07-11 8:22 ` Uwe Kleine-König
[not found] ` <1405066940-12919-1-git-send-email-u.kleine-koenig-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
0 siblings, 1 reply; 6+ messages in thread
From: Uwe Kleine-König @ 2014-07-11 8:22 UTC (permalink / raw)
To: Wolfram Sang
Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA,
devicetree-u79uwXL29TY76Z2rM5mHXA,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
kernel-bIcnvbaLZ9MEGnE8C9+IrQ, Olof Johansson
Olof Johansson pointed out that usually the company name is picked as
namespace prefix to specific properties. So expect "energymicro,location"
but fall back to the previously introduced name "efm32,location".
Cc: Olof Johansson <olof-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
---
Documentation/devicetree/bindings/i2c/i2c-efm32.txt | 4 ++--
drivers/i2c/busses/i2c-efm32.c | 8 +++++++-
2 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/Documentation/devicetree/bindings/i2c/i2c-efm32.txt b/Documentation/devicetree/bindings/i2c/i2c-efm32.txt
index fc15ac519437..50b25c3da186 100644
--- a/Documentation/devicetree/bindings/i2c/i2c-efm32.txt
+++ b/Documentation/devicetree/bindings/i2c/i2c-efm32.txt
@@ -10,7 +10,7 @@ Required properties :
Recommended properties :
- clock-frequency : maximal I2C bus clock frequency in Hz.
- - efm32,location : Decides the location of the USART I/O pins.
+ - energymicro,location : Decides the location of the USART I/O pins.
Allowed range : [0 .. 6]
Example:
@@ -23,7 +23,7 @@ Example:
clocks = <&cmu clk_HFPERCLKI2C0>;
clock-frequency = <100000>;
status = "ok";
- efm32,location = <3>;
+ energymicro,location = <3>;
eeprom@50 {
compatible = "microchip,24c02";
diff --git a/drivers/i2c/busses/i2c-efm32.c b/drivers/i2c/busses/i2c-efm32.c
index f7eccd682de9..5c4cf94527e3 100644
--- a/drivers/i2c/busses/i2c-efm32.c
+++ b/drivers/i2c/busses/i2c-efm32.c
@@ -370,7 +370,13 @@ static int efm32_i2c_probe(struct platform_device *pdev)
return ret;
}
- ret = of_property_read_u32(np, "efm32,location", &location);
+
+ ret = of_property_read_u32(np, "energymicro,location", &location);
+
+ if (!ret)
+ /* fall back to wrongly namespaced property */
+ ret = of_property_read_u32(np, "efm32,location", &location);
+
if (!ret) {
dev_dbg(&pdev->dev, "using location %u\n", location);
} else {
--
2.0.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] i2c: efm32: correct namespacing of location property
[not found] ` <1405066940-12919-1-git-send-email-u.kleine-koenig-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
@ 2014-07-11 8:28 ` Uwe Kleine-König
[not found] ` <20140711082826.GJ11056-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2014-07-11 8:50 ` [PATCH v2] " Uwe Kleine-König
1 sibling, 1 reply; 6+ messages in thread
From: Uwe Kleine-König @ 2014-07-11 8:28 UTC (permalink / raw)
To: Wolfram Sang
Cc: kernel-bIcnvbaLZ9MEGnE8C9+IrQ, devicetree-u79uwXL29TY76Z2rM5mHXA,
Olof Johansson, linux-i2c-u79uwXL29TY76Z2rM5mHXA,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r
Hi Wolfram,
> diff --git a/drivers/i2c/busses/i2c-efm32.c b/drivers/i2c/busses/i2c-efm32.c
> index f7eccd682de9..5c4cf94527e3 100644
> --- a/drivers/i2c/busses/i2c-efm32.c
> +++ b/drivers/i2c/busses/i2c-efm32.c
> @@ -370,7 +370,13 @@ static int efm32_i2c_probe(struct platform_device *pdev)
> return ret;
> }
>
> - ret = of_property_read_u32(np, "efm32,location", &location);
> +
> + ret = of_property_read_u32(np, "energymicro,location", &location);
> +
> + if (!ret)
This must be "if (ret)". I noticed during testing but obviously forgot
to fixup before sending out. Should I resend?
Best regards
Uwe
> + /* fall back to wrongly namespaced property */
> + ret = of_property_read_u32(np, "efm32,location", &location);
> +
> if (!ret) {
> dev_dbg(&pdev->dev, "using location %u\n", location);
> } else {
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | http://www.pengutronix.de/ |
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] i2c: efm32: correct namespacing of location property
[not found] ` <20140711082826.GJ11056-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
@ 2014-07-11 8:38 ` Wolfram Sang
0 siblings, 0 replies; 6+ messages in thread
From: Wolfram Sang @ 2014-07-11 8:38 UTC (permalink / raw)
To: Uwe Kleine-König
Cc: kernel-bIcnvbaLZ9MEGnE8C9+IrQ, devicetree-u79uwXL29TY76Z2rM5mHXA,
Olof Johansson, linux-i2c-u79uwXL29TY76Z2rM5mHXA,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r
[-- Attachment #1: Type: text/plain, Size: 144 bytes --]
> > + if (!ret)
> This must be "if (ret)". I noticed during testing but obviously forgot
> to fixup before sending out. Should I resend?
Yup.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v2] i2c: efm32: correct namespacing of location property
[not found] ` <1405066940-12919-1-git-send-email-u.kleine-koenig-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2014-07-11 8:28 ` Uwe Kleine-König
@ 2014-07-11 8:50 ` Uwe Kleine-König
[not found] ` <1405068614-14279-1-git-send-email-u.kleine-koenig-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
1 sibling, 1 reply; 6+ messages in thread
From: Uwe Kleine-König @ 2014-07-11 8:50 UTC (permalink / raw)
To: Wolfram Sang
Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA,
devicetree-u79uwXL29TY76Z2rM5mHXA,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
kernel-bIcnvbaLZ9MEGnE8C9+IrQ, Olof Johansson
Olof Johansson pointed out that usually the company name is picked as
namespace prefix to specific properties. So expect "energymicro,location"
but fall back to the previously introduced name "efm32,location".
Cc: Olof Johansson <olof-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
---
Changes since (implicit) v1:
- fix a wrong if condtion
Documentation/devicetree/bindings/i2c/i2c-efm32.txt | 4 ++--
drivers/i2c/busses/i2c-efm32.c | 8 +++++++-
2 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/Documentation/devicetree/bindings/i2c/i2c-efm32.txt b/Documentation/devicetree/bindings/i2c/i2c-efm32.txt
index fc15ac519437..50b25c3da186 100644
--- a/Documentation/devicetree/bindings/i2c/i2c-efm32.txt
+++ b/Documentation/devicetree/bindings/i2c/i2c-efm32.txt
@@ -10,7 +10,7 @@ Required properties :
Recommended properties :
- clock-frequency : maximal I2C bus clock frequency in Hz.
- - efm32,location : Decides the location of the USART I/O pins.
+ - energymicro,location : Decides the location of the USART I/O pins.
Allowed range : [0 .. 6]
Example:
@@ -23,7 +23,7 @@ Example:
clocks = <&cmu clk_HFPERCLKI2C0>;
clock-frequency = <100000>;
status = "ok";
- efm32,location = <3>;
+ energymicro,location = <3>;
eeprom@50 {
compatible = "microchip,24c02";
diff --git a/drivers/i2c/busses/i2c-efm32.c b/drivers/i2c/busses/i2c-efm32.c
index f7eccd682de9..10b8323b08d4 100644
--- a/drivers/i2c/busses/i2c-efm32.c
+++ b/drivers/i2c/busses/i2c-efm32.c
@@ -370,7 +370,13 @@ static int efm32_i2c_probe(struct platform_device *pdev)
return ret;
}
- ret = of_property_read_u32(np, "efm32,location", &location);
+
+ ret = of_property_read_u32(np, "energymicro,location", &location);
+
+ if (ret)
+ /* fall back to wrongly namespaced property */
+ ret = of_property_read_u32(np, "efm32,location", &location);
+
if (!ret) {
dev_dbg(&pdev->dev, "using location %u\n", location);
} else {
--
2.0.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v2] i2c: efm32: correct namespacing of location property
[not found] ` <1405068614-14279-1-git-send-email-u.kleine-koenig-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
@ 2014-07-17 13:40 ` Wolfram Sang
2014-07-17 18:42 ` Uwe Kleine-König
0 siblings, 1 reply; 6+ messages in thread
From: Wolfram Sang @ 2014-07-17 13:40 UTC (permalink / raw)
To: Uwe Kleine-König
Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA,
devicetree-u79uwXL29TY76Z2rM5mHXA,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
kernel-bIcnvbaLZ9MEGnE8C9+IrQ, Olof Johansson
[-- Attachment #1: Type: text/plain, Size: 553 bytes --]
On Fri, Jul 11, 2014 at 10:50:14AM +0200, Uwe Kleine-König wrote:
> Olof Johansson pointed out that usually the company name is picked as
> namespace prefix to specific properties. So expect "energymicro,location"
> but fall back to the previously introduced name "efm32,location".
>
> Cc: Olof Johansson <olof-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
Applied to for-next, thanks! If you think this is better suited in
for-current, let me know.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2] i2c: efm32: correct namespacing of location property
2014-07-17 13:40 ` Wolfram Sang
@ 2014-07-17 18:42 ` Uwe Kleine-König
0 siblings, 0 replies; 6+ messages in thread
From: Uwe Kleine-König @ 2014-07-17 18:42 UTC (permalink / raw)
To: Wolfram Sang
Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA,
devicetree-u79uwXL29TY76Z2rM5mHXA,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
kernel-bIcnvbaLZ9MEGnE8C9+IrQ, Olof Johansson
On Thu, Jul 17, 2014 at 03:40:00PM +0200, Wolfram Sang wrote:
> On Fri, Jul 11, 2014 at 10:50:14AM +0200, Uwe Kleine-König wrote:
> > Olof Johansson pointed out that usually the company name is picked as
> > namespace prefix to specific properties. So expect "energymicro,location"
> > but fall back to the previously introduced name "efm32,location".
> >
> > Cc: Olof Johansson <olof-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org>
> > Signed-off-by: Uwe Kleine-König <u.kleine-koenig-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
>
> Applied to for-next, thanks! If you think this is better suited in
> for-current, let me know.
I'm not in a hurry. If you take it it's fine for me.
(BTW, I'm not sure i fI understand your branch naming. for-next means
"targeting the next merge window" and for-current means "targeting the
next release"? So for-next currently means 3.17-rc1?)
Thanks
Uwe
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | http://www.pengutronix.de/ |
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2014-07-17 18:42 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <CAOesGMjgX5PWBSD2YP7mTGMWafxBjeMDmzZoPCXb27YPUHEcyw@mail.gmail.com>
[not found] ` <CAOesGMjgX5PWBSD2YP7mTGMWafxBjeMDmzZoPCXb27YPUHEcyw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-07-11 8:22 ` [PATCH] i2c: efm32: correct namespacing of location property Uwe Kleine-König
[not found] ` <1405066940-12919-1-git-send-email-u.kleine-koenig-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2014-07-11 8:28 ` Uwe Kleine-König
[not found] ` <20140711082826.GJ11056-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2014-07-11 8:38 ` Wolfram Sang
2014-07-11 8:50 ` [PATCH v2] " Uwe Kleine-König
[not found] ` <1405068614-14279-1-git-send-email-u.kleine-koenig-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2014-07-17 13:40 ` Wolfram Sang
2014-07-17 18:42 ` Uwe Kleine-König
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).