Writing 1 to the PM8xxx_RTC_ALARM_CLEAR register is expected to clear
the triggered alarm status. In patch v2, the value written to the
PM8xxx_RTC_ALARM_CLEAR register in the trigger function is incorrectly
written as 0. So correct the value written to PM8xxx_RTC_ALARM_CLEAR
register into 1.
Signed-off-by: jianbin zhang <[email protected]>
---
Changess in v4:
- add the cover letter
- modify the patch to conform to the specification
Changes in v3:
- Correct the value written into the PM8xxx_RTC_ALARM_CLEAR to 1.
- link: https://lore.kernel.org/linux-rtc/[email protected]/T/#t
Changes in v2:
- Switch to using regmap_update_bits() instead of open coding
read-modify-write accesses.
- link: https://lore.kernel.org/lkml/[email protected]/
Changes in v1:
-link: https://lore.kernel.org/linux-rtc/[email protected]/
---
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 e4e2307445cf..806c99cdac9a 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.43.2
On Mon, Apr 01, 2024 at 09:56:30AM +0800, jianbin zhang wrote:
> Writing 1 to the PM8xxx_RTC_ALARM_CLEAR register is expected to clear
> the triggered alarm status. In patch v2, the value written to the
I'm not sure what "in patch v2" refers to here.
Also, as with patch 1, please fix your subject line and use internal
review list.
Regards,
Bjorn
> PM8xxx_RTC_ALARM_CLEAR register in the trigger function is incorrectly
> written as 0. So correct the value written to PM8xxx_RTC_ALARM_CLEAR
> register into 1.
>
> Signed-off-by: jianbin zhang <[email protected]>
> ---
> Changess in v4:
> - add the cover letter
> - modify the patch to conform to the specification
>
> Changes in v3:
> - Correct the value written into the PM8xxx_RTC_ALARM_CLEAR to 1.
> - link: https://lore.kernel.org/linux-rtc/[email protected]/T/#t
>
> Changes in v2:
> - Switch to using regmap_update_bits() instead of open coding
> read-modify-write accesses.
> - link: https://lore.kernel.org/lkml/[email protected]/
>
> Changes in v1:
> -link: https://lore.kernel.org/linux-rtc/[email protected]/
> ---
> 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 e4e2307445cf..806c99cdac9a 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.43.2
>
On 4/5/24 10:47, Bjorn Andersson wrote:
> On Mon, Apr 01, 2024 at 09:56:30AM +0800, jianbin zhang wrote:
>> Writing 1 to the PM8xxx_RTC_ALARM_CLEAR register is expected to clear
>> the triggered alarm status. In patch v2, the value written to the
> I'm not sure what "in patch v2" refers to here.
Thanks for reviewing, "In patch v2" refers to https://lore.kernel.org/lkml/[email protected]/ which siwtch to use regmap_update_bits.
> Also, as with patch 1, please fix your subject line and use internal
> review list.
>
> Regards,
> Bjorn
Sure, Will fix the subject line and use internal review list in next
patch version.
>> PM8xxx_RTC_ALARM_CLEAR register in the trigger function is incorrectly
>> written as 0. So correct the value written to PM8xxx_RTC_ALARM_CLEAR
>> register into 1.
>>
>> Signed-off-by: jianbin zhang <[email protected]>
>> ---
>> Changess in v4:
>> - add the cover letter
>> - modify the patch to conform to the specification
>>
>> Changes in v3:
>> - Correct the value written into the PM8xxx_RTC_ALARM_CLEAR to 1.
>> - link: https://lore.kernel.org/linux-rtc/[email protected]/T/#t
>>
>> Changes in v2:
>> - Switch to using regmap_update_bits() instead of open coding
>> read-modify-write accesses.
>> - link: https://lore.kernel.org/lkml/[email protected]/
>>
>> Changes in v1:
>> -link: https://lore.kernel.org/linux-rtc/[email protected]/
>> ---
>> 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 e4e2307445cf..806c99cdac9a 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.43.2
>>