scpi-hwmon.c (4f2c0a4acffbec01079c28f839422e64ddeff004) | scpi-hwmon.c (0ce637a5469139f901c3047e507afcf17bd00f43) |
---|---|
1// SPDX-License-Identifier: GPL-2.0 2/* 3 * System Control and Power Interface(SCPI) based hwmon sensor driver 4 * 5 * Copyright (C) 2015 ARM Ltd. 6 * Punit Agrawal <punit.agrawal@arm.com> 7 */ 8 --- 50 unchanged lines hidden (view full) --- 59 if (scpi_scale[sensor->info.class] != sensor->scale) { 60 *value *= scpi_scale[sensor->info.class]; 61 do_div(*value, sensor->scale); 62 } 63} 64 65static int scpi_read_temp(struct thermal_zone_device *tz, int *temp) 66{ | 1// SPDX-License-Identifier: GPL-2.0 2/* 3 * System Control and Power Interface(SCPI) based hwmon sensor driver 4 * 5 * Copyright (C) 2015 ARM Ltd. 6 * Punit Agrawal <punit.agrawal@arm.com> 7 */ 8 --- 50 unchanged lines hidden (view full) --- 59 if (scpi_scale[sensor->info.class] != sensor->scale) { 60 *value *= scpi_scale[sensor->info.class]; 61 do_div(*value, sensor->scale); 62 } 63} 64 65static int scpi_read_temp(struct thermal_zone_device *tz, int *temp) 66{ |
67 struct scpi_thermal_zone *zone = tz->devdata; | 67 struct scpi_thermal_zone *zone = thermal_zone_device_priv(tz); |
68 struct scpi_sensors *scpi_sensors = zone->scpi_sensors; 69 struct scpi_ops *scpi_ops = scpi_sensors->scpi_ops; 70 struct sensor_data *sensor = &scpi_sensors->data[zone->sensor_id]; 71 u64 value; 72 int ret; 73 74 ret = scpi_ops->sensor_get_value(sensor->info.sensor_id, &value); 75 if (ret) --- 231 unchanged lines hidden --- | 68 struct scpi_sensors *scpi_sensors = zone->scpi_sensors; 69 struct scpi_ops *scpi_ops = scpi_sensors->scpi_ops; 70 struct sensor_data *sensor = &scpi_sensors->data[zone->sensor_id]; 71 u64 value; 72 int ret; 73 74 ret = scpi_ops->sensor_get_value(sensor->info.sensor_id, &value); 75 if (ret) --- 231 unchanged lines hidden --- |