Source
1713
1713
static void lm90_remove_pec(void *dev)
1714
1714
{
1715
1715
device_remove_file(dev, &dev_attr_pec);
1716
1716
}
1717
1717
1718
1718
static void lm90_regulator_disable(void *regulator)
1719
1719
{
1720
1720
regulator_disable(regulator);
1721
1721
}
1722
1722
1723
-
static const u32 lm90_chip_config[] = {
1724
-
HWMON_C_REGISTER_TZ | HWMON_C_UPDATE_INTERVAL | HWMON_C_ALARMS,
1725
-
0
1726
-
};
1727
-
1728
-
static const struct hwmon_channel_info lm90_chip_info = {
1729
-
.type = hwmon_chip,
1730
-
.config = lm90_chip_config,
1731
-
};
1732
-
1733
1723
1734
1724
static const struct hwmon_ops lm90_ops = {
1735
1725
.is_visible = lm90_is_visible,
1736
1726
.read = lm90_read,
1737
1727
.write = lm90_write,
1738
1728
};
1739
1729
1740
1730
static int lm90_probe(struct i2c_client *client,
1741
1731
const struct i2c_device_id *id)
1742
1732
{
1785
1775
* ALERT# output
1786
1776
*/
1787
1777
data->alert_alarms = lm90_params[data->kind].alert_alarms;
1788
1778
1789
1779
/* Set chip capabilities */
1790
1780
data->flags = lm90_params[data->kind].flags;
1791
1781
1792
1782
data->chip.ops = &lm90_ops;
1793
1783
data->chip.info = data->info;
1794
1784
1795
-
data->info[0] = &lm90_chip_info;
1785
+
data->info[0] = HWMON_CHANNEL_INFO(chip,
1786
+
HWMON_C_REGISTER_TZ | HWMON_C_UPDATE_INTERVAL | HWMON_C_ALARMS);
1796
1787
data->info[1] = &data->temp_info;
1797
1788
1798
1789
info = &data->temp_info;
1799
1790
info->type = hwmon_temp;
1800
1791
info->config = data->channel_config;
1801
1792
1802
1793
data->channel_config[0] = HWMON_T_INPUT | HWMON_T_MIN | HWMON_T_MAX |
1803
1794
HWMON_T_CRIT | HWMON_T_CRIT_HYST | HWMON_T_MIN_ALARM |
1804
1795
HWMON_T_MAX_ALARM | HWMON_T_CRIT_ALARM;
1805
1796
data->channel_config[1] = HWMON_T_INPUT | HWMON_T_MIN | HWMON_T_MAX |