13
13
#include <linux/platform_device.h>
14
14
#include <linux/watchdog.h>
15
15
#include <linux/uaccess.h>
16
- #include <linux/gpio.h>
17
16
18
17
#include <linux/mfd/wm831x/core.h>
19
18
#include <linux/mfd/wm831x/pdata.h>
@@ -29,7 +28,6 @@ struct wm831x_wdt_drvdata {
29
28
struct watchdog_device wdt ;
30
29
struct wm831x * wm831x ;
31
30
struct mutex lock ;
32
- int update_gpio ;
33
31
int update_state ;
34
32
};
35
33
@@ -103,14 +101,6 @@ static int wm831x_wdt_ping(struct watchdog_device *wdt_dev)
103
101
104
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
104
reg = wm831x_reg_read (wm831x , WM831X_WATCHDOG );
115
105
116
106
if (!(reg & WM831X_WDOG_RST_SRC )) {
@@ -239,23 +229,6 @@ static int wm831x_wdt_probe(struct platform_device *pdev)
239
229
reg |= pdata -> secondary << WM831X_WDOG_SECACT_SHIFT ;
240
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
232
ret = wm831x_reg_unlock (wm831x );
260
233
if (ret == 0 ) {
261
234
ret = wm831x_reg_write (wm831x , WM831X_WATCHDOG , reg );
0 commit comments