public inbox for linux-clk@vger.kernel.org
 help / color / mirror / Atom feed
From: Alexandre Belloni <alexandre.belloni@bootlin.com>
To: Ivaylo Ivanov <ivo.ivanov.ivanov1@gmail.com>
Cc: "Krzysztof Kozlowski" <krzk@kernel.org>,
	"André Draszik" <andre.draszik@linaro.org>,
	"Sylwester Nawrocki" <s.nawrocki@samsung.com>,
	"Chanwoo Choi" <cw00.choi@samsung.com>,
	"Alim Akhtar" <alim.akhtar@samsung.com>,
	"Michael Turquette" <mturquette@baylibre.com>,
	"Stephen Boyd" <sboyd@kernel.org>,
	"Rob Herring" <robh@kernel.org>,
	"Conor Dooley" <conor+dt@kernel.org>,
	"Lee Jones" <lee@kernel.org>,
	"Liam Girdwood" <lgirdwood@gmail.com>,
	"Mark Brown" <broonie@kernel.org>,
	linux-samsung-soc@vger.kernel.org, devicetree@vger.kernel.org,
	linux-clk@vger.kernel.org, linux-rtc@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1 6/7] rtc: s5m: add support for S2MPS16 RTC
Date: Sun, 14 Sep 2025 18:35:00 +0200	[thread overview]
Message-ID: <2025091416350055a27358@mail.local> (raw)
In-Reply-To: <20250914124227.2619925-7-ivo.ivanov.ivanov1@gmail.com>

On 14/09/2025 15:42:26+0300, Ivaylo Ivanov wrote:
> Add support for Samsung's S2MPS16 PMIC RTC, which has pretty much
> identical functionality to the existing S2MPS15 support, with the
> difference being the ST2 register.
> 
> Signed-off-by: Ivaylo Ivanov <ivo.ivanov.ivanov1@gmail.com>
Acked-by: Alexandre Belloni <alexandre.belloni@bootlin.com>

