2013-08-16 12:23:17

by Hebbar, Gururaja

[permalink] [raw]
Subject: [PATCH v4 0/2] rtc: omap: update AM335x rtc ip revision

The syntax of compatible property in DT is to mention the Most specific
match to most generic match.

Since AM335x is the platform with latest IP revision, add it 1st in
the device id table.

This way, we can add new matching compatible as 1st and maintain old
compatible string for backwards compatibility.

ex:
compatible = "ti,am3352-rtc", "ti,da830-rtc";

Also, update am335x .dtsi file (am33xx.dtsi) as above.

Note:
This is a part of previously submitted patch-set [1]. Out of 4 patches,
3 was accepted and 1 got an acceptable NAK. Hence resubmitting only the
rejected + updated changes.

Changes in V4:
- Rebased on latest linux-next (as on 160813).
- Correct a type AM335X --> AM3352

Changes in V3:
- As per Mark Rutland's suggestion [2], maintain old compatible
string and add the new matching string as the 1st compatible.

Changes in V2:
- Coding style corrections (remove extra space, use lower case
for hex numbers
- use prefix ARM: for commit subject keeping with arch/arm
convention)
- use "[AM/am]3352" instead of "[AM/am]335x" to keep the all
usages in sync.
- Use index defined for struct members so they remain in sync
- Add new compatible to existing one so that when driver
supports enhanced features of hardware, they are available
to the user else the basic functionality still works

[2]
https://lkml.org/lkml/2013/7/3/74
[1]
https://lkml.org/lkml/2013/8/1/442

Hebbar Gururaja (1):
ARM: dts: AM33XX: update rtc node compatibility

Hebbar, Gururaja (1):
rtc: omap: update of_device_id to reflect latest ip revisions

arch/arm/boot/dts/am33xx.dtsi | 2 +-
drivers/rtc/rtc-omap.c | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)


2013-08-16 12:22:55

by Hebbar, Gururaja

[permalink] [raw]
Subject: [PATCH v4 1/2] rtc: omap: update of_device_id to reflect latest ip revisions

The syntax of compatible property in DT is to mention the Most specific
match to most generic match.

Since AM335x is the platform with latest IP revision, add it 1st in
the device id table.

This way, we can add new matching compatible as 1st and maintain old
compatible string for backwards compatibility.

ex:
compatible = "ti,am3352-rtc", "ti,da830-rtc";

Signed-off-by: Hebbar, Gururaja <[email protected]>
CC: [email protected]
---
Changes in V4:
- Rebased on latest linux-next (as on 160813).
- Correct a type AM335X --> AM3352

Changes in v3:
- new patch

:100644 100644 dc62cc3... 2f0968c... M drivers/rtc/rtc-omap.c
drivers/rtc/rtc-omap.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/rtc/rtc-omap.c b/drivers/rtc/rtc-omap.c
index dc62cc3..2f0968c 100644
--- a/drivers/rtc/rtc-omap.c
+++ b/drivers/rtc/rtc-omap.c
@@ -330,12 +330,12 @@ static struct platform_device_id omap_rtc_devtype[] = {
MODULE_DEVICE_TABLE(platform, omap_rtc_devtype);

static const struct of_device_id omap_rtc_of_match[] = {
- { .compatible = "ti,da830-rtc",
- .data = &omap_rtc_devtype[OMAP_RTC_DATA_DA830_IDX],
- },
{ .compatible = "ti,am3352-rtc",
.data = &omap_rtc_devtype[OMAP_RTC_DATA_AM3352_IDX],
},
+ { .compatible = "ti,da830-rtc",
+ .data = &omap_rtc_devtype[OMAP_RTC_DATA_DA830_IDX],
+ },
{},
};
MODULE_DEVICE_TABLE(of, omap_rtc_of_match);
--
1.7.0.4

2013-08-16 12:23:14

by Hebbar, Gururaja

[permalink] [raw]
Subject: [PATCH v4 2/2] ARM: dts: AM33XX: update rtc node compatibility

From: Hebbar Gururaja <[email protected]>

Since AM33xx RTC IP has RTC_IRQWAKEEN to support Alarm Wake-up, update
the rtc compatible property to enable handling of this feature inside
rtc-omap driver.

Signed-off-by: Hebbar Gururaja <[email protected]>
CC: [email protected]
---
Changes in V4:
- No change.

Changes in V3:
- Instead of replacing the old matching string, add new
matching compatible as 1st and maintain old compatible string
for backwards compatibility

Changes in V2:
- Add new compatible to existing one so that when driver
supports enhanced features of hardware, they are available
to the user else the basic functionality still works
:100644 100644 0aaf8ce... daeafa0... M arch/arm/boot/dts/am33xx.dtsi
arch/arm/boot/dts/am33xx.dtsi | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi
index 0aaf8ce..daeafa0 100644
--- a/arch/arm/boot/dts/am33xx.dtsi
+++ b/arch/arm/boot/dts/am33xx.dtsi
@@ -317,7 +317,7 @@
};

rtc@44e3e000 {
- compatible = "ti,da830-rtc";
+ compatible = "ti,am3352-rtc", "ti,da830-rtc";
reg = <0x44e3e000 0x1000>;
interrupts = <75
76>;
--
1.7.0.4