aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeremy Gebben <jgebben@sweptlaser.com>2019-02-04 15:19:06 -0500
committerGuenter Roeck <linux@roeck-us.net>2019-02-18 17:23:29 -0500
commite9b95485c12c31e07dbb1694e794f18565144099 (patch)
treef891ea4902aad77074d4ed2da16b77fe81c5d95a
parent11650cf02e79c2ec9023c1d25eb47d0c3acac3f2 (diff)
hwmon: (lm85) add support for LM96000 high frequencies
The LM96000 expands the freqency field from 3 to 4 bits, to add more frequencies in the 22.5 to 30 kHz ranges. Signed-off-by: Jeremy Gebben <jgebben@sweptlaser.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
-rw-r--r--Documentation/hwmon/lm853
-rw-r--r--drivers/hwmon/lm85.c9
2 files changed, 12 insertions, 0 deletions
diff --git a/Documentation/hwmon/lm85 b/Documentation/hwmon/lm85
index 4f531f4acc3f..2329c383efe4 100644
--- a/Documentation/hwmon/lm85
+++ b/Documentation/hwmon/lm85
@@ -140,6 +140,9 @@ of voltage and temperature channels.
140SMSC EMC6D103S is similar to EMC6D103, but does not support pwm#_auto_pwm_minctl 140SMSC EMC6D103S is similar to EMC6D103, but does not support pwm#_auto_pwm_minctl
141and temp#_auto_temp_off. 141and temp#_auto_temp_off.
142 142
143The LM96000 supports additional high frequency PWM modes (22.5 kHz, 24 kHz,
14425.7 kHz, 27.7 kHz and 30 kHz), which can be configured on a per-PWM basis.
145
143Hardware Configurations 146Hardware Configurations
144----------------------- 147-----------------------
145 148
diff --git a/drivers/hwmon/lm85.c b/drivers/hwmon/lm85.c
index b23cf8e4c54b..a95d48316f06 100644
--- a/drivers/hwmon/lm85.c
+++ b/drivers/hwmon/lm85.c
@@ -202,6 +202,11 @@ static const int lm85_freq_map[] = { /* 1 Hz */
202 10, 15, 23, 30, 38, 47, 61, 94 202 10, 15, 23, 30, 38, 47, 61, 94
203}; 203};
204 204
205static const int lm96000_freq_map[] = { /* 1 Hz */
206 10, 15, 23, 30, 38, 47, 61, 94,
207 22500, 24000, 25700, 25700, 27700, 27700, 30000, 30000
208};
209
205static const int adm1027_freq_map[] = { /* 1 Hz */ 210static const int adm1027_freq_map[] = { /* 1 Hz */
206 11, 15, 22, 29, 35, 44, 59, 88 211 11, 15, 22, 29, 35, 44, 59, 88
207}; 212};
@@ -1574,6 +1579,10 @@ static int lm85_probe(struct i2c_client *client, const struct i2c_device_id *id)
1574 data->freq_map = adm1027_freq_map; 1579 data->freq_map = adm1027_freq_map;
1575 data->freq_map_size = ARRAY_SIZE(adm1027_freq_map); 1580 data->freq_map_size = ARRAY_SIZE(adm1027_freq_map);
1576 break; 1581 break;
1582 case lm96000:
1583 data->freq_map = lm96000_freq_map;
1584 data->freq_map_size = ARRAY_SIZE(lm96000_freq_map);
1585 break;
1577 default: 1586 default:
1578 data->freq_map = lm85_freq_map; 1587 data->freq_map = lm85_freq_map;
1579 data->freq_map_size = ARRAY_SIZE(lm85_freq_map); 1588 data->freq_map_size = ARRAY_SIZE(lm85_freq_map);