Lines Matching refs:drv_data

60 	struct menf21bmc_wdt *drv_data = watchdog_get_drvdata(wdt);  in menf21bmc_wdt_start()  local
62 return i2c_smbus_write_byte(drv_data->i2c_client, BMC_CMD_WD_ON); in menf21bmc_wdt_start()
67 struct menf21bmc_wdt *drv_data = watchdog_get_drvdata(wdt); in menf21bmc_wdt_stop() local
69 return i2c_smbus_write_byte_data(drv_data->i2c_client, in menf21bmc_wdt_stop()
77 struct menf21bmc_wdt *drv_data = watchdog_get_drvdata(wdt); in menf21bmc_wdt_settimeout() local
84 ret = i2c_smbus_write_word_data(drv_data->i2c_client, in menf21bmc_wdt_settimeout()
96 struct menf21bmc_wdt *drv_data = watchdog_get_drvdata(wdt); in menf21bmc_wdt_ping() local
98 return i2c_smbus_write_byte(drv_data->i2c_client, BMC_CMD_WD_TRIG); in menf21bmc_wdt_ping()
118 struct menf21bmc_wdt *drv_data; in menf21bmc_wdt_probe() local
121 drv_data = devm_kzalloc(dev, sizeof(struct menf21bmc_wdt), GFP_KERNEL); in menf21bmc_wdt_probe()
122 if (!drv_data) in menf21bmc_wdt_probe()
125 drv_data->wdt.ops = &menf21bmc_wdt_ops; in menf21bmc_wdt_probe()
126 drv_data->wdt.info = &menf21bmc_wdt_info; in menf21bmc_wdt_probe()
127 drv_data->wdt.min_timeout = BMC_WD_TIMEOUT_MIN; in menf21bmc_wdt_probe()
128 drv_data->wdt.max_timeout = BMC_WD_TIMEOUT_MAX; in menf21bmc_wdt_probe()
129 drv_data->wdt.parent = dev; in menf21bmc_wdt_probe()
130 drv_data->i2c_client = i2c_client; in menf21bmc_wdt_probe()
136 bmc_timeout = i2c_smbus_read_word_data(drv_data->i2c_client, in menf21bmc_wdt_probe()
143 watchdog_init_timeout(&drv_data->wdt, bmc_timeout / 10, dev); in menf21bmc_wdt_probe()
144 watchdog_set_nowayout(&drv_data->wdt, nowayout); in menf21bmc_wdt_probe()
145 watchdog_set_drvdata(&drv_data->wdt, drv_data); in menf21bmc_wdt_probe()
146 platform_set_drvdata(pdev, drv_data); in menf21bmc_wdt_probe()
148 ret = menf21bmc_wdt_set_bootstatus(drv_data); in menf21bmc_wdt_probe()
154 ret = devm_watchdog_register_device(dev, &drv_data->wdt); in menf21bmc_wdt_probe()
165 struct menf21bmc_wdt *drv_data = platform_get_drvdata(pdev); in menf21bmc_wdt_shutdown() local
167 i2c_smbus_write_word_data(drv_data->i2c_client, in menf21bmc_wdt_shutdown()