aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hwmon/pc87360.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/hwmon/pc87360.c')
-rw-r--r--drivers/hwmon/pc87360.c56
1 files changed, 28 insertions, 28 deletions
diff --git a/drivers/hwmon/pc87360.c b/drivers/hwmon/pc87360.c
index 236f9f29c624..db543a8d78b0 100644
--- a/drivers/hwmon/pc87360.c
+++ b/drivers/hwmon/pc87360.c
@@ -472,6 +472,34 @@ static struct sensor_device_attribute in_max[] = {
472 SENSOR_ATTR(in10_max, S_IWUSR | S_IRUGO, show_in_max, set_in_max, 10), 472 SENSOR_ATTR(in10_max, S_IWUSR | S_IRUGO, show_in_max, set_in_max, 10),
473}; 473};
474 474
475static ssize_t show_vid(struct device *dev, struct device_attribute *attr, char *buf)
476{
477 struct pc87360_data *data = pc87360_update_device(dev);
478 return sprintf(buf, "%u\n", vid_from_reg(data->vid, data->vrm));
479}
480static DEVICE_ATTR(cpu0_vid, S_IRUGO, show_vid, NULL);
481
482static ssize_t show_vrm(struct device *dev, struct device_attribute *attr, char *buf)
483{
484 struct pc87360_data *data = pc87360_update_device(dev);
485 return sprintf(buf, "%u\n", data->vrm);
486}
487static ssize_t set_vrm(struct device *dev, struct device_attribute *attr, const char *buf, size_t count)
488{
489 struct i2c_client *client = to_i2c_client(dev);
490 struct pc87360_data *data = i2c_get_clientdata(client);
491 data->vrm = simple_strtoul(buf, NULL, 10);
492 return count;
493}
494static DEVICE_ATTR(vrm, S_IRUGO | S_IWUSR, show_vrm, set_vrm);
495
496static ssize_t show_in_alarms(struct device *dev, struct device_attribute *attr, char *buf)
497{
498 struct pc87360_data *data = pc87360_update_device(dev);
499 return sprintf(buf, "%u\n", data->in_alarms);
500}
501static DEVICE_ATTR(alarms_in, S_IRUGO, show_in_alarms, NULL);
502
475static ssize_t show_therm_input(struct device *dev, struct device_attribute *devattr, char *buf) 503static ssize_t show_therm_input(struct device *dev, struct device_attribute *devattr, char *buf)
476{ 504{
477 struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr); 505 struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
@@ -590,34 +618,6 @@ static struct sensor_device_attribute therm_crit[] = {
590 show_therm_crit, set_therm_crit, 2+11), 618 show_therm_crit, set_therm_crit, 2+11),
591}; 619};
592 620
593static ssize_t show_vid(struct device *dev, struct device_attribute *attr, char *buf)
594{
595 struct pc87360_data *data = pc87360_update_device(dev);
596 return sprintf(buf, "%u\n", vid_from_reg(data->vid, data->vrm));
597}
598static DEVICE_ATTR(cpu0_vid, S_IRUGO, show_vid, NULL);
599
600static ssize_t show_vrm(struct device *dev, struct device_attribute *attr, char *buf)
601{
602 struct pc87360_data *data = pc87360_update_device(dev);
603 return sprintf(buf, "%u\n", data->vrm);
604}
605static ssize_t set_vrm(struct device *dev, struct device_attribute *attr, const char *buf, size_t count)
606{
607 struct i2c_client *client = to_i2c_client(dev);
608 struct pc87360_data *data = i2c_get_clientdata(client);
609 data->vrm = simple_strtoul(buf, NULL, 10);
610 return count;
611}
612static DEVICE_ATTR(vrm, S_IRUGO | S_IWUSR, show_vrm, set_vrm);
613
614static ssize_t show_in_alarms(struct device *dev, struct device_attribute *attr, char *buf)
615{
616 struct pc87360_data *data = pc87360_update_device(dev);
617 return sprintf(buf, "%u\n", data->in_alarms);
618}
619static DEVICE_ATTR(alarms_in, S_IRUGO, show_in_alarms, NULL);
620
621static ssize_t show_temp_input(struct device *dev, struct device_attribute *devattr, char *buf) 621static ssize_t show_temp_input(struct device *dev, struct device_attribute *devattr, char *buf)
622{ 622{
623 struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr); 623 struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);