From nobody Thu Apr 2 14:13:09 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