]> git.ipfire.org Git - thirdparty/linux.git/commit
mfd: rtc: bd7xxxx Drop IC name from IRQ
authorMatti Vaittinen <mazziesaccount@gmail.com>
Thu, 26 Sep 2024 12:01:13 +0000 (15:01 +0300)
committerLee Jones <lee@kernel.org>
Fri, 1 Nov 2024 15:53:05 +0000 (15:53 +0000)
commit9b15062cc05dbfec8092f5f08ac734fd29ed7b5a
tree4f7782459f47a1144b3b9868e73b266bfd045573
parent6e31bb8d3a63bb2c3efab2fb6bcfccac677a4581
mfd: rtc: bd7xxxx Drop IC name from IRQ

A few ROHM PMICs have an RTC block which can be controlled by the
rtc-bd70528 driver. The RTC driver needs the alarm interrupt information
from the parent MFD driver. The MFD driver provides the interrupt
information as a set of named interrupts, where the name is of form:
<PMIC model>-rtc-alm-<x>, where x is an alarm block number.

>From the RTC driver point of view it is irrelevant what the PMIC name
is. It is sufficient to know this is alarm interrupt for a block X. The
PMIC model information is carried to RTC via the platform device ID.
Hence, having the PMIC model in the interrupt name is only making things
more complex because the RTC driver needs to request differently named
interrupts on different PMICs, making code unnecessary complicated.

Simplify this slightly by always using the RTC driver name 'bd70528' as
the prefix for alarm interrupts, no matter what the exact PMIC model is,
and always request the alarm interrupts of same name no matter what the
PMIC model is.

Signed-off-by: Matti Vaittinen <mazziesaccount@gmail.com>
Acked-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://lore.kernel.org/r/ZvVNCfk10ih0YFLW@fedora
Signed-off-by: Lee Jones <lee@kernel.org>
drivers/mfd/rohm-bd71828.c
drivers/rtc/rtc-bd70528.c