aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hwmon
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2015-11-24 13:34:40 -0500
committerPaolo Bonzini <pbonzini@redhat.com>2015-11-24 13:34:40 -0500
commit8bd142c01648cdb33e9bcafa0448ba2c20ed814c (patch)
tree9197c60d3f9d4036f38f281a183e94750ceea1d7 /drivers/hwmon
parentd792abacaf1a1a8dfea353fab699b97fa6251c2a (diff)
parentfbb4574ce9a37e15a9872860bf202f2be5bdf6c4 (diff)
Merge tag 'kvm-arm-for-v4.4-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into kvm-master
KVM/ARM Fixes for v4.4-rc3. Includes some timer fixes, properly unmapping PTEs, an errata fix, and two tweaks to the EL2 panic code.
Diffstat (limited to 'drivers/hwmon')
-rw-r--r--drivers/hwmon/Kconfig2
-rw-r--r--drivers/hwmon/applesmc.c2
-rw-r--r--drivers/hwmon/scpi-hwmon.c21
3 files changed, 14 insertions, 11 deletions
diff --git a/drivers/hwmon/Kconfig b/drivers/hwmon/Kconfig
index 842b0043ad94..8f59f057cdf4 100644
--- a/drivers/hwmon/Kconfig
+++ b/drivers/hwmon/Kconfig
@@ -324,6 +324,7 @@ config SENSORS_APPLESMC
324config SENSORS_ARM_SCPI 324config SENSORS_ARM_SCPI
325 tristate "ARM SCPI Sensors" 325 tristate "ARM SCPI Sensors"
326 depends on ARM_SCPI_PROTOCOL 326 depends on ARM_SCPI_PROTOCOL
327 depends on THERMAL || !THERMAL_OF
327 help 328 help
328 This driver provides support for temperature, voltage, current 329 This driver provides support for temperature, voltage, current
329 and power sensors available on ARM Ltd's SCP based platforms. The 330 and power sensors available on ARM Ltd's SCP based platforms. The
@@ -1471,6 +1472,7 @@ config SENSORS_INA209
1471config SENSORS_INA2XX 1472config SENSORS_INA2XX
1472 tristate "Texas Instruments INA219 and compatibles" 1473 tristate "Texas Instruments INA219 and compatibles"
1473 depends on I2C 1474 depends on I2C
1475 select REGMAP_I2C
1474 help 1476 help
1475 If you say yes here you get support for INA219, INA220, INA226, 1477 If you say yes here you get support for INA219, INA220, INA226,
1476 INA230, and INA231 power monitor chips. 1478 INA230, and INA231 power monitor chips.
diff --git a/drivers/hwmon/applesmc.c b/drivers/hwmon/applesmc.c
index 1f5e956941b1..0af7fd311979 100644
--- a/drivers/hwmon/applesmc.c
+++ b/drivers/hwmon/applesmc.c
@@ -537,7 +537,7 @@ static int applesmc_init_index(struct applesmc_registers *s)
537static int applesmc_init_smcreg_try(void) 537static int applesmc_init_smcreg_try(void)
538{ 538{
539 struct applesmc_registers *s = &smcreg; 539 struct applesmc_registers *s = &smcreg;
540 bool left_light_sensor, right_light_sensor; 540 bool left_light_sensor = 0, right_light_sensor = 0;
541 unsigned int count; 541 unsigned int count;
542 u8 tmp[1]; 542 u8 tmp[1];
543 int ret; 543 int ret;
diff --git a/drivers/hwmon/scpi-hwmon.c b/drivers/hwmon/scpi-hwmon.c
index 2c1241bbf9af..7e20567bc369 100644
--- a/drivers/hwmon/scpi-hwmon.c
+++ b/drivers/hwmon/scpi-hwmon.c
@@ -117,7 +117,7 @@ static int scpi_hwmon_probe(struct platform_device *pdev)
117 struct scpi_ops *scpi_ops; 117 struct scpi_ops *scpi_ops;
118 struct device *hwdev, *dev = &pdev->dev; 118 struct device *hwdev, *dev = &pdev->dev;
119 struct scpi_sensors *scpi_sensors; 119 struct scpi_sensors *scpi_sensors;
120 int ret; 120 int ret, idx;
121 121
122 scpi_ops = get_scpi_ops(); 122 scpi_ops = get_scpi_ops();
123 if (!scpi_ops) 123 if (!scpi_ops)
@@ -146,8 +146,8 @@ static int scpi_hwmon_probe(struct platform_device *pdev)
146 146
147 scpi_sensors->scpi_ops = scpi_ops; 147 scpi_sensors->scpi_ops = scpi_ops;
148 148
149 for (i = 0; i < nr_sensors; i++) { 149 for (i = 0, idx = 0; i < nr_sensors; i++) {
150 struct sensor_data *sensor = &scpi_sensors->data[i]; 150 struct sensor_data *sensor = &scpi_sensors->data[idx];
151 151
152 ret = scpi_ops->sensor_get_info(i, &sensor->info); 152 ret = scpi_ops->sensor_get_info(i, &sensor->info);
153 if (ret) 153 if (ret)
@@ -183,7 +183,7 @@ static int scpi_hwmon_probe(struct platform_device *pdev)
183 num_power++; 183 num_power++;
184 break; 184 break;
185 default: 185 default:
186 break; 186 continue;
187 } 187 }
188 188
189 sensor->dev_attr_input.attr.mode = S_IRUGO; 189 sensor->dev_attr_input.attr.mode = S_IRUGO;
@@ -194,11 +194,12 @@ static int scpi_hwmon_probe(struct platform_device *pdev)
194 sensor->dev_attr_label.show = scpi_show_label; 194 sensor->dev_attr_label.show = scpi_show_label;
195 sensor->dev_attr_label.attr.name = sensor->label; 195 sensor->dev_attr_label.attr.name = sensor->label;
196 196
197 scpi_sensors->attrs[i << 1] = &sensor->dev_attr_input.attr; 197 scpi_sensors->attrs[idx << 1] = &sensor->dev_attr_input.attr;
198 scpi_sensors->attrs[(i << 1) + 1] = &sensor->dev_attr_label.attr; 198 scpi_sensors->attrs[(idx << 1) + 1] = &sensor->dev_attr_label.attr;
199 199
200 sysfs_attr_init(scpi_sensors->attrs[i << 1]); 200 sysfs_attr_init(scpi_sensors->attrs[idx << 1]);
201 sysfs_attr_init(scpi_sensors->attrs[(i << 1) + 1]); 201 sysfs_attr_init(scpi_sensors->attrs[(idx << 1) + 1]);
202 idx++;
202 } 203 }
203 204
204 scpi_sensors->group.attrs = scpi_sensors->attrs; 205 scpi_sensors->group.attrs = scpi_sensors->attrs;
@@ -236,8 +237,8 @@ static int scpi_hwmon_probe(struct platform_device *pdev)
236 237
237 zone->sensor_id = i; 238 zone->sensor_id = i;
238 zone->scpi_sensors = scpi_sensors; 239 zone->scpi_sensors = scpi_sensors;
239 zone->tzd = thermal_zone_of_sensor_register(dev, i, zone, 240 zone->tzd = thermal_zone_of_sensor_register(dev,
240 &scpi_sensor_ops); 241 sensor->info.sensor_id, zone, &scpi_sensor_ops);
241 /* 242 /*
242 * The call to thermal_zone_of_sensor_register returns 243 * The call to thermal_zone_of_sensor_register returns
243 * an error for sensors that are not associated with 244 * an error for sensors that are not associated with