Lines Matching +refs:dev +refs:id +refs:attrs
35 static ssize_t temp_show(struct device *dev, struct device_attribute *attr, in temp_show() argument
39 struct thermal_data *data = dev_get_drvdata(dev); in temp_show()
49 static ssize_t bit_show(struct device *dev, struct device_attribute *attr, in bit_show() argument
53 struct thermal_data *data = dev_get_drvdata(dev); in bit_show()
63 static ssize_t temp_store(struct device *dev, struct device_attribute *attr, in temp_store() argument
67 struct thermal_data *data = dev_get_drvdata(dev); in temp_store()
80 static ssize_t bit_store(struct device *dev, struct device_attribute *attr, in bit_store() argument
84 struct thermal_data *data = dev_get_drvdata(dev); in bit_store()
98 static ssize_t show_hyst_common(struct device *dev, in show_hyst_common() argument
103 struct thermal_data *data = dev_get_drvdata(dev); in show_hyst_common()
120 static ssize_t hyst_show(struct device *dev, struct device_attribute *attr, in hyst_show() argument
123 return show_hyst_common(dev, attr, buf, false); in hyst_show()
126 static ssize_t min_hyst_show(struct device *dev, in min_hyst_show() argument
129 return show_hyst_common(dev, attr, buf, true); in min_hyst_show()
132 static ssize_t hyst_store(struct device *dev, struct device_attribute *attr, in hyst_store() argument
136 struct thermal_data *data = dev_get_drvdata(dev); in hyst_store()
236 .attrs = emc1402_attrs,
264 .attrs = emc1403_attrs,
283 .attrs = emc1404_attrs,
316 .attrs = emc1402_alarm_attrs,
322 int id; in emc1403_detect() local
325 id = i2c_smbus_read_byte_data(client, THERMAL_SMSC_ID_REG); in emc1403_detect()
326 if (id != 0x5d) in emc1403_detect()
329 id = i2c_smbus_read_byte_data(client, THERMAL_PID_REG); in emc1403_detect()
330 switch (id) { in emc1403_detect()
353 id = i2c_smbus_read_byte_data(client, THERMAL_REVISION_REG); in emc1403_detect()
354 if (id < 0x01 || id > 0x04) in emc1403_detect()
360 static bool emc1403_regmap_is_volatile(struct device *dev, unsigned int reg) in emc1403_regmap_is_volatile() argument
395 const struct i2c_device_id *id = i2c_match_id(emc1403_idtable, client); in emc1403_probe() local
397 data = devm_kzalloc(&client->dev, sizeof(struct thermal_data), in emc1403_probe()
408 switch (id->driver_data) { in emc1403_probe()
419 if (id->driver_data == emc1402) in emc1403_probe()
422 hwmon_dev = devm_hwmon_device_register_with_groups(&client->dev, in emc1403_probe()
428 dev_info(&client->dev, "%s Thermal chip found\n", id->name); in emc1403_probe()