Skip to contentSkip to conversation

rtc: support for rv4162c7

PATCH In review Tomas Krcka 2 participants 5 messages Apr 13, 2016 – Apr 14, 2016 Real time clock (RTC)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 rtc: support for rv4162c7

This patch is for support of rv4162c7 RTC chip.
The device has same parameters as rv4162, but with different identification. Tested with PhyTec module AM335x.

---
 drivers/rtc/rtc-m41t80.c | 1 +
 1 file changed, 1 insertion(+)
drivers/rtc/rtc-m41t80.c +1 -0
index d107a8e..1aa57d8 100644
@@ -81,6 +81,7 @@ static const struct i2c_device_id m41t80_id[] = {
     { "m41st85", M41T80_FEATURE_HT | M41T80_FEATURE_BL | M41T80_FEATURE_SQ },
     { "m41st87", M41T80_FEATURE_HT | M41T80_FEATURE_BL | M41T80_FEATURE_SQ },
     { "rv4162", M41T80_FEATURE_SQ | M41T80_FEATURE_WD | M41T80_FEATURE_SQ_ALT },
+    { "rv4162c7", M41T80_FEATURE_SQ | M41T80_FEATURE_WD | M41T80_FEATURE_SQ_ALT },
     { }
 };
 MODULE_DEVICE_TABLE(i2c, m41t80_id);

-- 1.9.1

Signature · 9 lines
-- 
You received this message because you are subscribed to "rtc-linux".
Membership options at http://groups.google.com/group/rtc-linux .
Please read http://groups.google.com/group/rtc-linux/web/checklist
before submitting a driver.
--- 
You received this message because you are subscribed to the Google Groups "rtc-linux" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/d/optout.
#1 lore raw

Hi,

Quoted 4 lines · Tomas Krcka

This patch is for support of rv4162c7 RTC chip.
The device has same parameters as rv4162, but with different identification. Tested with PhyTec module AM335x.

Well, technically, it is an rv4162. rv4162-c7 is the only available one. So this patch is not necessary.

Quoted 20 lines
---
 drivers/rtc/rtc-m41t80.c | 1 +
 1 file changed, 1 insertion(+)
drivers/rtc/rtc-m41t80.c +1 -1
index d107a8e..1aa57d8 100644
@@ -81,6 +81,7 @@ static const struct i2c_device_id m41t80_id[] = {
     { "m41st85", M41T80_FEATURE_HT | M41T80_FEATURE_BL | M41T80_FEATURE_SQ },
     { "m41st87", M41T80_FEATURE_HT | M41T80_FEATURE_BL | M41T80_FEATURE_SQ },
     { "rv4162", M41T80_FEATURE_SQ | M41T80_FEATURE_WD | M41T80_FEATURE_SQ_ALT },
+    { "rv4162c7", M41T80_FEATURE_SQ | M41T80_FEATURE_WD | M41T80_FEATURE_SQ_ALT },
     { }
 };
 MODULE_DEVICE_TABLE(i2c, m41t80_id);
-- 1.9.1
Signature · 14 lines
Alexandre Belloni, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

-- 
-- 
You received this message because you are subscribed to "rtc-linux".
Membership options at http://groups.google.com/group/rtc-linux .
Please read http://groups.google.com/group/rtc-linux/web/checklist
before submitting a driver.
--- 
You received this message because you are subscribed to the Google Groups "rtc-linux" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/d/optout.
#2 lore raw

Hi,
that's correct, but idetification of this chip is rv4162c7 so
i2c_match_id() returns NULL.
If it's there any workaround, how the chip can be detected automatically then OK, but without this patch it doesn't work for me.

2016-04-14 0:49 GMT+02:00 Alexandre Belloni
<[email protected]>:

Quoted 36 lines

Hi,

Quoted 4 lines · Tomas Krcka

This patch is for support of rv4162c7 RTC chip.
The device has same parameters as rv4162, but with different identification. Tested with PhyTec module AM335x.

Well, technically, it is an rv4162. rv4162-c7 is the only available one. So this patch is not necessary.

Quoted 12 lines
---
 drivers/rtc/rtc-m41t80.c | 1 +
 1 file changed, 1 insertion(+)
drivers/rtc/rtc-m41t80.c +0 -0
index d107a8e..1aa57d8 100644

