From nobody Thu Apr 2 12:41:27 2026 Received: from srv01.abscue.de (abscue.de [89.58.28.240]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 566292C3266; Sun, 29 Mar 2026 07:27:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=89.58.28.240 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774769281; cv=none; b=en29i0WZ1VU1UtOEKv8/X9SZ1NZOvGHO96MDRxfC0FVEtfM+JYKUX9nmCef6quRtCNvtNmHcseBa5a+unzBkA2spi4dP9rEcUhHd2l6w42rESea3rbptCebT1b3ztN7rQwb1ulUPXGYN58R3leUzcPtHAZfyiw3wm9D2ckltceU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774769281; c=relaxed/simple; bh=zOiHRiD7dxKBfhbPbB4OMZm22V5rmCiucuIOzalEXSY=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=DhAYlGcXxK2EspfigWojyIAQfXktnTaPISFV+qCkSqCgJNsNBTZarh8z9cLrJ6z5OTo8A0nC2no4pWe2FSPFn/CSvuJmOmywM7HqyqtAnioIx28KXNCc+vIXDqPXXrI7auYoJCbWEzSwaw1X1Sa4Ryzo8ojo255t832KLWUTqqw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=abscue.de; spf=pass smtp.mailfrom=abscue.de; dkim=pass (2048-bit key) header.d=abscue.de header.i=@abscue.de header.b=T/W55Azw; arc=none smtp.client-ip=89.58.28.240 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=abscue.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=abscue.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=abscue.de header.i=@abscue.de header.b="T/W55Azw" Received: from fluffy-mammal.metal.fwg-cag.de (87-94-78-46.co.dnainternet.fi [87.94.78.46]) by srv01.abscue.de (Postfix) with ESMTPSA id 0280C1C0070; Sun, 29 Mar 2026 09:27:49 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=abscue.de; s=dkim; t=1774769270; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=KDZ5Sh45takfz5M+ly8guwVTBtTFzIYC7hXhR2y5yk4=; b=T/W55AzwjDaWFsg4AheP3A8Y1oqh39ldc4aPcnmWaqzaB6OfJEc+6qPPQytHeUxHPdGMMb XKdqKncrarZMXTAeM5wCX2AmpkiBMrnSX1H9BGOi9pSUdwES5FTvWJiiUxFKF6QiROP4nI xLLXs/m8hHpQWR6YvdVJCX6KwwieVmlTFCbs+zHsv1vZSkr/RaBb9JSovYQfPDU55zUwhu oqhM9hBuekmQ3+flAtePNzpxFyFMbcx2oGyhMsaBzRtuG1+7O2HlW+GymgvbDU+9YUENcu 52ys0xFLBN4e+KyGVB0DBPaMm56MEwOBFsBG22vGO1HQ4zSXobFiWlMQZ7FO3A== From: =?utf-8?q?Otto_Pfl=C3=BCger?= Date: Sun, 29 Mar 2026 09:27:45 +0200 Subject: [PATCH v3 1/5] dt-bindings: rtc: sc2731: Add compatible for SC2730 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: <20260329-sc27xx-mfd-cells-v3-1-9158dee41f74@abscue.de> References: <20260329-sc27xx-mfd-cells-v3-0-9158dee41f74@abscue.de> In-Reply-To: <20260329-sc27xx-mfd-cells-v3-0-9158dee41f74@abscue.de> To: Alexandre Belloni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Orson Zhai , Baolin Wang , Chunyan Zhang , Lee Jones , Pavel Machek , Liam Girdwood , Mark Brown , Sebastian Reichel Cc: linux-rtc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-leds@vger.kernel.org, linux-pm@vger.kernel.org, =?utf-8?q?Otto_Pfl=C3=BCger?= X-Mailer: b4 0.14.3 The RTC block found in the SC2730 PMIC is compatible with the one found in the SC2731 PMIC. Acked-by: Rob Herring (Arm) Signed-off-by: Otto Pfl=C3=BCger --- Documentation/devicetree/bindings/rtc/sprd,sc2731-rtc.yaml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/rtc/sprd,sc2731-rtc.yaml b/D= ocumentation/devicetree/bindings/rtc/sprd,sc2731-rtc.yaml index 5756f617df36..1deae2f4f09d 100644 --- a/Documentation/devicetree/bindings/rtc/sprd,sc2731-rtc.yaml +++ b/Documentation/devicetree/bindings/rtc/sprd,sc2731-rtc.yaml @@ -13,7 +13,12 @@ maintainers: =20 properties: compatible: - const: sprd,sc2731-rtc + oneOf: + - items: + - enum: + - sprd,sc2730-rtc + - const: sprd,sc2731-rtc + - const: sprd,sc2731-rtc =20 reg: maxItems: 1 --=20 2.51.0 From nobody Thu Apr 2 12:41:27 2026 Received: from srv01.abscue.de (abscue.de [89.58.28.240]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 49D472D1931; Sun, 29 Mar 2026 07:27:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=89.58.28.240 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774769281; cv=none; b=Wy59H4ODAaMDOQTEfLVn5lUSd2Fs1WtLgCM95Yv0bCVqXtjYiSKSwHl8mpS7NkBlXpcIqy80Z9mIqR5fw0izDtixPXAN/GxLCOSt9xBwxIQCHrL0pzm9C/cT1mqI208OSU4a3iWDVkyc+AbANI7JO/mC+rt/2Awase0cGr8epxU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774769281; c=relaxed/simple; bh=MHHt2ANc8Qe7TWRx8Im5NLPa2izmN2X0SM9HOq6qFMs=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=TJLLbptoa6SGhhV2JnnXAM68TxvWFjMSnzqxe7BhJqMvEb/IAhipRWgg0yWgj/cvAt9WO8Zptl42mIAoE2sOnpZjZjSHqSIkFh3u9tiFZSYL/2x6qqFD415wR4mkpZO/cwMxvTOSapNohKxWtNGuyHeyXqx+9nFsqB67zx1n5C0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=abscue.de; spf=pass smtp.mailfrom=abscue.de; dkim=pass (2048-bit key) header.d=abscue.de header.i=@abscue.de header.b=sj3k0fiQ; arc=none smtp.client-ip=89.58.28.240 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=abscue.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=abscue.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=abscue.de header.i=@abscue.de header.b="sj3k0fiQ" Received: from fluffy-mammal.metal.fwg-cag.de (87-94-78-46.co.dnainternet.fi [87.94.78.46]) by srv01.abscue.de (Postfix) with ESMTPSA id 03F7F1C00A8; Sun, 29 Mar 2026 09:27:50 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=abscue.de; s=dkim; t=1774769271; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=BHiWGAaKNrxwaOndt6yaXs1hWGrtAVLI4xI13GIu7Wg=; b=sj3k0fiQrlxLhoa9WyulimP1S2Wv+PcY7F1ySFZMuo/eKQAR3+gq3wPLkGMT9LuPlPrN15 DfWhMp6sE81oBV+A0I94v+Mj2xd83ANKOk+XhZzVnmth0bk5IcjJk1lY1szPvjztO2aYx8 JmAhfVBqaJirwAfGaftcDb050F6esPN8rh99abuHGSNw9Sqi+jK2bB2pjYxiTIRtgt+5V7 iZsoZwgvrcxNkqE+eF989AuN2c/9015Wfa0DYXK7y8u0WiOVyxvGyaVnplVgMDlYASCZ86 G/VI290iNf515zCaPlMMdCuBeOOHM68499fsRQqbkflgdHs1g4uu4a54IcvMSg== From: =?utf-8?q?Otto_Pfl=C3=BCger?= Date: Sun, 29 Mar 2026 09:27:46 +0200 Subject: [PATCH v3 2/5] regulator: dt-bindings: sc2731: Deprecate compatible property 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: <20260329-sc27xx-mfd-cells-v3-2-9158dee41f74@abscue.de> References: <20260329-sc27xx-mfd-cells-v3-0-9158dee41f74@abscue.de> In-Reply-To: <20260329-sc27xx-mfd-cells-v3-0-9158dee41f74@abscue.de> To: Alexandre Belloni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Orson Zhai , Baolin Wang , Chunyan Zhang , Lee Jones , Pavel Machek , Liam Girdwood , Mark Brown , Sebastian Reichel Cc: linux-rtc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-leds@vger.kernel.org, linux-pm@vger.kernel.org, =?utf-8?q?Otto_Pfl=C3=BCger?= X-Mailer: b4 0.14.3 The node containing the regulators is always a child of the main PMIC node, which already has a compatible property identifying the type of PMIC. This makes the compatible in the child node redundant. Mark it as deprecated and remove it from the required property list and the examples. Acked-by: Rob Herring (Arm) Acked-by: Mark Brown Signed-off-by: Otto Pfl=C3=BCger --- Documentation/devicetree/bindings/mfd/sprd,sc2731.yaml | 2 = -- .../devicetree/bindings/regulator/sprd,sc2731-regulator.yaml | 4 = +--- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/Documentation/devicetree/bindings/mfd/sprd,sc2731.yaml b/Docum= entation/devicetree/bindings/mfd/sprd,sc2731.yaml index b023e1ef8d3c..12b3258daef5 100644 --- a/Documentation/devicetree/bindings/mfd/sprd,sc2731.yaml +++ b/Documentation/devicetree/bindings/mfd/sprd,sc2731.yaml @@ -222,8 +222,6 @@ examples: }; =20 regulators { - compatible =3D "sprd,sc2731-regulator"; - BUCK_CPU0 { regulator-name =3D "vddarm0"; regulator-min-microvolt =3D <400000>; diff --git a/Documentation/devicetree/bindings/regulator/sprd,sc2731-regula= tor.yaml b/Documentation/devicetree/bindings/regulator/sprd,sc2731-regulato= r.yaml index 9bd752bab68e..7af20a4781b7 100644 --- a/Documentation/devicetree/bindings/regulator/sprd,sc2731-regulator.yaml +++ b/Documentation/devicetree/bindings/regulator/sprd,sc2731-regulator.yaml @@ -26,6 +26,7 @@ description: | =20 properties: compatible: + deprecated: true const: sprd,sc2731-regulator =20 patternProperties: @@ -39,8 +40,5 @@ patternProperties: $ref: regulator.yaml# unevaluatedProperties: false =20 -required: - - compatible - additionalProperties: false ... --=20 2.51.0 From nobody Thu Apr 2 12:41:27 2026 Received: from srv01.abscue.de (abscue.de [89.58.28.240]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 51F0E2D2397; Sun, 29 Mar 2026 07:28:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=89.58.28.240 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774769282; cv=none; b=EpErv0hZB+TS+2cbDRIWkMatimvCSbIoWkvIqKZXqVFenEGRJdNOmcdL65GkY2r/dq4X7Zdc5qLyVGUI2Zizo1hwDeYsh+u15QeJdonnnTUK9uEUtq7fEuAfV1FT2l+TLPpf9YKFjwFvKnoEg3aw5MGiW93ddeDgt8zX3wQgspk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774769282; c=relaxed/simple; bh=Tl09DoUDI1WlaEUHifoyQ4Al5NOut7mqf6EZMe4sI2s=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=hA2NnSHwKPLelO/XlnatCJKlDSUsLNL0wyXi1fBGiKBqTq7/pLyhbB/dC03EGOLa7gbKQ5/datePAZrri2fGUnzB0mwrbyq682WK6pwmj2MQGQJ0Qz54BP8DgL7zPp5CRabTcQG7aFYUxhfZhbc45O+tl+cg77WHp+bxdm1Fg2I= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=abscue.de; spf=pass smtp.mailfrom=abscue.de; dkim=pass (2048-bit key) header.d=abscue.de header.i=@abscue.de header.b=U+9Qs3SZ; arc=none smtp.client-ip=89.58.28.240 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=abscue.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=abscue.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=abscue.de header.i=@abscue.de header.b="U+9Qs3SZ" Received: from fluffy-mammal.metal.fwg-cag.de (87-94-78-46.co.dnainternet.fi [87.94.78.46]) by srv01.abscue.de (Postfix) with ESMTPSA id E3AE41C00AB; Sun, 29 Mar 2026 09:27:51 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=abscue.de; s=dkim; t=1774769272; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=GFndEwzrEeElHMwydsTfrQcvJvh+4gQQGNsvs8BcG4I=; b=U+9Qs3SZPg77N7kyZLrzIyPXNELvM12jnmS5XFnAbPizvudZupWlL2Pv5PPVIrnGOx3ycw bNKzug67Q0UuiOD9oi5q3lZNOBQTjNRqBzvxz+MA2V34H98gZqNn4XPgV7jlc3SBpqzSF5 8nrkEFkPnWR6CkwfsqKdRwULNMjCE9535Nl4T8GSYFhzSg2uttOJnyh8N7mp1oqD+gdX2/ zmf0IqPXpCXgHp4liWIhjmKmRPl9CoOrqe1j/AjknmogEVEEQb4AeYynE/OnsBydSC3dE4 UDqHKde2PkGPaYTKBKF2V9qvjJsFPvyHn1Op9lpslUB4u2vmZb3BS6wSY3+rGQ== From: =?utf-8?q?Otto_Pfl=C3=BCger?= Date: Sun, 29 Mar 2026 09:27:47 +0200 Subject: [PATCH v3 3/5] mfd: sprd-sc27xx: Switch to devm_mfd_add_devices() 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: <20260329-sc27xx-mfd-cells-v3-3-9158dee41f74@abscue.de> References: <20260329-sc27xx-mfd-cells-v3-0-9158dee41f74@abscue.de> In-Reply-To: <20260329-sc27xx-mfd-cells-v3-0-9158dee41f74@abscue.de> To: Alexandre Belloni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Orson Zhai , Baolin Wang , Chunyan Zhang , Lee Jones , Pavel Machek , Liam Girdwood , Mark Brown , Sebastian Reichel Cc: linux-rtc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-leds@vger.kernel.org, linux-pm@vger.kernel.org, =?utf-8?q?Otto_Pfl=C3=BCger?= X-Mailer: b4 0.14.3 To allow instantiating subdevices such as the regulator and poweroff devices that do not have corresponding device tree nodes with a "compatible" property, use devm_mfd_add_devices() with MFD cells instead of devm_of_platform_populate(). Since different PMICs in the SC27xx series contain different components, use separate MFD cell tables for each PMIC model. Define cells for all components that have upstream drivers at this point. Signed-off-by: Otto Pfl=C3=BCger --- drivers/mfd/sprd-sc27xx-spi.c | 62 ++++++++++++++++++++++++++++++++++++---= ---- 1 file changed, 53 insertions(+), 9 deletions(-) diff --git a/drivers/mfd/sprd-sc27xx-spi.c b/drivers/mfd/sprd-sc27xx-spi.c index d6b4350779e6..aa052f646623 100644 --- a/drivers/mfd/sprd-sc27xx-spi.c +++ b/drivers/mfd/sprd-sc27xx-spi.c @@ -14,6 +14,11 @@ #include #include =20 +enum sprd_pmic_type { + PMIC_TYPE_SC2730 =3D 1, + PMIC_TYPE_SC2731, +}; + #define SPRD_PMIC_INT_MASK_STATUS 0x0 #define SPRD_PMIC_INT_RAW_STATUS 0x4 #define SPRD_PMIC_INT_EN 0x8 @@ -50,6 +55,29 @@ struct sprd_pmic_data { u32 charger_det; }; =20 +static const struct mfd_cell sc2730_devices[] =3D { + MFD_CELL_OF("sc2730-adc", NULL, NULL, 0, 0, "sprd,sc2730-adc"), + MFD_CELL_OF("sc2730-bltc", NULL, NULL, 0, 0, "sprd,sc2730-bltc"), + MFD_CELL_OF("sc2730-efuse", NULL, NULL, 0, 0, "sprd,sc2730-efuse"), + MFD_CELL_OF("sc2730-eic", NULL, NULL, 0, 0, "sprd,sc2730-eic"), + MFD_CELL_OF("sc2730-fgu", NULL, NULL, 0, 0, "sprd,sc2730-fgu"), + MFD_CELL_OF("sc2730-rtc", NULL, NULL, 0, 0, "sprd,sc2730-rtc"), + MFD_CELL_OF("sc2730-vibrator", NULL, NULL, 0, 0, "sprd,sc2730-vibrator"), +}; + +static const struct mfd_cell sc2731_devices[] =3D { + MFD_CELL_OF("sc2731-adc", NULL, NULL, 0, 0, "sprd,sc2731-adc"), + MFD_CELL_OF("sc2731-bltc", NULL, NULL, 0, 0, "sprd,sc2731-bltc"), + MFD_CELL_OF("sc2731-charger", NULL, NULL, 0, 0, "sprd,sc2731-charger"), + MFD_CELL_OF("sc2731-efuse", NULL, NULL, 0, 0, "sprd,sc2731-efuse"), + MFD_CELL_OF("sc2731-eic", NULL, NULL, 0, 0, "sprd,sc2731-eic"), + MFD_CELL_OF("sc2731-fgu", NULL, NULL, 0, 0, "sprd,sc2731-fgu"), + MFD_CELL_NAME("sc2731-poweroff"), + MFD_CELL_NAME("sc2731-regulator"), + MFD_CELL_OF("sc2731-rtc", NULL, NULL, 0, 0, "sprd,sc2731-rtc"), + MFD_CELL_OF("sc2731-vibrator", NULL, NULL, 0, 0, "sprd,sc2731-vibrator"), +}; + /* * Since different PMICs of SC27xx series can have different interrupt * base address and irq number, we should save irq number and irq base @@ -152,12 +180,26 @@ static const struct regmap_config sprd_pmic_config = =3D { static int sprd_pmic_probe(struct spi_device *spi) { struct sprd_pmic *ddata; + enum sprd_pmic_type pmic_type; const struct sprd_pmic_data *pdata; - int ret, i; + const struct mfd_cell *cells; + int ret, i, num_cells; + + pmic_type =3D (uintptr_t)of_device_get_match_data(&spi->dev); =20 - pdata =3D of_device_get_match_data(&spi->dev); - if (!pdata) { - dev_err(&spi->dev, "No matching driver data found\n"); + switch (pmic_type) { + case PMIC_TYPE_SC2730: + pdata =3D &sc2730_data; + cells =3D sc2730_devices; + num_cells =3D ARRAY_SIZE(sc2730_devices); + break; + case PMIC_TYPE_SC2731: + pdata =3D &sc2731_data; + cells =3D sc2731_devices; + num_cells =3D ARRAY_SIZE(sc2731_devices); + break; + default: + dev_err(&spi->dev, "Invalid device ID\n"); return -EINVAL; } =20 @@ -204,7 +246,9 @@ static int sprd_pmic_probe(struct spi_device *spi) return ret; } =20 - ret =3D devm_of_platform_populate(&spi->dev); + ret =3D devm_mfd_add_devices(&spi->dev, PLATFORM_DEVID_AUTO, + cells, num_cells, NULL, 0, + regmap_irq_get_domain(ddata->irq_data)); if (ret) { dev_err(&spi->dev, "Failed to populate sub-devices %d\n", ret); return ret; @@ -241,15 +285,15 @@ static DEFINE_SIMPLE_DEV_PM_OPS(sprd_pmic_pm_ops, sprd_pmic_suspend, sprd_pmic_resume); =20 static const struct of_device_id sprd_pmic_match[] =3D { - { .compatible =3D "sprd,sc2730", .data =3D &sc2730_data }, - { .compatible =3D "sprd,sc2731", .data =3D &sc2731_data }, + { .compatible =3D "sprd,sc2730", .data =3D (void *)PMIC_TYPE_SC2730 }, + { .compatible =3D "sprd,sc2731", .data =3D (void *)PMIC_TYPE_SC2731 }, {}, }; MODULE_DEVICE_TABLE(of, sprd_pmic_match); =20 static const struct spi_device_id sprd_pmic_spi_ids[] =3D { - { .name =3D "sc2730", .driver_data =3D (unsigned long)&sc2730_data }, - { .name =3D "sc2731", .driver_data =3D (unsigned long)&sc2731_data }, + { .name =3D "sc2730", .driver_data =3D PMIC_TYPE_SC2730 }, + { .name =3D "sc2731", .driver_data =3D PMIC_TYPE_SC2731 }, {}, }; MODULE_DEVICE_TABLE(spi, sprd_pmic_spi_ids); --=20 2.51.0 From nobody Thu Apr 2 12:41:27 2026 Received: from srv01.abscue.de (abscue.de [89.58.28.240]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 730602D73AD; Sun, 29 Mar 2026 07:28:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=89.58.28.240 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774769282; cv=none; b=EIwE1A5uQPzjE/wOXzTRwPnqyTyZ7sGkUJfFxMmmDuGmlU63WgZQt4Gi+/TafbL9Tk0Q5KkdDBGQ5Rj2yjjpvmsywa3caqUjbeGqclLztpJHdISVzoSRc75dHlzS+vvQNmO/BSylTQ911aJrpJ5IcQFGpnUtuWBgg6MiWTLowGk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774769282; c=relaxed/simple; bh=pi32dSd8TSx+SNWSMpom2JT7gL0RFRI7pQDQIaLDrq8=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=EL/B1WWXtrOZ60zSmYLsWeILsTLwxkGjbkVIwcDP1kgqDjqZVyAEO/cyXQUWLbSq8U76NAo4k43Oh0x/SsPtLZ4D3fo9J9XGTYV3r4v6cWlkR2TdWQiKsYcjpIrvEkRSe+q9NSg5DytHwxGqBVAGuFWY61JB/ByJNcvw2CzU0kQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=abscue.de; spf=pass smtp.mailfrom=abscue.de; dkim=pass (2048-bit key) header.d=abscue.de header.i=@abscue.de header.b=kFkdA6kY; arc=none smtp.client-ip=89.58.28.240 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=abscue.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=abscue.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=abscue.de header.i=@abscue.de header.b="kFkdA6kY" Received: from fluffy-mammal.metal.fwg-cag.de (87-94-78-46.co.dnainternet.fi [87.94.78.46]) by srv01.abscue.de (Postfix) with ESMTPSA id CFE561C243A; Sun, 29 Mar 2026 09:27:52 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=abscue.de; s=dkim; t=1774769274; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=RHqLGlaDozhvgx5NZzsru55VUPorc1eitoMtmO4DGA0=; b=kFkdA6kYd/QrIaoKLsTyJNmA2Q0Mz5EwPAxVol41mpbcwJhv275luDN+Ks0cowUWPG84YS yujaMxjyI4oi4ychknGaNUk169VnS7PzteBORUnRCaEwSH0x26xKsqONxK464zt1j5NG1e nBM/W7f4YY7gP/4m5hZnVttxpbdOQS65xoa3Yy2x2oxosHwWH2+Erw//4xEC3y54zakv34 BFdWvcNYiJQRZEvusS+td7NLuPPdCwrtgDJQFCbPhf1hGE9h7M35rWmlMwq+A+62QNG4mp d77Es7TlGYtG5kwqo0JYOUSAwu5ftKejl05uEmagbgBshp95YixcfZGWufiRKA== From: =?utf-8?q?Otto_Pfl=C3=BCger?= Date: Sun, 29 Mar 2026 09:27:48 +0200 Subject: [PATCH v3 4/5] power: reset: sc27xx: Add platform_device_id table 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: <20260329-sc27xx-mfd-cells-v3-4-9158dee41f74@abscue.de> References: <20260329-sc27xx-mfd-cells-v3-0-9158dee41f74@abscue.de> In-Reply-To: <20260329-sc27xx-mfd-cells-v3-0-9158dee41f74@abscue.de> To: Alexandre Belloni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Orson Zhai , Baolin Wang , Chunyan Zhang , Lee Jones , Pavel Machek , Liam Girdwood , Mark Brown , Sebastian Reichel Cc: linux-rtc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-leds@vger.kernel.org, linux-pm@vger.kernel.org, =?utf-8?q?Otto_Pfl=C3=BCger?= , Sebastian Reichel X-Mailer: b4 0.14.3 Make the poweroff driver for SC27xx-series PMICs probe automatically. Since the device representing the poweroff functionality of the SC27xx PMIC is not supposed to have a dedicated device tree node without any corresponding DT resources [1], an of_device_id table cannot be used here. Instead, use a platform_device_id table to match the poweroff sub-device instantiated by the parent MFD driver. Signed-off-by: Otto Pfl=C3=BCger [1]: https://lore.kernel.org/all/20251002025344.GA2958334-robh@kernel.org/ Acked-by: Sebastian Reichel --- drivers/power/reset/sc27xx-poweroff.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/power/reset/sc27xx-poweroff.c b/drivers/power/reset/sc= 27xx-poweroff.c index 393bd1c33b73..6376706bf561 100644 --- a/drivers/power/reset/sc27xx-poweroff.c +++ b/drivers/power/reset/sc27xx-poweroff.c @@ -6,6 +6,7 @@ =20 #include #include +#include #include #include #include @@ -70,11 +71,18 @@ static int sc27xx_poweroff_probe(struct platform_device= *pdev) return 0; } =20 +static const struct platform_device_id sc27xx_poweroff_id_table[] =3D { + { "sc2731-poweroff" }, + { } +}; +MODULE_DEVICE_TABLE(platform, sc27xx_poweroff_id_table); + static struct platform_driver sc27xx_poweroff_driver =3D { .probe =3D sc27xx_poweroff_probe, .driver =3D { .name =3D "sc27xx-poweroff", }, + .id_table =3D sc27xx_poweroff_id_table, }; module_platform_driver(sc27xx_poweroff_driver); =20 --=20 2.51.0 From nobody Thu Apr 2 12:41:27 2026 Received: from srv01.abscue.de (abscue.de [89.58.28.240]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8ECBD2DA749; Sun, 29 Mar 2026 07:28:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=89.58.28.240 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774769283; cv=none; b=Unl1RzPV3dW9suABDyEZC65gWDl15T8Rma+u/iu4gwEBQB2+5OYuvO0qOvohMpTNyZKfO3SPQxiSbwa9fiKce8JbLX4y+sIDO2LHXoOY01GauBE1wQihzjpGGwRFJ2FuscgRPTfuDqzoE/dVzEIeivW9525MAL9imgdRwDOz19M= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774769283; c=relaxed/simple; bh=iDKvaeDvnMyZNEDCO+iH5La4SPaeOS8gVVZsISM+/78=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=diyexcfx8Vqprtr7o/VZ5gIdAeAS0xiFKTVox00dwl1zK2oQuK02kqvIX/yAjv+vmXanC7i0IloqNYC43i89+68LqmzkU9Bb6YCStx2w9817jEuMxkzTTutqSsQjVPBbgw9bbSBTIX6irnj0psz+PqH5+NZ6GXXArSWEoa6sgW0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=abscue.de; spf=pass smtp.mailfrom=abscue.de; dkim=pass (2048-bit key) header.d=abscue.de header.i=@abscue.de header.b=A5L7Y0Df; arc=none smtp.client-ip=89.58.28.240 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=abscue.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=abscue.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=abscue.de header.i=@abscue.de header.b="A5L7Y0Df" Received: from fluffy-mammal.metal.fwg-cag.de (87-94-78-46.co.dnainternet.fi [87.94.78.46]) by srv01.abscue.de (Postfix) with ESMTPSA id AFACD1C264D; Sun, 29 Mar 2026 09:27:54 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=abscue.de; s=dkim; t=1774769275; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=4Vvz9BBCdCjmAKX3x6b5LHDmFkQb7BZeGItD0dshHTs=; b=A5L7Y0Df3dXJXLFLiWXtYgDZNnYKLUGKTe3f9C6TKHrCFqlu6/9NjjXsCKRAuMPK5nbBXe a2+ITl7jSeoEyj4a/MUVaADh1x/rRcICKMEJZaowzSLO/EyZyFFcLZ+3rcB/yyaXqw+4JM szhMZy8NhTS10P6QMMJwjHrgkIPosrP2/wC98XBdu0tcXzogMR5neLVLnYT+OP0b0u+n5j KkTrlFkb8PiNfABjoyFGwII4beDjwSb/FN2WzcWBr2ro6anpdC680EJ1mRF7QXRfb7rQee iicPwT3PLfp5yHA3OyvrV6/7jXYyFbttN2mLQ6lt98lQRwoX7YLuwb17/cH+5A== From: =?utf-8?q?Otto_Pfl=C3=BCger?= Date: Sun, 29 Mar 2026 09:27:49 +0200 Subject: [PATCH v3 5/5] regulator: sc2731: Add platform_device_id table 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: <20260329-sc27xx-mfd-cells-v3-5-9158dee41f74@abscue.de> References: <20260329-sc27xx-mfd-cells-v3-0-9158dee41f74@abscue.de> In-Reply-To: <20260329-sc27xx-mfd-cells-v3-0-9158dee41f74@abscue.de> To: Alexandre Belloni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Orson Zhai , Baolin Wang , Chunyan Zhang , Lee Jones , Pavel Machek , Liam Girdwood , Mark Brown , Sebastian Reichel Cc: linux-rtc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-leds@vger.kernel.org, linux-pm@vger.kernel.org, =?utf-8?q?Otto_Pfl=C3=BCger?= X-Mailer: b4 0.14.3 Make the regulator driver for the SC2731 PMIC probe automatically. Using a platform_device_id table instead of DT compatible matching avoids the need for a separate compatible property in the "regulators" node, which simplifies the DT bindings and makes the parent MFD device responsible for selecting the correct regulator driver for the PMIC. However, this means that the regulator device is not automatically associated with the "regulators" node. Tell the regulator core to perform device tree lookups using the parent MFD device instead of the regulator sub-device and set the .regulators_node member in all regulator definitions so that the "regulators" sub-node is used. Acked-by: Mark Brown Signed-off-by: Otto Pfl=C3=BCger --- drivers/regulator/sc2731-regulator.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/drivers/regulator/sc2731-regulator.c b/drivers/regulator/sc273= 1-regulator.c index 5447e1a47d15..93c8156c5110 100644 --- a/drivers/regulator/sc2731-regulator.c +++ b/drivers/regulator/sc2731-regulator.c @@ -131,6 +131,7 @@ static const struct regulator_ops sc2731_regu_linear_op= s =3D { vstep, vmin, vmax) { \ .name =3D #_id, \ .of_match =3D of_match_ptr(#_id), \ + .regulators_node =3D of_match_ptr("regulators"), \ .ops =3D &sc2731_regu_linear_ops, \ .type =3D REGULATOR_VOLTAGE, \ .id =3D SC2731_##_id, \ @@ -226,7 +227,7 @@ static int sc2731_regulator_probe(struct platform_devic= e *pdev) return ret; } =20 - config.dev =3D &pdev->dev; + config.dev =3D pdev->dev.parent; config.regmap =3D regmap; =20 for (i =3D 0; i < ARRAY_SIZE(regulators); i++) { @@ -242,12 +243,19 @@ static int sc2731_regulator_probe(struct platform_dev= ice *pdev) return 0; } =20 +static const struct platform_device_id sc2731_regulator_id_table[] =3D { + { "sc2731-regulator" }, + { } +}; +MODULE_DEVICE_TABLE(platform, sc2731_regulator_id_table); + static struct platform_driver sc2731_regulator_driver =3D { .driver =3D { .name =3D "sc27xx-regulator", .probe_type =3D PROBE_PREFER_ASYNCHRONOUS, }, .probe =3D sc2731_regulator_probe, + .id_table =3D sc2731_regulator_id_table, }; =20 module_platform_driver(sc2731_regulator_driver); --=20 2.51.0