Use _pmbus_read_byte_data() rather than calling smbus directly to check
the write protection status. This give a chance to device implementing
write protection differently to report back on the actual write protection
status.
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Message-ID: <20241105-tps25990-v4-2-0e312ac70b62@baylibre.com>
[groeck: Fix page parameter of _pmbus_read_byte_data()]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
SY24655: Support for current and voltage detection as well as
power calculation.
Signed-off-by: Wenliang Yan <wenliang202407@163.com>
Message-ID: <20241106150547.2538-1-wenliang202407@163.com>
[groeck: Changed order of compatible entries;
dropped spurious extra return statement in is_visible();
fixed code problems]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Add support for LTC7841. The LTC7841 is a high performance
PolyPhase® single output synchronous boost converter controller.
Multiphase operation reduces input and output capacitor
requirements and allows the use of smaller inductors than the
single-phase equivalent.
The relevant registers in the LTC7841 are similar to the
LTC7880, only reduced by some amount. So it's just a matter of adding
the chip id. The device also doesn't support polling, on top of the
reduced register set, so a separate case for setting the chip info is
added.
Signed-off-by: Mariel Tinaco <Mariel.Tinaco@analog.com>
Message-ID: <20241029013734.293024-4-Mariel.Tinaco@analog.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
The NCT7363Y is a fan controller which provides up to 16
independent FAN input monitors. It can report each FAN input count
values. The NCT7363Y also provides up to 16 independent PWM
outputs. Each PWM can output specific PWM signal by manual mode to
control the FAN duty outside.
Signed-off-by: Ban Feng <kcfeng0@nuvoton.com>
Message-ID: <20241022052905.4062682-3-kcfeng0@nuvoton.com>
[groeck: Dropped unnecessary variable initialization, and , after { }]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Boards such as
* Pro WS 665-ACE
* Pro WS 600M-CL
have got a nct6775 chip, but by default there's no use of it
because of resource conflict with WMI method.
Add affected boards to the WMI monitoring list.
Link: https://bugzilla.kernel.org/show_bug.cgi?id=204807
Co-developed-by: Tommy Giesler <tommy.giesler@hetzner.com>
Signed-off-by: Tommy Giesler <tommy.giesler@hetzner.com>
Signed-off-by: Sarah Maedel <sarah.maedel@hetzner-cloud.de>
Message-ID: <20241018074611.358619-1-sarah.maedel@hetzner-cloud.de>
[groeck: Change commit message to imperative mood]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Driver for Renesas ISL28022 power monitor with I2C interface.
The device monitors voltage, current via shunt resistor
and calculated power.
Signed-off-by: Carsten Spieß <mail@carsten-spiess.de>
Signed-off-by: Yikai Tsai <yikai.tsai.wiwynn@gmail.com>
Message-ID: <20241002081133.13123-3-yikai.tsai.wiwynn@gmail.com>
[groeck: Fixed alignment issues, dropped noise at end of probe]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
After commit 0edb555a65 ("platform: Make platform_driver::remove()
return void") .remove() is (again) the right callback to implement for
platform drivers.
Convert all platform drivers below drivers/hwmonto use .remove(), with
the eventual goal to drop struct platform_driver::remove_new(). As
.remove() and .remove_new() have the same prototypes, conversion is done
by just changing the structure member name in the driver initializer.
While touching these files, make indention of the struct initializer
consistent in several files.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
Message-ID: <20241017155900.137357-2-u.kleine-koenig@baylibre.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Add support for manipulating the internal heater of sht4x devices.
Enabling the heater removes condensed water from the sensor surface
which disturbs the relative humidity measurements.
The heater can operate at three heating levels (20, 110 or 200
milliwatts). Also, two heating durations may be selected (0.1 or 1s).
Once the heating time elapses the heater is automatically switched off.
Changes since v3:
* struct sht4x_data: add heating_complete timestamp
* struct sht4x_data: add data_pending flag
* heater_enable_store: return -EINVAL if input != 1
* heater_enable_store: check for data->heating_complete and update it
* heater_enable_store: set data_pending flag after heating request
* sht4x_read_values: msleep if heating in progress
* sht4x_read_values: dont send measurement request if data_pending
* heater_enable attr: make it RW
* Documentation: update info about heater_enable attr
Changes since v2:
* heater_enable_store: remove unnecessary if
* Documentation: remove incorrect info about turning off the heater
* be more specific in the patch description
Changes since v1:
* explain the use case of the new attributes set
* heater_enable attr: make it write-only
* heater_enable_store: define cmd as u8 instead of u8*
* heater_enable_store: remove unreachable data path
* heater_enable_store: remove unnecessary lock
* heater_enable_store: call i2c_master_send only if status==true
* define attributes as DEVICE_ATTR_* instead of SENSOR_DEVICE_ATTR_*
Signed-off-by: Antoni Pokusinski <apokusinski01@gmail.com>
Message-ID: <20240930205346.2147-1-apokusinski01@gmail.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Use new member visible of struct hwmon_ops to simplify specifying
the static attribute visibility.
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Message-ID: <1ac2be2d-df4f-455a-900d-821fc7bd12c4@gmail.com>
Acked-by: Jonas Malaco <jonas@protocubo.io>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Use new member visible of struct hwmon_ops to simplify specifying
the static attribute visibility.
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Message-ID: <8ef99170-b37d-4c9a-b3bf-59f4ea76cf29@gmail.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Use new member visible of struct hwmon_ops to simplify specifying
the static attribute visibility.
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Message-ID: <4e8893a1-b080-4676-97b9-a48ac9ead28a@gmail.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Use new member visible of struct hwmon_ops to simplify specifying
the static attribute visibility.
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Acked-by: Thomas Weißschuh <linux@weissschuh.net>
Message-ID: <c4b4568b-59f6-43ac-8281-536a82ecd6ab@gmail.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Use new member visible of struct hwmon_ops to simplify specifying
the static attribute visibility.
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Message-ID: <bd909a2c-23ee-437d-9bd4-858119f6f266@gmail.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Use new member visible of struct hwmon_ops to simplify specifying
the static attribute visibility.
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Message-ID: <5c26d8cf-d6dc-46c5-be7c-fd8207b3f177@gmail.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Use new member visible of struct hwmon_ops to simplify specifying
the static attribute visibility.
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Message-ID: <d5d2570c-dfd9-4be5-ad9f-e721be477131@gmail.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Use new member visible of struct hwmon_ops to simplify specifying
the static attribute visibility.
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Message-ID: <2b1f2778-1127-4979-b02d-f75e16497ad7@gmail.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Several drivers return the same static value in their is_visible
callback, what results in code duplication. Therefore add an option
for drivers to specify a static visibility directly.
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Message-ID: <89690b81-2c73-47ae-9ae9-45c77b45ca0c@gmail.com>
groeck: Renamed hwmon_ops_is_visible -> hwmon_is_visible
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Theobroma Systems Mule is an MCU that emulates a set of I2C devices,
among which is an amc6821 and other devices that are reachable through
an I2C-mux.
The devices on the mux can be selected by writing the appropriate device
number to an I2C config register (amc6821: reg 0xff)
Implement "tsd,mule" compatible to instantiate the I2C-mux platform device
when probing the amc6821.
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Farouk Bouabid <farouk.bouabid@cherry.de>
Message-ID: <20240906-dev-mule-i2c-mux-v8-4-dbd28a150e41@cherry.de>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
To ensure code clarity and prevent potential errors, use ';' instead of
',' as a statement separator in the function mpq8785_identify.
Signed-off-by: Shen Lichuan <shenlichuan@vivo.com>
Message-ID: <20240919064939.3282-1-shenlichuan@vivo.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
INA260 is similar to other chips of the series, except it has an internal
shunt resistor. The calibration register is therefore not present. Also,
the current register address was changed, though that does not matter for
the driver since the shunt voltage register (which is now the current
register) value is already used to read the current.
Cc: Loic Guegan <loic.guegan@mailbox.org>
Reviewed-by: Tzung-Bi Shih <tzungbi@kernel.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Add configuration flag indicating if the chip supports alerts and limits
to prepare for adding INA260 support.
Reviewed-by: Tzung-Bi Shih <tzungbi@kernel.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
These drivers don't use the driver_data member of struct i2c_device_id,
so don't explicitly initialize this member.
This prepares putting driver_data in an anonymous union which requires
either no initialization or named designators. But it's also a nice
cleanup on its own.
While touching these structs, also remove commas after the sentinel
entries and use a consistent indention style.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
Message-ID: <20240918123150.1540161-7-u.kleine-koenig@baylibre.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Commit b3e992f69c ("hwmon: (jc42) Strengthen detect function")
attempted to make the detect function more robust for
TSE2004-compliant devices by checking capability bits which, according
to the JEDEC 21-C specification, should always be set. Unfortunately,
not all real-world implementations fully adhere to this specification,
so this change caused a regression.
Stop testing bit 7 (EVSD) of the Capabilities register, as it was
found to be 0 on one real-world device.
Also stop testing bits 0 (EVENT) and 2 (RANGE) as vendor datasheets
(Renesas TSE2004GB2B0, ST STTS2004) suggest that they may not always
be set either.
Signed-off-by: Jean Delvare <jdelvare@suse.de>
Message-ID: <20241014141204.026f4641@endymion.delvare>
Fixes: b3e992f69c ("hwmon: (jc42) Strengthen detect function")
Message-ID: <20241014220426.0c8f4d9c@endymion.delvare>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
This driver requires REGMAP_I2C to be selected in order to get access to
regmap_config, regmap_bus, and devm_regmap_init_i2c.
Add the missing dependency.
Fixes: 021730acbc ("hwmon: (max1668) Convert to use regmap")
Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
Message-ID: <20241002-hwmon-select-regmap-v1-4-548d03268934@gmail.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
This driver requires REGMAP_I2C to be selected in order to get access to
regmap_config and devm_regmap_init_i2c. Add the missing dependency.
Fixes: 2b9ea4262a ("hwmon: Add driver for ltc2991")
Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
Message-ID: <20241002-hwmon-select-regmap-v1-3-548d03268934@gmail.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
This driver requires REGMAP_I2C to be selected in order to get access to
regmap_config and devm_regmap_init_i2c. Add the missing dependency.
Fixes: ef67959c42 ("hwmon: (adt7470) Convert to use regmap")
Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
Message-ID: <20241002-hwmon-select-regmap-v1-2-548d03268934@gmail.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
This driver requires REGMAP_I2C to be selected in order to get access to
regmap_config and devm_regmap_init_i2c. Add the missing dependency.
Fixes: df885d912f ("hwmon: (adm9240) Convert to regmap")
Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
Message-ID: <20241002-hwmon-select-regmap-v1-1-548d03268934@gmail.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
This driver requires REGMAP_I2C to be selected in order to get access to
regmap_config and devm_regmap_init_i2c. Add the missing dependency.
Fixes: 07830d9ab3 ("hwmon: add initial NXP MC34VR500 PMIC monitoring support")
Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
Message-ID: <20241002-mc34vr500-select-regmap_i2c-v1-1-a01875d0a2e5@gmail.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
0-day reports:
drivers/hwmon/tmp513.c:162:21: error:
variable 'tmp51x_regmap_config' has initializer but incomplete type
162 | static const struct regmap_config tmp51x_regmap_config = {
| ^
struct regmap_config is only available if REGMAP is enabled.
Add the missing Kconfig dependency to fix the problem.
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202410020246.2cTDDx0X-lkp@intel.com/
Fixes: 59dfa75e5d ("hwmon: Add driver for Texas Instruments TMP512/513 sensor chips.")
Cc: Eric Tremblay <etremblay@distech-controls.com>
Reviewed-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
The device_for_each_child_node() loop requires calls to
fwnode_handle_put() upon early returns to decrement the refcount of
the child node and avoid leaking memory.
There are multiple early returns within that loop in
adt7475_fan_pwm_config(), but fwnode_handle_put() is never called.
Instead of adding the missing calls, the scoped version of the loop can
be used to simplify the code and avoid mistakes in the future if new
early returns are added.
This issue was recently introduced and it does not affect old kernels
that do not support the scoped variant.
Fixes: 777c97ff08 ("hwmon: (adt7475) Add support for configuring initial PWM state")
Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
Message-ID: <20240926-hwmon_adt7475_memleak-v1-1-89b8ee07507a@gmail.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Consistently use CVL instead of Columbiaville, since CVL is already
being used in all other sensor labels for the Intel N6000 card.
Fixes: e1983220ae ("hwmon: intel-m10-bmc-hwmon: Add N6000 sensors")
Signed-off-by: Peter Colberg <peter.colberg@intel.com>
Reviewed-by: Michael Adler <michael.adler@intel.com>
Message-ID: <20240919173417.867640-1-peter.colberg@intel.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
asm/unaligned.h is always an include of asm-generic/unaligned.h;
might as well move that thing to linux/unaligned.h and include
that - there's nothing arch-specific in that header.
auto-generated by the following:
for i in `git grep -l -w asm/unaligned.h`; do
sed -i -e "s/asm\/unaligned.h/linux\/unaligned.h/" $i
done
for i in `git grep -l -w asm-generic/unaligned.h`; do
sed -i -e "s/asm-generic\/unaligned.h/linux\/unaligned.h/" $i
done
git mv include/asm-generic/unaligned.h include/linux/unaligned.h
git mv tools/include/asm-generic/unaligned.h tools/include/linux/unaligned.h
sed -i -e "/unaligned.h/d" include/asm-generic/Kbuild
sed -i -e "s/__ASM_GENERIC/__LINUX/" include/linux/unaligned.h tools/include/linux/unaligned.h
no_llseek had been defined to NULL two years ago, in commit 868941b144
("fs: remove no_llseek")
To quote that commit,
At -rc1 we'll need do a mechanical removal of no_llseek -
git grep -l -w no_llseek | grep -v porting.rst | while read i; do
sed -i '/\<no_llseek\>/d' $i
done
would do it.
Unfortunately, that hadn't been done. Linus, could you do that now, so
that we could finally put that thing to rest? All instances are of the
form
.llseek = no_llseek,
so it's obviously safe.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Highlights:
- asus-wmi: Add support for vivobook fan profiles
- dell-laptop: Add knobs to change battery charge settings
- lg-laptop: Add operation region support
- intel-uncore-freq: Add support for efficiency latency control
- intel/ifs: Add SBAF test support
- intel/pmc: Ignore all LTRs during suspend
- platform/surface: Support for arm64 based Surface devices
- wmi: Pass event data directly to legacy notify handlers
- x86/platform/geode: switch GPIO buttons and LEDs to software properties
- bunch of small cleanups, fixes, hw-id additions, etc.
The following is an automated git shortlog grouped by driver:
Documentation:
- admin-guide: pm: Add efficiency vs. latency tradeoff to uncore documentation
ISST:
- Simplify isst_misc_reg() and isst_misc_unreg()
MAINTAINERS:
- adjust file entry in INTEL MID PLATFORM
- Add Intel MID section
Merge tag 'hwmon-for-v6.11-rc7' into review-hans:
- Merge tag 'hwmon-for-v6.11-rc7' into review-hans
Merge tag 'platform-drivers-x86-v6.11-3' into review-hans:
- Merge tag 'platform-drivers-x86-v6.11-3' into review-hans
acer-wmi:
- Use backlight power constants
asus-laptop:
- Use backlight power constants
asus-nb-wmi:
- Use backlight power constants
asus-wmi:
- don't fail if platform_profile already registered
- add debug print in more key places
- Use backlight power constants
- add support for vivobook fan profiles
dell-laptop:
- remove duplicate code w/ battery function
- Add knobs to change battery charge settings
dt-bindings:
- platform: Add Surface System Aggregator Module
- serial: Allow embedded-controller as child node
eeepc-laptop:
- Use backlight power constants
eeepc-wmi:
- Use backlight power constants
fujitsu-laptop:
- Use backlight power constants
hid-asus:
- use hid for brightness control on keyboard
ideapad-laptop:
- Make the scope_guard() clear of its scope
- move ACPI helpers from header to source file
- Use backlight power constants
int3472:
- Use str_high_low()
- Use GPIO_LOOKUP() macro
- make common part a separate module
intel-hid:
- Use string_choices API instead of ternary operator
intel/pmc:
- Ignore all LTRs during suspend
- Remove unused param idx from pmc_for_each_mode()
intel_scu_ipc:
- Move intel_scu_ipc.h out of arch/x86/include/asm
intel_scu_wdt:
- Move intel_scu_wdt.h to x86 subfolder
lenovo-ymc:
- Ignore the 0x0 state
lg-laptop:
- Add operation region support
oaktrail:
- Use backlight power constants
panasonic-laptop:
- Add support for programmable buttons
platform/mellanox:
- mlxbf-pmc: fix lockdep warning
platform/olpc:
- Remove redundant null pointer checks in olpc_ec_setup_debugfs()
platform/surface:
- Add OF support
platform/x86/amd:
- pmf: Add quirk for TUF Gaming A14
platform/x86/amd/pmf:
- Update SMU metrics table for 1AH family series
- Relocate CPU ID macros to the PMF header
- Add support for notifying Smart PC Solution updates
platform/x86/intel-uncore-freq:
- Add efficiency latency control to sysfs interface
- Add support for efficiency latency control
- Do not present separate package-die domain
platform/x86/intel/ifs:
- Fix SBAF title underline length
- Add SBAF test support
- Add SBAF test image loading support
- Refactor MSR usage in IFS test code
platform/x86/intel/pmc:
- Show live substate requirements
platform/x86/intel/pmt:
- Use PMT callbacks
platform/x86/intel/vsec:
- Add PMT read callbacks
platform/x86/intel/vsec.h:
- Move to include/linux
samsung-laptop:
- Use backlight power constants
serial-multi-instantiate:
- Don't require both I2C and SPI
thinkpad_acpi:
- Fix uninitialized symbol 's' warning
- Add Thinkpad Edge E531 fan support
touchscreen_dmi:
- add nanote-next quirk
trace:
- platform/x86/intel/ifs: Add SBAF trace support
wmi:
- Call both legacy and WMI driver notify handlers
- Merge get_event_data() with wmi_get_notify_data()
- Remove wmi_get_event_data()
- Pass event data directly to legacy notify handlers
x86-android-tablets:
- Adjust Xiaomi Pad 2 bottom bezel touch buttons LED
- Fix spelling in the comments
x86/platform/geode:
- switch GPIO buttons and LEDs to software properties
-----BEGIN PGP SIGNATURE-----
iQFIBAABCAAyFiEEuvA7XScYQRpenhd+kuxHeUQDJ9wFAmbq2tYUHGhkZWdvZWRl
QHJlZGhhdC5jb20ACgkQkuxHeUQDJ9xKYAgAoXZt1MjBDA1mP813i4bj8CYQHWO+
YnugVhEccucxgC6sBGzQeRLBNuG/VaBN6tyJ1pKYMpWV5gSthq1Iop+DZbno2ciM
QAnSSzioHB/dhYBXuKmZatkMsKLjLjtfcexUed9DfwKapqFl3XQMb6cEYasM37hH
197K4yAFF3oqQImlACwQDxN1q3eCG6bdIbEAByZW7yH644IC5zH8/CiFjTCwUx/F
aFIHQlLLzt1kjhD8AbRHhRcsGbzG2ejHsC3yrQddEJSOkInDO8baR0aDyhBTUFPE
lztuekFfaJ1Xcyoc/Zf4pi3ab1Djt+Htck3CHLO/xcl0YYMlM5vcs1QlhQ==
=sAk7
-----END PGP SIGNATURE-----
Merge tag 'platform-drivers-x86-v6.12-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86
Pull x86 platform drivers updates from Hans de Goede:
- asus-wmi: Add support for vivobook fan profiles
- dell-laptop: Add knobs to change battery charge settings
- lg-laptop: Add operation region support
- intel-uncore-freq: Add support for efficiency latency control
- intel/ifs: Add SBAF test support
- intel/pmc: Ignore all LTRs during suspend
- platform/surface: Support for arm64 based Surface devices
- wmi: Pass event data directly to legacy notify handlers
- x86/platform/geode: switch GPIO buttons and LEDs to software
properties
- bunch of small cleanups, fixes, hw-id additions, etc.
* tag 'platform-drivers-x86-v6.12-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86: (65 commits)
MAINTAINERS: adjust file entry in INTEL MID PLATFORM
platform/x86: x86-android-tablets: Adjust Xiaomi Pad 2 bottom bezel touch buttons LED
platform/mellanox: mlxbf-pmc: fix lockdep warning
platform/x86/amd: pmf: Add quirk for TUF Gaming A14
platform/x86: touchscreen_dmi: add nanote-next quirk
platform/x86: asus-wmi: don't fail if platform_profile already registered
platform/x86: asus-wmi: add debug print in more key places
platform/x86: intel_scu_wdt: Move intel_scu_wdt.h to x86 subfolder
platform/x86: intel_scu_ipc: Move intel_scu_ipc.h out of arch/x86/include/asm
MAINTAINERS: Add Intel MID section
platform/x86: panasonic-laptop: Add support for programmable buttons
platform/olpc: Remove redundant null pointer checks in olpc_ec_setup_debugfs()
platform/x86: intel/pmc: Ignore all LTRs during suspend
platform/x86: wmi: Call both legacy and WMI driver notify handlers
platform/x86: wmi: Merge get_event_data() with wmi_get_notify_data()
platform/x86: wmi: Remove wmi_get_event_data()
platform/x86: wmi: Pass event data directly to legacy notify handlers
platform/x86: thinkpad_acpi: Fix uninitialized symbol 's' warning
platform/x86: x86-android-tablets: Fix spelling in the comments
platform/x86: ideapad-laptop: Make the scope_guard() clear of its scope
...
* New drivers
- Driver for Sophgo SG2042 external hardware monitor
- Thermal sensor driver for Surface Aggregator Module
* Added support to existing drivers
- oxp-sensors: Support for multiple new devices.
- nct6775: Added G15CF to ASUS WMI monitoring list
* Modernizations
- ina2xx: Driver cleanup and update to use with_info API
- lm92: Driver cleanup and update to use regmap and with_info API
- lm95234: Driver cleanup and update to use regmap and with_info API
- max1619: Driver cleanup and update to use regmap and with_info API
- max1668: Driver cleanup and update to use regmap and with_info API
- max6697: Driver cleanup and update to use regmap and with_info API
* API updates
- Removed unused devm_hwmon_device_unregister() API function
* Other notable changes
- Implement and use generic bus access delay for pmbus drivers
- Use with scoped for each OF child loop in several drivers
- Module unloading fixes for gsc-hwmon and ntc_thermistor drivers
- Converted various drivers to use multi-byte regmap operations
- adt7475: Improved devicetree based configuration
- ltc2947: Move to firmware agnostic API
- ltc2978: Converted devicetree description to yaml
- max16065: Addressed overflows when writing limit attributes
* Various other minor cleanups, fixes and improvements
-----BEGIN PGP SIGNATURE-----
iQIzBAABCAAdFiEEiHPvMQj9QTOCiqgVyx8mb86fmYEFAmboX+AACgkQyx8mb86f
mYHRGA/7BVlHa3sxDTNLPvL3VMZ1/SgmQqC0xUx57bAOcpkLX0taXD/t+Nm93HaW
vCKGYPe0jII9tVz1YvZ1VSNwJXZo4X+jfdL3t6RpdKpn/op6vASzhKhh0sGeiyw1
aQNXzrm4dthFDRfmscZM1+CBQv4aTf6ApyTbRFH2dnViXu9idMZYcxoxz87uody5
AxUAgNDPb/mQww3x6r+rVv3VQaJZ+yrJxbYvaxgzbm8TqIFCpHgNtRJTVBhGjbOi
o9rushlUpOjBQE2/jKOajtfV9fWX/kpJu9dUfSbVMCvZgEPU985UX6dpg9Oc0t0o
oUhID2dHLUVNmn4dTQCtvzuLTEBDi87TcML6VDlMIn3dFi5QG3tJZkaWtbPymHz9
4Qf3TJ2TV0E/jIh8UueFd2SlRlkCE3HooM04Kbes7H8ftSbddMM3fTah8yzdOJJE
Dwv6eO3T9REHPaBauFq0Y9hzkx46rqF6Mli0tFUumh7oM1b68ILZ+oJxfpapatzO
Pa6UPFfaHU63VFmDCzNWc0IiI1beF7i5fzzWwj37HgIdaw1+cS6kNtvbv/6t5/41
5TVitpP1SLzDtjK6f+VDjroE/Qg4OeodamBOEopMPjYM/nipyWxPoOK1VEtbo1P5
vAJBmgPn45M02miB7l3ERCCkRVQdeL69ZM5vcRmLB8NQRKML830=
=z6jf
-----END PGP SIGNATURE-----
Merge tag 'hwmon-for-v6.12' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging
Pull hwmon updates from Guenter Roeck:
"New drivers:
- driver for Sophgo SG2042 external hardware monitor
- thermal sensor driver for Surface Aggregator Module
Added support to existing drivers:
- oxp-sensors: Support for multiple new devices.
- nct6775: Added G15CF to ASUS WMI monitoring list
Modernizations:
- driver cleanup and update to use with_info API: ina2xx, lm92,
lm95234, max1619, max1668, and max6697.
API updates:
- removed unused devm_hwmon_device_unregister() API function
Other notable changes
- implement and use generic bus access delay for pmbus drivers
- use with scoped for each OF child loop in several drivers
- module unloading fixes for gsc-hwmon and ntc_thermistor drivers
- converted various drivers to use multi-byte regmap operations
- adt7475: Improved devicetree based configuration
- ltc2947: Move to firmware agnostic API
- ltc2978: Converted devicetree description to yaml
- max16065: Addressed overflows when writing limit attributes
Various other minor cleanups, fixes and improvements"
* tag 'hwmon-for-v6.12' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: (96 commits)
hwmon: Remove devm_hwmon_device_unregister() API function
hwmon: (sch5636) Print unknown ID in error string via %*pE
hwmon: (sht21) Use %*ph to print small buffer
hwmon: (pmbus/mpq7932) Constify struct regulator_desc
hwmon: pmbus: pli12096bc: Add write delay
hwmon: pmbus: zl6100: Use generic code
hwmon: pmbus: ucd9000: Use generic code
hwmon: pmbus: max15301: Use generic code
hwmon: pmbus: Implement generic bus access delay
hwmon: (ina2xx) Use shunt voltage to calculate current
hwmon: (ina2xx) Add support for current limits
hwmon: (ina2xx) Pass register to alert limit write functions
hwmon: (ina2xx) Convert to use with_info hwmon API
hwmon: (ina2xx) Move ina2xx_get_value()
hwmon: (ina2xx) Set alert latch
hwmon: (ina2xx) Consolidate chip initialization code
hwmon: (ina2xx) Fix various overflow issues
hwmon: (ina2xx) Re-initialize chip using regmap functions
hwmon: (ina2xx) Use local regmap pointer if used more than once
hwmon: (ina2xx) Mark regmap_config as const
...
- Rework kcpuid to handle the the autogenerated CSV file correctly and
update the CSV file to cover the whole zoo of CPUID.
- Avoid memcpy() for ia32 syscall_get_arguments() and use direct
assignments as fortified memcpy() is unhappy about writing/reading
beyond the end of the addresses destination/source struct member
- A few new PCI IDs for AMD
- Update MAINTAINERS to cover x86 specific selftests
-----BEGIN PGP SIGNATURE-----
iQJHBAABCgAxFiEEQp8+kY+LLUocC4bMphj1TA10mKEFAmbpOZ8THHRnbHhAbGlu
dXRyb25peC5kZQAKCRCmGPVMDXSYofVUEACt8JjMxanswpMy1O6HbJcdVf2wwZ3q
n30BKIFXucvqE6Opc7tWy5THh1+YjHuNXZMkfuuEe2Qjc69z2m3YwUmF0oAB9/AI
6HU4yoePHTbEiPbTjNZMaKL+9CaYJbWkgoEjQpdQGWmo6gJqJxoRF5fY2assLfdJ
zik2faebMNj3l1C1R1w646Zu3CScfZUE8512zwBfOxTqkpVBO4uDrspTzLYljlQN
+gPZ41XDvQKu6SVoVC/TH/oRdshtLBg74fUDoL14yMkWqx3N5IKulFIMCeD2dEHv
pJcbYb8x0pJ1iLx8q/k+spzbvTewY3sAAzbo5JLvcHy1PhW8jc+uCWorMpqLEhH0
LzH1XZwC+kYvJytzZ9EEyYJAAMbh3KRBaphEXmRVec19tujwRy2NGjhRyVmLyqYr
aShIGEVqigCGY8dF0mJgyVu5kd7X4vDZw4xH92c5/G41Ui19cXp1nXh61KMs1WMR
sQm9FDvtRgcX9Pc89RyRRgYz2U75p3gcNyXKio4Oa2VfIlGRYUB5kg5/qDx3RjJx
kZZ44TqPA/oJjpJyNjVrYqD6Gd3WUsjuH2gn6IAohKiSEKDdGTtHu7LEnKEcdkQk
TomxWk1fTR8513GNXgEy2YhXdRN8iTlhgRI9G2BA5c4B6MCGHzPRFzWrosogB3+g
tAOsEN8Sp3ea+g==
=XVR5
-----END PGP SIGNATURE-----
Merge tag 'x86-misc-2024-09-17' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull misc x86 updates from Thomas Gleixner:
- Rework kcpuid to handle the the autogenerated CSV file correctly and
update the CSV file to cover the whole zoo of CPUID.
- Avoid memcpy() for ia32 syscall_get_arguments() and use direct
assignments as fortified memcpy() is unhappy about writing/reading
beyond the end of the addresses destination/source struct member
- A few new PCI IDs for AMD
- Update MAINTAINERS to cover x86 specific selftests
* tag 'x86-misc-2024-09-17' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
MAINTAINERS: Add selftests/x86 entry
x86/amd_nb: Add new PCI IDs for AMD family 1Ah model 60h-70h
x86/syscall: Avoid memcpy() for ia32 syscall_get_arguments()
MAINTAINERS: Add x86 cpuid database entry
tools/x86/kcpuid: Introduce a complete cpuid bitfields CSV file
tools/x86/kcpuid: Parse subleaf ranges if provided
tools/x86/kcpuid: Recognize all leaves with subleaves
tools/x86/kcpuid: Strip bitfield names leading/trailing whitespace
tools/x86/kcpuid: Protect against faulty "max subleaf" values
tools/x86/kcpuid: Set max possible subleaves count to 64
tools/x86/kcpuid: Properly align long-description columns
tools/x86/kcpuid: Remove unused variable
x86/amd_nb: Add new PCI IDs for AMD family 1Ah model 60h
devm_hwmon_device_unregister() has no in-tree user, and its implementation
is wrong since it does not pass the to-be-removed hardware monitoring
device as parameter. I do not envision a valid use for it; drivers needing
it should not have called devm_hwmon_device_register_with_info() in the
first place. Remove it.
Reported-by: Matthew Sanders <m@ttsande.rs>
Closes: https://lore.kernel.org/linux-hwmon/488b3bdf870ea76c4b943dbe5fd15ac8113019dc.camel@kernel.org/
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Instead of custom approach this allows to print escaped strings
via %*pE extension. With this the unknown ID will be printed
as a string. Nonetheless, leave hex values to be printed as well.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Message-ID: <20240911201903.2886874-1-andriy.shevchenko@linux.intel.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Use %*ph format to print small buffer as hex string.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Message-ID: <20240911194627.2885506-1-andriy.shevchenko@linux.intel.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
The current implementation of pmbus_show_boolean assumes that all devices
support write-back operation of status register to clear pending warnings
or faults. Since clearing individual bits in the status registers was only
introduced in PMBus specification 1.2, this operation may not be supported
by some older devices. This can result in an error while reading boolean
attributes such as temp1_max_alarm.
Fetch PMBus revision supported by the device and modify pmbus_show_boolean
so that it only tries to clear individual status bits if the device is
compliant with PMBus specs >= 1.2. Otherwise clear all fault indicators
on the current page after a fault status was reported.
Fixes: 35f165f089 ("hwmon: (pmbus) Clear pmbus fault/warning bits after read")
Signed-off-by: Patryk Biel <pbiel7@gmail.com>
Message-ID: <20240909-pmbus-status-reg-clearing-v1-1-f1c0d68c6408@gmail.com>
[groeck:
Rewrote description
Moved revision detection code ahead of clear faults command
Assigned revision if return value from PMBUS_REVISION command is 0
Improved return value check from calling _pmbus_write_byte_data()]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
'struct regulator_desc' is not modified in this driver.
Constifying this structure moves some data to a read-only section, so
increase overall security, especially when the structure holds some
function pointers.
This also makes mpq7932_regulators_desc consistent with
mpq7932_regulators_desc_one which is already a "static const struct
regulator_desc".
On a x86_64, with allmodconfig:
Before:
======
text data bss dec hex filename
3516 2264 0 5780 1694 drivers/hwmon/pmbus/mpq7932.o
After:
=====
text data bss dec hex filename
5396 384 0 5780 1694 drivers/hwmon/pmbus/mpq7932.o
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Message-ID: <c0585a07547ec58d99a5bff5e02b398114bbe312.1725784343.git.christophe.jaillet@wanadoo.fr>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
The current legacy WMI handlers are susceptible to picking up wrong
WMI event data on systems where different WMI devices share some
notification IDs.
Prevent this by letting the WMI driver core taking care of retrieving
the event data. This also simplifies the legacy WMI handlers and their
implementation inside the WMI driver core.
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Armin Wolf <W_Armin@gmx.de>
Link: https://lore.kernel.org/r/20240901031055.3030-3-W_Armin@gmx.de
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Tests on PLI12096bc showed that sometimes a small delay is necessary
after a write operation before a new operation can be processed.
If not respected the device will probably NACK the data phase of
the SMBus transaction. Tests showed that the probability to observe
transaction errors can be raised by either reading sensor data or
toggling the regulator enable.
Further tests showed that 250 microseconds, as used previously for
the CLEAR_FAULTS workaround, is sufficient.
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Message-ID: <20240902075319.585656-5-patrick.rudolph@9elements.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Use the generic pmbus bus access delay.
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Message-ID: <20240902075319.585656-2-patrick.rudolph@9elements.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Some drivers, like the max15301 or zl6100, are intentionally delaying
SMBus communications, to prevent transmission errors. As this is necessary
on additional PMBus compatible devices, implement a generic delay mechanism
in the pmbus core.
Introduces two delay settings in the pmbus_driver_info struct, one applies
to every SMBus transaction and the other is for write transaction only.
Once set by the driver the SMBus traffic, using the generic pmbus access
helpers, is automatically delayed when necessary.
The two settings are:
access_delay:
- Unit in microseconds
- Stores the accessed timestamp after every SMBus access
- Delays when necessary before the next SMBus access
write_delay:
- Unit in microseconds
- Stores the written timestamp after a write SMBus access
- Delays when necessary before the next SMBus access
This allows to drop the custom delay code from the drivers and easily
introduce this feature in additional pmbus drivers.
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Message-ID: <20240902075319.585656-1-patrick.rudolph@9elements.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
The BIOS can choose to return no event data in response to a
WMI event, so the ACPI object passed to the WMI notify handler
can be NULL.
Check for such a situation and ignore the event in such a case.
Fixes: 23902f98f8 ("hwmon: add HP WMI Sensors driver")
Signed-off-by: Armin Wolf <W_Armin@gmx.de>
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Message-ID: <20240901031055.3030-2-W_Armin@gmx.de>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
In the LTC2991, V5 and V6 channels use the low nibble of the
"V5, V6, V7, and V8 Control Register" for configuration, but currently,
the high nibble is defined.
This patch changes the defines to use the low nibble.
Fixes: 2b9ea4262a ("hwmon: Add driver for ltc2991")
Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
Message-ID: <20240830111349.30531-1-paweldembicki@gmail.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>