Skip to content

Commit

Permalink
hwmon: (lm90) Add support for MAX6690
Browse files Browse the repository at this point in the history
MAX6690 is all but identical to MAX6654. Revision 1 of its
datasheet lists the same chip ID as MAX6654, and a chip labeled
MAX6654 was found to have the chip ID listed as MAX6690 chip ID
in Revision 2 of its datasheet.

A devicetree node is not added for this chip since it is quite unlikely
that such an old chip will ever be used in a devicetree based system.
It can be added later if needed.

Signed-off-by: Guenter Roeck <[email protected]>
  • Loading branch information
groeck committed Jul 13, 2022
1 parent 9888775 commit 399a8a0
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Documentation/hwmon/lm90.rst
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ MAX6648, MAX6692:
* Better local resolution
* Unsigned temperature

MAX6654:
MAX6654, MAX6690:
* Better local resolution
* Selectable address
* Remote sensor type selection
Expand Down
17 changes: 16 additions & 1 deletion drivers/hwmon/lm90.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@
* accordingly, and is done during initialization. Extended precision is only
* available at conversion rates of 1 Hz and slower. Note that extended
* precision is not enabled by default, as this driver initializes all chips
* to 2 Hz by design.
* to 2 Hz by design. The driver also supports MAX6690, which is practically
* identical to MAX6654.
*
* This driver also supports the MAX6646, MAX6647, MAX6648, MAX6649 and
* MAX6692 chips made by Maxim. These are again similar to the LM86,
Expand Down Expand Up @@ -237,6 +238,7 @@ static const struct i2c_device_id lm90_id[] = {
{ "max6659", max6659 },
{ "max6680", max6680 },
{ "max6681", max6680 },
{ "max6690", max6654 },
{ "max6692", max6648 },
{ "max6695", max6696 },
{ "max6696", max6696 },
Expand Down Expand Up @@ -1718,6 +1720,19 @@ static const char *lm90_detect_maxim(struct i2c_client *client, int chip_id,
if (!(config1 & 0x07) && convrate <= 0x07)
name = "max6654";
break;
case 0x09:
/*
* The chip_id of the MAX6690 holds the revision of the chip.
* The lowest 3 bits of the config1 register are unused and
* should return zero when read.
* Note that MAX6654 and MAX6690 are practically the same chips.
* The only diference is the rated accuracy. Rev. 1 of the
* MAX6690 datasheet lists a chip ID of 0x08, and a chip labeled
* MAX6654 was observed to have a chip ID of 0x09.
*/
if (!(config1 & 0x07) && convrate <= 0x07)
name = "max6690";
break;
case 0x4d:
/*
* The MAX6657, MAX6658 and MAX6659 do NOT have a chip_id
Expand Down

0 comments on commit 399a8a0

Please sign in to comment.