[PATCH 0/3] Samsung mfd/rtc driver alarm IRQ simplification

André Draszik posted 3 patches 2 months, 3 weeks ago
There is a newer version of this series
drivers/mfd/sec-common.c         | 41 ++++++++++++++++++++++++++++++----------
drivers/mfd/sec-core.h           |  2 +-
drivers/mfd/sec-irq.c            | 10 ++--------
drivers/rtc/rtc-s5m.c            | 21 ++++++++------------
include/linux/mfd/samsung/core.h |  1 -
5 files changed, 42 insertions(+), 33 deletions(-)
[PATCH 0/3] Samsung mfd/rtc driver alarm IRQ simplification
Posted by André Draszik 2 months, 3 weeks ago
Hi,

With the attached patches the Samsung s5m RTC driver is simplified a
little bit with regards to alarm IRQ acquisition.

The end result is that instead of having a list of IRQ numbers for each
variant (and a BUILD_BUG_ON() to ensure consistency), the RTC driver
queries the 'alarm' platform resource from the parent (mfd cell).

Additionally, we can drop a now-useless field from runtime data,
reducing memory consumption slightly.

The attached patches must be applied in-order. I would expect them all
to go via the MFD tree. Alternatively, they could be applied one after
another during multiple kernel release cycles, but that seems a
needless complication.

Signed-off-by: André Draszik <andre.draszik@linaro.org>
---
André Draszik (3):
      mfd: sec: add rtc alarm IRQ as platform device resource
      rtc: s5m: query platform device IRQ resource for alarm IRQ
      mfd: sec: drop now unused struct sec_pmic_dev::irq_data

 drivers/mfd/sec-common.c         | 41 ++++++++++++++++++++++++++++++----------
 drivers/mfd/sec-core.h           |  2 +-
 drivers/mfd/sec-irq.c            | 10 ++--------
 drivers/rtc/rtc-s5m.c            | 21 ++++++++------------
 include/linux/mfd/samsung/core.h |  1 -
 5 files changed, 42 insertions(+), 33 deletions(-)
---
base-commit: b179ce312bafcb8c68dc718e015aee79b7939ff0
change-id: 20251114-s5m-alarm-3de705ea53ce

Best regards,
-- 
André Draszik <andre.draszik@linaro.org>

Re: [PATCH 0/3] Samsung mfd/rtc driver alarm IRQ simplification
Posted by Lee Jones 2 months, 2 weeks ago
On Fri, 14 Nov 2025, André Draszik wrote:

> Hi,
> 
> With the attached patches the Samsung s5m RTC driver is simplified a
> little bit with regards to alarm IRQ acquisition.
> 
> The end result is that instead of having a list of IRQ numbers for each
> variant (and a BUILD_BUG_ON() to ensure consistency), the RTC driver
> queries the 'alarm' platform resource from the parent (mfd cell).
> 
> Additionally, we can drop a now-useless field from runtime data,
> reducing memory consumption slightly.
> 
> The attached patches must be applied in-order. I would expect them all
> to go via the MFD tree. Alternatively, they could be applied one after
> another during multiple kernel release cycles, but that seems a
> needless complication.
> 
> Signed-off-by: André Draszik <andre.draszik@linaro.org>
> ---
> André Draszik (3):
>       mfd: sec: add rtc alarm IRQ as platform device resource
>       rtc: s5m: query platform device IRQ resource for alarm IRQ
>       mfd: sec: drop now unused struct sec_pmic_dev::irq_data
> 
>  drivers/mfd/sec-common.c         | 41 ++++++++++++++++++++++++++++++----------
>  drivers/mfd/sec-core.h           |  2 +-
>  drivers/mfd/sec-irq.c            | 10 ++--------
>  drivers/rtc/rtc-s5m.c            | 21 ++++++++------------
>  include/linux/mfd/samsung/core.h |  1 -
>  5 files changed, 42 insertions(+), 33 deletions(-)

This needs to be rebased now, right?

-- 
Lee Jones [李琼斯]
Re: [PATCH 0/3] Samsung mfd/rtc driver alarm IRQ simplification
Posted by André Draszik 2 months, 2 weeks ago
Hi Lee,

On Thu, 2025-11-20 at 10:31 +0000, Lee Jones wrote:
> On Fri, 14 Nov 2025, André Draszik wrote:
> 
> > Hi,
> > 
> > With the attached patches the Samsung s5m RTC driver is simplified a
> > little bit with regards to alarm IRQ acquisition.
> > 
> > The end result is that instead of having a list of IRQ numbers for each
> > variant (and a BUILD_BUG_ON() to ensure consistency), the RTC driver
> > queries the 'alarm' platform resource from the parent (mfd cell).
> > 
> > Additionally, we can drop a now-useless field from runtime data,
> > reducing memory consumption slightly.
> > 
> > The attached patches must be applied in-order. I would expect them all
> > to go via the MFD tree. Alternatively, they could be applied one after
> > another during multiple kernel release cycles, but that seems a
> > needless complication.
> > 
> > Signed-off-by: André Draszik <andre.draszik@linaro.org>
> > ---
> > André Draszik (3):
> >       mfd: sec: add rtc alarm IRQ as platform device resource
> >       rtc: s5m: query platform device IRQ resource for alarm IRQ
> >       mfd: sec: drop now unused struct sec_pmic_dev::irq_data
> > 
> >  drivers/mfd/sec-common.c         | 41 ++++++++++++++++++++++++++++++----------
> >  drivers/mfd/sec-core.h           |  2 +-
> >  drivers/mfd/sec-irq.c            | 10 ++--------
> >  drivers/rtc/rtc-s5m.c            | 21 ++++++++------------
> >  include/linux/mfd/samsung/core.h |  1 -
> >  5 files changed, 42 insertions(+), 33 deletions(-)
> 
> This needs to be rebased now, right?

Yes, I'll do that now. Thanks for merging the other patch.


Cheers,
Andre'