Lines Matching refs:dev

126 static bool tmp401_regmap_is_volatile(struct device *dev, unsigned int reg)  in tmp401_regmap_is_volatile()  argument
307 static int tmp401_temp_read(struct device *dev, u32 attr, int channel, long *val) in tmp401_temp_read() argument
309 struct tmp401_data *data = dev_get_drvdata(dev); in tmp401_temp_read()
359 static int tmp401_temp_write(struct device *dev, u32 attr, int channel, in tmp401_temp_write() argument
362 struct tmp401_data *data = dev_get_drvdata(dev); in tmp401_temp_write()
400 static int tmp401_chip_read(struct device *dev, u32 attr, int channel, long *val) in tmp401_chip_read() argument
402 struct tmp401_data *data = dev_get_drvdata(dev); in tmp401_chip_read()
440 static int tmp401_chip_write(struct device *dev, u32 attr, int channel, long val) in tmp401_chip_write() argument
442 struct tmp401_data *data = dev_get_drvdata(dev); in tmp401_chip_write()
471 static int tmp401_read(struct device *dev, enum hwmon_sensor_types type, in tmp401_read() argument
476 return tmp401_chip_read(dev, attr, channel, val); in tmp401_read()
478 return tmp401_temp_read(dev, attr, channel, val); in tmp401_read()
484 static int tmp401_write(struct device *dev, enum hwmon_sensor_types type, in tmp401_write() argument
489 return tmp401_chip_write(dev, attr, channel, val); in tmp401_write()
491 return tmp401_temp_write(dev, attr, channel, val); in tmp401_write()
564 if (of_property_read_bool(data->client->dev.of_node, "ti,extended-range-enable")) { in tmp401_init_client()
577 ret = of_property_read_u32(data->client->dev.of_node, "ti,n-factor", &nfactor); in tmp401_init_client()
580 dev_err(&data->client->dev, "ti,tmp401 does not support n-factor correction\n"); in tmp401_init_client()
584 dev_err(&data->client->dev, "n-factor is invalid (%d)\n", nfactor); in tmp401_init_client()
592 ret = of_property_read_u32(data->client->dev.of_node, "ti,beta-compensation", &val); in tmp401_init_client()
595 dev_err(&data->client->dev, "ti,tmp401 or ti,tmp411 does not support beta compensation\n"); in tmp401_init_client()
599 dev_err(&data->client->dev, "beta-compensation is invalid (%u)\n", val); in tmp401_init_client()
684 struct device *dev = &client->dev; in tmp401_probe() local
690 data = devm_kzalloc(dev, sizeof(struct tmp401_data), GFP_KERNEL); in tmp401_probe()
698 data->regmap = devm_regmap_init(dev, NULL, data, &tmp401_regmap_config); in tmp401_probe()
743 hwmon_dev = devm_hwmon_device_register_with_info(dev, client->name, data, in tmp401_probe()
748 dev_info(dev, "Detected TI %s chip\n", names[data->kind]); in tmp401_probe()