From nobody Fri Apr 3 01:29:49 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 D5C2E3D333A; Wed, 25 Mar 2026 13:55: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=1774446903; cv=none; b=CKodrxgJAKTp92zYEKeOCYeuXv/YlijuDtr7incZ7HKnpT6eIJCiDBQArvAf6d31PRbyRMPuMZH7b6kvdl+QfnpLMu+4cpp4hLoLJv3/f5VFPq4A0pRhYdMX9qrUB9cWWiqMNMri/8lAruJmcirLFToAwTcuk0/qCtdo0Ed1vXQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774446903; c=relaxed/simple; bh=zOiHRiD7dxKBfhbPbB4OMZm22V5rmCiucuIOzalEXSY=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=bQrWE/xlM1nJgMHzqXH9FMMyKfpGvqrzqQPLNoECT2xpZ7pSCBh6NfZ81FqLW16gN+b/pUmXsnA6VNKvDL/CnVm/Ve+IB9HaQsOcQ5cOU7YJEZcV0hMWVtGctxsElIAdL8VspgTURJoERlJE090RBpdhtYFCqMYj3sG0zLvulj4= 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=fquBHHCz; 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="fquBHHCz" Received: from fluffy-mammal.metal.fwg-cag.de (unknown [IPv6:2001:9e8:cde0:9600:8d27:ae39:1dce:2212]) by srv01.abscue.de (Postfix) with ESMTPSA id AE0491C006F; Wed, 25 Mar 2026 14:54:52 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=abscue.de; s=dkim; t=1774446893; 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=fquBHHCzMBq4Q3M0HbwDIjI3Q71S+GRI93VLNHcNmV0QeO7+/Cifjxod3Gi1IGoH3EI9Ws d3ggCEgPGiv/y96pVM/8BHTdbC6YC1TVandAtyml56JXuIn8MDItEk5JjR+/ohvxTeSuJc gG2WBdU460oDuzV2FXjDeYylftBTqEM7z8VgbniFjS5t6+lZCy2ys8oqjsd8AMHltjx5Jc WO8DaBtisKMMHmm1JoXJ6/6CdUpC9LSwOVKNHLk+4aro7k2hNvXN8ei3jhYbgyjjmsRWGY BhXG+mzfoy1X/Kee5gDjpkIMobuljbxt3tC1iwIGQtULVCtmGd9jw8/fN/h2YQ== From: =?utf-8?q?Otto_Pfl=C3=BCger?= Date: Wed, 25 Mar 2026 14:53:43 +0100 Subject: [PATCH v2 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: <20260325-sc27xx-mfd-cells-v2-1-d0ebb60aa4a7@abscue.de> References: <20260325-sc27xx-mfd-cells-v2-0-d0ebb60aa4a7@abscue.de> In-Reply-To: <20260325-sc27xx-mfd-cells-v2-0-d0ebb60aa4a7@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 Fri Apr 3 01:29:49 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 33EAA3D9DAC; Wed, 25 Mar 2026 13:55: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=1774446904; cv=none; b=judxVH/ez2zYjKiZuCfyp0BHM2Ej+DgbV3d0KELrqg7/WjPjFf/nJA5K77hEOot+tbc4xSIRyRwiCCLMMG+mLb5EGmIinEuk3vL+/OXbL/EkCj79AfnMI9mzp/wS8XIfCMtFlAmZnF6RlBkBYi2QFf3ui0sofIT9Tt1pGcpgTW0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774446904; c=relaxed/simple; bh=MHHt2ANc8Qe7TWRx8Im5NLPa2izmN2X0SM9HOq6qFMs=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=QbTYxcBawB+2hZpmoDlwya3MihQMkxY8VwCokCy13DKRU9Io6HUgU9gfB+WMMzEJeiIuztk1iGQi3BjDWfNcYtF2sPjPQRveTMdBr+UkQ5sjdY1Dwy0h3Rune/86atjKDYd/mMrkbiOIM1dVLXKXsN4J4S+qSidYHRXlvt5W2IU= 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=oDnO0ecr; 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="oDnO0ecr" Received: from fluffy-mammal.metal.fwg-cag.de (unknown [IPv6:2001:9e8:cde0:9600:8d27:ae39:1dce:2212]) by srv01.abscue.de (Postfix) with ESMTPSA id 477E01C0070; Wed, 25 Mar 2026 14:54:53 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=abscue.de; s=dkim; t=1774446893; 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=oDnO0ecrYR0J/FrYgYVtWmkcSwG6qHARik+Ul2lS3JLp5XkfteNTui5t9DOzy40L0Kvxk3 6hjOCnfdN48U1pxh/jUU/j2m12YJ+InRPxkl5oQKWOoXQN8qNnApq42NiPbZOcK593OfIP k8cjRAymTLYeND+A2vUI3qMfVfysLGpYR3qV3YMKBCxRreT1d3CBLcxQGE33w7QHy3CVMe XW1g+Z+oO2wTyC7g803iWGZeAknCDMm+3KN97+/Cf2dEUpg8FYYgvLndyeVh5uJPmyNOGg 5jPEIDAeaV/cFanaWLAT9+vqX9G8tHOWlgVpSyZBGsHAIMkA3AxhMOCpcsmt9g== From: =?utf-8?q?Otto_Pfl=C3=BCger?= Date: Wed, 25 Mar 2026 14:53:44 +0100 Subject: [PATCH v2 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: <20260325-sc27xx-mfd-cells-v2-2-d0ebb60aa4a7@abscue.de> References: <20260325-sc27xx-mfd-cells-v2-0-d0ebb60aa4a7@abscue.de> In-Reply-To: <20260325-sc27xx-mfd-cells-v2-0-d0ebb60aa4a7@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 Fri Apr 3 01:29:49 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 33F443D9DB0; Wed, 25 Mar 2026 13:55: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=1774446903; cv=none; b=d/p8KKvDmS6FiwIy6nZs8MHjJJThG4Raw10rDK0CgKWpEPzNtnauvQCQcJcmbFMOwdOQ3Vhv5TsD6iKiGlO96vCRfNRKZflVkh97cPPbOZea26yJA8wo17XUkbWVMwkSNJGAzacs7ncxdyGTKTKn4Qu6HkA+4IN1fwVuhNJjBY0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774446903; c=relaxed/simple; bh=pmjaHkkd1GTe7qUmzoQfztH+XwQtCIWX0+AnfIZurJg=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Mt/kEG4IV0YwYZCnKegA/azfc94BlOmhkxZ+yPjXfWb8XOmKZSiaCSNRIMTa8bmuUQ9KxLVQJdpOVFK+ZyYUh/uNx1qeTFvVVXW18FphfbuTAs2ZhLQadE5AAEX36WThclrgLuVt5gjDpA69YhCgRV3R/V4sDx5T7CI197rvB7A= 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=p0PwCT/n; 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="p0PwCT/n" Received: from fluffy-mammal.metal.fwg-cag.de (unknown [IPv6:2001:9e8:cde0:9600:8d27:ae39:1dce:2212]) by srv01.abscue.de (Postfix) with ESMTPSA id E67781C00A8; Wed, 25 Mar 2026 14:54:53 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=abscue.de; s=dkim; t=1774446894; 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=oAeadNDLY6QXY+Bf5+OCfab+TpNiEHvWt9WUf5IakbE=; b=p0PwCT/nEYdkk1yT7UIDSrAIOhA46+Anm+Xkp6uAmG0bf9ZaPI/WGqBOKRtGC4Er/1xQ6B u+QYMSUPb6Oi6nnmpN4cvs535xW9pEqB+Dd34CdVWJZ3vyFlHLgIsxLUJu2RQ4uOVEJt4H +ZrjeSMpJJ53TtQBa5Zc4OFKjEj58SudGXrz3Fzw6h3KhnHJMwU0kL7bT3dYD968FxfNkQ qo7xY0IARb6nk2ZWN17YS12JnwPGoCI+9tJ+Q3QoM0vcbg74djGpr1HFGk6WgPfbWdip/g PKm2euM6dmoivbAADLdv/p0sQU74xVlhbXWvMvu6R6AM0d42IyBDiBv6C/JijQ== From: =?utf-8?q?Otto_Pfl=C3=BCger?= Date: Wed, 25 Mar 2026 14:53:45 +0100 Subject: [PATCH v2 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: <20260325-sc27xx-mfd-cells-v2-3-d0ebb60aa4a7@abscue.de> References: <20260325-sc27xx-mfd-cells-v2-0-d0ebb60aa4a7@abscue.de> In-Reply-To: <20260325-sc27xx-mfd-cells-v2-0-d0ebb60aa4a7@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..eb57023fdc3c 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, + 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 (enum sprd_pmic_type)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 Fri Apr 3 01:29:49 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 4D731238166; Wed, 25 Mar 2026 13:55: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=1774446903; cv=none; b=SPlL2PgBsBQ1I3uFIxnoiibRNYFQ0LpIYOYCIp1JSVp4+30yl+v3QMkJD1WVdkhFc/HmNfh7/q/bzN4TKWWFREukd8CM8KxL/igqFIMAoMML2j2miF2dBviEvBCqjBZzUO8o2Lr8Fj+U0BKhvPSoIkcbpa1Y241qGNE4dBZzdHw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774446903; c=relaxed/simple; bh=pi32dSd8TSx+SNWSMpom2JT7gL0RFRI7pQDQIaLDrq8=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=g51e5BLAY5Zxf/xo0JYUtWKJPrMrczhrAsWNHiGXGzkc52XHVkGoAAKiDhlBJAykqWe1PWfRL4WflP/1TMPxu+ZwIv7A6phk2BNqEk23Db7ptn0Y/eIk/0bMfo2CzAPBr+0YZcvyGIw3QLmvMtCO0mTmrjzrjp5TXjGN4VqejGE= 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=j5QaGxjM; 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="j5QaGxjM" Received: from fluffy-mammal.metal.fwg-cag.de (unknown [IPv6:2001:9e8:cde0:9600:8d27:ae39:1dce:2212]) by srv01.abscue.de (Postfix) with ESMTPSA id 723A71C264D; Wed, 25 Mar 2026 14:54:54 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=abscue.de; s=dkim; t=1774446895; 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=j5QaGxjMbarizNKHJzox7nHghzgQitSFGmmXHww5GAQk5KCe6PLq1Br5PJDwNs/nY6Re3C 3SWjG99OKfLDpNxmwl/NgUS0imMukDjuvqDw2qiVkP8os1yX6e8Kf37Y57uJjfCLAkJkio 9q6yuDHRsM6X+yoyWiINjYVGvTwWcbtXsCVhLqO22o1L9I/dY5HyNlCM4oEaU4nL5wAEG8 nCtkbfmkJXVYHrJh5v5iyxIxkBsf5tJOanbbRYiV/v9cEXnqCSvy54edX3UgGZ40hihUaj G/4JkYrHSlZyfmyPU1DBIn0b8nVXxxUDifA+nkMBvW6CLZFDnZL2Aa8vltdoHw== From: =?utf-8?q?Otto_Pfl=C3=BCger?= Date: Wed, 25 Mar 2026 14:53:46 +0100 Subject: [PATCH v2 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: <20260325-sc27xx-mfd-cells-v2-4-d0ebb60aa4a7@abscue.de> References: <20260325-sc27xx-mfd-cells-v2-0-d0ebb60aa4a7@abscue.de> In-Reply-To: <20260325-sc27xx-mfd-cells-v2-0-d0ebb60aa4a7@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 Fri Apr 3 01:29:49 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 211B73DDDC0; Wed, 25 Mar 2026 13:55:04 +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=1774446906; cv=none; b=sJTKx5Smliw/C/yL5Hb6bQ79eDjsoztY7+QYdBaBicGUTu8V/DFBH0kWFVl4AyYkN8W7yryc++2P9J93+DYtP4AMemUiJgZWOh+IzgQAZRIe/KmYxRSG0Erb0rMDE1iXCyzOPOBTtmU/K9nGjJCAN2sY122qpGNllB4dCIYRT2g= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774446906; c=relaxed/simple; bh=iDKvaeDvnMyZNEDCO+iH5La4SPaeOS8gVVZsISM+/78=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=jOmPqG4msEieK545DXm0a1oEcgqs/jXifen73JJ2m9TzoZLow/OP7nIzcrpdA/VZtyRlAm+R5RYWcJDBoo3FuQPzlKaSs7LRRtnYCXazzUBNxlPS7Evy5Gh3ZZ+THAggS56i7OywBL7ON8dBTyMCdr8ronyGjVLtJFA2vSjDBls= 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=FRoR1cQ9; 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="FRoR1cQ9" Received: from fluffy-mammal.metal.fwg-cag.de (unknown [IPv6:2001:9e8:cde0:9600:8d27:ae39:1dce:2212]) by srv01.abscue.de (Postfix) with ESMTPSA id 93D7E1C3A8B; Wed, 25 Mar 2026 14:54:55 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=abscue.de; s=dkim; t=1774446895; 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=FRoR1cQ9xfDn68CQwKYxV7tH5hnWgj9zu9G9i7k3rUs4SZ3Drfe7AXK2vPw0Gt/2ed38YG 9dYIYc66WmjmbxWQCmVAYxH6wEKxcRKBgJsOIaDtOdaXxmYdYAg5tXNnyY+JONWDZgR00/ 00Yprj+4KWWRkPdW32sxcrbAbtYOZKi/UJWofvW1XY7r23vERCPEWHxigic5mIPbJVQd72 zdCb9+aBGOsy27L+MUifumctiYAFXWTzh9AhFwSa2BQDBt82NyVVIzTEbHCcaii7B1dyjV bNZ0EFRxRazNrxFrWote6ckkZmkkxnNnrohBgrDMdR3X7n5VWkP7wYEowsSdfw== From: =?utf-8?q?Otto_Pfl=C3=BCger?= Date: Wed, 25 Mar 2026 14:53:47 +0100 Subject: [PATCH v2 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: <20260325-sc27xx-mfd-cells-v2-5-d0ebb60aa4a7@abscue.de> References: <20260325-sc27xx-mfd-cells-v2-0-d0ebb60aa4a7@abscue.de> In-Reply-To: <20260325-sc27xx-mfd-cells-v2-0-d0ebb60aa4a7@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