rtc: rtc-isl12022: add isl12020 device support
PATCH 1/1 rtc: rtc-isl12022: add isl12020 device support
Adds the isl12020 device, which is fully compatible to isl12022.
--- drivers/rtc/rtc-isl12022.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/rtc/rtc-isl12022.c +3 -0
@@ -257,6 +257,8 @@ static int isl12022_probe(struct i2c_client *client,static const struct of_device_id isl12022_dt_match[] = { { .compatible ="isl,isl12022" },/* for backward compat., don't use */ { .compatible ="isil,isl12022" }, + { .compatible ="isl,isl12020" },/* for backward compat., don't use */ + { .compatible ="isil,isl12020" }, { }, };MODULE_DEVICE_TABLE (of, isl12022_dt_match);
@@ -264,6 +266,7 @@ MODULE_DEVICE_TABLE(of, isl12022_dt_match);static const struct i2c_device_id isl12022_id[] = { {"isl12022" ,0 }, + {"isl12020" ,0 }, { } };MODULE_DEVICE_TABLE (i2c, isl12022_id);
Signature · 1 line
2.33.0
Alexandre Belloni
maintainerHi,
Quoted 2 lines · Wilken Gottwalt
Adds the isl12020 device, which is fully compatible to isl12022.
Do you know what is differing between both parts? If there is nothing relevant to linux, maybe we could just avoid adding a new compatible string.
Quoted 11 lines
Signed-off-by Wilken Gottwalt <[email protected]>Signed-off-by Joerg Reiling <[email protected]>--- drivers/rtc/rtc-isl12022.c | 3 +++ 1 file changed, 3 insertions(+)drivers/rtc/rtc-isl12022.c +0
-0
drivers/rtc/rtc-isl12022.c static int isl12022_probe(struct i2c_client *client, · line 260
Quoted 4 lines
drivers/rtc/rtc-isl12022.c +1
-0@@ -257,6 +257,8 @@ static int isl12022_probe(struct i2c_client *client,static const struct of_device_id isl12022_dt_match[] = { { .compatible ="isl,isl12022" },/* for backward compat., don't use */ { .compatible ="isil,isl12022" }, + { .compatible ="isl,isl12020" },/* for backward compat., don't use */
Please, do not add this compatible string.
drivers/rtc/rtc-isl12022.c static int isl12022_probe(struct i2c_client *client, · line 261
Quoted 1 line
drivers/rtc/rtc-isl12022.c +1
-0+ { .compatible = "isil,isl12020" },
You also need to document this string in Documentation/devicetree/bindings/rtc/trivial-rtc.yaml
Quoted 14 lines
drivers/rtc/rtc-isl12022.c +1
-0{ }, };MODULE_DEVICE_TABLE (of, isl12022_dt_match);@@ -264,6 +266,7 @@ MODULE_DEVICE_TABLE(of, isl12022_dt_match);static const struct i2c_device_id isl12022_id[] = { {"isl12022" ,0 }, + {"isl12020" ,0 }, { } };MODULE_DEVICE_TABLE (i2c, isl12022_id);Signature · 1 line
2.33.0
Signature · 3 lines
Alexandre Belloni, co-owner and COO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
Quoted 9 lines · On Thu, 23 Sep 2021 17:36:55 +0200 Alexandre Belloni…
Hi,
Quoted 2 lines · Wilken Gottwalt
Adds the isl12020 device, which is fully compatible to isl12022.
Do you know what is differing between both parts? If there is nothing relevant to linux, maybe we could just avoid adding a new compatible string.
Hmm no, there are no changes relevant for a driver. So yeah, you are right, that only would add the possibility to use isl12020 in the device tree instead of isl12022. Oh boy, this is kind of embarrassing, just didn't think about it. ;-) But there will be more patches, the chip also have temp sensor exposable by hwmon.
Quoted 18 lines
Quoted 11 lines
Signed-off-by Wilken Gottwalt <[email protected]>Signed-off-by Joerg Reiling <[email protected]>--- drivers/rtc/rtc-isl12022.c | 3 +++ 1 file changed, 3 insertions(+)drivers/rtc/rtc-isl12022.c +0
-0drivers/rtc/rtc-isl12022.c static int isl12022_probe(struct i2c_client *client, · line 260
Quoted 4 lines
drivers/rtc/rtc-isl12022.c +1
-0@@ -257,6 +257,8 @@ static int isl12022_probe(struct i2c_client *client,static const struct of_device_id isl12022_dt_match[] = { { .compatible ="isl,isl12022" },/* for backward compat., don't use */ { .compatible ="isil,isl12022" }, + { .compatible ="isl,isl12020" },/* for backward compat., don't use */ Please, do not add this compatible string.
Quoted 3 lines
drivers/rtc/rtc-isl12022.c static int isl12022_probe(struct i2c_client *client, · line 261
Quoted 1 line
drivers/rtc/rtc-isl12022.c +1
-0+ { .compatible = "isil,isl12020" },You also need to document this string in
Documentation/devicetree/bindings/rtc/trivial-rtc.yaml
I only checked the isl* bindings. Why is there no specific isl12022 yaml file like the other isl* chips have?
Quoted 15 lines
Quoted 14 lines
drivers/rtc/rtc-isl12022.c +1
-0{ }, };MODULE_DEVICE_TABLE (of, isl12022_dt_match);@@ -264,6 +266,7 @@ MODULE_DEVICE_TABLE(of, isl12022_dt_match);static const struct i2c_device_id isl12022_id[] = { {"isl12022" ,0 }, + {"isl12020" ,0 }, { } };MODULE_DEVICE_TABLE (i2c, isl12022_id);Signature · 1 line
2.33.0