* [PATCH v2 2/3] hwmon: (lm85) Document the LM96000 as supported
[not found] <20190131220617.15223-1-jgebben@sweptlaser.com>
@ 2019-01-31 22:06 ` Jeremy Gebben
2019-01-31 22:06 ` [PATCH v2 3/3] hwmon: (lm85) add support for LM96000 high frequencies Jeremy Gebben
1 sibling, 0 replies; 3+ messages in thread
From: Jeremy Gebben @ 2019-01-31 22:06 UTC (permalink / raw)
To: Jean Delvare, Guenter Roeck, Jonathan Corbet, linux-hwmon,
linux-doc, linux-kernel
It has been supported as a generic lm85 for quite some time.
Signed-off-by: Jeremy Gebben <jgebben@sweptlaser.com>
---
Documentation/hwmon/lm85 | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/Documentation/hwmon/lm85 b/Documentation/hwmon/lm85
index 7c49feaa7..9f3a945d1 100644
--- a/Documentation/hwmon/lm85
+++ b/Documentation/hwmon/lm85
@@ -3,9 +3,13 @@ Kernel driver lm85
Supported chips:
* National Semiconductor LM85 (B and C versions)
- Prefix: 'lm85'
+ Prefix: 'lm85b' or 'lm85c'
Addresses scanned: I2C 0x2c, 0x2d, 0x2e
Datasheet: http://www.national.com/pf/LM/LM85.html
+ * Texas Instruments LM96000
+ Prefix: 'lm85'
+ Addresses scanned: I2C 0x2c, 0x2d, 0x2e
+ Datasheet: http://www.ti.com/lit/ds/symlink/lm96000.pdf
* Analog Devices ADM1027
Prefix: 'adm1027'
Addresses scanned: I2C 0x2c, 0x2d, 0x2e
--
2.17.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH v2 3/3] hwmon: (lm85) add support for LM96000 high frequencies
[not found] <20190131220617.15223-1-jgebben@sweptlaser.com>
2019-01-31 22:06 ` [PATCH v2 2/3] hwmon: (lm85) Document the LM96000 as supported Jeremy Gebben
@ 2019-01-31 22:06 ` Jeremy Gebben
2019-02-01 22:37 ` Guenter Roeck
1 sibling, 1 reply; 3+ messages in thread
From: Jeremy Gebben @ 2019-01-31 22:06 UTC (permalink / raw)
To: Jean Delvare, Guenter Roeck, Jonathan Corbet, linux-hwmon,
linux-doc, linux-kernel
This chip 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>
---
Documentation/hwmon/lm85 | 3 +++
drivers/hwmon/lm85.c | 9 +++++++++
2 files changed, 12 insertions(+)
diff --git a/Documentation/hwmon/lm85 b/Documentation/hwmon/lm85
index 9f3a945d1..264874f09 100644
--- a/Documentation/hwmon/lm85
+++ b/Documentation/hwmon/lm85
@@ -140,6 +140,9 @@ of voltage and temperature channels.
SMSC EMC6D103S is similar to EMC6D103, but does not support pwm#_auto_pwm_minctl
and temp#_auto_temp_off.
+The LM96000 supports additional high frequency PWM modes (22.5 kHz, 24 kHz,
+25.7 kHz, 27.7 kHz and 30 kHz), which can be configured on a per-PWM basis.
+
Hardware Configurations
-----------------------
diff --git a/drivers/hwmon/lm85.c b/drivers/hwmon/lm85.c
index 4b15193d1..88f08f4bc 100644
--- a/drivers/hwmon/lm85.c
+++ b/drivers/hwmon/lm85.c
@@ -202,6 +202,11 @@ static const int lm85_freq_map[] = { /* 1 Hz */
10, 15, 23, 30, 38, 47, 61, 94
};
+static const int lm85_high_freq_map[] = { /* 1 Hz */
+ 10, 15, 23, 30, 38, 47, 61, 94,
+ 22500, 24000, 25700, 25700, 27700, 27700, 30000, 30000
+};
+
static const int adm1027_freq_map[] = { /* 1 Hz */
11, 15, 22, 29, 35, 44, 59, 88
};
@@ -1574,6 +1579,10 @@ static int lm85_probe(struct i2c_client *client, const struct i2c_device_id *id)
data->freq_map = adm1027_freq_map;
data->freq_map_size = ARRAY_SIZE(adm1027_freq_map);
break;
+ case lm85:
+ data->freq_map = lm85_high_freq_map;
+ data->freq_map_size = ARRAY_SIZE(lm85_high_freq_map);
+ break;
default:
data->freq_map = lm85_freq_map;
data->freq_map_size = ARRAY_SIZE(lm85_freq_map);
--
2.17.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v2 3/3] hwmon: (lm85) add support for LM96000 high frequencies
2019-01-31 22:06 ` [PATCH v2 3/3] hwmon: (lm85) add support for LM96000 high frequencies Jeremy Gebben
@ 2019-02-01 22:37 ` Guenter Roeck
0 siblings, 0 replies; 3+ messages in thread
From: Guenter Roeck @ 2019-02-01 22:37 UTC (permalink / raw)
To: Jeremy Gebben
Cc: Jean Delvare, Jonathan Corbet, linux-hwmon, linux-doc,
linux-kernel
On Thu, Jan 31, 2019 at 03:06:17PM -0700, Jeremy Gebben wrote:
> This chip expands the freqency field from 3 to 4 bits, to
> add more frequencies in the 22.5 to 30 kHz ranges.
>
"This chip" -> LM96000
> Signed-off-by: Jeremy Gebben <jgebben@sweptlaser.com>
> ---
> Documentation/hwmon/lm85 | 3 +++
> drivers/hwmon/lm85.c | 9 +++++++++
> 2 files changed, 12 insertions(+)
>
> diff --git a/Documentation/hwmon/lm85 b/Documentation/hwmon/lm85
> index 9f3a945d1..264874f09 100644
> --- a/Documentation/hwmon/lm85
> +++ b/Documentation/hwmon/lm85
> @@ -140,6 +140,9 @@ of voltage and temperature channels.
> SMSC EMC6D103S is similar to EMC6D103, but does not support pwm#_auto_pwm_minctl
> and temp#_auto_temp_off.
>
> +The LM96000 supports additional high frequency PWM modes (22.5 kHz, 24 kHz,
> +25.7 kHz, 27.7 kHz and 30 kHz), which can be configured on a per-PWM basis.
> +
> Hardware Configurations
> -----------------------
>
> diff --git a/drivers/hwmon/lm85.c b/drivers/hwmon/lm85.c
> index 4b15193d1..88f08f4bc 100644
> --- a/drivers/hwmon/lm85.c
> +++ b/drivers/hwmon/lm85.c
> @@ -202,6 +202,11 @@ static const int lm85_freq_map[] = { /* 1 Hz */
> 10, 15, 23, 30, 38, 47, 61, 94
> };
>
> +static const int lm85_high_freq_map[] = { /* 1 Hz */
> + 10, 15, 23, 30, 38, 47, 61, 94,
> + 22500, 24000, 25700, 25700, 27700, 27700, 30000, 30000
> +};
Should be lm96000_freq_map.
> +
> static const int adm1027_freq_map[] = { /* 1 Hz */
> 11, 15, 22, 29, 35, 44, 59, 88
> };
> @@ -1574,6 +1579,10 @@ static int lm85_probe(struct i2c_client *client, const struct i2c_device_id *id)
> data->freq_map = adm1027_freq_map;
> data->freq_map_size = ARRAY_SIZE(adm1027_freq_map);
> break;
> + case lm85:
> + data->freq_map = lm85_high_freq_map;
> + data->freq_map_size = ARRAY_SIZE(lm85_high_freq_map);
> + break;
This is too generic. You'll have to introduce a 'lm96000' type
and use it. That should be straightforward since the lm96000
is already detected (and for some reason handled as lm85).
> default:
> data->freq_map = lm85_freq_map;
> data->freq_map_size = ARRAY_SIZE(lm85_freq_map);
> --
> 2.17.1
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-02-01 22:37 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20190131220617.15223-1-jgebben@sweptlaser.com>
2019-01-31 22:06 ` [PATCH v2 2/3] hwmon: (lm85) Document the LM96000 as supported Jeremy Gebben
2019-01-31 22:06 ` [PATCH v2 3/3] hwmon: (lm85) add support for LM96000 high frequencies Jeremy Gebben
2019-02-01 22:37 ` Guenter Roeck
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).