Lines Matching refs:pw
102 struct pseries_wdt *pw = watchdog_get_drvdata(wdd); in pseries_wdt_start() local
107 flags = pw->action | PSERIES_WDTF_OP_START; in pseries_wdt_start()
109 rc = plpar_hcall_norets(H_WATCHDOG, flags, pw->num, msecs); in pseries_wdt_start()
112 rc, pw->num); in pseries_wdt_start()
120 struct pseries_wdt *pw = watchdog_get_drvdata(wdd); in pseries_wdt_stop() local
124 rc = plpar_hcall_norets(H_WATCHDOG, PSERIES_WDTF_OP_STOP, pw->num); in pseries_wdt_stop()
127 rc, pw->num); in pseries_wdt_stop()
148 struct pseries_wdt *pw; in pseries_wdt_probe() local
160 pw = devm_kzalloc(&pdev->dev, sizeof(*pw), GFP_KERNEL); in pseries_wdt_probe()
161 if (!pw) in pseries_wdt_probe()
170 pw->num = 1; in pseries_wdt_probe()
171 if (PSERIES_WDTQ_MAX_NUMBER(cap) < pw->num) in pseries_wdt_probe()
176 pw->action = pseries_wdt_action[action]; in pseries_wdt_probe()
178 pw->wd.parent = &pdev->dev; in pseries_wdt_probe()
179 pw->wd.info = &pseries_wdt_info; in pseries_wdt_probe()
180 pw->wd.ops = &pseries_wdt_ops; in pseries_wdt_probe()
182 pw->wd.min_timeout = DIV_ROUND_UP(msecs, MSEC_PER_SEC); in pseries_wdt_probe()
183 pw->wd.max_timeout = UINT_MAX / 1000; /* from linux/watchdog.h */ in pseries_wdt_probe()
184 pw->wd.timeout = timeout; in pseries_wdt_probe()
185 if (watchdog_init_timeout(&pw->wd, 0, NULL)) in pseries_wdt_probe()
187 watchdog_set_nowayout(&pw->wd, nowayout); in pseries_wdt_probe()
188 watchdog_stop_on_reboot(&pw->wd); in pseries_wdt_probe()
189 watchdog_stop_on_unregister(&pw->wd); in pseries_wdt_probe()
190 watchdog_set_drvdata(&pw->wd, pw); in pseries_wdt_probe()
192 err = devm_watchdog_register_device(&pdev->dev, &pw->wd); in pseries_wdt_probe()
196 platform_set_drvdata(pdev, &pw->wd); in pseries_wdt_probe()