> ---
>  drivers/rtc/rtc-s5m.c | 16 ++++++++++++++++
>  1 file changed, 16 insertions(+)
> 
> diff --git a/drivers/rtc/rtc-s5m.c b/drivers/rtc/rtc-s5m.c
> index a7220b4d0..910248731 100644
> --- a/drivers/rtc/rtc-s5m.c
> +++ b/drivers/rtc/rtc-s5m.c
> @@ -18,6 +18,7 @@
>  #include <linux/mfd/samsung/irq.h>
>  #include <linux/mfd/samsung/rtc.h>
>  #include <linux/mfd/samsung/s2mps14.h>
> +#include <linux/mfd/samsung/s2mps16.h>
>  
>  /*
>   * Maximum number of retries for checking changes in UDR field
> @@ -254,6 +255,11 @@ static int s5m_check_pending_alarm_interrupt(struct s5m_rtc_info *info,
>  		ret = regmap_read(info->regmap, S5M_RTC_STATUS, &val);
>  		val &= S5M_ALARM0_STATUS;
>  		break;
> +	case S2MPS16X:
> +		ret = regmap_read(info->s5m87xx->regmap_pmic, S2MPS16_REG_ST2,
> +				  &val);
> +		val &= S2MPS_ALARM0_STATUS;
> +		break;
>  	case S2MPG10:
>  	case S2MPS15X:
>  	case S2MPS14X:
> @@ -303,6 +309,7 @@ static int s5m8767_rtc_set_alarm_reg(struct s5m_rtc_info *info)
>  		udr_mask |= S5M_RTC_TIME_EN_MASK;
>  		break;
>  	case S2MPG10:
> +	case S2MPS16X:
>  	case S2MPS15X:
>  	case S2MPS14X:
>  	case S2MPS13X:
> @@ -354,6 +361,7 @@ static int s5m_rtc_read_time(struct device *dev, struct rtc_time *tm)
>  	switch (info->device_type) {
>  	case S5M8767X:
>  	case S2MPG10:
> +	case S2MPS16X:
>  	case S2MPS15X:
>  	case S2MPS14X:
>  	case S2MPS13X:
> @@ -378,6 +386,7 @@ static int s5m_rtc_set_time(struct device *dev, struct rtc_time *tm)
>  	switch (info->device_type) {
>  	case S5M8767X:
>  	case S2MPG10:
> +	case S2MPS16X:
>  	case S2MPS15X:
>  	case S2MPS14X:
>  	case S2MPS13X:
> @@ -416,6 +425,7 @@ static int s5m_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alrm)
>  	switch (info->device_type) {
>  	case S5M8767X:
>  	case S2MPG10:
> +	case S2MPS16X:
>  	case S2MPS15X:
>  	case S2MPS14X:
>  	case S2MPS13X:
> @@ -455,6 +465,7 @@ static int s5m_rtc_stop_alarm(struct s5m_rtc_info *info)
>  	switch (info->device_type) {
>  	case S5M8767X:
>  	case S2MPG10:
> +	case S2MPS16X:
>  	case S2MPS15X:
>  	case S2MPS14X:
>  	case S2MPS13X:
> @@ -494,6 +505,7 @@ static int s5m_rtc_start_alarm(struct s5m_rtc_info *info)
>  	switch (info->device_type) {
>  	case S5M8767X:
>  	case S2MPG10:
> +	case S2MPS16X:
>  	case S2MPS15X:
>  	case S2MPS14X:
>  	case S2MPS13X:
> @@ -532,6 +544,7 @@ static int s5m_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alrm)
>  	switch (info->device_type) {
>  	case S5M8767X:
>  	case S2MPG10:
> +	case S2MPS16X:
>  	case S2MPS15X:
>  	case S2MPS14X:
>  	case S2MPS13X:
> @@ -613,6 +626,7 @@ static int s5m8767_rtc_init_reg(struct s5m_rtc_info *info)
>  		break;
>  
>  	case S2MPG10:
> +	case S2MPS16X:
>  	case S2MPS15X:
>  	case S2MPS14X:
>  	case S2MPS13X:
> @@ -680,6 +694,7 @@ static int s5m_rtc_probe(struct platform_device *pdev)
>  		struct i2c_client *i2c;
>  
>  		switch (device_type) {
> +		case S2MPS16X:
>  		case S2MPS15X:
>  			regmap_cfg = &s2mps14_rtc_regmap_config;
>  			info->regs = &s2mps15_rtc_regs;
> @@ -817,6 +832,7 @@ static const struct platform_device_id s5m_rtc_id[] = {
>  	{ "s2mps13-rtc",	S2MPS13X },
>  	{ "s2mps14-rtc",	S2MPS14X },
>  	{ "s2mps15-rtc",	S2MPS15X },
> +	{ "s2mps16-rtc",	S2MPS16X },
>  	{ },
>  };
>  MODULE_DEVICE_TABLE(platform, s5m_rtc_id);
> -- 
> 2.43.0
> 

-- 
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

  reply	other threads:[~2025-09-14 16:35 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-14 12:42 [PATCH v1 0/7] mfd: sec: add support for s2mps16 pmic Ivaylo Ivanov
2025-09-14 12:42 ` [PATCH v1 1/7] regulator: dt-bindings: add documentation for s2mps16-pmic regulators Ivaylo Ivanov
2025-09-24 15:11   ` Rob Herring
2025-09-24 15:12   ` Rob Herring
2025-09-14 12:42 ` [PATCH v1 2/7] dt-bindings: mfd: samsung,s2mps11: add compatible for s2mps16-pmic Ivaylo Ivanov
2025-09-24 15:13   ` Rob Herring (Arm)
2025-09-14 12:42 ` [PATCH v1 3/7] dt-bindings: clock: samsung,s2mps11: document the S2MPS16 compatible Ivaylo Ivanov
2025-09-21 16:27   ` Stephen Boyd
2025-09-24 15:13   ` Rob Herring (Arm)
2025-09-14 12:42 ` [PATCH v1 4/7] mfd: sec: add support for s2mps16 pmic Ivaylo Ivanov
2025-09-16 15:55   ` Lee Jones
2025-10-10 13:12   ` Krzysztof Kozlowski
2025-09-14 12:42 ` [PATCH v1 5/7] clk: s2mps11: add the support for S2MPS16 PMIC clock Ivaylo Ivanov
2025-09-15  4:56   ` Peng Fan
2025-09-15  7:46   ` André Draszik
2025-09-21 16:28   ` Stephen Boyd
2025-10-10 13:05   ` Krzysztof Kozlowski
2025-09-14 12:42 ` [PATCH v1 6/7] rtc: s5m: add support for S2MPS16 RTC Ivaylo Ivanov
2025-09-14 16:35   ` Alexandre Belloni [this message]
2025-10-10 13:07   ` Krzysztof Kozlowski
2025-09-14 12:42 ` [PATCH v1 7/7] regulator: s2mps11: add support for S2MPS16 regulators Ivaylo Ivanov
2025-09-15 11:42   ` Mark Brown
2025-10-10 13:08   ` Krzysztof Kozlowski

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=2025091416350055a27358@mail.local \
    --to=alexandre.belloni@bootlin.com \
    --cc=alim.akhtar@samsung.com \
    --cc=andre.draszik@linaro.org \
    --cc=broonie@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=cw00.choi@samsung.com \
    --cc=devicetree@vger.kernel.org \
    --cc=ivo.ivanov.ivanov1@gmail.com \
    --cc=krzk@kernel.org \
    --cc=lee@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rtc@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=mturquette@baylibre.com \
    --cc=robh@kernel.org \
    --cc=s.nawrocki@samsung.com \
    --cc=sboyd@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