@@ -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
@@ -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;
deleted file mode 100644
@@ -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__ */
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