From: Guenter Roeck <linux@roeck-us.net>
To: Hardware Monitoring <linux-hwmon@vger.kernel.org>
Cc: Guenter Roeck <linux@roeck-us.net>
Subject: [PATCH 2/7] hwmon: (g762) Drop platform data support
Date: Thu, 4 Jul 2024 14:37:07 -0700 [thread overview]
Message-ID: <20240704213712.2699553-3-linux@roeck-us.net> (raw)
In-Reply-To: <20240704213712.2699553-1-linux@roeck-us.net>
There is no in-tree user (or at least not anymore), so drop platform data
to simplify the code.
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
---
Documentation/hwmon/g762.rst | 4 +---
drivers/hwmon/g762.c | 33 ------------------------------
include/linux/platform_data/g762.h | 24 ----------------------
3 files changed, 1 insertion(+), 60 deletions(-)
delete mode 100644 include/linux/platform_data/g762.h
diff --git a/Documentation/hwmon/g762.rst b/Documentation/hwmon/g762.rst
index 0371b3365c48..3dc5294b2181 100644
--- a/Documentation/hwmon/g762.rst
+++ b/Documentation/hwmon/g762.rst
@@ -17,9 +17,7 @@ done via a userland daemon like fancontrol.
Note that those entries do not provide ways to setup the specific
hardware characteristics of the system (reference clock, pulses per
fan revolution, ...); Those can be modified via devicetree bindings
-documented in Documentation/devicetree/bindings/hwmon/g762.txt or
-using a specific platform_data structure in board initialization
-file (see include/linux/platform_data/g762.h).
+documented in Documentation/devicetree/bindings/hwmon/g762.txt.
fan1_target:
set desired fan speed. This only makes sense in closed-loop
diff --git a/drivers/hwmon/g762.c b/drivers/hwmon/g762.c
index da43a26f558d..8573865a8989 100644
--- a/drivers/hwmon/g762.c
+++ b/drivers/hwmon/g762.c
@@ -39,7 +39,6 @@
#include <linux/kernel.h>
#include <linux/clk.h>
#include <linux/of.h>
-#include <linux/platform_data/g762.h>
#define DRVNAME "g762"
@@ -648,34 +647,6 @@ static int g762_of_clock_enable(struct device *dev)
}
#endif
-/*
- * Helper to import hardware characteristics from .dts file and push
- * those to the chip.
- */
-
-static int g762_pdata_prop_import(struct i2c_client *client)
-{
- struct g762_platform_data *pdata = dev_get_platdata(&client->dev);
- int ret;
-
- if (!pdata)
- return 0;
-
- ret = do_set_fan_gear_mode(&client->dev, pdata->fan_gear_mode);
- if (ret)
- return ret;
-
- ret = do_set_pwm_polarity(&client->dev, pdata->pwm_polarity);
- if (ret)
- return ret;
-
- ret = do_set_fan_startv(&client->dev, pdata->fan_startv);
- if (ret)
- return ret;
-
- return do_set_clk_freq(&client->dev, pdata->clk_freq);
-}
-
/*
* sysfs attributes
*/
@@ -1026,10 +997,6 @@ static int g762_probe(struct i2c_client *client)
if (ret)
return ret;
ret = g762_of_prop_import(client);
- if (ret)
- return ret;
- /* ... or platform_data */
- ret = g762_pdata_prop_import(client);
if (ret)
return ret;
diff --git a/include/linux/platform_data/g762.h b/include/linux/platform_data/g762.h
deleted file mode 100644
index 249257ee2132..000000000000
--- a/include/linux/platform_data/g762.h
+++ /dev/null
@@ -1,24 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
-/*
- * Platform data structure for g762 fan controller driver
- *
- * Copyright (C) 2013, Arnaud EBALARD <arno@natisbad.org>
- */
-#ifndef __LINUX_PLATFORM_DATA_G762_H__
-#define __LINUX_PLATFORM_DATA_G762_H__
-
-/*
- * Following structure can be used to set g762 driver platform specific data
- * during board init. Note that passing a sparse structure is possible but
- * will result in non-specified attributes to be set to default value, hence
- * overloading those installed during boot (e.g. by u-boot).
- */
-
-struct g762_platform_data {
- u32 fan_startv;
- u32 fan_gear_mode;
- u32 pwm_polarity;
- u32 clk_freq;
-};
-
-#endif /* __LINUX_PLATFORM_DATA_G762_H__ */
--
2.39.2
next prev parent reply other threads:[~2024-07-04 21:37 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-04 21:37 [PATCH 0/7] hwmon: (g762) Convert to with_info API Guenter Roeck
2024-07-04 21:37 ` [PATCH 1/7] hwmon: (g762) Simplify clock initialization Guenter Roeck
2024-07-04 21:37 ` Guenter Roeck [this message]
2024-07-04 21:37 ` [PATCH 3/7] hwmon: (g762) Reorder include files to be in alphabetic order Guenter Roeck
2024-07-04 21:37 ` [PATCH 4/7] hwmon: (g762) Use bit operations Guenter Roeck
2024-07-04 21:37 ` [PATCH 5/7] hwmon: (g762) Make chip configuration devicetree independent Guenter Roeck
2024-07-04 21:37 ` [PATCH 6/7] hwmon: (g762) Convert to use regmap Guenter Roeck
2024-07-04 21:37 ` [PATCH 7/7] hwmon: (g762) Convert to with_info API 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=20240704213712.2699553-3-linux@roeck-us.net \
--to=linux@roeck-us.net \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox