[PATCH v2 06/10] rtc: bd70528: Support RTC on ROHM BD73800

Matti Vaittinen <[email protected]>
Newsgroups gmane.linux.drivers.devicetree,gmane.linux.kernel,gmane.linux.kernel.clk,gmane.linux.kernel.gpio
Message-ID <bc38e6da43919a745f2fe953c98c1fb67e793474.1785838585.git.mazziesaccount@gmail.com>
From: Matti Vaittinen <[email protected]>

BD73800 contains similar RTC block as BD71828 and BD71815. Only the address
offsets seem different. Support also BD73800 RTC using the rtc-bd70528.

Signed-off-by: Matti Vaittinen <[email protected]>
Acked-by: Alexandre Belloni <[email protected]>

---
Revision history:
 v1 => :
  - No changes
---
 drivers/rtc/rtc-bd70528.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/rtc/rtc-bd70528.c b/drivers/rtc/rtc-bd70528.c
index 482810b61495..fd415e327ea6 100644
--- a/drivers/rtc/rtc-bd70528.c
+++ b/drivers/rtc/rtc-bd70528.c
@@ -8,6 +8,7 @@
 #include <linux/mfd/rohm-bd71815.h>
 #include <linux/mfd/rohm-bd71828.h>
 #include <linux/mfd/rohm-bd72720.h>
+#include <linux/mfd/rohm-bd73800.h>
 #include <linux/module.h>
 #include <linux/of.h>
 #include <linux/platform_device.h>
@@ -284,6 +285,12 @@ static int bd70528_probe(struct platform_device *pdev)
 		bd_rtc->bd718xx_alm_block_start = BD72720_REG_RTC_ALM_START;
 		hour_reg = BD72720_REG_RTC_HOUR;
 		break;
+	case ROHM_CHIP_TYPE_BD73800:
+		bd_rtc->reg_time_start = BD73800_REG_RTC_START;
+		bd_rtc->bd718xx_alm_block_start = BD73800_REG_RTC_ALM_START;
+		hour_reg = BD73800_REG_RTC_HOUR;
+		break;
+
 	default:
 		dev_err(&pdev->dev, "Unknown chip\n");
 		return -ENOENT;
@@ -344,6 +351,7 @@ static const struct platform_device_id bd718x7_rtc_id[] = {
 	{ .name = "bd71828-rtc", .driver_data = ROHM_CHIP_TYPE_BD71828 },
 	{ .name = "bd71815-rtc", .driver_data = ROHM_CHIP_TYPE_BD71815 },
 	{ .name = "bd72720-rtc", .driver_data = ROHM_CHIP_TYPE_BD72720 },
+	{ .name = "bd73800-rtc", .driver_data = ROHM_CHIP_TYPE_BD73800 },
 	{ }
 };
 MODULE_DEVICE_TABLE(platform, bd718x7_rtc_id);
-- 
2.55.0
signature.asc (application/pgp-signature, 488 B)
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCgAdFiEEIx+f8wZb28fLKEhTeFA3/03aocUFAmpxvVsACgkQeFA3/03a
ocVq+gf/Tkb0YiekxH5nYMj7MKydIE8Y2GrQP/sboNHDIW9hSGwGqf4q3KdZIHwJ
13+Acirxz47W8jzrkYqQPIzfZ0nraeTExX7tOB7Zt31i86gN+fIKZTmN5q2REvaA
rNfeadw1TpJFVX4Qp2sMJJuVE8K/qOJ/Uusn9PH81DhILcG0J4y0/4g4/AvFI83n
aFqwmlQTVfJWHf5HeQ/ZKPmBL9XHfv3iDLRzzpkmkvKoRc7/t4rna+NmDRAXaqFt
Powwyy9Fz1dvOA5KapB5tWEP11id1TkUN4sQ/q83ii+YOOncwDdhOoVt9LZ33hMv
qvktXEHX53nXNZYf6m72kYzJLOuYhg==
=rOLP
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.