From: Lee Jones <lee@kernel.org>
To: "André Draszik" <andre.draszik@linaro.org>
Cc: Krzysztof Kozlowski <krzk@kernel.org>,
Alexandre Belloni <alexandre.belloni@bootlin.com>,
Peter Griffin <peter.griffin@linaro.org>,
Tudor Ambarus <tudor.ambarus@linaro.org>,
Will McVicker <willmcvicker@google.com>,
Juan Yescas <jyescas@google.com>,
Douglas Anderson <dianders@chromium.org>,
kernel-team@android.com,
Kaustabh Chakraborty <kauschluss@disroot.org>,
linux-kernel@vger.kernel.org, linux-samsung-soc@vger.kernel.org,
linux-rtc@vger.kernel.org
Subject: Re: [PATCH v2 0/3] Samsung mfd/rtc driver alarm IRQ simplification
Date: Tue, 16 Dec 2025 16:20:24 +0000 [thread overview]
Message-ID: <20251216162024.GI9275@google.com> (raw)
In-Reply-To: <20251126140409.GC3070764@google.com>
On Wed, 26 Nov 2025, Lee Jones wrote:
> On Wed, 26 Nov 2025, Lee Jones wrote:
>
> > On Thu, 20 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 as patch 2 without 1 will
> > > fail at runtime, and patch 3 without 2 will fail at build time. I would
> > > expect them all to go via the MFD tree. Alternatively, they could be
> > > applied individually to the respective kernel trees during multiple
> > > kernel release cycles, but that seems a needless complication and
> > > delay.
> > >
> > > Signed-off-by: André Draszik <andre.draszik@linaro.org>
> > > ---
> > > Changes in v2:
> > > - rebase on top of https://lore.kernel.org/r/20251114-s2mpg10-chained-irq-v1-1-34ddfa49c4cd@linaro.org
> > > - return struct regmap_irq_chip_data * in sec_irq_init() (Lee)
> > > - collect tags
> > > - Link to v1: https://lore.kernel.org/r/20251114-s5m-alarm-v1-0-c9b3bebae65f@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 | 45 ++++++++++++++++++++--------
> > > drivers/mfd/sec-core.h | 2 +-
> > > drivers/mfd/sec-irq.c | 63 ++++++++++++++++++----------------------
> > > drivers/rtc/rtc-s5m.c | 21 +++++---------
> > > include/linux/mfd/samsung/core.h | 1 -
> > > 5 files changed, 71 insertions(+), 61 deletions(-)
> >
> > The MFD parts look okay to me.
> >
> > Once we have the RTC Ack, I'll merge this and send out a PR.
>
> Ah, I see it. Apologies.
>
> It's too late in the cycle to take this now anyway.
>
> It's on my radar for when -rc1 is released.
This does not seem to apply well on v6.19-rc1.
Please rebase and send as a [RESEND].
-----
% cat drivers/mfd/sec-irq.c.rej
diff a/drivers/mfd/sec-irq.c b/drivers/mfd/sec-irq.c (rejected hunks)
@@ -302,27 +304,28 @@ static int sec_irq_init_s2mpg1x(struct sec_pmic_dev *sec_pmic)
chained_pirq = S2MPG10_COMMON_IRQ_PMIC;
break;
default:
- return dev_err_probe(sec_pmic->dev, -EINVAL, "Unsupported device type %d\n",
- sec_pmic->device_type);
+ return dev_err_ptr_probe(sec_pmic->dev, -EINVAL, "Unsupported device type %d\n",
+ sec_pmic->device_type);
};
regmap_common = dev_get_regmap(sec_pmic->dev, "common");
if (!regmap_common)
- return dev_err_probe(sec_pmic->dev, -EINVAL, "No 'common' regmap %d\n",
- sec_pmic->device_type);
+ return dev_err_ptr_probe(sec_pmic->dev, -EINVAL, "No 'common' regmap %d\n",
+ sec_pmic->device_type);
ret = devm_regmap_add_irq_chip(sec_pmic->dev, regmap_common, sec_pmic->irq, IRQF_ONESHOT, 0,
irq_chip, &irq_data);
if (ret)
- return dev_err_probe(sec_pmic->dev, ret, "Failed to add %s IRQ chip\n",
- irq_chip->name);
+ return dev_err_ptr_probe(sec_pmic->dev, ret, "Failed to add %s IRQ chip\n",
+ irq_chip->name);
return s2mpg1x_add_chained_irq_chip(sec_pmic->dev, sec_pmic->regmap_pmic, chained_pirq,
- irq_data, chained_irq_chip, &sec_pmic->irq_data);
+ irq_data, chained_irq_chip);
}
-int sec_irq_init(struct sec_pmic_dev *sec_pmic)
+struct regmap_irq_chip_data *sec_irq_init(struct sec_pmic_dev *sec_pmic)
{
+ struct regmap_irq_chip_data *sec_irq_chip_data;
const struct regmap_irq_chip *sec_irq_chip;
int ret;
--
Lee Jones [李琼斯]
next prev parent reply other threads:[~2025-12-16 16:20 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-20 14:38 [PATCH v2 0/3] Samsung mfd/rtc driver alarm IRQ simplification André Draszik
2025-11-20 14:38 ` [PATCH v2 1/3] mfd: sec: add rtc alarm IRQ as platform device resource André Draszik
2025-11-20 14:38 ` [PATCH v2 2/3] rtc: s5m: query platform device IRQ resource for alarm IRQ André Draszik
2025-11-20 14:38 ` [PATCH v2 3/3] mfd: sec: drop now unused struct sec_pmic_dev::irq_data André Draszik
2025-11-26 11:29 ` [PATCH v2 0/3] Samsung mfd/rtc driver alarm IRQ simplification Lee Jones
2025-11-26 12:30 ` André Draszik
2025-11-26 14:04 ` Lee Jones
2025-12-16 16:20 ` Lee Jones [this message]
2026-01-20 15:49 ` Lee Jones
2026-01-20 15:52 ` Lee Jones
2026-01-20 15:58 ` Mark Brown
2026-01-20 17:24 ` Lee Jones
2026-01-20 17:28 ` Mark Brown
2026-01-21 8:48 ` Lee Jones
2026-01-21 3:23 ` Konstantin Ryabitsev
2026-01-21 8:44 ` Lee Jones
2026-01-22 13:28 ` [GIT PULL] Immutable branch between MFD and RTC due for the v6.20 merge window Lee Jones
2026-01-22 13:29 ` Lee Jones
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=20251216162024.GI9275@google.com \
--to=lee@kernel.org \
--cc=alexandre.belloni@bootlin.com \
--cc=andre.draszik@linaro.org \
--cc=dianders@chromium.org \
--cc=jyescas@google.com \
--cc=kauschluss@disroot.org \
--cc=kernel-team@android.com \
--cc=krzk@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rtc@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=peter.griffin@linaro.org \
--cc=tudor.ambarus@linaro.org \
--cc=willmcvicker@google.com \
/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