From: Guenter Roeck <linux@roeck-us.net>
To: linux-hwmon@vger.kernel.org
Cc: Arnd Bergmann <arnd@arndb.de>, Guenter Roeck <linux@roeck-us.net>
Subject: [PATCH 06/10] hwmon: (mcp3021) Drop platform data support
Date: Tue, 10 Nov 2026 10:34:29 -0800 [thread overview]
Message-ID: <20261110183434.181711-7-linux@roeck-us.net> (raw)
In-Reply-To: <20261110183434.181711-1-linux@roeck-us.net>
No in-tree boards supply platform data to the mcp3021 driver. Reference
voltage is already configurable via the "reference-voltage-microvolt"
devicetree property, defaulting to 3300 mV otherwise.
Drop platform data handling from mcp3021_probe().
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
---
drivers/hwmon/mcp3021.c | 18 ++++--------------
1 file changed, 4 insertions(+), 14 deletions(-)
diff --git a/drivers/hwmon/mcp3021.c b/drivers/hwmon/mcp3021.c
index 087b595bf5ad..82b1363ab1c6 100644
--- a/drivers/hwmon/mcp3021.c
+++ b/drivers/hwmon/mcp3021.c
@@ -132,20 +132,10 @@ static int mcp3021_probe(struct i2c_client *client)
i2c_set_clientdata(client, data);
- if (np) {
- if (!of_property_read_u32(np, "reference-voltage-microvolt",
- &data->vdd))
- data->vdd /= 1000;
- else
- data->vdd = MCP3021_VDD_REF_DEFAULT;
- } else {
- u32 *pdata = dev_get_platdata(&client->dev);
-
- if (pdata)
- data->vdd = *pdata;
- else
- data->vdd = MCP3021_VDD_REF_DEFAULT;
- }
+ if (!of_property_read_u32(np, "reference-voltage-microvolt", &data->vdd))
+ data->vdd /= 1000;
+ else
+ data->vdd = MCP3021_VDD_REF_DEFAULT;
type = (uintptr_t)i2c_get_match_data(client);
switch (type) {
--
2.45.2
next prev parent reply other threads:[~2026-11-10 18:36 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-10 18:34 [PATCH 00/10] hwmon: Drop unused platform data support and max197 driver Guenter Roeck
2026-11-10 18:34 ` [PATCH 01/10] hwmon: (ads7828) Drop platform data support Guenter Roeck
2026-11-10 18:45 ` Arnd Bergmann
2026-11-10 19:40 ` Guenter Roeck
2026-11-10 19:49 ` Arnd Bergmann
2026-11-12 18:25 ` Guenter Roeck
2026-11-10 18:34 ` [PATCH 02/10] hwmon: (emc2305) " Guenter Roeck
2026-11-10 18:56 ` Arnd Bergmann
2026-11-12 19:06 ` Guenter Roeck
2026-11-10 18:34 ` [PATCH 03/10] hwmon: (g762) " Guenter Roeck
2026-11-10 19:09 ` Arnd Bergmann
2026-11-12 19:08 ` Guenter Roeck
2026-11-10 18:34 ` [PATCH 04/10] hwmon: (gsc-hwmon) " Guenter Roeck
2026-11-10 19:11 ` Arnd Bergmann
2026-11-12 19:09 ` Guenter Roeck
2026-11-10 18:34 ` [PATCH 05/10] hwmon: (ltc4245) " Guenter Roeck
2026-11-10 18:58 ` Arnd Bergmann
2026-11-12 19:11 ` Guenter Roeck
2026-11-11 9:54 ` Nuno Sá
2026-11-10 18:34 ` Guenter Roeck [this message]
2026-11-10 19:12 ` [PATCH 06/10] hwmon: (mcp3021) " Arnd Bergmann
2026-11-12 19:14 ` Guenter Roeck
2026-11-10 18:34 ` [PATCH 07/10] hwmon: (shtc1) " Guenter Roeck
2026-11-10 19:00 ` Arnd Bergmann
2026-11-12 19:18 ` Guenter Roeck
2026-11-10 18:34 ` [PATCH 08/10] hwmon: (max197) Remove driver Guenter Roeck
2026-11-10 19:02 ` Arnd Bergmann
2026-11-12 19:22 ` Guenter Roeck
2026-11-11 9:49 ` Nuno Sá
2026-11-10 18:34 ` [PATCH 09/10] hwmon: (f75375s) Drop platform data support Guenter Roeck
2026-11-10 19:18 ` Arnd Bergmann
2026-11-10 19:43 ` Guenter Roeck
2026-11-12 19:25 ` Guenter Roeck
2026-11-10 18:34 ` [PATCH 10/10] hwmon: (ds620) " Guenter Roeck
2026-11-10 19:07 ` Arnd Bergmann
2026-11-10 19:41 ` Guenter Roeck
2026-11-12 19:29 ` Guenter Roeck
2026-11-11 9:56 ` Nuno Sá
2026-11-10 19:24 ` [PATCH 00/10] hwmon: Drop unused platform data support and max197 driver Arnd Bergmann
2026-11-10 19:50 ` Guenter Roeck
2026-11-10 20:31 ` Arnd Bergmann
2026-11-12 19:31 ` Guenter Roeck
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=20261110183434.181711-7-linux@roeck-us.net \
--to=linux@roeck-us.net \
--cc=arnd@arndb.de \
--cc=linux-hwmon@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.