Skip to content

Commit

Permalink
Merge tag 'hwmon-for-v5.18-rc7' of git:https://git.kernel.org/pub/scm/linux…
Browse files Browse the repository at this point in the history
…/kernel/git/groeck/linux-staging

Pull hwmon fixes from Guenter Roeck:

 - Restrict ltq-cputemp to SOC_XWAY to fix build failure

 - Add OF device ID table to tmp401 driver to enable auto-load

* tag 'hwmon-for-v5.18-rc7' of git:https://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging:
  hwmon: (ltq-cputemp) restrict it to SOC_XWAY
  hwmon: (tmp401) Add OF device ID table
  • Loading branch information
torvalds committed May 13, 2022
2 parents 10b4b67 + 151d6dc commit 359ee4f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/hwmon/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -960,7 +960,7 @@ config SENSORS_LTC4261

config SENSORS_LTQ_CPUTEMP
bool "Lantiq cpu temperature sensor driver"
depends on LANTIQ
depends on SOC_XWAY
help
If you say yes here you get support for the temperature
sensor inside your CPU.
Expand Down
11 changes: 11 additions & 0 deletions drivers/hwmon/tmp401.c
Original file line number Diff line number Diff line change
Expand Up @@ -708,10 +708,21 @@ static int tmp401_probe(struct i2c_client *client)
return 0;
}

static const struct of_device_id __maybe_unused tmp4xx_of_match[] = {
{ .compatible = "ti,tmp401", },
{ .compatible = "ti,tmp411", },
{ .compatible = "ti,tmp431", },
{ .compatible = "ti,tmp432", },
{ .compatible = "ti,tmp435", },
{ },
};
MODULE_DEVICE_TABLE(of, tmp4xx_of_match);

static struct i2c_driver tmp401_driver = {
.class = I2C_CLASS_HWMON,
.driver = {
.name = "tmp401",
.of_match_table = of_match_ptr(tmp4xx_of_match),
},
.probe_new = tmp401_probe,
.id_table = tmp401_id,
Expand Down

0 comments on commit 359ee4f

Please sign in to comment.