<div dir="ltr">Great, thanks! <br></div><br><div class="gmail_quote"><div dir="ltr">On Tue, Sep 11, 2018 at 1:37 PM Guenter Roeck <<a href="mailto:linux@roeck-us.net">linux@roeck-us.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Tue, Sep 11, 2018 at 01:25:58PM -0700, Kun Yi wrote:<br>
> MAX31725/MAX31726 are local temperature sensors with +/- 0.5 degree<br>
> Celsius accuracy and 16-bit (0.00390625 degrees Celsius) resolution.<br>
> They have a register mapping and encoding compatible with the lm75<br>
> series drivers. Address scan and extended temperature range are<br>
> not supported by this patch.<br>
> <br>
> Tested on real hardware and verified temperature readings are correct.<br>
> <br>
> Signed-off-by: Kun Yi <<a href="mailto:kunyi@google.com" target="_blank">kunyi@google.com</a>><br>
<br>
Applied to hwmon-next.<br>
<br>
Thanks,<br>
Guenter<br>
<br>
> ---<br>
> Documentation/hwmon/lm75 | 6 +++---<br>
> drivers/hwmon/lm75.c | 18 ++++++++++++++++--<br>
> 2 files changed, 19 insertions(+), 5 deletions(-)<br>
> <br>
> diff --git a/Documentation/hwmon/lm75 b/Documentation/hwmon/lm75<br>
> index ac95edfcd907..2f1120f88c16 100644<br>
> --- a/Documentation/hwmon/lm75<br>
> +++ b/Documentation/hwmon/lm75<br>
> @@ -17,8 +17,8 @@ Supported chips:<br>
> Addresses scanned: none<br>
> Datasheet: Publicly available at the Maxim website<br>
> <a href="http://www.maximintegrated.com/" rel="noreferrer" target="_blank">http://www.maximintegrated.com/</a><br>
> - * Maxim MAX6625, MAX6626<br>
> - Prefixes: 'max6625', 'max6626'<br>
> + * Maxim MAX6625, MAX6626, MAX31725, MAX31726<br>
> + Prefixes: 'max6625', 'max6626', 'max31725', 'max31726'<br>
> Addresses scanned: none<br>
> Datasheet: Publicly available at the Maxim website<br>
> <a href="http://www.maxim-ic.com/" rel="noreferrer" target="_blank">http://www.maxim-ic.com/</a><br>
> @@ -86,7 +86,7 @@ The LM75 is essentially an industry standard; there may be other<br>
> LM75 clones not listed here, with or without various enhancements,<br>
> that are supported. The clones are not detected by the driver, unless<br>
> they reproduce the exact register tricks of the original LM75, and must<br>
> -therefore be instantiated explicitly. Higher resolution up to 12-bit<br>
> +therefore be instantiated explicitly. Higher resolution up to 16-bit<br>
> is supported by this driver, other specific enhancements are not.<br>
> <br>
> The LM77 is not supported, contrary to what we pretended for a long time.<br>
> diff --git a/drivers/hwmon/lm75.c b/drivers/hwmon/lm75.c<br>
> index 49f4b33a5685..e6e5a1080f09 100644<br>
> --- a/drivers/hwmon/lm75.c<br>
> +++ b/drivers/hwmon/lm75.c<br>
> @@ -47,6 +47,7 @@ enum lm75_type { /* keep sorted in alphabetical order */<br>
> lm75b,<br>
> max6625,<br>
> max6626,<br>
> + max31725,<br>
> mcp980x,<br>
> stds75,<br>
> tcn75,<br>
> @@ -64,7 +65,6 @@ enum lm75_type { /* keep sorted in alphabetical order */<br>
> static const unsigned short normal_i2c[] = { 0x48, 0x49, 0x4a, 0x4b, 0x4c,<br>
> 0x4d, 0x4e, 0x4f, I2C_CLIENT_END };<br>
> <br>
> -<br>
> /* The LM75 registers */<br>
> #define LM75_REG_TEMP 0x00<br>
> #define LM75_REG_CONF 0x01<br>
> @@ -76,7 +76,7 @@ struct lm75_data {<br>
> struct i2c_client *client;<br>
> struct regmap *regmap;<br>
> u8 orig_conf;<br>
> - u8 resolution; /* In bits, between 9 and 12 */<br>
> + u8 resolution; /* In bits, between 9 and 16 */<br>
> u8 resolution_limits;<br>
> unsigned int sample_time; /* In ms */<br>
> };<br>
> @@ -339,6 +339,10 @@ lm75_probe(struct i2c_client *client, const struct i2c_device_id *id)<br>
> data->resolution_limits = 9;<br>
> data->sample_time = MSEC_PER_SEC / 4;<br>
> break;<br>
> + case max31725:<br>
> + data->resolution = 16;<br>
> + data->sample_time = MSEC_PER_SEC / 8;<br>
> + break;<br>
> case tcn75:<br>
> data->resolution = 9;<br>
> data->sample_time = MSEC_PER_SEC / 8;<br>
> @@ -415,6 +419,8 @@ static const struct i2c_device_id lm75_ids[] = {<br>
> { "lm75b", lm75b, },<br>
> { "max6625", max6625, },<br>
> { "max6626", max6626, },<br>
> + { "max31725", max31725, },<br>
> + { "max31726", max31725, },<br>
> { "mcp980x", mcp980x, },<br>
> { "stds75", stds75, },<br>
> { "tcn75", tcn75, },<br>
> @@ -471,6 +477,14 @@ static const struct of_device_id lm75_of_match[] = {<br>
> .compatible = "maxim,max6626",<br>
> .data = (void *)max6626<br>
> },<br>
> + {<br>
> + .compatible = "maxim,max31725",<br>
> + .data = (void *)max31725<br>
> + },<br>
> + {<br>
> + .compatible = "maxim,max31726",<br>
> + .data = (void *)max31725<br>
> + },<br>
> {<br>
> .compatible = "maxim,mcp980x",<br>
> .data = (void *)mcp980x<br>
> -- <br>
> 2.19.0.rc2.392.g5ba43deb5a-goog<br>
> <br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Regards,<div>Kun</div></div></div>