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
13#include <linux/platform_device.h>13#include <linux/platform_device.h>
14#include <linux/watchdog.h>14#include <linux/watchdog.h>
15#include <linux/uaccess.h>15#include <linux/uaccess.h>
16#include <linux/gpio.h>
17 16
18#include <linux/mfd/wm831x/core.h>17#include <linux/mfd/wm831x/core.h>
19#include <linux/mfd/wm831x/pdata.h>18#include <linux/mfd/wm831x/pdata.h>
@@ -29,7 +28,6 @@ struct wm831x_wdt_drvdata { · 9 unmodified lines
29 struct watchdog_device wdt;28 struct watchdog_device wdt;
30 struct wm831x *wm831x;29 struct wm831x *wm831x;
31 struct mutex lock;30 struct mutex lock;
32 int update_gpio;
33 int update_state;31 int update_state;
34};32};
35 33
@@ -103,14 +101,6 @@ static int wm831x_wdt_ping(struct watchdog_device *wdt_dev) · 67 unmodified lines
103 101
104 mutex_lock(&driver_data->lock);102 mutex_lock(&driver_data->lock);
105 103
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
114 reg = wm831x_reg_read(wm831x, WM831X_WATCHDOG);104 reg = wm831x_reg_read(wm831x, WM831X_WATCHDOG);
115 105
116 if (!(reg & WM831X_WDOG_RST_SRC)) {106 if (!(reg & WM831X_WDOG_RST_SRC)) {
@@ -239,23 +229,6 @@ static int wm831x_wdt_probe(struct platform_device *pdev) · 122 unmodified lines
239 reg |= pdata->secondary << WM831X_WDOG_SECACT_SHIFT;229 reg |= pdata->secondary << WM831X_WDOG_SECACT_SHIFT;
240 reg |= pdata->software << WM831X_WDOG_RST_SRC_SHIFT;230 reg |= pdata->software << WM831X_WDOG_RST_SRC_SHIFT;
241 231
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
259 ret = wm831x_reg_unlock(wm831x);232 ret = wm831x_reg_unlock(wm831x);
260 if (ret == 0) {233 if (ret == 0) {
261 ret = wm831x_reg_write(wm831x, WM831X_WATCHDOG, reg);234 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
89 89
90struct wm831x_watchdog_pdata {90struct wm831x_watchdog_pdata {
91 enum wm831x_watchdog_action primary, secondary;91 enum wm831x_watchdog_action primary, secondary;
92 int update_gpio;
93 unsigned int software:1;92 unsigned int software:1;
94};93};
95 94