History

watchdog: wm831x_wdt: Remove GPIO handling

An attempt to convert the driver to using GPIO descriptors (see Link tag) was discouraged in favor of deleting the handling of the update GPIO altogehter since there are no in-tree users. This patch deletes the GPIO handling instead.

Linus Walleij committed 6 years ago

Commit 3f9d5131 parent dca96e02 files · +0 −28Browse files

Unified · Split

2 files
  1. drivers/watchdog/wm831x_wdt.c +0 −27
  2. include/linux/mfd/wm831x/pdata.h +0 −1
drivers/watchdog/wm831x_wdt.c+0−27
@@ -13,7 +13,6 @@ · 12 unmodified lines
1313 #include <linux/platform_device.h>
1414 #include <linux/watchdog.h>
1515 #include <linux/uaccess.h>
16−#include <linux/gpio.h>
1716
1817 #include <linux/mfd/wm831x/core.h>
1918 #include <linux/mfd/wm831x/pdata.h>
@@ -29,7 +28,6 @@ struct wm831x_wdt_drvdata { · 9 unmodified lines
2928 struct watchdog_device wdt;
3029 struct wm831x *wm831x;
3130 struct mutex lock;
32− int update_gpio;
3331 int update_state;
3432 };
3533
@@ -103,14 +101,6 @@ static int wm831x_wdt_ping(struct watchdog_device *wdt_dev) · 67 unmodified lines
103101
104102 mutex_lock(&driver_data->lock);
105103
106− if (driver_data->update_gpio) {
107− gpio_set_value_cansleep(driver_data->update_gpio,
108− driver_data->update_state);
109− driver_data->update_state = !driver_data->update_state;
110− ret = 0;
111− goto out;
112− }
113−
114104 reg = wm831x_reg_read(wm831x, WM831X_WATCHDOG);
115105
116106 if (!(reg & WM831X_WDOG_RST_SRC)) {
@@ -239,23 +229,6 @@ static int wm831x_wdt_probe(struct platform_device *pdev) · 122 unmodified lines
239229 reg |= pdata->secondary << WM831X_WDOG_SECACT_SHIFT;
240230 reg |= pdata->software << WM831X_WDOG_RST_SRC_SHIFT;
241231
242− if (pdata->update_gpio) {
243− ret = devm_gpio_request_one(dev, pdata->update_gpio,
244− GPIOF_OUT_INIT_LOW,
245− "Watchdog update");
246− if (ret < 0) {
247− dev_err(wm831x->dev,
248− "Failed to request update GPIO: %d\n",
249− ret);
250− return ret;
251− }
252−
253− driver_data->update_gpio = pdata->update_gpio;
254−
255− /* Make sure the watchdog takes hardware updates */
256− reg |= WM831X_WDOG_RST_SRC;
257− }
258−
259232 ret = wm831x_reg_unlock(wm831x);
260233 if (ret == 0) {
261234 ret = wm831x_reg_write(wm831x, WM831X_WATCHDOG, reg);
include/linux/mfd/wm831x/pdata.h+0−1
@@ -89,7 +89,6 @@ enum wm831x_watchdog_action { · 88 unmodified lines
8989
9090 struct wm831x_watchdog_pdata {
9191 enum wm831x_watchdog_action primary, secondary;
92− int update_gpio;
9392 unsigned int software:1;
9493 };
9594