aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/hwmon/sht15.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/drivers/hwmon/sht15.c b/drivers/hwmon/sht15.c
index 1c85d39df171..9a594e6533a9 100644
--- a/drivers/hwmon/sht15.c
+++ b/drivers/hwmon/sht15.c
@@ -139,12 +139,12 @@ static const u8 sht15_crc8_table[] = {
139 * @reg: associated regulator (if specified). 139 * @reg: associated regulator (if specified).
140 * @nb: notifier block to handle notifications of voltage 140 * @nb: notifier block to handle notifications of voltage
141 * changes. 141 * changes.
142 * @supply_uV: local copy of supply voltage used to allow use of 142 * @supply_uv: local copy of supply voltage used to allow use of
143 * regulator consumer if available. 143 * regulator consumer if available.
144 * @supply_uV_valid: indicates that an updated value has not yet been 144 * @supply_uv_valid: indicates that an updated value has not yet been
145 * obtained from the regulator and so any calculations 145 * obtained from the regulator and so any calculations
146 * based upon it will be invalid. 146 * based upon it will be invalid.
147 * @update_supply_work: work struct that is used to update the supply_uV. 147 * @update_supply_work: work struct that is used to update the supply_uv.
148 * @interrupt_handled: flag used to indicate a handler has been scheduled. 148 * @interrupt_handled: flag used to indicate a handler has been scheduled.
149 */ 149 */
150struct sht15_data { 150struct sht15_data {
@@ -166,8 +166,8 @@ struct sht15_data {
166 struct device *hwmon_dev; 166 struct device *hwmon_dev;
167 struct regulator *reg; 167 struct regulator *reg;
168 struct notifier_block nb; 168 struct notifier_block nb;
169 int supply_uV; 169 int supply_uv;
170 bool supply_uV_valid; 170 bool supply_uv_valid;
171 struct work_struct update_supply_work; 171 struct work_struct update_supply_work;
172 atomic_t interrupt_handled; 172 atomic_t interrupt_handled;
173}; 173};
@@ -598,8 +598,8 @@ static inline int sht15_calc_temp(struct sht15_data *data)
598 598
599 for (i = ARRAY_SIZE(temppoints) - 1; i > 0; i--) 599 for (i = ARRAY_SIZE(temppoints) - 1; i > 0; i--)
600 /* Find pointer to interpolate */ 600 /* Find pointer to interpolate */
601 if (data->supply_uV > temppoints[i - 1].vdd) { 601 if (data->supply_uv > temppoints[i - 1].vdd) {
602 d1 = (data->supply_uV - temppoints[i - 1].vdd) 602 d1 = (data->supply_uv - temppoints[i - 1].vdd)
603 * (temppoints[i].d1 - temppoints[i - 1].d1) 603 * (temppoints[i].d1 - temppoints[i - 1].d1)
604 / (temppoints[i].vdd - temppoints[i - 1].vdd) 604 / (temppoints[i].vdd - temppoints[i - 1].vdd)
605 + temppoints[i - 1].d1; 605 + temppoints[i - 1].d1;
@@ -859,7 +859,7 @@ static void sht15_update_voltage(struct work_struct *work_s)
859 struct sht15_data *data 859 struct sht15_data *data
860 = container_of(work_s, struct sht15_data, 860 = container_of(work_s, struct sht15_data,
861 update_supply_work); 861 update_supply_work);
862 data->supply_uV = regulator_get_voltage(data->reg); 862 data->supply_uv = regulator_get_voltage(data->reg);
863} 863}
864 864
865/** 865/**
@@ -878,7 +878,7 @@ static int sht15_invalidate_voltage(struct notifier_block *nb,
878 struct sht15_data *data = container_of(nb, struct sht15_data, nb); 878 struct sht15_data *data = container_of(nb, struct sht15_data, nb);
879 879
880 if (event == REGULATOR_EVENT_VOLTAGE_CHANGE) 880 if (event == REGULATOR_EVENT_VOLTAGE_CHANGE)
881 data->supply_uV_valid = false; 881 data->supply_uv_valid = false;
882 schedule_work(&data->update_supply_work); 882 schedule_work(&data->update_supply_work);
883 883
884 return NOTIFY_OK; 884 return NOTIFY_OK;
@@ -906,7 +906,7 @@ static int sht15_probe(struct platform_device *pdev)
906 return -EINVAL; 906 return -EINVAL;
907 } 907 }
908 data->pdata = pdev->dev.platform_data; 908 data->pdata = pdev->dev.platform_data;
909 data->supply_uV = data->pdata->supply_mv * 1000; 909 data->supply_uv = data->pdata->supply_mv * 1000;
910 if (data->pdata->checksum) 910 if (data->pdata->checksum)
911 data->checksumming = true; 911 data->checksumming = true;
912 if (data->pdata->no_otp_reload) 912 if (data->pdata->no_otp_reload)
@@ -924,7 +924,7 @@ static int sht15_probe(struct platform_device *pdev)
924 924
925 voltage = regulator_get_voltage(data->reg); 925 voltage = regulator_get_voltage(data->reg);
926 if (voltage) 926 if (voltage)
927 data->supply_uV = voltage; 927 data->supply_uv = voltage;
928 928
929 regulator_enable(data->reg); 929 regulator_enable(data->reg);
930 /* 930 /*