Lines Matching refs:dev
71 static int adm1177_read(struct device *dev, enum hwmon_sensor_types type, in adm1177_read() argument
74 struct adm1177_state *st = dev_get_drvdata(dev); in adm1177_read()
121 static int adm1177_write(struct device *dev, enum hwmon_sensor_types type, in adm1177_write() argument
124 struct adm1177_state *st = dev_get_drvdata(dev); in adm1177_write()
192 struct device *dev = &client->dev; in adm1177_probe() local
198 st = devm_kzalloc(dev, sizeof(*st), GFP_KERNEL); in adm1177_probe()
204 ret = devm_regulator_get_enable_optional(&client->dev, "vref"); in adm1177_probe()
208 if (device_property_read_u32(dev, "shunt-resistor-micro-ohms", in adm1177_probe()
211 if (device_property_read_u32(dev, "adi,shutdown-threshold-microamp", in adm1177_probe()
223 st->vrange_high = device_property_read_bool(dev, in adm1177_probe()
235 devm_hwmon_device_register_with_info(dev, client->name, st, in adm1177_probe()