From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Peter Griffin <peter.griffin@linaro.org>,
Alim Akhtar <alim.akhtar@samsung.com>,
Russell King <linux@armlinux.org.uk>,
Mark Brown <broonie@kernel.org>,
Linus Walleij <linusw@kernel.org>,
Charles Keepax <ckeepax@opensource.cirrus.com>,
Sam Protsenko <semen.protsenko@linaro.org>,
Arnd Bergmann <arnd@arndb.de>,
Bartosz Golaszewski <brgl@bgdev.pl>
Cc: Krzysztof Kozlowski <krzk@kernel.org>,
linux-input@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-samsung-soc@vger.kernel.org,
patches@opensource.cirrus.com
Subject: [PATCH v2 08/11] ARM: s3c: crag6410: convert PMIC to software properties
Date: Wed, 08 Jul 2026 21:53:06 -0700 [thread overview]
Message-ID: <20260708-samsung-kp-v2-8-3c6ed4c9b3b6@gmail.com> (raw)
In-Reply-To: <20260708-samsung-kp-v2-0-3c6ed4c9b3b6@gmail.com>
Convert the PMIC DVS GPIO configuration from a legacy lookup table to
software properties. We use the new 'swnode' field in 'struct
wm831x_buckv_pdata' to pass the software node to the regulator driver.
The DVS control source is also passed via software node properties.
Assisted-by: Antigravity:gemini-3.5-flash
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
---
arch/arm/mach-s3c/mach-crag6410.c | 33 ++++++++++++++-------------------
1 file changed, 14 insertions(+), 19 deletions(-)
diff --git a/arch/arm/mach-s3c/mach-crag6410.c b/arch/arm/mach-s3c/mach-crag6410.c
index 9682ef67b866..4c9b8c1fb08e 100644
--- a/arch/arm/mach-s3c/mach-crag6410.c
+++ b/arch/arm/mach-s3c/mach-crag6410.c
@@ -456,9 +456,21 @@ static struct pca953x_platform_data crag6410_pca_data = {
.irq_base = -1,
};
+static const struct property_entry crag_dcdc1_properties[] = {
+ PROPERTY_ENTRY_GPIO("dvs-gpios",
+ SAMSUNG_GPIO_NODE('K'), 0, GPIO_ACTIVE_HIGH),
+ PROPERTY_ENTRY_U32("wlf,dvs-control-src", 1),
+ { }
+};
+
+static const struct software_node crag_dcdc1_swnode = {
+ .name = "wm831x-buckv-dcdc1",
+ .properties = crag_dcdc1_properties,
+};
+
/* VDDARM is controlled by DVS1 connected to GPK(0) */
static struct wm831x_buckv_pdata vddarm_pdata = {
- .dvs_control_src = 1,
+ .swnode = &crag_dcdc1_swnode,
};
static struct regulator_consumer_supply vddarm_consumers[] = {
@@ -656,23 +668,6 @@ static struct wm831x_pdata crag_pmic_pdata = {
.touch = &touch_pdata,
};
-/*
- * VDDARM is eventually ending up as a regulator hanging on the MFD cell device
- * "wm831x-buckv.1" spawn from drivers/mfd/wm831x-core.c.
- *
- * From the note on the platform data we can see that this is clearly DVS1
- * and assigned as dcdc1 resource to the MFD core which sets .id of the cell
- * spawning the DVS1 platform device to 1, then the cell platform device
- * name is calculated from 10*instance + id resulting in the device name
- * "wm831x-buckv.11"
- */
-static struct gpiod_lookup_table crag_pmic_gpiod_table = {
- .dev_id = "wm831x-buckv.11",
- .table = {
- GPIO_LOOKUP("GPIOK", 0, "dvs", GPIO_ACTIVE_HIGH),
- { },
- },
-};
static struct i2c_board_info i2c_devs0[] = {
{ I2C_BOARD_INFO("24c08", 0x50), },
@@ -931,7 +926,7 @@ static void __init crag6410_machine_init(void)
s3c_fb_set_platdata(&crag6410_lcd_pdata);
dwc2_hsotg_set_platdata(&crag6410_hsotg_pdata);
- gpiod_add_lookup_table(&crag_pmic_gpiod_table);
+ software_node_register(&crag_dcdc1_swnode);
i2c_register_board_info(0, i2c_devs0, ARRAY_SIZE(i2c_devs0));
gpiod_add_lookup_table(&crag_wm1250_ev1_gpiod_table);
i2c_register_board_info(1, i2c_devs1, ARRAY_SIZE(i2c_devs1));
--
2.55.0.795.g602f6c329a-goog
next prev parent reply other threads:[~2026-07-09 4:53 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-09 4:52 [PATCH v2 00/11] Remove support for platform data from samsung keypad Dmitry Torokhov
2026-07-09 4:52 ` [PATCH v2 01/11] dt-bindings: input: samsung,s3c6410-keypad: introduce compact binding Dmitry Torokhov
2026-07-09 17:56 ` Conor Dooley
2026-07-09 4:53 ` [PATCH v2 02/11] Input: samsung-keypad - handle " Dmitry Torokhov
2026-07-09 4:53 ` [PATCH v2 03/11] ARM: s3c: register and attach software nodes for Samsung gpio_chips Dmitry Torokhov
2026-07-09 4:53 ` [PATCH v2 04/11] ARM: s3c: crag6410: switch keypad device to software properties Dmitry Torokhov
2026-07-09 4:53 ` [PATCH v2 05/11] Input: samsung-keypad - remove support for platform data Dmitry Torokhov
2026-07-09 4:53 ` [PATCH v2 06/11] ARM: s3c: crag6410: use software nodes/properties to set up GPIO keys Dmitry Torokhov
2026-07-09 4:53 ` [PATCH v2 07/11] regulator: wm831x: support software node in platform data Dmitry Torokhov
2026-07-09 4:53 ` Dmitry Torokhov [this message]
2026-07-09 4:53 ` [PATCH v2 09/11] regulator: wm831x: remove legacy DVS " Dmitry Torokhov
2026-07-09 4:53 ` [PATCH v2 10/11] ARM: s3c: crag6410: convert remaining GPIO lookup tables to property entries Dmitry Torokhov
2026-07-09 4:53 ` [PATCH v2 11/11] ARM: s3c: crag6410: convert basic-mmio-gpio and LEDs to software properties Dmitry Torokhov
2026-07-09 8:10 ` [PATCH v2 00/11] Remove support for platform data from samsung keypad Bartosz Golaszewski
2026-07-10 19:41 ` Linus Walleij
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260708-samsung-kp-v2-8-3c6ed4c9b3b6@gmail.com \
--to=dmitry.torokhov@gmail.com \
--cc=alim.akhtar@samsung.com \
--cc=arnd@arndb.de \
--cc=brgl@bgdev.pl \
--cc=broonie@kernel.org \
--cc=ckeepax@opensource.cirrus.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=krzk+dt@kernel.org \
--cc=krzk@kernel.org \
--cc=linusw@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=patches@opensource.cirrus.com \
--cc=peter.griffin@linaro.org \
--cc=robh@kernel.org \
--cc=semen.protsenko@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox