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>,
Riku Voipio <riku.voipio@iki.fi>
Subject: [PATCH 09/10] hwmon: (f75375s) Drop platform data support
Date: Tue, 10 Nov 2026 10:34:32 -0800 [thread overview]
Message-ID: <20261110183434.181711-10-linux@roeck-us.net> (raw)
In-Reply-To: <20261110183434.181711-1-linux@roeck-us.net>
There are no in-tree users of f75375s_platform_data. Initial PWM mode
and enable settings are read from the chip registers during probe, and
both pwm and pwm_enable are configurable through standard hwmon sysfs
attributes.
Drop platform data support from the driver and remove
include/linux/f75375s.h.
Cc: Riku Voipio <riku.voipio@iki.fi>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
---
MAINTAINERS | 1 -
drivers/hwmon/f75375s.c | 94 ++++++++++++++++-------------------------
include/linux/f75375s.h | 21 ---------
3 files changed, 37 insertions(+), 79 deletions(-)
delete mode 100644 include/linux/f75375s.h
diff --git a/MAINTAINERS b/MAINTAINERS
index 15d70b72d9a2..8d103c0b86b7 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -10415,7 +10415,6 @@ M: Riku Voipio <riku.voipio@iki.fi>
L: linux-hwmon@vger.kernel.org
S: Maintained
F: drivers/hwmon/f75375s.c
-F: include/linux/f75375s.h
FINTEK F81604 USB to 2xCANBUS DEVICE DRIVER
M: Ji-Ze Hong (Peter Hong) <peter_hong@fintek.com.tw>
diff --git a/drivers/hwmon/f75375s.c b/drivers/hwmon/f75375s.c
index b67a0db680ee..a0c778c5e0a5 100644
--- a/drivers/hwmon/f75375s.c
+++ b/drivers/hwmon/f75375s.c
@@ -23,7 +23,6 @@
#include <linux/i2c.h>
#include <linux/err.h>
#include <linux/mutex.h>
-#include <linux/f75375s.h>
#include <linux/slab.h>
/* Addresses to scan */
@@ -724,75 +723,56 @@ static const struct attribute_group f75375_group = {
.attrs = f75375_attributes,
};
-static void f75375_init(struct i2c_client *client, struct f75375_data *data,
- struct f75375s_platform_data *f75375s_pdata)
+static void f75375_init(struct i2c_client *client, struct f75375_data *data)
{
+ u8 conf, mode;
int nr;
- if (!f75375s_pdata) {
- u8 conf, mode;
- int nr;
+ conf = f75375_read8(client, F75375_REG_CONFIG1);
+ mode = f75375_read8(client, F75375_REG_FAN_TIMER);
+ for (nr = 0; nr < 2; nr++) {
+ if (data->kind == f75387) {
+ bool manu, duty;
- conf = f75375_read8(client, F75375_REG_CONFIG1);
- mode = f75375_read8(client, F75375_REG_FAN_TIMER);
- for (nr = 0; nr < 2; nr++) {
- if (data->kind == f75387) {
- bool manu, duty;
+ if (!(mode & (1 << F75387_FAN_CTRL_LINEAR(nr))))
+ data->pwm_mode[nr] = 1;
- if (!(mode & (1 << F75387_FAN_CTRL_LINEAR(nr))))
- data->pwm_mode[nr] = 1;
+ manu = ((mode >> F75387_FAN_MANU_MODE(nr)) & 1);
+ duty = ((mode >> F75387_FAN_DUTY_MODE(nr)) & 1);
+ if (!manu && duty)
+ /* auto, pwm */
+ data->pwm_enable[nr] = 4;
+ else if (manu && !duty)
+ /* manual, speed */
+ data->pwm_enable[nr] = 3;
+ else if (!manu && !duty)
+ /* automatic, speed */
+ data->pwm_enable[nr] = 2;
+ else
+ /* manual, pwm */
+ data->pwm_enable[nr] = 1;
+ } else {
+ if (!(conf & (1 << F75375_FAN_CTRL_LINEAR(nr))))
+ data->pwm_mode[nr] = 1;
- manu = ((mode >> F75387_FAN_MANU_MODE(nr)) & 1);
- duty = ((mode >> F75387_FAN_DUTY_MODE(nr)) & 1);
- if (!manu && duty)
- /* auto, pwm */
- data->pwm_enable[nr] = 4;
- else if (manu && !duty)
- /* manual, speed */
- data->pwm_enable[nr] = 3;
- else if (!manu && !duty)
- /* automatic, speed */
- data->pwm_enable[nr] = 2;
- else
- /* manual, pwm */
- data->pwm_enable[nr] = 1;
- } else {
- if (!(conf & (1 << F75375_FAN_CTRL_LINEAR(nr))))
- data->pwm_mode[nr] = 1;
-
- switch ((mode >> FAN_CTRL_MODE(nr)) & 3) {
- case 0: /* speed */
- data->pwm_enable[nr] = 3;
- break;
- case 1: /* automatic */
- data->pwm_enable[nr] = 2;
- break;
- default: /* manual */
- data->pwm_enable[nr] = 1;
- break;
- }
+ switch ((mode >> FAN_CTRL_MODE(nr)) & 3) {
+ case 0: /* speed */
+ data->pwm_enable[nr] = 3;
+ break;
+ case 1: /* automatic */
+ data->pwm_enable[nr] = 2;
+ break;
+ default: /* manual */
+ data->pwm_enable[nr] = 1;
+ break;
}
}
- return;
}
-
- set_pwm_enable_direct(client, 0, f75375s_pdata->pwm_enable[0]);
- set_pwm_enable_direct(client, 1, f75375s_pdata->pwm_enable[1]);
- for (nr = 0; nr < 2; nr++) {
- if (auto_mode_enabled(f75375s_pdata->pwm_enable[nr]) ||
- !duty_mode_enabled(f75375s_pdata->pwm_enable[nr]))
- continue;
- data->pwm[nr] = clamp_val(f75375s_pdata->pwm[nr], 0, 255);
- f75375_write_pwm(client, nr);
- }
-
}
static int f75375_probe(struct i2c_client *client)
{
struct f75375_data *data;
- struct f75375s_platform_data *f75375s_pdata =
- dev_get_platdata(&client->dev);
int err;
if (!i2c_check_functionality(client->adapter,
@@ -829,7 +809,7 @@ static int f75375_probe(struct i2c_client *client)
goto exit_remove;
}
- f75375_init(client, data, f75375s_pdata);
+ f75375_init(client, data);
return 0;
diff --git a/include/linux/f75375s.h b/include/linux/f75375s.h
deleted file mode 100644
index e99e22500668..000000000000
--- a/include/linux/f75375s.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * f75375s.h - platform data structure for f75375s sensor
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License. See the file "COPYING" in the main directory of this archive
- * for more details.
- *
- * Copyright (C) 2007, Riku Voipio <riku.voipio@iki.fi>
- */
-
-#ifndef __LINUX_F75375S_H
-#define __LINUX_F75375S_H
-
-/* We want to set fans spinning on systems where there is no
- * BIOS to do that for us */
-struct f75375s_platform_data {
- u8 pwm[2];
- u8 pwm_enable[2];
-};
-
-#endif /* __LINUX_F75375S_H */
--
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 ` [PATCH 06/10] hwmon: (mcp3021) " Guenter Roeck
2026-11-10 19:12 ` 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 ` Guenter Roeck [this message]
2026-11-10 19:18 ` [PATCH 09/10] hwmon: (f75375s) Drop platform data support 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-10-linux@roeck-us.net \
--to=linux@roeck-us.net \
--cc=arnd@arndb.de \
--cc=linux-hwmon@vger.kernel.org \
--cc=riku.voipio@iki.fi \
/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.