Skip to content

Commit

Permalink
hwmon: (lm90) Combine lm86 and lm90 configuration
Browse files Browse the repository at this point in the history
LM86 and LM90 support exactly the same features, so there is no need
to keep their configuration options separate. Combine to reduce data
size.

Signed-off-by: Guenter Roeck <[email protected]>
  • Loading branch information
groeck committed Jul 13, 2022
1 parent 37d1dc8 commit df18fcc
Showing 1 changed file with 5 additions and 12 deletions.
17 changes: 5 additions & 12 deletions drivers/hwmon/lm90.c
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ static const unsigned short normal_i2c[] = {
0x4d, 0x4e, 0x4f, I2C_CLIENT_END };

enum chips { adm1023, adm1032, adt7461, adt7461a, adt7481,
g781, lm84, lm86, lm90, lm99,
g781, lm84, lm90, lm99,
max1617, max6642, max6646, max6648, max6654, max6657, max6659, max6680, max6696,
sa56004, tmp451, tmp461, w83l771,
};
Expand Down Expand Up @@ -235,8 +235,8 @@ static const struct i2c_device_id lm90_id[] = {
{ "g781", g781 },
{ "gl523sm", max1617 },
{ "lm84", lm84 },
{ "lm86", lm86 },
{ "lm89", lm86 },
{ "lm86", lm90 },
{ "lm89", lm90 },
{ "lm90", lm90 },
{ "lm99", lm99 },
{ "max1617", max1617 },
Expand Down Expand Up @@ -289,11 +289,11 @@ static const struct of_device_id __maybe_unused lm90_of_match[] = {
},
{
.compatible = "national,lm86",
.data = (void *)lm86
.data = (void *)lm90
},
{
.compatible = "national,lm89",
.data = (void *)lm86
.data = (void *)lm90
},
{
.compatible = "national,lm99",
Expand Down Expand Up @@ -443,13 +443,6 @@ static const struct lm90_params lm90_params[] = {
.flags = LM90_HAVE_ALARMS,
.resolution = 8,
},
[lm86] = {
.flags = LM90_HAVE_OFFSET | LM90_HAVE_REM_LIMIT_EXT
| LM90_HAVE_CRIT | LM90_HAVE_ALARMS | LM90_HAVE_LOW
| LM90_HAVE_CONVRATE | LM90_HAVE_REMOTE_EXT,
.alert_alarms = 0x7b,
.max_convrate = 9,
},
[lm90] = {
.flags = LM90_HAVE_OFFSET | LM90_HAVE_REM_LIMIT_EXT
| LM90_HAVE_CRIT | LM90_HAVE_ALARMS | LM90_HAVE_LOW
Expand Down

0 comments on commit df18fcc

Please sign in to comment.