From: Alexandre Belloni <alexandre.belloni@bootlin.com>
To: Matti Vaittinen <mazziesaccount@gmail.com>
Cc: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>,
Lee Jones <lee@kernel.org>, Pavel Machek <pavel@kernel.org>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Sebastian Reichel <sre@kernel.org>,
Liam Girdwood <lgirdwood@gmail.com>,
Mark Brown <broonie@kernel.org>,
Michael Turquette <mturquette@baylibre.com>,
Stephen Boyd <sboyd@kernel.org>,
Linus Walleij <linus.walleij@linaro.org>,
Bartosz Golaszewski <brgl@bgdev.pl>,
Andreas Kemnade <andreas@kemnade.info>,
linux-leds@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org,
linux-clk@vger.kernel.org, linux-gpio@vger.kernel.org,
linux-rtc@vger.kernel.org
Subject: Re: [PATCH v2 12/15] rtc: bd70528: Support BD72720 rtc
Date: Mon, 27 Oct 2025 13:38:19 +0100 [thread overview]
Message-ID: <202510271238195ef3bdfb@mail.local> (raw)
In-Reply-To: <380ea1fdbb94a796418e8f463c6a9436001d572d.1761564043.git.mazziesaccount@gmail.com>
On 27/10/2025 13:47:51+0200, Matti Vaittinen wrote:
> The BD72720 has similar RTC block as a few other ROHM PMICs.
>
> Add support for BD72720 RTC.
>
> Signed-off-by: Matti Vaittinen <mazziesaccount@gmail.com>
>
Acked-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Note that we didn't get 07/15 that adds linux/mfd/rohm-bd72720.h which
this patch depends on.
> ---
> Revision history:
> RFCv1 =>:
> - No changes
> ---
> drivers/rtc/Kconfig | 3 ++-
> drivers/rtc/rtc-bd70528.c | 21 ++++++++++++++-------
> 2 files changed, 16 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig
> index 2933c41c77c8..418f6c28847a 100644
> --- a/drivers/rtc/Kconfig
> +++ b/drivers/rtc/Kconfig
> @@ -561,7 +561,8 @@ config RTC_DRV_BD70528
> depends on MFD_ROHM_BD71828
> help
> If you say Y here you will get support for the RTC
> - block on ROHM BD71815 and BD71828 Power Management IC.
> + block on ROHM BD71815, BD71828 and BD72720 Power
> + Management ICs.
>
> This driver can also be built as a module. If so, the module
> will be called rtc-bd70528.
> diff --git a/drivers/rtc/rtc-bd70528.c b/drivers/rtc/rtc-bd70528.c
> index 954ac4ef53e8..4c8599761b2e 100644
> --- a/drivers/rtc/rtc-bd70528.c
> +++ b/drivers/rtc/rtc-bd70528.c
> @@ -7,6 +7,7 @@
> #include <linux/bcd.h>
> #include <linux/mfd/rohm-bd71815.h>
> #include <linux/mfd/rohm-bd71828.h>
> +#include <linux/mfd/rohm-bd72720.h>
> #include <linux/module.h>
> #include <linux/of.h>
> #include <linux/platform_device.h>
> @@ -262,13 +263,13 @@ static int bd70528_probe(struct platform_device *pdev)
>
> /*
> * See also BD718XX_ALM_EN_OFFSET:
> - * This works for BD71828 and BD71815 as they have same offset
> - * between ALM0 start and ALM0_MASK. If new ICs are to be
> - * added this requires proper check as ALM0_MASK is not located
> - * at the end of ALM0 block - but after all ALM blocks so if
> - * amount of ALMs differ the offset to enable/disable is likely
> - * to be incorrect and enable/disable must be given as own
> - * reg address here.
> + * This works for BD71828, BD71815, and BD72720 as they all
> + * have same offset between the ALM0 start and the ALM0_MASK.
> + * If new ICs are to be added this requires proper check as
> + * the ALM0_MASK is not located at the end of ALM0 block -
> + * but after all ALM blocks. If amount of ALMs differ, the
> + * offset to enable/disable is likely to be incorrect and
> + * enable/disable must be given as own reg address here.
> */
> bd_rtc->bd718xx_alm_block_start = BD71815_REG_RTC_ALM_START;
> hour_reg = BD71815_REG_HOUR;
> @@ -278,6 +279,11 @@ static int bd70528_probe(struct platform_device *pdev)
> bd_rtc->bd718xx_alm_block_start = BD71828_REG_RTC_ALM_START;
> hour_reg = BD71828_REG_RTC_HOUR;
> break;
> + case ROHM_CHIP_TYPE_BD72720:
> + bd_rtc->reg_time_start = BD72720_REG_RTC_START;
> + bd_rtc->bd718xx_alm_block_start = BD72720_REG_RTC_ALM_START;
> + hour_reg = BD72720_REG_RTC_HOUR;
> + break;
> default:
> dev_err(&pdev->dev, "Unknown chip\n");
> return -ENOENT;
> @@ -337,6 +343,7 @@ static int bd70528_probe(struct platform_device *pdev)
> static const struct platform_device_id bd718x7_rtc_id[] = {
> { "bd71828-rtc", ROHM_CHIP_TYPE_BD71828 },
> { "bd71815-rtc", ROHM_CHIP_TYPE_BD71815 },
> + { "bd72720-rtc", ROHM_CHIP_TYPE_BD72720 },
> { },
> };
> MODULE_DEVICE_TABLE(platform, bd718x7_rtc_id);
> --
> 2.51.0
>
--
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
next prev parent reply other threads:[~2025-10-27 12:38 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-27 11:44 [PATCH v2 00/15] Support ROHM BD72720 PMIC Matti Vaittinen
2025-10-27 11:44 ` [PATCH v2 01/15] dt-bindings: regulator: ROHM BD72720 Matti Vaittinen
2025-10-27 21:03 ` Rob Herring
2025-10-27 11:45 ` [PATCH v2 02/15] dt-bindings: Add trickle-charge upper limit Matti Vaittinen
2025-10-29 6:03 ` Krzysztof Kozlowski
2025-10-29 6:17 ` Krzysztof Kozlowski
2025-10-29 6:24 ` Matti Vaittinen
2025-10-29 6:22 ` Matti Vaittinen
2025-10-29 6:32 ` Matti Vaittinen
2025-10-29 13:26 ` Linus Walleij
2025-10-29 13:33 ` Krzysztof Kozlowski
2025-10-27 11:45 ` [PATCH v2 03/15] dt-bindings: power: supply: BD72720 managed battery Matti Vaittinen
2025-10-27 21:08 ` Rob Herring
2025-10-27 22:34 ` Linus Walleij
2025-10-27 11:45 ` [PATCH v2 04/15] dt-bindings: mfd: ROHM BD72720 Matti Vaittinen
2025-10-27 21:13 ` Rob Herring
2025-10-29 12:22 ` Matti Vaittinen
2025-10-27 21:20 ` Andreas Kemnade
2025-10-29 12:23 ` Matti Vaittinen
2025-10-27 22:42 ` Linus Walleij
2025-10-29 12:30 ` Matti Vaittinen
2025-10-29 13:08 ` Linus Walleij
2025-10-27 11:46 ` [PATCH v2 05/15] dt-bindings: leds: bd72720: Add BD72720 Matti Vaittinen
2025-10-28 8:25 ` Krzysztof Kozlowski
2025-10-27 11:46 ` [PATCH v2 06/15] mfd: rohm-bd71828: Use regmap_reg_range() Matti Vaittinen
2025-10-27 11:46 ` [PATCH v2 08/15] regulator: bd71828: rename IC specific entities Matti Vaittinen
2025-10-27 12:14 ` Mark Brown
2025-10-27 11:47 ` [PATCH v2 09/15] regulator: bd71828: Support ROHM BD72720 Matti Vaittinen
2025-10-27 12:15 ` Mark Brown
2025-10-27 11:47 ` [PATCH v2 10/15] gpio: Support ROHM BD72720 gpios Matti Vaittinen
2025-10-27 11:47 ` [PATCH v2 11/15] clk: clk-bd718x7: Support BD72720 clk gate Matti Vaittinen
2025-10-27 11:47 ` [PATCH v2 12/15] rtc: bd70528: Support BD72720 rtc Matti Vaittinen
2025-10-27 12:38 ` Alexandre Belloni [this message]
2025-10-27 13:02 ` Matti Vaittinen
2025-10-27 11:48 ` [PATCH v2 13/15] power: supply: bd71828: Support wider register addresses Matti Vaittinen
2025-10-27 11:48 ` [PATCH v2 14/15] power: supply: bd71828-power: Support ROHM BD72720 Matti Vaittinen
2025-10-27 11:48 ` [PATCH v2 15/15] MAINTAINERS: Add ROHM BD72720 PMIC Matti Vaittinen
2025-10-28 6:06 ` [PATCH v2 07/15] mfd: bd71828: Support ROHM BD72720 Matti Vaittinen
2025-10-28 6:39 ` [PATCH v2 00/15] Support ROHM BD72720 PMIC Matti Vaittinen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202510271238195ef3bdfb@mail.local \
--to=alexandre.belloni@bootlin.com \
--cc=andreas@kemnade.info \
--cc=brgl@bgdev.pl \
--cc=broonie@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=krzk+dt@kernel.org \
--cc=lee@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linus.walleij@linaro.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-leds@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux-rtc@vger.kernel.org \
--cc=matti.vaittinen@fi.rohmeurope.com \
--cc=mazziesaccount@gmail.com \
--cc=mturquette@baylibre.com \
--cc=pavel@kernel.org \
--cc=robh@kernel.org \
--cc=sboyd@kernel.org \
--cc=sre@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).