Skip to content

Commit 3f9d513

Browse files
linuswWim Van Sebroeck
authored andcommitted
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. Cc: Richard Fitzgerald <[email protected]> Cc: Charles Keepax <[email protected]> Cc: Mark Brown <[email protected]> Link: https://lore.kernel.org/linux-watchdog/[email protected]/ Signed-off-by: Linus Walleij <[email protected]> Reviewed-by: Guenter Roeck <[email protected]> Acked-by: Charles Keepax <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
1 parent dca96e0 commit 3f9d513

File tree

2 files changed

+0
-28
lines changed

2 files changed

+0
-28
lines changed

drivers/watchdog/wm831x_wdt.c

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
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 {
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)
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)
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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@ enum wm831x_watchdog_action {
8989

9090
struct wm831x_watchdog_pdata {
9191
enum wm831x_watchdog_action primary, secondary;
92-
int update_gpio;
9392
unsigned int software:1;
9493
};
9594

0 commit comments

Comments
 (0)