diff mbox series

[v3,2/2] rtc: rtc-pm8xxx: Correct the PM8xxx_RTC_ALARM_CLEAR vaule in trigger

Message ID 20240314033449.10872-1-quic_jianbinz@quicinc.com
State Changes Requested
Headers show
Series [v3,1/2] rtc: rtc-pm8xxx: clear the interrupt in probe | expand

Commit Message

jianbin zhang March 14, 2024, 3:34 a.m. UTC
Change in v3:
*Correct the vaule that writed into the PM8xxx_RTC_ALARM_CLEAR to 1.

Change in v2:
*Switch to using regmap_update_bits() instead of open coding
read-modify-write accesses.
Link to v2: https://lore.kernel.org/lkml/20230202155448.6715-4-johan+linaro@kernel.org/

Signed-off-by: jianbinz <quic_jianbinz@quicinc.com>
---
 drivers/rtc/rtc-pm8xxx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Bjorn Andersson March 19, 2024, 7:12 p.m. UTC | #1
On Thu, Mar 14, 2024 at 11:34:49AM +0800, jianbinz wrote:
> Change in v3:
> *Correct the vaule that writed into the PM8xxx_RTC_ALARM_CLEAR to 1.
> 
> Change in v2:
> *Switch to using regmap_update_bits() instead of open coding
> read-modify-write accesses.
> Link to v2: https://lore.kernel.org/lkml/20230202155448.6715-4-johan+linaro@kernel.org/
> 
> Signed-off-by: jianbinz <quic_jianbinz@quicinc.com>

Same feedback as on patch 1/2, but on this one you're also completely
missing a commit message clearly describing the problem that your change
is solving.

Regards,
Bjorn

> ---
>  drivers/rtc/rtc-pm8xxx.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/rtc/rtc-pm8xxx.c b/drivers/rtc/rtc-pm8xxx.c
> index 1b5a96924e57..8a9be78d0b0b 100644
> --- a/drivers/rtc/rtc-pm8xxx.c
> +++ b/drivers/rtc/rtc-pm8xxx.c
> @@ -391,7 +391,7 @@ static irqreturn_t pm8xxx_alarm_trigger(int irq, void *dev_id)
>  
>  	/* Clear alarm status */
>  	rc = regmap_update_bits(rtc_dd->regmap, regs->alarm_ctrl2,
> -				PM8xxx_RTC_ALARM_CLEAR, 0);
> +				PM8xxx_RTC_ALARM_CLEAR, 1);
>  	if (rc)
>  		return IRQ_NONE;
>  
> -- 
> 2.17.1
>
diff mbox series

Patch

diff --git a/drivers/rtc/rtc-pm8xxx.c b/drivers/rtc/rtc-pm8xxx.c
index 1b5a96924e57..8a9be78d0b0b 100644
--- a/drivers/rtc/rtc-pm8xxx.c
+++ b/drivers/rtc/rtc-pm8xxx.c
@@ -391,7 +391,7 @@  static irqreturn_t pm8xxx_alarm_trigger(int irq, void *dev_id)
 
 	/* Clear alarm status */
 	rc = regmap_update_bits(rtc_dd->regmap, regs->alarm_ctrl2,
-				PM8xxx_RTC_ALARM_CLEAR, 0);
+				PM8xxx_RTC_ALARM_CLEAR, 1);
 	if (rc)
 		return IRQ_NONE;