Skip to content

Commit 38d9f06

Browse files
committed
hwmon: (tmp401) Drop support for TMP461
TMP461 is almost identical to TMP451, which is already supported by the lm90 driver. At the same time, unlike other sensors from the TMP401 compatible series, it only supports 8-bit temperature read operations, and it supports negative temperatures when configured for its default temperature range, and it supports a temperature offset register. Supporting this chip in the tmp401 driver adds unnecessary complexity. Remove its support from this driver and support the chip with the lm90 driver instead. Fixes: 24333ac ("hwmon: (tmp401) use smb word operations instead of 2 smb byte operations") Reported-by: David T. Wilson <[email protected]> Cc: David T. Wilson <[email protected]> Signed-off-by: Guenter Roeck <[email protected]>
1 parent f8344f7 commit 38d9f06

File tree

3 files changed

+4
-38
lines changed

3 files changed

+4
-38
lines changed

Documentation/hwmon/tmp401.rst

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,6 @@ Supported chips:
4343

4444
Datasheet: http://focus.ti.com/docs/prod/folders/print/tmp435.html
4545

46-
* Texas Instruments TMP461
47-
48-
Prefix: 'tmp461'
49-
50-
Datasheet: https://www.ti.com/product/tmp461
51-
5246

5347

5448
Authors:
@@ -60,7 +54,7 @@ Description
6054
-----------
6155

6256
This driver implements support for Texas Instruments TMP401, TMP411,
63-
TMP431, TMP432, TMP435, and TMP461 chips. These chips implement one or two
57+
TMP431, TMP432, and TMP435 chips. These chips implement one or two
6458
remote and one local temperature sensors. Temperature is measured in degrees
6559
Celsius. Resolution of the remote sensor is 0.0625 degree. Local
6660
sensor resolution can be set to 0.5, 0.25, 0.125 or 0.0625 degree (not
@@ -84,10 +78,3 @@ some additional features.
8478

8579
TMP432 is compatible with TMP401 and TMP431. It supports two external
8680
temperature sensors.
87-
88-
TMP461 is compatible with TMP401. It supports offset correction
89-
that is applied to the remote sensor.
90-
91-
* Sensor offset values are temperature values
92-
93-
Exported via sysfs attribute tempX_offset

drivers/hwmon/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1941,7 +1941,7 @@ config SENSORS_TMP401
19411941
depends on I2C
19421942
help
19431943
If you say yes here you get support for Texas Instruments TMP401,
1944-
TMP411, TMP431, TMP432, TMP435, and TMP461 temperature sensor chips.
1944+
TMP411, TMP431, TMP432, and TMP435 temperature sensor chips.
19451945

19461946
This driver can also be built as a module. If so, the module
19471947
will be called tmp401.

drivers/hwmon/tmp401.c

Lines changed: 2 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
static const unsigned short normal_i2c[] = { 0x48, 0x49, 0x4a, 0x4c, 0x4d,
3535
0x4e, 0x4f, I2C_CLIENT_END };
3636

37-
enum chips { tmp401, tmp411, tmp431, tmp432, tmp435, tmp461 };
37+
enum chips { tmp401, tmp411, tmp431, tmp432, tmp435 };
3838

3939
/*
4040
* The TMP401 registers, note some registers have different addresses for
@@ -56,7 +56,6 @@ static const u8 TMP401_TEMP_MSB_READ[7][2] = {
5656
{ 0x20, 0x19 }, /* therm (crit) limit */
5757
{ 0x30, 0x34 }, /* lowest */
5858
{ 0x32, 0x36 }, /* highest */
59-
{ 0, 0x11 }, /* offset */
6059
};
6160

6261
static const u8 TMP401_TEMP_MSB_WRITE[7][2] = {
@@ -66,7 +65,6 @@ static const u8 TMP401_TEMP_MSB_WRITE[7][2] = {
6665
{ 0x20, 0x19 }, /* therm (crit) limit */
6766
{ 0x30, 0x34 }, /* lowest */
6867
{ 0x32, 0x36 }, /* highest */
69-
{ 0, 0x11 }, /* offset */
7068
};
7169

7270
static const u8 TMP432_TEMP_MSB_READ[4][3] = {
@@ -123,7 +121,6 @@ static const struct i2c_device_id tmp401_id[] = {
123121
{ "tmp431", tmp431 },
124122
{ "tmp432", tmp432 },
125123
{ "tmp435", tmp435 },
126-
{ "tmp461", tmp461 },
127124
{ }
128125
};
129126
MODULE_DEVICE_TABLE(i2c, tmp401_id);
@@ -570,21 +567,6 @@ static const struct attribute_group tmp432_group = {
570567
.attrs = tmp432_attributes,
571568
};
572569

573-
/*
574-
* Additional features of the TMP461 chip.
575-
* The TMP461 temperature offset for the remote channel.
576-
*/
577-
static SENSOR_DEVICE_ATTR_2_RW(temp2_offset, temp, 6, 1);
578-
579-
static struct attribute *tmp461_attributes[] = {
580-
&sensor_dev_attr_temp2_offset.dev_attr.attr,
581-
NULL
582-
};
583-
584-
static const struct attribute_group tmp461_group = {
585-
.attrs = tmp461_attributes,
586-
};
587-
588570
/*
589571
* Begin non sysfs callback code (aka Real code)
590572
*/
@@ -686,7 +668,7 @@ static int tmp401_detect(struct i2c_client *client,
686668
static int tmp401_probe(struct i2c_client *client)
687669
{
688670
static const char * const names[] = {
689-
"TMP401", "TMP411", "TMP431", "TMP432", "TMP435", "TMP461"
671+
"TMP401", "TMP411", "TMP431", "TMP432", "TMP435"
690672
};
691673
struct device *dev = &client->dev;
692674
struct device *hwmon_dev;
@@ -717,9 +699,6 @@ static int tmp401_probe(struct i2c_client *client)
717699
if (data->kind == tmp432)
718700
data->groups[groups++] = &tmp432_group;
719701

720-
if (data->kind == tmp461)
721-
data->groups[groups++] = &tmp461_group;
722-
723702
hwmon_dev = devm_hwmon_device_register_with_groups(dev, client->name,
724703
data, data->groups);
725704
if (IS_ERR(hwmon_dev))

0 commit comments

Comments
 (0)