summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2026-06-16 05:40:21 +0300
committerLinus Torvalds <torvalds@linux-foundation.org>2026-06-16 05:40:21 +0300
commitfc2ce3ee106f2d53eb344f5c4963c897bbb21634 (patch)
tree9477c5967a84f334d7c8a5d7d53ffd8b0679fdac /include
parent7e54cdd0564f5393eb773b88cb49f55859e90474 (diff)
parent9955c92abe72564a49c293b1c15cd3b4f02ea6a0 (diff)
downloadlinux-fc2ce3ee106f2d53eb344f5c4963c897bbb21634.tar.xz
Merge tag 'hwmon-for-v7.2' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging
Pull hwmon updates from Guenter Roeck: "New drivers for the following chips: - Analog Devices LTC4283 Swap Controller - Analog Devices MAX20830 - Analog Devices MAX20860A - ARCTIC Fan Controller - Delta E50SN12051 - Luxshare LX1308 - Microchip EMC1812/13/14/15/33 - Monolithic MP2985 - Murata D1U74T PSU New chip support added to existing drivers: - asus-ec-sensors: Support for ROG MAXIMUS Z790 EXTREME, ROG STRIX B850-E GAMING WIFI, and ROG STRIX B650E-E GAMING WIFI - dell-smm: Add Dell Latitude 7530 to fan control whitelist - nct6683: Support for ASRock Z890 Pro-A - pmbus: Support for Flex BMR316, BMR321, BMR350 and BMR351 - pmbus/max34440: Support for ADPM12250 - pmbus/xdp720: Support for Infineon xdp730, and fix driver issues reported by Sashiko New functionality: - Add support for update_interval_us chip attribute, and support it in ina238 driver - Add support for guard() and scoped_guard() for subsystem locks, and use it in adt7411, ina2xx, and lm90 drivers - emc2305: Support configurable fan PWM at shutdown - lm63: Expose PWM frequency and LUT hysteresis as writable - lm75: Support active-high alert polarity - nct7802: Add time step attributes for tweaking responsiveness - pmbus/adm1266: Add rtc debugfs entries for rtc, powerup_counter, clear_blackbox, and firmware_revision - raspberrypi: Fix delayed-work teardown race, add voltage input support as well as voltage domain IDs - mcp9982: Add support for reporting external diode faults Miscellaneous bug fixes, changes and improvements: - Use named initializers for platform_device_id arrays and i2c_device_data, and remove unused driver data - Various drivers: Move MODULE_DEVICE_TABLE next to the table itself - ads7871: Convert to hwmon_device_register_with_info(), and use DMA-safe buffer for SPI writes - adt7411: document supported sysfs attributes - adt7462: Add of_match_table to support devicetree - adt7475: Add explicit header include - coretemp; Fix outdated documentation, coding style issues, and replace hardcoded core count with dynamic value - cros_ec: Drop unused assignment of platform_device_id driver data - emc2305: Fix fan channel index handling - gpd-fan: Reject EC PWM value 0 as invalid, fix race condition between device removal and sysfs access, upgrade log level from warn to err for platform device creation failure, initialize EC before registering hwmon device, drop global driver data and use per-device allocation - htu31: document debugfs serial_number - ina238: Add support for samples and update_interval - it87: Clamp negative values to zero in set_fan() - lm75: Add explicit header include, Add explicit default cases in lm75_is_visible(), and add section for sysfs interface to documentation - pmbus/lm25066: Fix PMBus coefficients for LM5064/5066/5066i - tmp102: Use device_property_read_string API - tmp401: Read "ti,n-factor" as signed - Convert zyxel,nsa320-mcu to DT schema" * tag 'hwmon-for-v7.2' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: (81 commits) hwmon: tmp401: Read "ti,n-factor" as signed hwmon: (pmbus/lm25066) Fix PMBus coefficients for LM5064/5066/5066i hwmon: (gpd-fan) Reject EC PWM value 0 as invalid hwmon: (dell-smm) Add Dell Latitude 7530 to fan control whitelist hwmon: temperature: add support for EMC1812 dt-bindings: hwmon: temperature: add support for EMC1812 hwmon: (gpd-fan): fix race condition between device removal and sysfs access hwmon: (gpd-fan): upgrade log level from warn to err for platform device creation failure hwmon: (gpd-fan): Initialize EC before registering hwmon device hwmon: (gpd-fan): drop global driver data and use per-device allocation hwmon: (pmbus/max34440): add support adpm12250 hwmon: (ina238) Add update_interval_us attribute hwmon: Add update_interval_us chip attribute hwmon: (ina238) Add support for samples and update_interval gpio: gpio-ltc4283: Add support for the LTC4283 Swap Controller hwmon: ltc4283: Add support for the LTC4283 Swap Controller dt-bindings: hwmon: Document the LTC4283 Swap Controller hwmon: (pmbus/xdp720) Fix driver issues xdp720/730 hwmon: (pmbus/xdp720) Add support for efuse xdp730 dt-bindings: hwmon/pmbus: Add Infineon xdp730 ...
Diffstat (limited to 'include')
-rw-r--r--include/linux/hwmon.h5
-rw-r--r--include/soc/bcm2835/raspberrypi-firmware.h25
2 files changed, 30 insertions, 0 deletions
diff --git a/include/linux/hwmon.h b/include/linux/hwmon.h
index a578a10baff2..77a6f2bffcba 100644
--- a/include/linux/hwmon.h
+++ b/include/linux/hwmon.h
@@ -13,6 +13,7 @@
#define _HWMON_H_
#include <linux/bitops.h>
+#include <linux/cleanup.h>
struct device;
struct attribute_group;
@@ -39,6 +40,7 @@ enum hwmon_chip_attributes {
hwmon_chip_power_reset_history,
hwmon_chip_register_tz,
hwmon_chip_update_interval,
+ hwmon_chip_update_interval_us,
hwmon_chip_alarms,
hwmon_chip_samples,
hwmon_chip_curr_samples,
@@ -55,6 +57,7 @@ enum hwmon_chip_attributes {
#define HWMON_C_POWER_RESET_HISTORY BIT(hwmon_chip_power_reset_history)
#define HWMON_C_REGISTER_TZ BIT(hwmon_chip_register_tz)
#define HWMON_C_UPDATE_INTERVAL BIT(hwmon_chip_update_interval)
+#define HWMON_C_UPDATE_INTERVAL_US BIT(hwmon_chip_update_interval_us)
#define HWMON_C_ALARMS BIT(hwmon_chip_alarms)
#define HWMON_C_SAMPLES BIT(hwmon_chip_samples)
#define HWMON_C_CURR_SAMPLES BIT(hwmon_chip_curr_samples)
@@ -496,6 +499,8 @@ char *devm_hwmon_sanitize_name(struct device *dev, const char *name);
void hwmon_lock(struct device *dev);
void hwmon_unlock(struct device *dev);
+DEFINE_GUARD(hwmon_lock, struct device *, hwmon_lock(_T), hwmon_unlock(_T))
+
/**
* hwmon_is_bad_char - Is the char invalid in a hwmon name
* @ch: the char to be considered
diff --git a/include/soc/bcm2835/raspberrypi-firmware.h b/include/soc/bcm2835/raspberrypi-firmware.h
index e1f87fbfe554..975bef529854 100644
--- a/include/soc/bcm2835/raspberrypi-firmware.h
+++ b/include/soc/bcm2835/raspberrypi-firmware.h
@@ -156,6 +156,31 @@ enum rpi_firmware_clk_id {
RPI_FIRMWARE_NUM_CLK_ID,
};
+enum rpi_firmware_volt_id {
+ RPI_FIRMWARE_VOLT_ID_CORE = 1,
+ RPI_FIRMWARE_VOLT_ID_SDRAM_C = 2,
+ RPI_FIRMWARE_VOLT_ID_SDRAM_P = 3,
+ RPI_FIRMWARE_VOLT_ID_SDRAM_I = 4,
+ RPI_FIRMWARE_NUM_VOLT_ID,
+};
+
+/**
+ * struct rpi_firmware_get_voltage_request - Firmware request for a voltage
+ * @id: ID of the voltage being queried
+ * @value: Voltage in microvolts. Set by the firmware.
+ *
+ * Used by @RPI_FIRMWARE_GET_VOLTAGE.
+ */
+struct rpi_firmware_get_voltage_request {
+ __le32 id;
+ __le32 value;
+} __packed;
+
+#define RPI_FIRMWARE_GET_VOLTAGE_REQUEST(_id) \
+ { \
+ .id = cpu_to_le32(_id), \
+ }
+
/**
* struct rpi_firmware_clk_rate_request - Firmware Request for a rate
* @id: ID of the clock being queried