From nobody Wed Feb 11 02:54:44 2026 Received: from mail-ed1-f52.google.com (mail-ed1-f52.google.com [209.85.208.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 92FFE392826 for ; Tue, 13 Jan 2026 14:03:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.52 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768312999; cv=none; b=I+2uKMDm3QoqvYDam8gwxKhg/66jZGo8+HY1EJFDPc3tH7934wB97zf3MCq7CQ+ucterprjanDbb3N9G2o+/wdeDoNtxK/9ATuYAb0lGFCmYJ3s78insFiCreFFE6IcJurUoqHzhHa5EeyHfnmv9X7Z6ct5P+GKDJ7gOi3vDm+c= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768312999; c=relaxed/simple; bh=YursKKXNmAq3gLEo1Ra7eyeVALmovWWslD5JKj7z2PM=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=WslWNm+N9PLVLYeEUVzkob+frqUu3jAxrUJCI23v5NGIzAKDcEdpS3ptROYMashtRv6kgeaHYwSDVx0UOYQ9gFSMljqxbX765/Y8FvFeuWjBXo14z15snW3hNKhrPS92LCCPytiqC92V/Hxagb147rgdIrVNvWb5pGvyPPTqawU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=tRUP6nrC; arc=none smtp.client-ip=209.85.208.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="tRUP6nrC" Received: by mail-ed1-f52.google.com with SMTP id 4fb4d7f45d1cf-64d02c01865so385292a12.1 for ; Tue, 13 Jan 2026 06:03:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1768312994; x=1768917794; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=2QNRfSu+X0n9+C9HJ8TARuT1Nhgd2E5zqZHGvVona/I=; b=tRUP6nrCrfrgqXZvZtIAIvdOyt8TtvzY1msQiZPmrxrpHIAxhi2lntUAVkaMOy+otY tuE5Fl7nbTpSLFO7H3NYy59cgxEy/GH1IIKk6ocjCagpBdlesqmshakjTJWZnMAyCZDL N7W5wPJ5LfmZvXhxG55ZBGlFuPZeSVLu9IE6Iu/E2Cl2sEU68HMhBF1Q3roqNFWknvgp n4yWDQMGM1swX9ovQzXPoCAs++01XbO02MF5r6Pl++c49dPxGBAV1+sDGr9Jk/Cila1z e39HNA8aOEn3bgSGEAc/2Z7pbXRg328lg7M8F2aOQ9GEZMyW/xt54J8PZqWTSRNrPkHW +/6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768312994; x=1768917794; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=2QNRfSu+X0n9+C9HJ8TARuT1Nhgd2E5zqZHGvVona/I=; b=f2hN8RqPIEZR7FBE8Hbgr+/Ql/NQvP3eHkYulYxZaXk9fiACqvd8boSQwdR0KP5OVz 6jLbpnhoXSO0frP4CzliGFKwaKSFyA4Jr5REl6xxiYIR4wzXH0yyqnWnnTixdaDkFn/G 2P/CB3Wdo6f/lArMCLvVOBwvoeuesnfAA44p9Tu9oCVo9EEmMOApOLUvATrXnFDct77w NDIZatnxqbvjaZFaI/bPz4SD/GWvauqCA91kSPRvh3WIjBFAmIHHf63N7qGLLixQ/R7e heExzuc477ggWZMKUVcaexOwCvWq+jMu55VN1bq9aqAEWO3s7G9amNx2dlGz2B99Rs7K hkRg== X-Forwarded-Encrypted: i=1; AJvYcCVE5Kanqdz3Vrqa/xz9IjVG9l8e060H7vwMfVhzn4Nw5iIhEWbrtWGNYF7uy4q01CT1k2SUwe6rCS6oSvI=@vger.kernel.org X-Gm-Message-State: AOJu0YynrVriW5EicZwr/9mNziNbXwB9YjccknlXi44qzuUgkypusit3 o7ye7TDdOx5/2yApzcemeSJh8YtaKVWMFr7GCymH1y1kwSJ9VHARJMGAH6OZv6hSgiY= X-Gm-Gg: AY/fxX6N06dr0rdIL/RmmDa7PViPW1zQ2V5NPVBFuCdTkdAYg9AxU5nfDt1XovGJ7GW Hzovaj7uQE+FD0v/VhKHmKqfk6it9D39M0AVGXw0drEZ9fm8UHgarbOg28xd0jtqr2G1d+GLvb4 4CFCeXXNPCJ+Al8tNo2/yXBZm6BiF8+g6wcURgMSd2luRx5Xsrq+HjECNoJWcHzOeArXpdU3ezV 0vufy+68yFjEZb1sRqGklYdJs8FxEcU6ZqKGJLjuwCUWJOewEc0w5ocfWN3ndw20ExgNwCXgQA9 IzJbriAhzQrqYHGiber3+9Rk0i/VQNM/ya08iLheP9ouuGWH+ku5FmVu1KRCGCsE/m+huL0pYCw OwQcBozX+0KDx8XeATR8i9RvN9rMXDrehVYp4DCjYA8wrxw0uW3h4jX04rGsGVoVcysu/d+GB3a LrwBjrFy8g9FslquW1gRpSodxotiO/5A5dkSLgfqjSbTXBraXAymlZ4cz+lFZfpPxXFyt3X4CZk Wci8Q== X-Google-Smtp-Source: AGHT+IGTTr6SX1QOQDiv8wO0iFLkAfJCO8fhPBk9ftZPt1uQsStN5fTC5tHBZBCLBy3V7N0AGsHvyg== X-Received: by 2002:aa7:cd13:0:b0:64b:7e89:811 with SMTP id 4fb4d7f45d1cf-65097e071f5mr16815559a12.13.1768312994017; Tue, 13 Jan 2026 06:03:14 -0800 (PST) Received: from puffmais2.c.googlers.com (244.175.141.34.bc.googleusercontent.com. [34.141.175.244]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-6507bf65c07sm20139157a12.23.2026.01.13.06.03.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Jan 2026 06:03:13 -0800 (PST) From: =?utf-8?q?Andr=C3=A9_Draszik?= Date: Tue, 13 Jan 2026 14:03:11 +0000 Subject: [PATCH v3 1/3] mfd: sec: add rtc alarm IRQ as platform device resource Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260113-s5m-alarm-v3-1-855a19db1277@linaro.org> References: <20260113-s5m-alarm-v3-0-855a19db1277@linaro.org> In-Reply-To: <20260113-s5m-alarm-v3-0-855a19db1277@linaro.org> To: Krzysztof Kozlowski , Lee Jones , Alexandre Belloni Cc: Peter Griffin , Tudor Ambarus , Will McVicker , Juan Yescas , Douglas Anderson , kernel-team@android.com, Kaustabh Chakraborty , linux-kernel@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-rtc@vger.kernel.org, =?utf-8?q?Andr=C3=A9_Draszik?= X-Mailer: b4 0.14.2 By adding the RTC alarm IRQ to the MFD cell as a resource, the child driver (rtc) can simply query that IRQ, instead of having a lookup table itself. This change therefore allows the child driver to be simplified with regards to determining the alarm IRQ. Signed-off-by: Andr=C3=A9 Draszik --- drivers/mfd/sec-common.c | 38 +++++++++++++++++++++++++++++--------- 1 file changed, 29 insertions(+), 9 deletions(-) diff --git a/drivers/mfd/sec-common.c b/drivers/mfd/sec-common.c index 42d55e70e34c8d7cd68cddaecc88017e259365b4..77370db52a7ba81234136b29f85= 892f4b197f429 100644 --- a/drivers/mfd/sec-common.c +++ b/drivers/mfd/sec-common.c @@ -23,9 +23,13 @@ #include #include "sec-core.h" =20 +static const struct resource s5m8767_rtc_resources[] =3D { + DEFINE_RES_IRQ_NAMED(S5M8767_IRQ_RTCA1, "alarm"), +}; + static const struct mfd_cell s5m8767_devs[] =3D { MFD_CELL_NAME("s5m8767-pmic"), - MFD_CELL_NAME("s5m-rtc"), + MFD_CELL_RES("s5m-rtc", s5m8767_rtc_resources), MFD_CELL_OF("s5m8767-clk", NULL, NULL, 0, 0, "samsung,s5m8767-clk"), }; =20 @@ -33,50 +37,66 @@ static const struct mfd_cell s2dos05_devs[] =3D { MFD_CELL_NAME("s2dos05-regulator"), }; =20 +static const struct resource s2mpg10_rtc_resources[] =3D { + DEFINE_RES_IRQ_NAMED(S2MPG10_IRQ_RTCA0, "alarm"), +}; + static const struct mfd_cell s2mpg10_devs[] =3D { MFD_CELL_NAME("s2mpg10-meter"), MFD_CELL_NAME("s2mpg10-regulator"), - MFD_CELL_NAME("s2mpg10-rtc"), + MFD_CELL_RES("s2mpg10-rtc", s2mpg10_rtc_resources), MFD_CELL_OF("s2mpg10-clk", NULL, NULL, 0, 0, "samsung,s2mpg10-clk"), MFD_CELL_OF("s2mpg10-gpio", NULL, NULL, 0, 0, "samsung,s2mpg10-gpio"), }; =20 +static const struct resource s2mps11_rtc_resources[] =3D { + DEFINE_RES_IRQ_NAMED(S2MPS11_IRQ_RTCA0, "alarm"), +}; + static const struct mfd_cell s2mps11_devs[] =3D { MFD_CELL_NAME("s2mps11-regulator"), - MFD_CELL_NAME("s2mps14-rtc"), + MFD_CELL_RES("s2mps14-rtc", s2mps11_rtc_resources), MFD_CELL_OF("s2mps11-clk", NULL, NULL, 0, 0, "samsung,s2mps11-clk"), }; =20 +static const struct resource s2mps14_rtc_resources[] =3D { + DEFINE_RES_IRQ_NAMED(S2MPS14_IRQ_RTCA0, "alarm"), +}; + static const struct mfd_cell s2mps13_devs[] =3D { MFD_CELL_NAME("s2mps13-regulator"), - MFD_CELL_NAME("s2mps13-rtc"), + MFD_CELL_RES("s2mps13-rtc", s2mps14_rtc_resources), MFD_CELL_OF("s2mps13-clk", NULL, NULL, 0, 0, "samsung,s2mps13-clk"), }; =20 static const struct mfd_cell s2mps14_devs[] =3D { MFD_CELL_NAME("s2mps14-regulator"), - MFD_CELL_NAME("s2mps14-rtc"), + MFD_CELL_RES("s2mps14-rtc", s2mps14_rtc_resources), MFD_CELL_OF("s2mps14-clk", NULL, NULL, 0, 0, "samsung,s2mps14-clk"), }; =20 static const struct mfd_cell s2mps15_devs[] =3D { MFD_CELL_NAME("s2mps15-regulator"), - MFD_CELL_NAME("s2mps15-rtc"), + MFD_CELL_RES("s2mps15-rtc", s2mps14_rtc_resources), MFD_CELL_OF("s2mps13-clk", NULL, NULL, 0, 0, "samsung,s2mps13-clk"), }; =20 static const struct mfd_cell s2mpa01_devs[] =3D { MFD_CELL_NAME("s2mpa01-pmic"), - MFD_CELL_NAME("s2mps14-rtc"), + MFD_CELL_RES("s2mps14-rtc", s2mps14_rtc_resources), }; =20 static const struct mfd_cell s2mpu02_devs[] =3D { MFD_CELL_NAME("s2mpu02-regulator"), }; =20 +static const struct resource s2mpu05_rtc_resources[] =3D { + DEFINE_RES_IRQ_NAMED(S2MPU05_IRQ_RTCA0, "alarm"), +}; + static const struct mfd_cell s2mpu05_devs[] =3D { MFD_CELL_NAME("s2mpu05-regulator"), - MFD_CELL_NAME("s2mps15-rtc"), + MFD_CELL_RES("s2mps15-rtc", s2mpu05_rtc_resources), }; =20 static void sec_pmic_dump_rev(struct sec_pmic_dev *sec_pmic) @@ -220,7 +240,7 @@ int sec_pmic_probe(struct device *dev, int device_type,= unsigned int irq, sec_pmic->device_type); } ret =3D devm_mfd_add_devices(sec_pmic->dev, -1, sec_devs, num_sec_devs, - NULL, 0, NULL); + NULL, 0, regmap_irq_get_domain(sec_pmic->irq_data)); if (ret) return ret; =20 --=20 2.52.0.457.g6b5491de43-goog