{"id":2215881,"url":"http://patchwork.ozlabs.org/api/patches/2215881/?format=json","web_url":"http://patchwork.ozlabs.org/project/rtc-linux/patch/20260325-sc27xx-mfd-cells-v2-5-d0ebb60aa4a7@abscue.de/","project":{"id":9,"url":"http://patchwork.ozlabs.org/api/projects/9/?format=json","name":"Linux RTC development","link_name":"rtc-linux","list_id":"linux-rtc.vger.kernel.org","list_email":"linux-rtc@vger.kernel.org","web_url":"","scm_url":"","webscm_url":"","list_archive_url":"","list_archive_url_format":"","commit_url_format":""},"msgid":"<20260325-sc27xx-mfd-cells-v2-5-d0ebb60aa4a7@abscue.de>","list_archive_url":null,"date":"2026-03-25T13:53:47","name":"[v2,5/5] regulator: sc2731: Add platform_device_id table","commit_ref":null,"pull_url":null,"state":"superseded","archived":false,"hash":"90e589cc55c02e153032226f8da227477d73990f","submitter":{"id":85322,"url":"http://patchwork.ozlabs.org/api/people/85322/?format=json","name":"Otto Pflüger","email":"otto.pflueger@abscue.de"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/rtc-linux/patch/20260325-sc27xx-mfd-cells-v2-5-d0ebb60aa4a7@abscue.de/mbox/","series":[{"id":497448,"url":"http://patchwork.ozlabs.org/api/series/497448/?format=json","web_url":"http://patchwork.ozlabs.org/project/rtc-linux/list/?series=497448","date":"2026-03-25T13:53:42","name":"mfd: sc27xx: Use MFD cells and devm_mfd_add_devices()","version":2,"mbox":"http://patchwork.ozlabs.org/series/497448/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/2215881/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/2215881/checks/","tags":{},"related":[],"headers":{"Return-Path":"\n <linux-rtc+bounces-6254-incoming=patchwork.ozlabs.org@vger.kernel.org>","X-Original-To":["incoming@patchwork.ozlabs.org","linux-rtc@vger.kernel.org"],"Delivered-To":"patchwork-incoming@legolas.ozlabs.org","Authentication-Results":["legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n secure) header.d=abscue.de header.i=@abscue.de header.a=rsa-sha256\n header.s=dkim header.b=FRoR1cQ9;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=2600:3c15:e001:75::12fc:5321; helo=sin.lore.kernel.org;\n envelope-from=linux-rtc+bounces-6254-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)","smtp.subspace.kernel.org;\n\tdkim=pass (2048-bit key) header.d=abscue.de header.i=@abscue.de\n header.b=\"FRoR1cQ9\"","smtp.subspace.kernel.org;\n arc=none smtp.client-ip=89.58.28.240","smtp.subspace.kernel.org;\n dmarc=none (p=none dis=none) header.from=abscue.de","smtp.subspace.kernel.org;\n spf=pass smtp.mailfrom=abscue.de"],"Received":["from sin.lore.kernel.org (sin.lore.kernel.org\n [IPv6:2600:3c15:e001:75::12fc:5321])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fgphf29jTz1y1K\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 26 Mar 2026 01:10:26 +1100 (AEDT)","from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby sin.lore.kernel.org (Postfix) with ESMTP id B8A9230B0D5A\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 25 Mar 2026 13:55:59 +0000 (UTC)","from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 937BA3DEAC5;\n\tWed, 25 Mar 2026 13:55:06 +0000 (UTC)","from srv01.abscue.de (abscue.de [89.58.28.240])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby smtp.subspace.kernel.org (Postfix) with ESMTPS id 211B73DDDC0;\n\tWed, 25 Mar 2026 13:55:04 +0000 (UTC)","from fluffy-mammal.metal.fwg-cag.de (unknown\n [IPv6:2001:9e8:cde0:9600:8d27:ae39:1dce:2212])\n\tby srv01.abscue.de (Postfix) with ESMTPSA id 93D7E1C3A8B;\n\tWed, 25 Mar 2026 14:54:55 +0100 (CET)"],"ARC-Seal":"i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1774446906; cv=none;\n b=sJTKx5Smliw/C/yL5Hb6bQ79eDjsoztY7+QYdBaBicGUTu8V/DFBH0kWFVl4AyYkN8W7yryc++2P9J93+DYtP4AMemUiJgZWOh+IzgQAZRIe/KmYxRSG0Erb0rMDE1iXCyzOPOBTtmU/K9nGjJCAN2sY122qpGNllB4dCIYRT2g=","ARC-Message-Signature":"i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1774446906; c=relaxed/simple;\n\tbh=iDKvaeDvnMyZNEDCO+iH5La4SPaeOS8gVVZsISM+/78=;\n\th=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References:\n\t In-Reply-To:To:Cc;\n b=jOmPqG4msEieK545DXm0a1oEcgqs/jXifen73JJ2m9TzoZLow/OP7nIzcrpdA/VZtyRlAm+R5RYWcJDBoo3FuQPzlKaSs7LRRtnYCXazzUBNxlPS7Evy5Gh3ZZ+THAggS56i7OywBL7ON8dBTyMCdr8ronyGjVLtJFA2vSjDBls=","ARC-Authentication-Results":"i=1; smtp.subspace.kernel.org;\n dmarc=none (p=none dis=none) header.from=abscue.de;\n spf=pass smtp.mailfrom=abscue.de;\n dkim=pass (2048-bit key) header.d=abscue.de header.i=@abscue.de\n header.b=FRoR1cQ9; arc=none smtp.client-ip=89.58.28.240","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=abscue.de; s=dkim;\n\tt=1774446895;\n\th=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n\t to:to:cc:cc:mime-version:mime-version:content-type:content-type:\n\t content-transfer-encoding:content-transfer-encoding:\n\t in-reply-to:in-reply-to:references:references;\n\tbh=4Vvz9BBCdCjmAKX3x6b5LHDmFkQb7BZeGItD0dshHTs=;\n\tb=FRoR1cQ9xfDn68CQwKYxV7tH5hnWgj9zu9G9i7k3rUs4SZ3Drfe7AXK2vPw0Gt/2ed38YG\n\t9dYIYc66WmjmbxWQCmVAYxH6wEKxcRKBgJsOIaDtOdaXxmYdYAg5tXNnyY+JONWDZgR00/\n\t00Yprj+4KWWRkPdW32sxcrbAbtYOZKi/UJWofvW1XY7r23vERCPEWHxigic5mIPbJVQd72\n\tzdCb9+aBGOsy27L+MUifumctiYAFXWTzh9AhFwSa2BQDBt82NyVVIzTEbHCcaii7B1dyjV\n\tbNZ0EFRxRazNrxFrWote6ckkZmkkxnNnrohBgrDMdR3X7n5VWkP7wYEowsSdfw==","From":"=?utf-8?q?Otto_Pfl=C3=BCger?= <otto.pflueger@abscue.de>","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-rtc@vger.kernel.org","List-Id":"<linux-rtc.vger.kernel.org>","List-Subscribe":"<mailto:linux-rtc+subscribe@vger.kernel.org>","List-Unsubscribe":"<mailto:linux-rtc+unsubscribe@vger.kernel.org>","MIME-Version":"1.0","Content-Type":"text/plain; charset=\"utf-8\"","Content-Transfer-Encoding":"8bit","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 <alexandre.belloni@bootlin.com>,\n Rob Herring <robh@kernel.org>, Krzysztof Kozlowski <krzk+dt@kernel.org>,\n Conor Dooley <conor+dt@kernel.org>, Orson Zhai <orsonzhai@gmail.com>,\n Baolin Wang <baolin.wang@linux.alibaba.com>,\n Chunyan Zhang <zhang.lyra@gmail.com>, Lee Jones <lee@kernel.org>,\n Pavel Machek <pavel@kernel.org>, Liam Girdwood <lgirdwood@gmail.com>,\n Mark Brown <broonie@kernel.org>, Sebastian Reichel <sre@kernel.org>","Cc":"linux-rtc@vger.kernel.org, devicetree@vger.kernel.org,\n  linux-kernel@vger.kernel.org, linux-leds@vger.kernel.org,\n  linux-pm@vger.kernel.org,\n =?utf-8?q?Otto_Pfl=C3=BCger?= <otto.pflueger@abscue.de>","X-Mailer":"b4 0.14.3"},"content":"Make the regulator driver for the SC2731 PMIC probe automatically. Using\na platform_device_id table instead of DT compatible matching avoids the\nneed for a separate compatible property in the \"regulators\" node, which\nsimplifies the DT bindings and makes the parent MFD device responsible\nfor selecting the correct regulator driver for the PMIC.\n\nHowever, this means that the regulator device is not automatically\nassociated with the \"regulators\" node. Tell the regulator core to\nperform device tree lookups using the parent MFD device instead of\nthe regulator sub-device and set the .regulators_node member in all\nregulator definitions so that the \"regulators\" sub-node is used.\n\nAcked-by: Mark Brown <broonie@kernel.org>\nSigned-off-by: Otto Pflüger <otto.pflueger@abscue.de>\n---\n drivers/regulator/sc2731-regulator.c | 10 +++++++++-\n 1 file changed, 9 insertions(+), 1 deletion(-)","diff":"diff --git a/drivers/regulator/sc2731-regulator.c b/drivers/regulator/sc2731-regulator.c\nindex 5447e1a47d15..93c8156c5110 100644\n--- a/drivers/regulator/sc2731-regulator.c\n+++ b/drivers/regulator/sc2731-regulator.c\n@@ -131,6 +131,7 @@ static const struct regulator_ops sc2731_regu_linear_ops = {\n \t\t\t  vstep, vmin, vmax) {\t\t\t\\\n \t.name\t\t\t= #_id,\t\t\t\t\\\n \t.of_match\t\t= of_match_ptr(#_id),\t\t\\\n+\t.regulators_node\t= of_match_ptr(\"regulators\"),\t\\\n \t.ops\t\t\t= &sc2731_regu_linear_ops,\t\\\n \t.type\t\t\t= REGULATOR_VOLTAGE,\t\t\\\n \t.id\t\t\t= SC2731_##_id,\t\t\t\\\n@@ -226,7 +227,7 @@ static int sc2731_regulator_probe(struct platform_device *pdev)\n \t\treturn ret;\n \t}\n \n-\tconfig.dev = &pdev->dev;\n+\tconfig.dev = pdev->dev.parent;\n \tconfig.regmap = regmap;\n \n \tfor (i = 0; i < ARRAY_SIZE(regulators); i++) {\n@@ -242,12 +243,19 @@ static int sc2731_regulator_probe(struct platform_device *pdev)\n \treturn 0;\n }\n \n+static const struct platform_device_id sc2731_regulator_id_table[] = {\n+\t{ \"sc2731-regulator\" },\n+\t{ }\n+};\n+MODULE_DEVICE_TABLE(platform, sc2731_regulator_id_table);\n+\n static struct platform_driver sc2731_regulator_driver = {\n \t.driver = {\n \t\t.name = \"sc27xx-regulator\",\n \t\t.probe_type = PROBE_PREFER_ASYNCHRONOUS,\n \t},\n \t.probe = sc2731_regulator_probe,\n+\t.id_table = sc2731_regulator_id_table,\n };\n \n module_platform_driver(sc2731_regulator_driver);\n","prefixes":["v2","5/5"]}