drivers/rtc/rtc-m41t80.c static const struct i2c_device_id m41t80_id[] = {

Quoted 8 lines
drivers/rtc/rtc-m41t80.c +1 -1
@@ -81,6 +81,7 @@ static const struct i2c_device_id m41t80_id[] = {
     { "m41st85", M41T80_FEATURE_HT | M41T80_FEATURE_BL | M41T80_FEATURE_SQ },
     { "m41st87", M41T80_FEATURE_HT | M41T80_FEATURE_BL | M41T80_FEATURE_SQ },
     { "rv4162", M41T80_FEATURE_SQ | M41T80_FEATURE_WD | M41T80_FEATURE_SQ_ALT },
+    { "rv4162c7", M41T80_FEATURE_SQ | M41T80_FEATURE_WD | M41T80_FEATURE_SQ_ALT },
     { }
 };
 MODULE_DEVICE_TABLE(i2c, m41t80_id);
-- 1.9.1

--
Alexandre Belloni, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

Signature · 9 lines
-- 
You received this message because you are subscribed to "rtc-linux".
Membership options at http://groups.google.com/group/rtc-linux .
Please read http://groups.google.com/group/rtc-linux/web/checklist
before submitting a driver.
--- 
You received this message because you are subscribed to the Google Groups "rtc-linux" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/d/optout.
#3 lore raw

Hi,

Quoted 6 lines · Tomas Krcka

Hi,
that's correct, but idetification of this chip is rv4162c7 so
i2c_match_id() returns NULL.
If it's there any workaround, how the chip can be detected automatically then OK, but without this patch it doesn't work for me.

Just use rv4162 as your compatible string. That is what the mainline dtsi is doing for the phycore som:

$ grep -C 2 rv4162 arch/arm/boot/dts/am335x-phycore-som.dtsi
	i2c_rtc: rtc@68 {
		compatible = "rv4162";
		reg = <0x68>;
		status = "disabled";
Quoted 38 lines

2016-04-14 0:49 GMT+02:00 Alexandre Belloni
<[email protected]>:

Quoted 36 lines

Hi,

Quoted 4 lines · Tomas Krcka

This patch is for support of rv4162c7 RTC chip.
The device has same parameters as rv4162, but with different identification. Tested with PhyTec module AM335x.

Well, technically, it is an rv4162. rv4162-c7 is the only available one. So this patch is not necessary.

Quoted 12 lines
---
 drivers/rtc/rtc-m41t80.c | 1 +
 1 file changed, 1 insertion(+)
drivers/rtc/rtc-m41t80.c +0 -0
index d107a8e..1aa57d8 100644

drivers/rtc/rtc-m41t80.c static const struct i2c_device_id m41t80_id[] = {

Quoted 8 lines
drivers/rtc/rtc-m41t80.c +1 -1
@@ -81,6 +81,7 @@ static const struct i2c_device_id m41t80_id[] = {
     { "m41st85", M41T80_FEATURE_HT | M41T80_FEATURE_BL | M41T80_FEATURE_SQ },
     { "m41st87", M41T80_FEATURE_HT | M41T80_FEATURE_BL | M41T80_FEATURE_SQ },
     { "rv4162", M41T80_FEATURE_SQ | M41T80_FEATURE_WD | M41T80_FEATURE_SQ_ALT },
+    { "rv4162c7", M41T80_FEATURE_SQ | M41T80_FEATURE_WD | M41T80_FEATURE_SQ_ALT },
     { }
 };
 MODULE_DEVICE_TABLE(i2c, m41t80_id);
-- 1.9.1

--
Alexandre Belloni, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

Signature · 14 lines
Alexandre Belloni, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

-- 
-- 
You received this message because you are subscribed to "rtc-linux".
Membership options at http://groups.google.com/group/rtc-linux .
Please read http://groups.google.com/group/rtc-linux/web/checklist
before submitting a driver.
--- 
You received this message because you are subscribed to the Google Groups "rtc-linux" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/d/optout.
#4 lore raw

Hi,
ok, good. Thanks.
Patch is not needed.

2016-04-14 9:19 GMT+02:00 Alexandre Belloni
<[email protected]>:

Quoted 64 lines

Hi,

Quoted 6 lines · Tomas Krcka

Hi,
that's correct, but idetification of this chip is rv4162c7 so
i2c_match_id() returns NULL.
If it's there any workaround, how the chip can be detected automatically then OK, but without this patch it doesn't work for me.

Just use rv4162 as your compatible string. That is what the mainline dtsi is doing for the phycore som:

$ grep -C 2 rv4162 arch/arm/boot/dts/am335x-phycore-som.dtsi
        i2c_rtc: rtc@68 {
                compatible = "rv4162";
                reg = <0x68>;
                status = "disabled";
Quoted 38 lines

2016-04-14 0:49 GMT+02:00 Alexandre Belloni
<[email protected]>:

Quoted 36 lines

Hi,

Quoted 4 lines · Tomas Krcka

This patch is for support of rv4162c7 RTC chip.
The device has same parameters as rv4162, but with different identification. Tested with PhyTec module AM335x.

Well, technically, it is an rv4162. rv4162-c7 is the only available one. So this patch is not necessary.

Quoted 12 lines
---
 drivers/rtc/rtc-m41t80.c | 1 +
 1 file changed, 1 insertion(+)
drivers/rtc/rtc-m41t80.c +0 -0
index d107a8e..1aa57d8 100644

drivers/rtc/rtc-m41t80.c static const struct i2c_device_id m41t80_id[] = {

Quoted 8 lines
drivers/rtc/rtc-m41t80.c +1 -1
@@ -81,6 +81,7 @@ static const struct i2c_device_id m41t80_id[] = {
     { "m41st85", M41T80_FEATURE_HT | M41T80_FEATURE_BL | M41T80_FEATURE_SQ },
     { "m41st87", M41T80_FEATURE_HT | M41T80_FEATURE_BL | M41T80_FEATURE_SQ },
     { "rv4162", M41T80_FEATURE_SQ | M41T80_FEATURE_WD | M41T80_FEATURE_SQ_ALT },
+    { "rv4162c7", M41T80_FEATURE_SQ | M41T80_FEATURE_WD | M41T80_FEATURE_SQ_ALT },
     { }
 };
 MODULE_DEVICE_TABLE(i2c, m41t80_id);
-- 1.9.1

--
Alexandre Belloni, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

--
Alexandre Belloni, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

Signature · 9 lines
-- 
You received this message because you are subscribed to "rtc-linux".
Membership options at http://groups.google.com/group/rtc-linux .
Please read http://groups.google.com/group/rtc-linux/web/checklist
before submitting a driver.
--- 
You received this message because you are subscribed to the Google Groups "rtc-linux" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/d/optout.