aboutsummaryrefslogtreecommitdiff
path: root/drivers/hwmon
AgeCommit message (Collapse)Author
2016-03-27hwmon: (max1111) Return -ENODEV from max1111_read_channel if not instantiatedGuenter Roeck
arm:pxa_defconfig can result in the following crash if the max1111 driver is not instantiated. Unhandled fault: page domain fault (0x01b) at 0x00000000 pgd = c0004000 [00000000] *pgd=00000000 Internal error: : 1b [#1] PREEMPT ARM Modules linked in: CPU: 0 PID: 300 Comm: kworker/0:1 Not tainted 4.5.0-01301-g1701f680407c #10 Hardware name: SHARP Akita Workqueue: events sharpsl_charge_toggle task: c390a000 ti: c391e000 task.ti: c391e000 PC is at max1111_read_channel+0x20/0x30 LR is at sharpsl_pm_pxa_read_max1111+0x2c/0x3c pc : [<c03aaab0>] lr : [<c0024b50>] psr: 20000013 ... [<c03aaab0>] (max1111_read_channel) from [<c0024b50>] (sharpsl_pm_pxa_read_max1111+0x2c/0x3c) [<c0024b50>] (sharpsl_pm_pxa_read_max1111) from [<c00262e0>] (spitzpm_read_devdata+0x5c/0xc4) [<c00262e0>] (spitzpm_read_devdata) from [<c0024094>] (sharpsl_check_battery_temp+0x78/0x110) [<c0024094>] (sharpsl_check_battery_temp) from [<c0024f9c>] (sharpsl_charge_toggle+0x48/0x110) [<c0024f9c>] (sharpsl_charge_toggle) from [<c004429c>] (process_one_work+0x14c/0x48c) [<c004429c>] (process_one_work) from [<c0044618>] (worker_thread+0x3c/0x5d4) [<c0044618>] (worker_thread) from [<c004a238>] (kthread+0xd0/0xec) [<c004a238>] (kthread) from [<c000a670>] (ret_from_fork+0x14/0x24) This can occur because the SPI controller driver (SPI_PXA2XX) is built as module and thus not necessarily loaded. While building SPI_PXA2XX into the kernel would make the problem disappear, it appears prudent to ensure that the driver is instantiated before accessing its data structures. Cc: Arnd Bergmann <arnd@arndb.de> Cc: stable@vger.kernel.org Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2016-03-20Merge tag 'armsoc-drivers' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull ARM SoC driver updates from Arnd Bergmann: "Driver updates for ARM SoCs, these contain various things that touch the drivers/ directory but got merged through arm-soc for practical reasons: - Rockchip rk3368 gains power domain support - Small updates for the ARM spmi driver - The Atmel PMC driver saw a larger rework, touching both arch/arm/mach-at91 and drivers/clk/at91 - All reset controller driver changes alway get merged through arm-soc, though this time the largest change is the addition of a MIPS pistachio reset driver - One bugfix for the NXP (formerly Freescale) i.MX weim bus driver" * tag 'armsoc-drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (43 commits) bus: imx-weim: Take the 'status' property value into account clk: at91: remove useless includes clk: at91: pmc: remove useless capacities handling clk: at91: pmc: drop at91_pmc_base usb: gadget: atmel: access the PMC using regmap ARM: at91: remove useless includes and function prototypes ARM: at91: pm: move idle functions to pm.c ARM: at91: pm: find and remap the pmc ARM: at91: pm: simply call at91_pm_init clk: at91: pmc: move pmc structures to C file clk: at91: pmc: merge at91_pmc_init in atmel_pmc_probe clk: at91: remove IRQ handling and use polling clk: at91: make use of syscon/regmap internally clk: at91: make use of syscon to share PMC registers in several drivers hwmon: (scpi) add energy meter support firmware: arm_scpi: add support for 64-bit sensor values firmware: arm_scpi: decrease Tx timeout to 20ms firmware: arm_scpi: fix send_message and sensor_get_value for big-endian reset: sti: Make reset_control_ops const reset: zynq: Make reset_control_ops const ...
2016-03-08hwmon: Create an NSA320 hardware monitoring driverAdam Baker
Create a driver to support the hardware monitoring chip present in the Zyxel NSA320 and some of the other Zyxel NAS devices. The driver reads fan speed and temperature from a suitably pre-programmed MCU on the device. Signed-off-by: Adam Baker <linux@baker-net.org.uk> [groeck: Dropped .owner field initialization] Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2016-03-05hwmon: (adm1275) Add support for ADM1278Guenter Roeck
ADM1278 is mostly compatible to other chips of the same series. Besides the usual difference in coefficients, it supports a temperature sensor, and it can measure both input and output voltage at the same time. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2016-03-05hwmon: (ntc_thermistor) Add support for ncpXXxh103Joseph McNally
This patch adds support for the Murata NCP15XH103 thermistor series. Signed-off-by: Joseph McNally <jmcna06@gmail.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2016-03-05hwmon: (iio_hwmon) Allow the driver to accept hypen in device tree node namesSanchayan Maity
Currently the driver calls hwmon_device_register_with_groups which does not accept hypen in node name and returns EINVAL. Use of hypen in device tree node name results in probe failure., however use of hypen in device tree node name is perfectly acceptable. Change this by allocating a duplicate managed string, replacing hypen with underscore and then calling hwmon_device_register_with_groups. This allows the use of hypen in device tree node name while maintaining backwards compatibility and preventing any possible regressions with user space. Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2016-03-05hwmon: Add LTC2990 sensor driverMike Looijmans
This adds support for the Linear Technology LTC2990 I2C System Monitor. The LTC2990 supports a combination of voltage, current and temperature monitoring. This driver currently only supports reading two currents by measuring two differential voltages across series resistors, in addition to the Vcc supply voltage and internal temperature. This is sufficient to support the Topic Miami SOM which uses this chip to monitor the currents flowing into the FPGA and the CPU parts. Signed-off-by: Mike Looijmans <mike.looijmans@topic.nl> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2016-03-05hwmon: (vexpress) rename vexpress hwmon implementationSudeep Holla
The vexpress hwmon implementation is currently just called vexpress. This is a problem because it clashes with another module with the same name in regulators. This patch renames the vexpress hwmon implementation to vexpress-hwmon so that there will be no clash in the module namespace. Cc: Liviu Dudau <liviu.dudau@arm.com> Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> Cc: Jean Delvare <jdelvare@suse.com> Cc: Guenter Roeck <linux@roeck-us.net> Cc: lm-sensors@lm-sensors.org Reported-by: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Sudeep Holla <sudeep.holla@arm.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2016-02-24Merge tag 'scpi-for-v4.6/updates' of ↵Olof Johansson
git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux into next/drivers SCPI updates and fixes for v4.6 1. Minor fix to restore functionality in big-endian mode 2. Fix race by decreasing Tx timeout to 20ms 3. Adds support for 64-bit sensor values and energy meter * tag 'scpi-for-v4.6/updates' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux: hwmon: (scpi) add energy meter support firmware: arm_scpi: add support for 64-bit sensor values firmware: arm_scpi: decrease Tx timeout to 20ms firmware: arm_scpi: fix send_message and sensor_get_value for big-endian Signed-off-by: Olof Johansson <olof@lixom.net>
2016-02-19hwmon: (gpio-fan) Remove un-necessary speed_index lookup for thermal hookNishanth Menon
Thermal hook gpio_fan_get_cur_state is only interested in knowing the current speed index that was setup in the system, this is already available as part of fan_data->speed_index which is always set by set_fan_speed. Using get_fan_speed_index is useful when we have no idea about the fan speed configuration (for example during fan_ctrl_init). When thermal framework invokes gpio_fan_get_cur_state=>get_fan_speed_index via gpio_fan_get_cur_state especially in a polled configuration for thermal governor, we basically hog the i2c interface to the extent that other functions fail to get any traffic out :(. Instead, just provide the last state set in the driver - since the gpio fan driver is responsible for the fan state immaterial of override, the fan_data->speed_index should accurately reflect the state. Fixes: b5cf88e46bad ("(gpio-fan): Add thermal control hooks") Reported-by: Tony Lindgren <tony@atomide.com> Cc: Guenter Roeck <linux@roeck-us.net> Cc: Eduardo Valentin <edubezval@gmail.com> Signed-off-by: Nishanth Menon <nm@ti.com> Cc: stable@vger.kernel.org Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2016-02-18hwmon: (ads1015) Handle negative conversion values correctlyPeter Rosin
Make the divisor signed as DIV_ROUND_CLOSEST is undefined for negative dividends when the divisor is unsigned. Signed-off-by: Peter Rosin <peda@axentia.se> Cc: stable@vger.kernel.org Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2016-02-16hwmon: (scpi) add energy meter supportSudeep Holla
SCPI specification v1.1 adds support for energy sensors. This patch adds support for the same. Acked-by: Guenter Roeck <linux@roeck-us.net> Reviewed-by: Punit Agrawal <punit.agrawal@arm.com> Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2016-02-16firmware: arm_scpi: add support for 64-bit sensor valuesSudeep Holla
SCPI specification version 1.1 extended the sensor from 32-bit to 64-bit values in order to accommodate new sensor class with 64-bit requirements Since the SCPI driver sets the higher 32-bit for older protocol version to zeros, there's no need to explicitly check the SCPI protocol version and the backward compatibility is maintainted. Acked-by: Guenter Roeck <linux@roeck-us.net> Reviewed-by: Punit Agrawal <punit.agrawal@arm.com> Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2016-01-27hwmon: (fam15h_power) Add bit masking for tdp_limitGioh Kim
Add bit masking to read ApmTdpLimit precisely Signed-off-by: Gioh Kim <gi-oh.kim@profitbricks.com> Acked-by: Borislav Petkov <bp@suse.de> Acked-by: Huang Rui <ray.huang@amd.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2016-01-24hwmon: (dell-smm) Blacklist Dell Studio XPS 8000Thorsten Leemhuis
Since Linux 4.0 the CPU fan speed is going up and down on Dell Studio XPS 8000 and 8100 for unknown reasons. The 8100 was already blacklisted in commit a4b45b25f18d ("hwmon: (dell-smm) Blacklist Dell Studio XPS 8100"). This patch blacklists the XPS 8000. Without further debugging on the affected machine, it is not possible to find the problem. For more details see https://bugzilla.kernel.org/show_bug.cgi?id=100121 Signed-off-by: Thorsten Leemhuis <linux@leemhuis.info> Acked-by: Pali Rohár <pali.rohar@gmail.com> Cc: stable@vger.kernel.org # v4.0+, will need backport Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2016-01-17Merge git://www.linux-watchdog.org/linux-watchdogLinus Torvalds
Pull watchdog updates from Wim Van Sebroeck: "This adds following items: - watchdog restart handler support - watchdog reboot notifier support - watchdog sysfs attributes - support for the following new devices: AMD Mullins platform, AMD Carrizo platform, meson8b SoC, CSRatlas7, TS-4800, Alphascale asm9260-wdt, Zodiac, Sigma Designs SMP86xx/SMP87xx - Changes in refcounting for the watchdog core - watchdog core improvements - and small fixes" * git://www.linux-watchdog.org/linux-watchdog: (60 commits) watchdog: asm9260: remove __init and __exit annotations watchdog: Drop pointer to watchdog device from struct watchdog_device watchdog: ziirave: Use watchdog infrastructure to create sysfs attributes watchdog: Add support for creating driver specific sysfs attributes watchdog: kill unref/ref ops watchdog: stmp3xxx: Remove unused variables watchdog: add MT7621 watchdog support hwmon: (sch56xx) Drop watchdog driver data reference count callbacks watchdog: da9055_wdt: Drop reference counting watchdog: da9052_wdt: Drop reference counting watchdog: Separate and maintain variables based on variable lifetime watchdog: diag288: Stop re-using watchdog core internal flags watchdog: Create watchdog device in watchdog_dev.c watchdog: qcom-wdt: Do not set 'dev' in struct watchdog_device watchdog: mena21: Do not use device pointer from struct watchdog_device watchdog: gpio: Do not use device pointer from struct watchdog_device watchdog: tangox: Print info message using pointer to platform device watchdog: bcm2835_wdt: Drop log message if watchdog is stopped devicetree: watchdog: add binding for Sigma Designs SMP8642 watchdog watchdog: add support for Sigma Designs SMP86xx/SMP87xx ...
2016-01-09hwmon: (nct6683) Add basic support for NCT6683 on Mitac boardsGuenter Roeck
Mitac microcode differs from Intel microcode. One key difference is that pwm values can be written. Detect vendor from customer ID field and no longer use DMI data to identify which microcode is running on the chip. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2016-01-04hwmon: (ibmaem) constify aem_rw_sensor_template and aem_ro_sensor_template ↵Julia Lawall
structures The aem_rw_sensor_template and aem_ro_sensor_template structures are never modified, so declare them as const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2015-12-29hwmon: (sch56xx) Drop watchdog driver data reference count callbacksGuenter Roeck
Reference counting is now implemented in the watchdog core and no longer required in watchdog drivers. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2015-12-18hwmon: (nct6683,nct6775) constify sensor_template_group structuresJulia Lawall
The sensor_template_group structures are never modified, so declare them as const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2015-12-18hwmon: (fam15h_power) Add support for AMD new 15h processorsHuang Rui
AMD Family 15h Models 70h-7fh processors also support TDP power reporting interface. Signed-off-by: Huang Rui <ray.huang@amd.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2015-12-18hwmon: (pmbus) Add client driver for LTC3815Guenter Roeck
LTC3815 is a Monolithic Synchronous DC/DC Step-Down Converter. Cc: Michael Jones <mike@proclivis.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2015-12-18hwmon: (htu21) Remove driverGuenter Roeck
HTU21 is now supported by IIO, and can be instantiated as hwmon driver using the iio-hwmon bridge. An explicit hwmon driver is no longer needed. Cc: William Markezana <william.markezana@meas-spec.com> Cc: Ludovic Tancerel <ludovic.tancerel@maplehightech.com> Cc: Jonathan Cameron <jic23@kernel.org> Reviewed-by: Jean Delvare <jdelvare@suse.de> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2015-12-18hwmon: (sht15) Select CONFIG_BITREVERSEArnd Bergmann
If CONFIG_BITREVERSE is not built-in, the sht15 driver fails to link: drivers/built-in.o: In function `sht15_crc8': drivers/hwmon/sht15.c:195: undefined reference to `byte_rev_table' This adds a Kconfig 'select' statement, like all other users of bitrev.h have it. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Fixes: 33836ee98533 ("hwmon:change sht15_reverse()") Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2015-12-10hwmon: (tmp102) Force wait for conversion time for the first valid dataNishanth Menon
TMP102 works based on conversions done periodically. However, as per the TMP102 data sheet[1] the first conversion is triggered immediately after we program the configuration register. The temperature data registers do not reflect proper data until the first conversion is complete (in our case HZ/4). The driver currently sets the last_update to be jiffies - HZ, just after the configuration is complete. When TMP102 driver registers with the thermal framework, it immediately tries to read the sensor temperature data. This takes place even before the conversion on the TMP102 is complete and results in an invalid temperature read. Depending on the value read, this may cause thermal framework to assume that a critical temperature event has occurred and attempts to shutdown the system. Instead of causing an invalid mid-conversion value to be read erroneously, we mark the last_update to be in-line with the current jiffies. This allows the tmp102_update_device function to skip update until the required conversion time is complete. Further, we ensure to return -EAGAIN result instead of returning spurious temperature (such as 0C) values to the caller to prevent any wrong decisions made with such values. NOTE: this allows the read functions not to be blocking and allows the callers to make the decision if they would like to block or try again later. At least the current user(thermal) seems to handle this by retrying later. A simpler alternative approach could be to sleep in the probe for the duration required, but that will result in latency that is undesirable and delay boot sequence un-necessarily. [1] http://www.ti.com/lit/ds/symlink/tmp102.pdf Cc: Eduardo Valentin <edubezval@gmail.com> Reported-by: Aparna Balasubramanian <aparnab@ti.com> Reported-by: Elvita Lobo <elvita@ti.com> Reported-by: Yan Liu <yan-liu@ti.com> Signed-off-by: Nishanth Menon <nm@ti.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2015-11-16hwmon: (scpi) skip unsupported sensors properlySudeep Holla
Currently it's assumed that firmware exports only the class of sensors supported by the driver. However with newer firmware or SCPI protocol revision, support for newer classes of sensors can be present. The driver fails to probe with the following warning if an unsupported class of sensor is encountered in the firmware. sysfs: cannot create duplicate filename '/devices/platform/scpi/scpi:sensors/hwmon/hwmon0/' ------------[ cut here ]------------ WARNING: at fs/sysfs/dir.c:31 Modules linked in: CPU: 0 PID: 6 Comm: kworker/u12:0 Not tainted 4.3.0-rc7 #137 Hardware name: ARM Juno development board (r0) (DT) Workqueue: deferwq deferred_probe_work_func PC is at sysfs_warn_dup+0x54/0x78 LR is at sysfs_warn_dup+0x54/0x78 This patch fixes the above issue by skipping through the unsupported class of SCPI sensors. Fixes: 68acc77a2d51 ("hwmon: Support thermal zones registration for SCP temperature sensors") Fixes: ea98b29a05e9 ("hwmon: Support sensors exported via ARM SCP interface") Cc: Guenter Roeck <linux@roeck-us.net> Reviewed-by: Punit Agrawal <punit.agrawal@arm.com> Signed-off-by: Sudeep Holla <sudeep.holla@arm.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2015-11-16hwmon: (scpi) add thermal-of dependencyArnd Bergmann
The newly added scpi thermal support is broken when the scpi driver is built-in but the thermal driver is a loadable module: drivers/built-in.o: In function `scpi_hwmon_probe': (.text+0x444d70): undefined reference to `thermal_zone_of_sensor_unregister' (.text+0x444d94): undefined reference to `thermal_zone_of_sensor_register' drivers/built-in.o: In function `scpi_hwmon_remove': (text+0x444e6c): undefined reference to `thermal_zone_of_sensor_unregister' This uses the same Kconfig trick that we have in a couple of other drivers already to ensure we can only select the driver in valid configurations when either THERMAL_OF is disabled, or when with a dependency on CONFIG_THERMAL that can force SCPI to be a loadable module in the case I was hitting. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Fixes: 68acc77a2d51 ("hwmon: Support thermal zones registration for SCP temperature sensors") Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2015-11-15hwmon : (applesmc) Fix uninitialized variables warningsShuah Khan
Fix the following "maybe used uninitialized" warnings by initializing the variables to keep the compiler quiet. There is no "used uninitialized" in this case. CC [M] drivers/hwmon/applesmc.o drivers/hwmon/applesmc.c: In function ‘applesmc_init_smcreg’: drivers/hwmon/applesmc.c:595:43: warning: ‘right_light_sensor’ may be used uninitialized in this function [-Wmaybe-uninitialized] s->num_light_sensors = left_light_sensor + right_light_sensor; ^ drivers/hwmon/applesmc.c:540:26: note: ‘right_light_sensor’ was declared here bool left_light_sensor, right_light_sensor; ^ drivers/hwmon/applesmc.c:595:43: warning: ‘left_light_sensor’ may be used uninitialized in this function [-Wmaybe-uninitialized] s->num_light_sensors = left_light_sensor + right_light_sensor; ^ drivers/hwmon/applesmc.c:540:7: note: ‘left_light_sensor’ was declared here bool left_light_sensor, right_light_sensor; ^ Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2015-11-15hwmon: (ina2xx) Fix build issue by selecting REGMAP_I2CLi Yang
Since a0de56c81fcf ("hwmon: (ina2xx) convert driver to using regmap") the driver requires REGMAP_I2C to build. Select it by default in Kconfig. Reported-by: Guo Chunrong <B40290@freescale.com> Cc: Marc Titinger <mtitinger@baylibre.com> Signed-off-by: Li Yang <leoli@freescale.com> Fixes: a0de56c81fcf ("hwmon: (ina2xx) convert driver to using regmap") Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2015-11-10Merge tag 'armsoc-drivers' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull ARM SoC driver updates from Olof Johansson: "As we've enabled multiplatform kernels on ARM, and greatly done away with the contents under arch/arm/mach-*, there's still need for SoC-related drivers to go somewhere. Many of them go in through other driver trees, but we still have drivers/soc to hold some of the "doesn't fit anywhere" lowlevel code that might be shared between ARM and ARM64 (or just in general makes sense to not have under the architecture directory). This branch contains mostly such code: - Drivers for qualcomm SoCs for SMEM, SMD and SMD-RPM, used to communicate with power management blocks on these SoCs for use by clock, regulator and bus frequency drivers. - Allwinner Reduced Serial Bus driver, again used to communicate with PMICs. - Drivers for ARM's SCPI (System Control Processor). Not to be confused with PSCI (Power State Coordination Interface). SCPI is used to communicate with the assistant embedded cores doing power management, and we have yet to see how many of them will implement this for their hardware vs abstracting in other ways (or not at all like in the past). - To make confusion between SCPI and PSCI more likely, this release also includes an update of PSCI to interface version 1.0. - Rockchip support for power domains. - A driver to talk to the firmware on Raspberry Pi" * tag 'armsoc-drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (57 commits) soc: qcom: smd-rpm: Correct size of outgoing message bus: sunxi-rsb: Add driver for Allwinner Reduced Serial Bus bus: sunxi-rsb: Add Allwinner Reduced Serial Bus (RSB) controller bindings ARM: bcm2835: add mutual inclusion protection drivers: psci: make PSCI 1.0 functions initialization version dependent dt-bindings: Correct paths in Rockchip power domains binding document soc: rockchip: power-domain: don't try to print the clock name in error case soc: qcom/smem: add HWSPINLOCK dependency clk: berlin: add cpuclk ARM: berlin: dts: add CLKID_CPU for BG2Q ARM: bcm2835: Add the Raspberry Pi firmware driver soc: qcom: smem: Move RPM message ram out of smem DT node soc: qcom: smd-rpm: Correct the active vs sleep state flagging soc: qcom: smd: delete unneeded of_node_put firmware: qcom-scm: build for correct architecture level soc: qcom: smd: Correct SMEM items for upper channels qcom-scm: add missing prototype for qcom_scm_is_available() qcom-scm: fix endianess issue in __qcom_scm_is_call_available soc: qcom: smd: Reject send of too big packets soc: qcom: smd: Handle big endian CPUs ...
2015-11-10Merge branch 'hwmon-for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging Pull tiny hwmon update from Jean Delvare. * 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging: hwmon: (k10temp) Remove duplicate pci-id define
2015-11-09hwmon: (k10temp) Remove duplicate pci-id defineAdam Majer
PCI_DEVICE_ID_AMD_15H_M60H_NB_F3 is now defined in pci_ids.h Signed-off-by: Adam Majer <adamm@zombino.com> Acked-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Jean Delvare <jdelvare@suse.de>
2015-11-07Merge branch 'for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial Pull trivial updates from Jiri Kosina: "Trivial stuff from trivial tree that can be trivially summed up as: - treewide drop of spurious unlikely() before IS_ERR() from Viresh Kumar - cosmetic fixes (that don't really affect basic functionality of the driver) for pktcdvd and bcache, from Julia Lawall and Petr Mladek - various comment / printk fixes and updates all over the place" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: bcache: Really show state of work pending bit hwmon: applesmc: fix comment typos Kconfig: remove comment about scsi_wait_scan module class_find_device: fix reference to argument "match" debugfs: document that debugfs_remove*() accepts NULL and error values net: Drop unlikely before IS_ERR(_OR_NULL) mm: Drop unlikely before IS_ERR(_OR_NULL) fs: Drop unlikely before IS_ERR(_OR_NULL) drivers: net: Drop unlikely before IS_ERR(_OR_NULL) drivers: misc: Drop unlikely before IS_ERR(_OR_NULL) UBI: Update comments to reflect UBI_METAONLY flag pktcdvd: drop null test before destroy functions
2015-11-05Merge tag 'spi-v4.4' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi Pull spi updates from Mark Brown: "Quite a lot of activity in SPI this cycle, almost all of it in drivers with a few minor improvements and tweaks in the core. - Updates to pxa2xx to support Intel Broxton and multiple chip selects. - Support for big endian in the bcm63xx driver. - Multiple slave support for the mt8173 - New driver for the auxiliary SPI controller in bcm2835 SoCs. - Support for Layerscale SoCs in the Freescale DSPI driver" * tag 'spi-v4.4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: (87 commits) spi: pxa2xx: Rework self-initiated platform data creation for non-ACPI spi: pxa2xx: Add support for Intel Broxton spi: pxa2xx: Detect number of enabled Intel LPSS SPI chip select signals spi: pxa2xx: Add output control for multiple Intel LPSS chip selects spi: pxa2xx: Use LPSS prefix for defines that are Intel LPSS specific spi: Add DSPI support for layerscape family spi: ti-qspi: improve ->remove() callback spi/spi-xilinx: Fix race condition on last word read spi: Drop owner assignment from spi_drivers spi: Add THIS_MODULE to spi_driver in SPI core spi: Setup the master controller driver before setting the chipselect spi: dw: replace magic constant by DW_SPI_DR spi: mediatek: mt8173 spi multiple devices support spi: mediatek: handle controller_data in mtk_spi_setup spi: mediatek: remove mtk_spi_config spi: mediatek: Update document devicetree bindings to support multiple devices spi: fix kernel-doc warnings about missing return desc in spi.c spi: fix kernel-doc warnings about missing return desc in spi.h spi: pxa2xx: Align a few defines spi: pxa2xx: Save other reg_cs_ctrl bits when configuring chip select ...
2015-11-04Merge remote-tracking branches 'spi/topic/omap-100k', ↵Mark Brown
'spi/topic/omap-uwire', 'spi/topic/owner', 'spi/topic/pxa' and 'spi/topic/pxa2xx' into spi-next
2015-10-31hwmon: (fam15h_power) Add max compute unit accumulated powerHuang Rui
This patch adds a member in fam15h_power_data which specifies the maximum accumulated power in a compute unit. Signed-off-by: Huang Rui <ray.huang@amd.com> Cc: Borislav Petkov <bp@alien8.de> Cc: Guenter Roeck <linux@roeck-us.net> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Ingo Molnar <mingo@kernel.org> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2015-10-31hwmon: (fam15h_power) Enable power1_input on AMD CarrizoHuang Rui
This patch enables power1_input attribute for Carrizo platform. Signed-off-by: Huang Rui <ray.huang@amd.com> Cc: Borislav Petkov <bp@alien8.de> Cc: Guenter Roeck <linux@roeck-us.net> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Ingo Molnar <mingo@kernel.org> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2015-10-31hwmon: (fam15h_power) Refactor attributes for dynamically addedHuang Rui
Attributes depend on the CPU model the driver gets loaded on. Therefore, add those attributes dynamically at init time. This is more flexible to control the different attributes on different platforms. Suggested-by: Borislav Petkov <bp@alien8.de> Signed-off-by: Huang Rui <ray.huang@amd.com> Cc: Guenter Roeck <linux@roeck-us.net> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Ingo Molnar <mingo@kernel.org> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2015-10-31hwmon: (ina2xx) remove no longer used variable 'kind'Marc Titinger
Signed-off-by: Marc Titinger <mtitinger@baylibre.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2015-10-30hwmon: (nct6775) Introduce separate temperature labels for NCT6792 and NCT6793Guenter Roeck
NCT6792 and NCT6793 are mostly register compatible to NCT6791, but temperature sources are different and difficult to manage with a single temperature label array. Introduce separate temperature label arrays for those chips to reflect the differences. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2015-10-30hwmon: (nct6775) NCT6791D and NCT6792D have an additional temperature sourceGuenter Roeck
Both NCT6791D and NCT6792D permit selection of a 'virtual' temperature register as temperature source. The virtual temperature registers are registers 0xea to 0xef in bank 0 and can be written by software. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2015-10-28hwmon: (ina2xx) give precedence to DT over checking for platform data.Marc Titinger
when checking for the value of the shunt resistor. Signed-off-by: Marc Titinger <mtitinger@baylibre.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2015-10-28hwmon: (ina2xx) convert driver to using regmapMarc Titinger
Any sysfs "show" read access from the client app will result in reading all registers (8 with ina226). Depending on the host this can limit the best achievable read rate. This changeset allows for individual register accesses through regmap. Tested with BeagleBone Black (Baylibre-ACME) and ina226. Signed-off-by: Marc Titinger <mtitinger@baylibre.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2015-10-28spi: Drop owner assignment from spi_driversAndrew F. Davis
An spi_driver does not need to set an owner, it will be populated by the driver core. Signed-off-by: Andrew F. Davis <afd@ti.com> Acked-by: Jonathan Cameron <jic23@kernel.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-10-14Merge tag 'arm-scpi-for-v4.4' of ↵Arnd Bergmann
git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux into next/drivers Merge "ARM System Control and Power Interface(SCPI) support" from Sudeep Holla It adds support for the following features provided by SCP firmware using different subsystems in Linux: 1. SCPI mailbox protocol driver which using mailbox framework 2. Clocks provided by SCP using clock framework 3. CPU DVFS(cpufreq) using existing arm-big-little driver 4. SCPI based sensors including temperature sensors * tag 'arm-scpi-for-v4.4' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux: hwmon: Support thermal zones registration for SCP temperature sensors hwmon: Support sensors exported via ARM SCP interface firmware: arm_scpi: Extend to support sensors Documentation: add DT bindings for ARM SCPI sensors cpufreq: arm_big_little: add SCPI interface driver clk: scpi: add support for cpufreq virtual device clk: add support for clocks provided by SCP(System Control Processor) firmware: add support for ARM System Control and Power Interface(SCPI) protocol Documentation: add DT binding for ARM System Control and Power Interface(SCPI) protocol
2015-10-14hwmon: (coretemp) Increase limit of maximum core ID from 32 to 128.Lukasz Odzioba
A new limit selected arbitrarily as power of two greater than required minimum for Xeon Phi processor (72 for Knights Landing). Currently driver is not able to handle cores with core ID greater than 32. Such attempt ends up with the following error in dmesg: coretemp coretemp.0: Adding Core XXX failed Signed-off-by: Lukasz Odzioba <lukasz.odzioba@intel.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2015-10-14hwmon: (lm75) Add support for TMP75CBen Gardner
The TMP75C has a different control register layout and only supports 12-bit temperature samples (0.0625 deg C). The continuous sample rate is ~12 Hz. Signed-off-by: Ben Gardner <gardner.ben@gmail.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2015-10-14hwmon: (ibmpowernv) Add OF compatibility table entryCédric Le Goater
Fix module autoload for IBM and Open power platforms. Signed-off-by: Cédric Le Goater <clg@fr.ibm.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2015-10-14hwmon: (abx500) drop the use of IRQF_NO_SUSPENDSudeep Holla
The description in the driver states: "ABX500 does not provide auto ADC, so to monitor the required temperatures, a periodic work is used. It is more important to not wake up the CPU... If the chip gets too hot during a sleep state it's most likely due to external factors, such as the surrounding temperature and nothing can be done in S/W." So it makes no sense to keep IRQs enabled as it need not be wakeup source. This patch removes the use of IRQF_NO_SUSPEND flag Signed-off-by: Sudeep Holla <sudeep.holla@arm.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2015-10-14hwmon: (max31790) Fix dereference of ERR_PTRSudip Mukherjee
max31790_update_device() return the error code in ERR_PTR. We were checking if it has returned error or not but before checking we have dereferenced it. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Guenter Roeck <linux@roeck-us.net>