summaryrefslogtreecommitdiff
path: root/drivers/hwmon
AgeCommit message (Collapse)Author
2021-09-08Merge branch 'akpm' (patches from Andrew)Linus Torvalds
Merge more updates from Andrew Morton: "147 patches, based on 7d2a07b769330c34b4deabeed939325c77a7ec2f. Subsystems affected by this patch series: mm (memory-hotplug, rmap, ioremap, highmem, cleanups, secretmem, kfence, damon, and vmscan), alpha, percpu, procfs, misc, core-kernel, MAINTAINERS, lib, checkpatch, epoll, init, nilfs2, coredump, fork, pids, criu, kconfig, selftests, ipc, and scripts" * emailed patches from Andrew Morton <akpm@linux-foundation.org>: (94 commits) scripts: check_extable: fix typo in user error message mm/workingset: correct kernel-doc notations ipc: replace costly bailout check in sysvipc_find_ipc() selftests/memfd: remove unused variable Kconfig.debug: drop selecting non-existing HARDLOCKUP_DETECTOR_ARCH configs: remove the obsolete CONFIG_INPUT_POLLDEV prctl: allow to setup brk for et_dyn executables pid: cleanup the stale comment mentioning pidmap_init(). kernel/fork.c: unexport get_{mm,task}_exe_file coredump: fix memleak in dump_vma_snapshot() fs/coredump.c: log if a core dump is aborted due to changed file permissions nilfs2: use refcount_dec_and_lock() to fix potential UAF nilfs2: fix memory leak in nilfs_sysfs_delete_snapshot_group nilfs2: fix memory leak in nilfs_sysfs_create_snapshot_group nilfs2: fix memory leak in nilfs_sysfs_delete_##name##_group nilfs2: fix memory leak in nilfs_sysfs_create_##name##_group nilfs2: fix NULL pointer in nilfs_##name##_attr_release nilfs2: fix memory leak in nilfs_sysfs_create_device_group trap: cleanup trap_init() init: move usermodehelper_enable() to populate_rootfs() ...
2021-09-08hwmon/drivers/mr75203: use HZ macrosDaniel Lezcano
HZ unit conversion macros are available in units.h, use them and remove the duplicate definition. The new macro is an unsigned long. The code dealing with it is considering as an unsigned long also. Link: https://lkml.kernel.org/r/20210816114732.1834145-7-daniel.lezcano@linaro.org Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Reviewed-by: Christian Eggers <ceggers@arri.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Guenter Roeck <linux@roeck-us.net> Cc: Chanwoo Choi <cw00.choi@samsung.com> Cc: Jonathan Cameron <jic23@kernel.org> Cc: Jonathan Cameron <Jonathan.Cameron@huawei.com> Cc: Kyungmin Park <kyungmin.park@samsung.com> Cc: Lars-Peter Clausen <lars@metafoo.de> Cc: Lukasz Luba <lukasz.luba@arm.com> Cc: Maxime Coquelin <mcoquelin.stm32@gmail.com> Cc: Miquel Raynal <miquel.raynal@bootlin.com> Cc: MyungJoo Ham <myungjoo.ham@samsung.com> Cc: Peter Meerwald <pmeerw@pmeerw.net> Cc: "Rafael J. Wysocki" <rafael@kernel.org> Cc: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2021-08-28hwmon: add driver for Aquacomputer D5 NextAleksa Savic
This driver exposes hardware sensors of the Aquacomputer D5 Next watercooling pump, which communicates through a proprietary USB HID protocol. Available sensors are pump and fan speed, power, voltage and current, as well as coolant temperature. Also available through debugfs are the serial number, firmware version and power-on count. Attaching a fan is optional and allows it to be controlled using temperature curves directly from the pump. If it's not connected, the fan-related sensors will report zeroes. The pump can be configured either through software or via its physical interface. Configuring the pump through this driver is not implemented, as it seems to require sending it a complete configuration. That includes addressable RGB LEDs, for which there is no standard sysfs interface. Thus, that task is better suited for userspace tools. This driver has been tested on x86_64, both in-kernel and as a module. Signed-off-by: Aleksa Savic <savicaleksa83@gmail.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2021-08-27hwmon: (adt7470) Convert to devm_hwmon_device_register_with_info APIChris Packham
Use the devm_hwmon_device_register_with_info API and remove code that deals with the standard sensor attributes. Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz> Link: https://lore.kernel.org/r/20210826024121.15665-4-chris.packham@alliedtelesis.co.nz [groeck: Fixed alignment issues] Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2021-08-27hwmon: (adt7470) Convert to use regmapChris Packham
Convert the adt7470 to using regmap which allows better error handling. Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz> Link: https://lore.kernel.org/r/20210826024121.15665-3-chris.packham@alliedtelesis.co.nz Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2021-08-27hwmon: (adt7470) Fix some style issuesChris Packham
In preparation for the changes that follow fix up some existing style issues. Specifically: - add blank line between variable declaration and code - use strscpy instead of strlcpy - remove unnecessary braces Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz> Link: https://lore.kernel.org/r/20210826024121.15665-2-chris.packham@alliedtelesis.co.nz Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2021-08-27hwmon: (k10temp) Add support for yellow carpMario Limonciello
Yellow carp matches same behavior as green sardine and other Zen3 products, but have different CCD offsets. Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> Acked-by: Borislav Petkov <bp@suse.de> Link: https://lore.kernel.org/r/20210827201527.24454-3-mario.limonciello@amd.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2021-08-27hwmon: (k10temp) Rework the temperature offset calculationMario Limonciello
Some of the existing assumptions made do not scale properly to new silicon in upcoming changes. This commit should cause no functional changes to existing silicon. Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> Link: https://lore.kernel.org/r/20210827201527.24454-2-mario.limonciello@amd.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2021-08-27hwmon: (k10temp) Don't show Tdie for all Zen/Zen2/Zen3 CPU/APUMario Limonciello
Tdie is an offset calculation that should only be shown when temp_offset is actually put into a table. This is useless to show for all CPU/APU. Show it only when necessary. Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2021-08-27hwmon: (k10temp) Add additional missing Zen2 and Zen3 APUsMario Limonciello
These follow the rest of the existing codepaths for families 17h and 19h. Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2021-08-17hwmon: remove amd_energy driver in MakefileLukas Bulwahn
Commit 9049572fb145 ("hwmon: Remove amd_energy driver") removes the driver, but misses to adjust the Makefile. Hence, ./scripts/checkkconfigsymbols.py warns: SENSORS_AMD_ENERGY Referencing files: drivers/hwmon/Makefile Remove the missing piece of this driver removal. Fixes: 9049572fb145 ("hwmon: Remove amd_energy driver") Signed-off-by: Lukas Bulwahn <lukas.bulwahn@gmail.com> Link: https://lore.kernel.org/r/20210817084811.10673-1-lukas.bulwahn@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2021-08-17hwmon: (dell-smm) Rework SMM function debuggingArmin Wolf
Drop #ifdef DEBUG and use ktime_us_delta() for improved precision. Signed-off-by: Armin Wolf <W_Armin@gmx.de> Reviewed-by: Pali Rohár <pali@kernel.org> Link: https://lore.kernel.org/r/20210814190516.26718-1-W_Armin@gmx.de Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2021-08-17hwmon: (dell-smm) Mark i8k_get_fan_nominal_speed as __initArmin Wolf
Mark function i8k_get_fan_nominal_speed() as __init since it is only used in code also marked as __init. Signed-off-by: Armin Wolf <W_Armin@gmx.de> Reviewed-by: Pali Rohár <pali@kernel.org> Link: https://lore.kernel.org/r/20210814143637.11922-5-W_Armin@gmx.de Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2021-08-17hwmon: (dell-smm) Mark tables as __initconstArmin Wolf
Both the config and the DMI tables never change and are only used during module init for setting up the device data struct. Mark all of them as const and __initconst for a smaller runtime memory footprint. Signed-off-by: Armin Wolf <W_Armin@gmx.de> Reviewed-by: Pali Rohár <pali@kernel.org> Link: https://lore.kernel.org/r/20210814143637.11922-2-W_Armin@gmx.de Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2021-08-17hwmon: (pmbus/bpa-rs600) Add workaround for incorrect Pin maxChris Packham
BPD-RS600 modules running firmware v5.70 misreport the MFR_PIN_MAX. The indicate a maximum of 1640W instead of 700W. Detect the invalid reading and return a sensible value instead. Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz> Link: https://lore.kernel.org/r/20210812014000.26293-3-chris.packham@alliedtelesis.co.nz Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2021-08-17hwmon: (pmbus/bpa-rs600) Don't use rated limits as warn limitsChris Packham
In the initial implementation a number of PMBUS_x_WARN_LIMITs were mapped to MFR fields. This was incorrect as these MFR limits reflect the rated limit as opposed to a limit which will generate warning. Instead return -ENXIO like we were already doing for other WARN_LIMITs. Subsequently these rated limits have been exposed generically as new fields in the sysfs ABI so the values are still available. Fixes: 15b2703e5e02 ("hwmon: (pmbus) Add driver for BluTek BPA-RS600") Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz> Link: https://lore.kernel.org/r/20210812014000.26293-2-chris.packham@alliedtelesis.co.nz Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2021-08-17hwmon: (axi-fan-control) Support temperature vs pwm pointsNuno Sá
The HW has some predefined points where it will associate a PWM value. However some users might want to better set these points to their usecases. This patch exposes these points as pwm auto_points: * pwm1_auto_point1_temp_hyst: temperature threshold below which PWM should be 0%; * pwm1_auto_point1_temp: temperature threshold above which PWM should be 25%; * pwm1_auto_point2_temp_hyst: temperature threshold below which PWM should be 25%; * pwm1_auto_point2_temp: temperature threshold above which PWM should be 50%; * pwm1_auto_point3_temp_hyst: temperature threshold below which PWM should be 50%; * pwm1_auto_point3_temp: temperature threshold above which PWM should be 75%; * pwm1_auto_point4_temp_hyst: temperature threshold below which PWM should be 75%; * pwm1_auto_point4_temp: temperature threshold above which PWM should be 100%; Signed-off-by: Nuno Sá <nuno.sa@analog.com> Link: https://lore.kernel.org/r/20210811114853.159298-4-nuno.sa@analog.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2021-08-17hwmon: (axi-fan-control) Handle irqs in natural orderNuno Sá
The core will now start out of reset at boot as soon as clocking is available. Hence, by the time we unmask the interrupts we already might have some of them set. Thus, it's important to handle them in the natural order the core generates them. Otherwise, we could process 'ADI_IRQ_SRC_PWM_CHANGED' before 'ADI_IRQ_SRC_TEMP_INCREASE' and erroneously set 'update_tacho_params' to true. Signed-off-by: Nuno Sá <nuno.sa@analog.com> Link: https://lore.kernel.org/r/20210811114853.159298-3-nuno.sa@analog.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2021-08-17hwmon: (axi-fan-control) Make sure the clock is enabledNuno Sá
The core will only work if it's clock is enabled. This patch is a minor enhancement to make sure that's the case. Signed-off-by: Nuno Sá <nuno.sa@analog.com> Link: https://lore.kernel.org/r/20210811114853.159298-2-nuno.sa@analog.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2021-08-17hwmon: (pmbus/ibm-cffps) Fix write bits for LED controlBrandon Wyman
When doing a PMBus write for the LED control on the IBM Common Form Factor Power Supplies (ibm-cffps), the DAh command requires that bit 7 be low and bit 6 be high in order to indicate that you are truly attempting to do a write. Signed-off-by: Brandon Wyman <bjwyman@gmail.com> Link: https://lore.kernel.org/r/20210806225131.1808759-1-bjwyman@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2021-08-17hwmon: (w83781d) Match on device tree compatiblesLinus Walleij
I2C devices should match on the proper compatible string. This is already used in one device tree in the kernel (MIPS) so let's add the matches. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Link: https://lore.kernel.org/r/20210729230543.2853485-2-linus.walleij@linaro.org Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2021-08-17hwmon: Replace deprecated CPU-hotplug functions.Sebastian Andrzej Siewior
The functions get_online_cpus() and put_online_cpus() have been deprecated during the CPU hotplug rework. They map directly to cpus_read_lock() and cpus_read_unlock(). Replace deprecated CPU-hotplug functions with the official version. The behavior remains unchanged. Cc: Jean Delvare <jdelvare@suse.com> Cc: Guenter Roeck <linux@roeck-us.net> Cc: linux-hwmon@vger.kernel.org Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Link: https://lore.kernel.org/r/20210803141621.780504-14-bigeasy@linutronix.de Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2021-08-17hwmon: (dell-smm) Add Dell Precision 7510 to fan control whitelistCarlos Alberto Lopez Perez
This allows manual PWM control without the BIOS fighting back on Dell Precision 7510. Meanwhile at it, also sort alphabetically the entries of the i8k_whitelist_fan_control struct. Signed-off-by: Carlos Alberto Lopez Perez <clopez@igalia.com> Acked-by: Pali Rohár <pali@kernel.org> Link: https://lore.kernel.org/r/20210802131538.8660-1-clopez@igalia.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2021-08-17hwmon: (dell-smm-hwmon) Fix fan mutliplier detection for 3rd fanArmin Wolf
There are up to three fans, but the detection omits the 3rd one. Fix that by using DELL_SMM_NO_FANS. Signed-off-by: Armin Wolf <W_Armin@gmx.de> Fixes: 747bc8b063ae (hwmon: (dell-smm) Detect fan with index=2) Link: https://lore.kernel.org/r/20210728221557.8891-7-W_Armin@gmx.de Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2021-08-17hwmon: (dell-smm-hwmon) Convert to devm_hwmon_device_register_with_info()Armin Wolf
Convert to new registration API to get rid of attribute magic numbers and reduce module size. Signed-off-by: Armin Wolf <W_Armin@gmx.de> Link: https://lore.kernel.org/r/20210728221557.8891-6-W_Armin@gmx.de Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2021-08-17hwmon: (dell-smm-hwmon) Move variables into a driver private data structureArmin Wolf
Move Variables into a driver private data structure. Signed-off-by: Armin Wolf <W_Armin@gmx.de> Link: https://lore.kernel.org/r/20210728221557.8891-5-W_Armin@gmx.de Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2021-08-17hwmon: (dell-smm-hwmon) Use devm_add_action_or_reset()Armin Wolf
Use devm_add_action_or_reset() for calling i8k_exit_procfs() so the remove() function in dell_smm_driver can be omitted. Signed-off-by: Armin Wolf <W_Armin@gmx.de> Reviewed-by: Pali Rohár <pali@kernel.org> Tested-by: Pali Rohár <pali@kernel.org> Link: https://lore.kernel.org/r/20210728221557.8891-4-W_Armin@gmx.de Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2021-08-17hwmon: (dell-smm-hwmon) Mark functions as __initArmin Wolf
i8k_get_dmi_data() and i8k_get_dell_signature() are only called during module init and probe, which both are marked as __init. Also mark these function as __init to lower the runtime memory footprint. Signed-off-by: Armin Wolf <W_Armin@gmx.de> Reviewed-by: Pali Rohár <pali@kernel.org> Tested-by: Pali Rohár <pali@kernel.org> Link: https://lore.kernel.org/r/20210728221557.8891-3-W_Armin@gmx.de Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2021-08-17hwmon: (dell-smm-hwmon) Use platform deviceArmin Wolf
Register a platform device for usage with devm_hwmon_device_register_with_groups since the platform device is necessary for future changes. Also fix some checkpatch warnings. Signed-off-by: Armin Wolf <W_Armin@gmx.de> Link: https://lore.kernel.org/r/20210728221557.8891-2-W_Armin@gmx.de Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2021-08-17hwmon: Add support for SB-RMI power moduleAkshay Gupta
On AMD platforms the Out-of-band access is provided by Advanced Platform Management Link (APML), APML is a SMBus v2.0 compatible 2-wire processor client interface. APML is also referred as the sideband interface (SBI). APML is used to communicate with the Side-Band Remote Management Interface (SB-RMI) which provides Soft Mailbox messages to manage power consumption and power limits of the CPU socket. - This module add support to read power consumption, power limit & max power limit and write power limit. - To instantiate this driver on a Board Management Controller (BMC) connected to an AMD CPU with SB-RMI support, the i2c bus number would be the bus connected from the BMC to the CPU. Reviewed-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Akshay Gupta <Akshay.Gupta@amd.com> Signed-off-by: Naveen Krishna Chatradhi <nchatrad@amd.com> Link: https://lore.kernel.org/r/20210726133615.9709-1-nchatrad@amd.com [groeck: Fix uninitialized variable problem when reporting max power] Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2021-08-17hwmon: (w83627ehf) Make DEVICE_ATTR_RO staticArmin Wolf
Make DEVICE_ATTR_RO static to fix sparse warning: warning: symbol 'dev_attr_cpu0_vid' was not declared. Should it be static? Signed-off-by: Armin Wolf <W_Armin@gmx.de> Link: https://lore.kernel.org/r/20210724154817.18796-1-W_Armin@gmx.de Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2021-08-17hwmon: (w83627ehf) Switch to SIMPLE_DEV_PM_OPSArmin Wolf
Use SIMPLE_DEV_PM_OPS() to also assign poweroff and thaw callbacks. Remove the now obsolete checking of CONFIG_PM too. Signed-off-by: Armin Wolf <W_Armin@gmx.de> Link: https://lore.kernel.org/r/20210721192519.28784-1-W_Armin@gmx.de Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2021-08-17hwmon: intel-m10-bmc-hwmon: add n5010 sensorsMartin Hundebøll
Add the list of sensors supported by the Silicom n5010 PAC, and enable the drivers as a subtype of the intel-m10-bmc multi-function driver. Signed-off-by: Martin Hundebøll <mhu@silicom.dk> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Reviewed-by: Moritz Fischer <mdf@kernel.org> Reviewed-by: Xu Yilun <yilun.xu@intel.com> Link: https://lore.kernel.org/r/20210716135441.3235863-4-martin@geanix.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2021-08-17hwmon: (w83627ehf) Remove w83627ehf_remove()Armin Wolf
Using devm_request_region() allows us to omit w83627ehf_remove() and also simplifies error handling during probe. Also fixed a checkpatch issue. Signed-off-by: Armin Wolf <W_Armin@gmx.de> Link: https://lore.kernel.org/r/20210709184501.6546-3-W_Armin@gmx.de Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2021-08-17hwmon: (w83627ehf) Use platform_create_bundleArmin Wolf
Using platform_create_bundle() simplifies the module init code and allows w83627ehf_probe() to be marked as __init, lowering the runtime memory footprint. Signed-off-by: Armin Wolf <W_Armin@gmx.de> Link: https://lore.kernel.org/r/20210709184501.6546-2-W_Armin@gmx.de Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2021-08-17hwmon: (pmbus/bpa-rs600) Support BPD-RS600Chris Packham
The BPD-RS600 is the DC version of the BPA-RS600. The PMBUS interface is the same between the two models. Keep the same compatible string but accept either BPA-RS600 or BPD-RS600 in the PMBUS_MFR_MODEL. Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz> Link: https://lore.kernel.org/r/20210708220618.23576-1-chris.packham@alliedtelesis.co.nz Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2021-08-17hwmon: (ntc_thermistor) Use library interpolationLinus Walleij
The kernel has a helper function for linear interpolation so use it. It incidentally makes the code easier to read as well. Tested on the ST-Ericsson HREFv60plus hardware reference design with two thermistors forming a thermal zone. Cc: Peter Rosin <peda@axentia.se> Cc: Chris Lesiak <chris.lesiak@licor.com> Cc: linux-iio@vger.kernel.org Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Link: https://lore.kernel.org/r/20210704222014.12058-1-linus.walleij@linaro.org Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2021-08-17hwmon: (k10temp) support Zen3 APUsDavid Bartley
Add support for Zen3 Ryzen APU. Signed-off-by: David Bartley <andareed@gmail.com> Link: https://lore.kernel.org/r/20210517064131.4369-1-andareed@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2021-07-05Merge tag 'char-misc-5.14-rc1' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc Pull char / misc driver updates from Greg KH: "Here is the big set of char / misc and other driver subsystem updates for 5.14-rc1. Included in here are: - habanalabs driver updates - fsl-mc driver updates - comedi driver updates - fpga driver updates - extcon driver updates - interconnect driver updates - mei driver updates - nvmem driver updates - phy driver updates - pnp driver updates - soundwire driver updates - lots of other tiny driver updates for char and misc drivers This is looking more and more like the "various driver subsystems mushed together" tree... All of these have been in linux-next for a while with no reported issues" * tag 'char-misc-5.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (292 commits) mcb: Use DEFINE_RES_MEM() helper macro and fix the end address PNP: moved EXPORT_SYMBOL so that it immediately followed its function/variable bus: mhi: pci-generic: Add missing 'pci_disable_pcie_error_reporting()' calls bus: mhi: Wait for M2 state during system resume bus: mhi: core: Fix power down latency intel_th: Wait until port is in reset before programming it intel_th: msu: Make contiguous buffers uncached intel_th: Remove an unused exit point from intel_th_remove() stm class: Spelling fix nitro_enclaves: Set Bus Master for the NE PCI device misc: ibmasm: Modify matricies to matrices misc: vmw_vmci: return the correct errno code siox: Simplify error handling via dev_err_probe() fpga: machxo2-spi: Address warning about unused variable lkdtm/heap: Add init_on_alloc tests selftests/lkdtm: Enable various testable CONFIGs lkdtm: Add CONFIG hints in errors where possible lkdtm: Enable DOUBLE_FAULT on all architectures lkdtm/heap: Add vmalloc linear overflow test lkdtm/bugs: XFAIL UNALIGNED_LOAD_STORE_WRITE ...
2021-06-28Merge tag 'fallthrough-fixes-clang-5.14-rc1' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux Pull fallthrough fixes from Gustavo Silva: "Fix many fall-through warnings when building with Clang 12.0.0 and '-Wimplicit-fallthrough' so that we at some point will be able to enable that warning by default" * tag 'fallthrough-fixes-clang-5.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux: (26 commits) rxrpc: Fix fall-through warnings for Clang drm/nouveau/clk: Fix fall-through warnings for Clang drm/nouveau/therm: Fix fall-through warnings for Clang drm/nouveau: Fix fall-through warnings for Clang xfs: Fix fall-through warnings for Clang xfrm: Fix fall-through warnings for Clang tipc: Fix fall-through warnings for Clang sctp: Fix fall-through warnings for Clang rds: Fix fall-through warnings for Clang net/packet: Fix fall-through warnings for Clang net: netrom: Fix fall-through warnings for Clang ide: Fix fall-through warnings for Clang hwmon: (max6621) Fix fall-through warnings for Clang hwmon: (corsair-cpro) Fix fall-through warnings for Clang firewire: core: Fix fall-through warnings for Clang braille_console: Fix fall-through warnings for Clang ipv4: Fix fall-through warnings for Clang qlcnic: Fix fall-through warnings for Clang bnxt_en: Fix fall-through warnings for Clang netxen_nic: Fix fall-through warnings for Clang ...
2021-06-24hwmon: Support set_trips() of thermal device opsDmitry Osipenko
Support set_trips() callback of thermal device ops. This allows HWMON device to operatively notify thermal core about temperature changes, which is very handy to have in a case where HWMON sensor is used by CPU thermal zone that performs passive cooling and emergency shutdown on overheat. Thermal core will be able to react faster to temperature changes. The set_trips() callback is entirely optional. If HWMON sensor doesn't support setting thermal trips, then the callback is a NO-OP. The dummy callback has no effect on the thermal core. The temperature trips are either complement the temperature polling mechanism of thermal core or replace the polling if sensor can set the trips and polling is disabled by a particular device in a device-tree. Signed-off-by: Dmitry Osipenko <digetx@gmail.com> Link: https://lore.kernel.org/r/20210623042231.16008-3-digetx@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2021-06-24hwmon: (lm90) Prevent integer underflows of temperature calculationsDmitry Osipenko
The min/max/crit and all other temperature values that are passed to the driver are unlimited and value that is close to INT_MIN results in integer underflow of the temperature calculations made by the driver for LM99 sensor. Temperature hysteresis is among those values that need to be limited, but limiting of hysteresis is independent from the sensor version. Add the missing limits. Signed-off-by: Dmitry Osipenko <digetx@gmail.com> Link: https://lore.kernel.org/r/20210623042231.16008-2-digetx@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2021-06-19hwmon: (lm90) Disable interrupt on suspendDmitry Osipenko
I2C accesses are prohibited and will error out after suspending of the I2C controller, hence we need to ensure that interrupt won't fire on suspend when it's too late. Disable interrupt across suspend/resume. Signed-off-by: Dmitry Osipenko <digetx@gmail.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2021-06-19hwmon: (lm90) Unmask hardware interruptDmitry Osipenko
The ALERT interrupt is enabled by default after power-on, but it could be masked by bootloader. For example this is the case on Acer A500 tablet device. Unmask the hardware interrupt if interrupt is provided. Signed-off-by: Dmitry Osipenko <digetx@gmail.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2021-06-19hwmon: (lm90) Use hwmon_notify_event()Dmitry Osipenko
Use hwmon_notify_event() to notify userspace and thermal core about temperature changes. Suggested-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Dmitry Osipenko <digetx@gmail.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2021-06-19hwmon: (lm90) Don't override interrupt trigger typeDmitry Osipenko
The lm90 driver sets interrupt trigger type to level-low. This type is not suitable for sensors like NCT1008 that don't deassert interrupt line until temperature is back to normal, resulting in interrupt storm. The appropriate trigger type should come from OF device description and currently it's overridden by the driver's trigger type. Don't specify the trigger type in the driver code, letting interrupt core to use the device-specific trigger type. Signed-off-by: Dmitry Osipenko <digetx@gmail.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2021-06-18hwmon: (pmbus/dps920ab) Delete some dead codeDan Carpenter
The debugfs_create_dir() function returns error pointers, it doesn't return NULL. But debugfs functions don't need to be checked in normal situations and we can just delete this code. Fixes: 1f442e213ce5 ("hwmon: (pmbus) Add driver for Delta DPS-920AB PSU") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Link: https://lore.kernel.org/r/YMyjmR54ErLtc1sH@mwanda Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2021-06-17hwmon: (ntc_thermistor) Drop unused headers.Jonathan Cameron
The IIO usage in this driver is purely consumer so it should only be including linux/iio/consumer.h Whilst here drop pm_runtime.h as there is no runtime power management in the driver. Found using include-what-you-use and manual inspection of the suggestions. Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Cc: Guenter Roeck <linux@roeck-us.net> Link: https://lore.kernel.org/r/20210611142257.103094-1-jic23@kernel.org Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2021-06-17hwmon: (pmbus) Add driver for Delta DPS-920AB PSURobert Marko
This adds support for the Delta DPS-920AB PSU. Only missing feature is fan control which the PSU supports. Signed-off-by: Robert Marko <robert.marko@sartura.hr> Link: https://lore.kernel.org/r/20210607103431.2039073-1-robert.marko@sartura.hr [groeck: Add MODULE_IMPORT_NS(PMBUS);] Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2021-06-17hwmon: (pmbus/pim4328) Add PMBus driver for PIM4006, PIM4328 and PIM4820Erik Rosen
Add hardware monitoring support for Flex power interface modules PIM4006, PIM4328 and PIM4820. Signed-off-by: Erik Rosen <erik.rosen@metormote.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>