diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-12-08 20:30:25 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-12-08 20:30:25 -0800 |
commit | 177808cd28ac793d654bb1ae5ae1f778e7b3864f (patch) | |
tree | e54e877b3aecd09d91d473da36981ed1702cfa87 /arch | |
parent | 0160928e792eff243c84b39a46cddb2fb89da0cb (diff) | |
parent | 907a6d5824599d09e986105a5a880d119a996c4b (diff) | |
download | linux-177808cd28ac793d654bb1ae5ae1f778e7b3864f.tar.bz2 |
Merge tag 'hwmon-for-linus-3.19' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging
Pull hwmon updates from Guenter Roeck:
"Notable changes:
- new driver for NCT7802Y
- support for TMP435, LM95233, LM95235, NCT6792D, and NXP LM75B
- regulator support for PMBus chips, specifically LTX2978
- support for humidity sensors to iio-hwmon bridge driver
* tag 'hwmon-for-linus-3.19' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: (21 commits)
hwmon: (tmp401) Detect TMP435 on all addresses it supports
hwmon: (lm75) Strengthen detect function
hwmon: (gpio-fan) Add a shutdown handler to poweroff the fans
hwmon: (gpio-fan) Allow usage of gpio operations that may sleep
hwmon: (tmp401) Bail out from tmp401_probe() in case of write errors
hwmon: (tmp401) Add support for TI TMP435
hwmon: (lm95234) Add support for LM95233
hwmon: (lm95245) Add support for LM95235
hwmon: (ina2xx) bail-out from ina2xx_probe() in case of configuration errors
hwmon: (nct6775) Add blank lines after declarations
hwmon: (nct6775) Add support for NCT6792D
hwmon: (nct6775) Documentation updates
hwmon: (lm75) Add support for the NXP LM75B
hwmon: Driver for Nuvoton NCT7802Y
hwmon: (ibmpowernv) Convert to module_platform_driver
hwmon: (ibmpowernv) Use platform 'id_table' to probe the device
hwmon: (iio_hwmon) Add support for humidity sensors
hwmon: (ltc2978) Add regulator support
hwmon: (pmbus) Add regulator support
hwmon: (pmbus) add helpers for byte write and read modify write
...
Diffstat (limited to 'arch')
-rw-r--r-- | arch/powerpc/platforms/powernv/opal-sensor.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/arch/powerpc/platforms/powernv/opal-sensor.c b/arch/powerpc/platforms/powernv/opal-sensor.c index 10271ad1fac4..4ab67ef7abc9 100644 --- a/arch/powerpc/platforms/powernv/opal-sensor.c +++ b/arch/powerpc/platforms/powernv/opal-sensor.c @@ -20,7 +20,9 @@ #include <linux/delay.h> #include <linux/mutex.h> +#include <linux/of_platform.h> #include <asm/opal.h> +#include <asm/machdep.h> static DEFINE_MUTEX(opal_sensor_mutex); @@ -64,3 +66,21 @@ out: return ret; } EXPORT_SYMBOL_GPL(opal_get_sensor_data); + +static __init int opal_sensor_init(void) +{ + struct platform_device *pdev; + struct device_node *sensor; + + sensor = of_find_node_by_path("/ibm,opal/sensors"); + if (!sensor) { + pr_err("Opal node 'sensors' not found\n"); + return -ENODEV; + } + + pdev = of_platform_device_create(sensor, "opal-sensor", NULL); + of_node_put(sensor); + + return PTR_ERR_OR_ZERO(pdev); +} +machine_subsys_initcall(powernv, opal_sensor_init); |