summaryrefslogtreecommitdiff
path: root/drivers/hwmon
AgeCommit message (Collapse)AuthorFilesLines
2024-05-01hwmon: (max31790) revise the scale to write pwmDelphine CC Chiu1-1/+7
Since the value for PWMOUT Target Duty Cycle register is a 9 bit left-justified value that ranges from 0 to 511 and is contained in 2 bytes. There is an issue that the PWM signal recorded by oscilloscope would not be on consistently if we set PWM to 100% to the driver. It is because the LSB of the 9 bit would always be zero if it just left shift 8 bit for the value that write to PWMOUT Target Duty Cycle register. Therefore, revise the scale of the value that was written to pwm input from 255 to 511 and modify the value to left-justified value. Signed-off-by: Delphine CC Chiu <Delphine_CC_Chiu@wiwynn.com> Link: https://lore.kernel.org/r/20240416022211.859483-1-Delphine_CC_Chiu@wiwynn.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-04-30hwmon: (nzxt-kraken3) Add support for NZXT Kraken 2023 (standard and Elite) ↵Aleksa Savic1-8/+30
models Add support for NZXT Kraken 2023 (standard) and NZXT Kraken 2023 Elite all-in-one CPU coolers. These models communicate identically to the NZXT Kraken Z-series (Z53 code paths) in all cases except when writing the fan curve, where setting additional bits in the report is needed. Reviewed-by: Jonas Malaco <jonas@protocubo.io> Signed-off-by: Aleksa Savic <savicaleksa83@gmail.com> Link: https://lore.kernel.org/r/20240428104812.14037-3-savicaleksa83@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-04-30hwmon: (nzxt-kraken3) Decouple device names from kindsAleksa Savic1-10/+7
Prepare for the support of new models, for which the relationship between device name (for hwmon and debugfs) and kind (for the selection of appropriate code paths within this driver) will no longer be 1:1. Originally-from: Jonas Malaco <jonas@protocubo.io> Signed-off-by: Aleksa Savic <savicaleksa83@gmail.com> Link: https://lore.kernel.org/r/20240428104812.14037-2-savicaleksa83@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-04-30hwmon: (it87) Remove tests nolonger requiredFrank Crawford1-48/+0
Remove DMI tests for boards that are known to have issues with entering configuration mode, as now we are testing the chips directly and no longer need to rely on matching the board. Leave the DMI table in place, for the nVIDIA board, and any future expansions. Signed-off-by: Frank Crawford <frank@crawford.emu.id.au> Link: https://lore.kernel.org/r/20240428060653.2425296-5-frank@crawford.emu.id.au Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-04-30hwmon: (it87) Test for chipset before entering configuration modeFrank Crawford1-5/+47
Major part of the change for the new method to avoid chipset issues. The actual update does the following: 1) Lock the memory, but does not perform a SIO entry (previously it would have performed an SIO entry). 2) Attempt to read the chipID. This should be safe no matter which chip we have. 3) If step (2) fails, then perform SIO entry and retry chipID read. For older chips and on failure it acts similarly to prior to this patch. 4) Set the sio_data->type, similar to previously. 5) If we have not performed an SIO entry, and this is not a chip type with the NOCONF feature, then it will perform an SIO entry at this point. 6) Proceed with setup as prior to this patch. 7) Any following access to the SIO registers will invoke the SIO entry and SIO exit steps unless it is a chip with the NOCONF feature set. This was set up in the previous patches in this patchset. 8) Update to the exit based on if it had performed a SIO entry or not. Signed-off-by: Frank Crawford <frank@crawford.emu.id.au> Link: https://lore.kernel.org/r/20240428060653.2425296-4-frank@crawford.emu.id.au [groeck: s/intialised/initialized/] Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-04-30hwmon: (it87) Do not enter configuration mode for some chiptypesFrank Crawford1-6/+7
Update the configuration mode entry code to allow conditional entry, and apply to all calls. Signed-off-by: Frank Crawford <frank@crawford.emu.id.au> Link: https://lore.kernel.org/r/20240428060653.2425296-3-frank@crawford.emu.id.au Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-04-30hwmon: (it87) Rename FEAT_CONF_NOEXIT to FEAT_NOCONF as more descriptive of ↵Frank Crawford1-9/+9
requirement Rename previous definitions to match the new information that they are preinitialised as enabled and should not receive codes to enter or exit configuration mode. Signed-off-by: Frank Crawford <frank@crawford.emu.id.au> Link: https://lore.kernel.org/r/20240428060653.2425296-2-frank@crawford.emu.id.au Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-04-30hwmon: (pmbus) Add support for Infineon XDP710Peter Yin3-0/+141
Add support for Infineon XDP710.This is a Hot-Swap Controller. Signed-off-by: Peter Yin <peteryin.openbmc@gmail.com> Link: https://lore.kernel.org/r/20240425153608.4003782-2-peteryin.openbmc@gmail.com [groeck: s/microOhmRsense/micro_ohm_osense/g; declared array static] Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-04-30hwmon: (aquacomputer_d5next) Add support for Octo flow sensor pulsesAleksa Savic1-4/+13
Add support for reading and writing the flow sensor pulses on the Aquacomputer Octo. Implemented by David Flemstrom [1]. [1] https://github.com/aleksamagicka/aquacomputer_d5next-hwmon/pull/95 Originally-from: David Flemstrom <david.flemstrom@gmail.com> Signed-off-by: Aleksa Savic <savicaleksa83@gmail.com> Link: https://lore.kernel.org/r/20240417175037.32499-3-savicaleksa83@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-04-30hwmon: (aquacomputer_d5next) Add support for Octo flow sensorAleksa Savic1-13/+21
Add support for reading the flow sensor value on the Aquacomputer Octo. Implemented by David Flemstrom [1]. [1] https://github.com/aleksamagicka/aquacomputer_d5next-hwmon/pull/95 Originally-from: David Flemstrom <david.flemstrom@gmail.com> Signed-off-by: Aleksa Savic <savicaleksa83@gmail.com> Link: https://lore.kernel.org/r/20240417175037.32499-2-savicaleksa83@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-04-30hwmon: Add EC Chip driver for Lenovo ThinkStation motherboardsDavid Ober3-0/+613
This addition adds in the ability for the system to scan the EC chip in the Lenovo ThinkStation systems to get the current fan RPM speeds the Maximum speed value for each fan also provides the CPU, DIMM other thermal statuses Signed-off-by: David Ober <dober6023@gmail.com> Link: https://lore.kernel.org/r/20240328121250.331146-1-dober6023@gmail.com [groeck: Dropped pointless case statements] [Colin King: Fixed spelling error accesssible -> accessible] Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-04-28hwmon: (pmbus/adm1275) add adm1281 supportJose Ramon San Buenaventura2-4/+7
Add support for adm1281 which is similar to adm1275 and other chips of the series. Signed-off-by: Jose Ramon San Buenaventura <jose.sanbuenaventura@analog.com> Link: https://lore.kernel.org/r/20240425070948.25788-3-jose.sanbuenaventura@analog.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-04-28hwmon: (coretemp) Extend the bitmask to read temperature to 0xffRicardo Neri1-1/+1
The Intel Software Development manual defines the temperature digital readout as the bits [22:16] of the IA32_[PACKAGE]_THERM_STATUS registers. Bit 23 is specified as reserved. In recent processors, however, the temperature digital readout uses bits [23:16]. In those processors, using the bitmask 0x7f would lead to incorrect readings if the temperature deviates from TjMax by more than 127 degrees Celsius. Although not guaranteed, bit 23 is likely to be 0 in processors from a few generations ago. The temperature reading would still be correct in those processors when using a 0xff bitmask. Model-specific provisions can be made for older processors in which bit 23 is not 0 should the need arise. Signed-off-by: Ricardo Neri <ricardo.neri-calderon@linux.intel.com> Link: https://lore.kernel.org/r/20240425171311.19519-4-ricardo.neri-calderon@linux.intel.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-04-28hwmon: (jc42) Remove I2C_CLASS_SPD supportHeiner Kallweit1-1/+1
Last host driver supporting I2C_CLASS_SPD was i801. Now that I2C_CLASS_SPD support has been removed there, we can remove it here too. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Link: https://lore.kernel.org/r/3c4a1715-bfbb-4ae2-b35f-2f20f95e4932@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-04-28hwmon: (aspeed-g6-pwm-tach) Convert to platform remove callback returning voidUwe Kleine-König1-4/+2
The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Eventually after all drivers are converted, .remove_new() is renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Reviewed-by: Andrew Jeffery <andrew@codeconstruct.com.au> Link: https://lore.kernel.org/r/20240409085552.19868-2-u.kleine-koenig@pengutronix.de Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-04-28hwmon: (pwm-fan) Make use of device propertiesAndy Shevchenko2-12/+11
Convert the module to be property provider agnostic and allow it to be used on non-OF platforms. Add mod_devicetable.h include. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Link: https://lore.kernel.org/r/20240404191323.3547465-3-andriy.shevchenko@linux.intel.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-04-28hwmon: (pwm-fan) Convert to use of_property_read_u32_array()Andy Shevchenko1-10/+18
This is a preparatory change to fulfill further conversion the driver to be OF-independent. The independent code has no analogue API that can read the value by index in the device property array. Suggested-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20240404191323.3547465-2-andriy.shevchenko@linux.intel.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-04-28hwmon: add HAS_IOPORT dependenciesNiklas Schnelle1-5/+20
In a future patch HAS_IOPORT=n will disable inb()/outb() and friends at compile time. We thus need to add HAS_IOPORT as dependency for those drivers using them. Acked-by: Guenter Roeck <linux@roeck-us.net> Co-developed-by: Arnd Bergmann <arnd@kernel.org> Signed-off-by: Arnd Bergmann <arnd@kernel.org> Signed-off-by: Niklas Schnelle <schnelle@linux.ibm.com> Link: https://lore.kernel.org/r/20240404124700.3807842-2-schnelle@linux.ibm.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-04-28hwmon: (pmbus/mp2975) Use i2c_get_match_data()Andy Shevchenko1-23/+33
Use preferred i2c_get_match_data() instead of of_device_get_match_data() to get the driver match data. With this, adjust the includes to explicitly include the correct headers. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20240325120952.3019767-4-andriy.shevchenko@linux.intel.com [groeck: Dropped __maybe_unused from mp2975_of_match] Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-04-28hwmon: (pmbus/mp2975) Constify local pointers to pmbus_driver_infoAndy Shevchenko1-2/+2
Constify the local variables pointing to "struct pmbus_driver_info" and other encoding params to annotate the function is not modifying pointed data. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20240325120952.3019767-3-andriy.shevchenko@linux.intel.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-04-28hwmon: (pmbus/mp2975) Replace home made version of __assign_bit()Andy Shevchenko1-16/+15
The newly introduced SWAP() macro is quite generic by naming, but moreover it's a repetition of the existing __assign_bit(). With this applied, add a missing bits.h (via now required bitops.h). Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20240325120952.3019767-2-andriy.shevchenko@linux.intel.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-04-28hwmon: (pmbus/adp1050) Don't use "proxy" headersAndy Shevchenko1-4/+2
Update header inclusions to follow IWYU (Include What You Use) principle. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20240325124156.3036266-1-andriy.shevchenko@linux.intel.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-04-28hwmon: (dell-smm) Add Dell Precision 7540 to fan control whitelistSeiji Nishikawa1-0/+8
Add Precision 7540 to the fan control whitelist, in addition to 7510. Signed-off-by: Seiji Nishikawa <snishika@redhat.com> Link: https://lore.kernel.org/r/20240325045913.385853-2-snishika@redhat.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-04-28hwmon: (pmbus) Add driver for ADP1050Radu Sabau3-0/+69
Add support for ADP1050 Digital Controller for Isolated Power Supplies with PMBus interface Voltage, Current and Temperature Monitor. The ADP1050 implements several features to enable a robust system of parallel and redundant operation for customers who require high availability. The device can measure voltage, current and temperature that can be used in different techniques to identify and safely shut down an erroneous power supply in parallel operation mode. Signed-off-by: Radu Sabau <radu.sabau@analog.com> Link: https://lore.kernel.org/r/20240321142201.10330-2-radu.sabau@analog.com [groeck: Fixed corrupted link in documentation] Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-04-28hwmon: (acpi_power_meter) Ensure IPMI space handler is ready on Dell systemsKai-Heng Feng1-0/+16
The following error can be observed at boot: [ 3.717920] ACPI Error: No handler for Region [SYSI] (00000000ab9e62c5) [IPMI] (20230628/evregion-130) [ 3.717928] ACPI Error: Region IPMI (ID=7) has no handler (20230628/exfldio-261) [ 3.717936] No Local Variables are initialized for Method [_GHL] [ 3.717938] No Arguments are initialized for method [_GHL] [ 3.717940] ACPI Error: Aborting method \_SB.PMI0._GHL due to previous error (AE_NOT_EXIST) (20230628/psparse-529) [ 3.717949] ACPI Error: Aborting method \_SB.PMI0._PMC due to previous error (AE_NOT_EXIST) (20230628/psparse-529) [ 3.717957] ACPI: \_SB_.PMI0: _PMC evaluation failed: AE_NOT_EXIST On Dell systems several methods of acpi_power_meter access variables in IPMI region [0], so wait until IPMI space handler is installed by acpi_ipmi and also wait until SMI is selected to make the space handler fully functional. Since the dependency is inside BIOS's ASL code and it's not discoverable, so use this fixup is a hack to workaround BIOS issue. [0] https://www.dell.com/support/manuals/en-us/redhat-enterprise-linux-v8.0/rhel8_rn_pub/advanced-configuration-and-power-interface-acpi-error-messages-displayed-in-dmesg?guid=guid-0d5ae482-1977-42cf-b417-3ed5c3f5ee62 Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com> Link: https://lore.kernel.org/r/20240320084317.366853-2-kai.heng.feng@canonical.com [groeck: Simplified added code] Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-04-28hwmon: (lm70) fix links in doc and commentsKousik Sanagavarapu1-2/+2
Update links in the documentation and in-code comments which point to the datasheet. The current links don't work because National Semiconductor (which is the original manufacturer of this chip) has been a part of Texas Instruments since 2011 and http://www.national.com/ doesn't work anymore. Fixes: e1a8e913f97e ("[PATCH] lm70: New hardware monitoring driver") Signed-off-by: Kousik Sanagavarapu <five231003@gmail.com> Link: https://lore.kernel.org/r/20240318154540.90613-3-five231003@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-04-28hwmon: (pmbus/mp2975) Fix IRQ maskingPatrick Rudolph1-0/+77
The MP2971/MP2973 use a custom 16bit register format for SMBALERT_MASK which doesn't follow the PMBUS specification. Map the PMBUS defined bits used by the common code onto the custom format used by MPS and since the SMBALERT_MASK is currently never read by common code only implement the mapping for write transactions. Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com> Signed-off-by: Naresh Solanki <naresh.solanki@9elements.com> Link: https://lore.kernel.org/r/20240318174406.3782306-1-naresh.solanki@9elements.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-04-28hwmon: (dell-smm) Add Dell G5 5505 to DMI tableTobias Jakobi1-0/+7
Enables reading the speed of the CPU and GPU fan on the G5. Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de> Reviewed-by: Armin Wolf <W_Armin@gmx.de> Link: https://lore.kernel.org/r/20240310220710.896230-1-tjakobi@math.uni-bielefeld.de Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-03-15Merge tag 'mm-nonmm-stable-2024-03-14-09-36' of ↵Linus Torvalds2-2/+2
git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm Pull non-MM updates from Andrew Morton: - Kuan-Wei Chiu has developed the well-named series "lib min_heap: Min heap optimizations". - Kuan-Wei Chiu has also sped up the library sorting code in the series "lib/sort: Optimize the number of swaps and comparisons". - Alexey Gladkov has added the ability for code running within an IPC namespace to alter its IPC and MQ limits. The series is "Allow to change ipc/mq sysctls inside ipc namespace". - Geert Uytterhoeven has contributed some dhrystone maintenance work in the series "lib: dhry: miscellaneous cleanups". - Ryusuke Konishi continues nilfs2 maintenance work in the series "nilfs2: eliminate kmap and kmap_atomic calls" "nilfs2: fix kernel bug at submit_bh_wbc()" - Nathan Chancellor has updated our build tools requirements in the series "Bump the minimum supported version of LLVM to 13.0.1". - Muhammad Usama Anjum continues with the selftests maintenance work in the series "selftests/mm: Improve run_vmtests.sh". - Oleg Nesterov has done some maintenance work against the signal code in the series "get_signal: minor cleanups and fix". Plus the usual shower of singleton patches in various parts of the tree. Please see the individual changelogs for details. * tag 'mm-nonmm-stable-2024-03-14-09-36' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm: (77 commits) nilfs2: prevent kernel bug at submit_bh_wbc() nilfs2: fix failure to detect DAT corruption in btree and direct mappings ocfs2: enable ocfs2_listxattr for special files ocfs2: remove SLAB_MEM_SPREAD flag usage assoc_array: fix the return value in assoc_array_insert_mid_shortcut() buildid: use kmap_local_page() watchdog/core: remove sysctl handlers from public header nilfs2: use div64_ul() instead of do_div() mul_u64_u64_div_u64: increase precision by conditionally swapping a and b kexec: copy only happens before uchunk goes to zero get_signal: don't initialize ksig->info if SIGNAL_GROUP_EXIT/group_exec_task get_signal: hide_si_addr_tag_bits: fix the usage of uninitialized ksig get_signal: don't abuse ksig->info.si_signo and ksig->sig const_structs.checkpatch: add device_type Normalise "name (ad@dr)" MODULE_AUTHORs to "name <ad@dr>" dyndbg: replace kstrdup() + strchr() with kstrdup_and_replace() list: leverage list_is_head() for list_entry_is_head() nilfs2: MAINTAINERS: drop unreachable project mirror site smp: make __smp_processor_id() 0-argument macro fat: fix uninitialized field in nostale filehandles ...
2024-03-14Merge tag 'platform-drivers-x86-v6.9-1' of ↵Linus Torvalds1-0/+1
git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86 Pull x86 platform driver updates from Ilpo Järvinen: - New acer-wmi HW support - Support for new revision of amd/pmf heartbeat notify - Correctly handle asus-wmi HW without LEDs - fujitsu-laptop battery charge control support - Support for new hp-wmi thermal profiles - Support ideapad-laptop refresh rate key - Put intel/pmc AI accelerator (GNA) into D3 if it has no driver to allow entry into low-power modes, and temporarily removed Lunar Lake SSRAM support due to breaking FW changes causing probe fail (further breaking FW changes are still pending) - Report pmc/punit_atom devices that prevent reacing low power levels - Surface Fan speed function support - Support for more sperial keys and complete the list of models with non-standard fan registers in thinkpad_acpi - New DMI touchscreen HW support - Continued modernization efforts of wmi - Removal of obsoleted ledtrig-audio call and the related dependency - Debug & metrics interface improvements - Miscellaneous cleanups / fixes / improvements * tag 'platform-drivers-x86-v6.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86: (87 commits) platform/x86/intel/pmc: Improve PKGC residency counters debug platform/x86: asus-wmi: Consider device is absent when the read is ~0 Documentation/x86/amd/hsmp: Updating urls platform/mellanox: mlxreg-hotplug: Remove redundant NULL-check platform/x86/amd/pmf: Update sps power thermals according to the platform-profiles platform/x86/amd/pmf: Add support to get sps default APTS index values platform/x86/amd/pmf: Add support to get APTS index numbers for static slider platform/x86/amd/pmf: Add support to notify sbios heart beat event platform/x86/amd/pmf: Add support to get sbios requests in PMF driver platform/x86/amd/pmf: Disable debugfs support for querying power thermals platform/x86/amd/pmf: Differentiate PMF ACPI versions x86/platform/atom: Check state of Punit managed devices on s2idle platform/x86: pmc_atom: Check state of PMC clocks on s2idle platform/x86: pmc_atom: Check state of PMC managed devices on s2idle platform/x86: pmc_atom: Annotate d3_sts register bit defines clk: x86: Move clk-pmc-atom register defines to include/linux/platform_data/x86/pmc_atom.h platform/x86: make fw_attr_class constant platform/x86/intel/tpmi: Change vsec offset to u64 platform/x86: intel_scu_pcidrv: Remove unused intel-mid.h platform/x86: intel_scu_wdt: Remove unused intel-mid.h ...
2024-03-13Merge tag 'hwmon-for-v6.9' of ↵Linus Torvalds52-178/+5978
git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging Pull hwmon updates from Guenter Roeck: "New drivers: - Amphenol ChipCap 2 - ASPEED g6 PWM/Fan tach - Astera Labs PT5161L retimer - ASUS ROG RYUJIN II 360 AIO cooler - LTC4282 - Microsoft Surface devices - MPS MPQ8785 Synchronous Step-Down Converter - NZXT Kraken X and Z series AIO CPU coolers Additional chip support in existing drivers: - Ayaneo Air Plus 7320u (oxp-sensors) - INA260 (ina2xx) - XPS 9315 (dell-smm) - MSI customer ID (nct6683) Devicetree bindings updates: - Common schema for hardware monitoring devices - Common schema for fans - Update chip descriptions to use common schema - Document regulator properties in several drivers - Explicit bindings for infineon buck converters Other improvements: - Replaced rbtree with maple tree register cache in several drivers - Added support for humidity min/max alarm and volatage fault attributes to hwmon core - Dropped non-functional I2C_CLASS_HWMON support for drivers w/o detect() - Dropped obsolete and redundant entried from MAINTAINERS - Cleaned up axi-fan-control and coretemp drivers - Minor fixes and improvements in several other drivers" * tag 'hwmon-for-v6.9' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: (70 commits) hwmon: (dell-smm) Add XPS 9315 to fan control whitelist hwmon: (aspeed-g6-pwm-tacho): Support for ASPEED g6 PWM/Fan tach dt-bindings: hwmon: Support Aspeed g6 PWM TACH Control dt-bindings: hwmon: fan: Add fan binding to schema dt-bindings: hwmon: tda38640: Add interrupt & regulator properties hwmon: (amc6821) add of_match table dt-bindings: hwmon: lm75: use common hwmon schema hwmon: (sis5595) drop unused DIV_TO_REG function dt-bindings: hwmon: reference common hwmon schema dt-bindings: hwmon: lltc,ltc4286: use common hwmon schema dt-bindings: hwmon: adi,adm1275: use common hwmon schema dt-bindings: hwmon: ti,ina2xx: use common hwmon schema dt-bindings: hwmon: add common properties hwmon: (pmbus/ir38064) Use PMBUS_REGULATOR_ONE to declare regulator hwmon: (pmbus/lm25066) Use PMBUS_REGULATOR_ONE to declare regulator hwmon: (pmbus/tda38640) Use PMBUS_REGULATOR_ONE to declare regulator regulator: dt-bindings: promote infineon buck converters to their own binding dt-bindings: hwmon/pmbus: ti,lm25066: document regulators dt-bindings: hwmon: nuvoton,nct6775: Add compatible value for NCT6799 MAINTAINERS: Drop redundant hwmon entries ...
2024-03-12platform/x86: wmi: Do not instantiate older WMI drivers multiple timesArmin Wolf1-0/+1
Many older WMI drivers cannot be instantiated multiple times for two reasons: - they are using the legacy GUID-based WMI API - they are singletons (with global state) Prevent such WMI drivers from binding to WMI devices with a duplicated GUID, as this would mean that the WMI driver will be instantiated at least two times (one for the original GUID and one for the duplicated GUID). WMI drivers which can be instantiated multiple times can signal this by setting a flag inside struct wmi_driver. Tested on a ASUS Prime B650-Plus. Signed-off-by: Armin Wolf <W_Armin@gmx.de> Link: https://lore.kernel.org/r/20240226193557.2888-2-W_Armin@gmx.de Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
2024-03-12Merge tag 'x86-apic-2024-03-10' of ↵Linus Torvalds2-2/+2
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 APIC updates from Thomas Gleixner: "Rework of APIC enumeration and topology evaluation. The current implementation has a couple of shortcomings: - It fails to handle hybrid systems correctly. - The APIC registration code which handles CPU number assignents is in the middle of the APIC code and detached from the topology evaluation. - The various mechanisms which enumerate APICs, ACPI, MPPARSE and guest specific ones, tweak global variables as they see fit or in case of XENPV just hack around the generic mechanisms completely. - The CPUID topology evaluation code is sprinkled all over the vendor code and reevaluates global variables on every hotplug operation. - There is no way to analyze topology on the boot CPU before bringing up the APs. This causes problems for infrastructure like PERF which needs to size certain aspects upfront or could be simplified if that would be possible. - The APIC admission and CPU number association logic is incomprehensible and overly complex and needs to be kept around after boot instead of completing this right after the APIC enumeration. This update addresses these shortcomings with the following changes: - Rework the CPUID evaluation code so it is common for all vendors and provides information about the APIC ID segments in a uniform way independent of the number of segments (Thread, Core, Module, ..., Die, Package) so that this information can be computed instead of rewriting global variables of dubious value over and over. - A few cleanups and simplifcations of the APIC, IO/APIC and related interfaces to prepare for the topology evaluation changes. - Seperation of the parser stages so the early evaluation which tries to find the APIC address can be seperately overridden from the late evaluation which enumerates and registers the local APIC as further preparation for sanitizing the topology evaluation. - A new registration and admission logic which - encapsulates the inner workings so that parsers and guest logic cannot longer fiddle in it - uses the APIC ID segments to build topology bitmaps at registration time - provides a sane admission logic - allows to detect the crash kernel case, where CPU0 does not run on the real BSP, automatically. This is required to prevent sending INIT/SIPI sequences to the real BSP which would reset the whole machine. This was so far handled by a tedious command line parameter, which does not even work in nested crash scenarios. - Associates CPU number after the enumeration completed and prevents the late registration of APICs, which was somehow tolerated before. - Converting all parsers and guest enumeration mechanisms over to the new interfaces. This allows to get rid of all global variable tweaking from the parsers and enumeration mechanisms and sanitizes the XEN[PV] handling so it can use CPUID evaluation for the first time. - Mopping up existing sins by taking the information from the APIC ID segment bitmaps. This evaluates hybrid systems correctly on the boot CPU and allows for cleanups and fixes in the related drivers, e.g. PERF. The series has been extensively tested and the minimal late fallout due to a broken ACPI/MADT table has been addressed by tightening the admission logic further" * tag 'x86-apic-2024-03-10' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (76 commits) x86/topology: Ignore non-present APIC IDs in a present package x86/apic: Build the x86 topology enumeration functions on UP APIC builds too smp: Provide 'setup_max_cpus' definition on UP too smp: Avoid 'setup_max_cpus' namespace collision/shadowing x86/bugs: Use fixed addressing for VERW operand x86/cpu/topology: Get rid of cpuinfo::x86_max_cores x86/cpu/topology: Provide __num_[cores|threads]_per_package x86/cpu/topology: Rename topology_max_die_per_package() x86/cpu/topology: Rename smp_num_siblings x86/cpu/topology: Retrieve cores per package from topology bitmaps x86/cpu/topology: Use topology logical mapping mechanism x86/cpu/topology: Provide logical pkg/die mapping x86/cpu/topology: Simplify cpu_mark_primary_thread() x86/cpu/topology: Mop up primary thread mask handling x86/cpu/topology: Use topology bitmaps for sizing x86/cpu/topology: Let XEN/PV use topology from CPUID/MADT x86/xen/smp_pv: Count number of vCPUs early x86/cpu/topology: Assign hotpluggable CPUIDs during init x86/cpu/topology: Reject unknown APIC IDs on ACPI hotplug x86/topology: Add a mechanism to track topology via APIC IDs ...
2024-03-10hwmon: (dell-smm) Add XPS 9315 to fan control whitelistArmin Wolf1-0/+13
A user reported that on this machine, disabling BIOS fan control is necessary in order to change the fan speed. Signed-off-by: Armin Wolf <W_Armin@gmx.de> Acked-by: Pali Rohár <pali@kernel.org> Link: https://lore.kernel.org/r/20240309212025.13758-1-W_Armin@gmx.de Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-03-07hwmon: (aspeed-g6-pwm-tacho): Support for ASPEED g6 PWM/Fan tachBilly Tsai3-0/+561
The driver support two functions: PWM and Tachometer. The PWM feature can handle up to 16 output ports, while the Tachometer can monitor to up to 16 input ports as well. This driver implements them by exposing two kernel subsystems: PWM and HWMON. The PWM subsystem can be utilized alongside existing drivers for controlling elements such as fans (pwm-fan.c), beepers (pwm-beeper.c) and so on. Through the HWMON subsystem, the driver provides sysfs interfaces for fan. Signed-off-by: Billy Tsai <billy_tsai@aspeedtech.com> Link: https://lore.kernel.org/r/20240221104025.1306227-4-billy_tsai@aspeedtech.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-03-07hwmon: (amc6821) add of_match tableJosua Mayer1-0/+11
Add of_match table for "ti,amc6821" compatible string. This fixes automatic driver loading by userspace when using device-tree, and if built as a module like major linux distributions do. While devices probe just fine with i2c_device_id table, userspace can't match the "ti,amc6821" compatible string from dt with the plain "amc6821" device id. As a result, the kernel module can not be loaded. Cc: stable@vger.kernel.org Signed-off-by: Josua Mayer <josua@solid-run.com> Link: https://lore.kernel.org/r/20240307-amc6821-of-match-v1-1-5f40464a3110@solid-run.com [groeck: Cleaned up patch description] Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-03-07Normalise "name (ad@dr)" MODULE_AUTHORs to "name <ad@dr>"Ahelenia Ziemiańska2-2/+2
Found with git grep 'MODULE_AUTHOR(".*([^)]*@' Fixed with sed -i '/MODULE_AUTHOR(".*([^)]*@/{s/ (/ </g;s/)"/>"/;s/)and/> and/}' \ $(git grep -l 'MODULE_AUTHOR(".*([^)]*@') Also: in drivers/media/usb/siano/smsusb.c normalise ", INC" to ", Inc"; this is what every other MODULE_AUTHOR for this company says, and it's what the header says in drivers/sbus/char/openprom.c normalise a double-spaced separator; this is clearly copied from the copyright header, where the names are aligned on consecutive lines thusly: * Linux/SPARC PROM Configuration Driver * Copyright (C) 1996 Thomas K. Dyas (tdyas@noc.rutgers.edu) * Copyright (C) 1996 Eddie C. Dost (ecd@skynet.be) but the authorship branding is single-line Link: https://lkml.kernel.org/r/mk3geln4azm5binjjlfsgjepow4o73domjv6ajybws3tz22vb3@tarta.nabijaczleweli.xyz Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Cc: Joe Perches <joe@perches.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2024-02-25hwmon: (sis5595) drop unused DIV_TO_REG functionKrzysztof Kozlowski1-6/+2
'DIV_TO_REG' function is not used: sis5595.c:159:18: error: unused function 'DIV_TO_REG' [-Werror,-Wunused-function] Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20240225202841.60740-1-krzysztof.kozlowski@linaro.org Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-02-25hwmon: (pmbus/ir38064) Use PMBUS_REGULATOR_ONE to declare regulatorGuenter Roeck1-1/+1
If a chip only provides a single regulator, it should be named 'vout' and not 'vout0'. Declare regulator using PMBUS_REGULATOR_ONE() to make that happen. Cc: Conor Dooley <conor@kernel.org> Cc: Naresh Solanki <naresh.solanki@9elements.com> Cc: Patrick Rudolph <patrick.rudolph@9elements.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Conor Dooley <conor.dooley@microchip.com> Link: https://lore.kernel.org/r/20240223-harmless-covenant-9cd3d4f1cfd2@spud Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-02-25hwmon: (pmbus/lm25066) Use PMBUS_REGULATOR_ONE to declare regulatorGuenter Roeck1-1/+1
If a chip only provides a single regulator, it should be named 'vout' and not 'vout0'. Declare regulator using PMBUS_REGULATOR_ONE() to make that happen. Cc: Conor Dooley <conor@kernel.org> Cc: Naresh Solanki <naresh.solanki@9elements.com> Cc: Zev Weiss <zev@bewilderbeest.net> Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Conor Dooley <conor.dooley@microchip.com> Link: https://lore.kernel.org/r/20240223-player-buckskin-01405c5889c4@spud Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-02-25hwmon: (pmbus/tda38640) Use PMBUS_REGULATOR_ONE to declare regulatorGuenter Roeck1-1/+1
If a chip only provides a single regulator, it should be named 'vout' and not 'vout0'. Declare regulator using PMBUS_REGULATOR_ONE() to make that happen. Cc: Conor Dooley <conor@kernel.org> Cc: Naresh Solanki <naresh.solanki@9elements.com> Cc: Patrick Rudolph <patrick.rudolph@9elements.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Conor Dooley <conor.dooley@microchip.com> Link: https://lore.kernel.org/r/20240223-catnap-companion-c42fdd8ad110@spud Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-02-25hwmon: (axi-fan-control) Make use of dev_err_probe()Nuno Sa1-22/+18
Use dev_err_probe() to slightly simplify printing errors during probe. No functional changes intended. Signed-off-by: Nuno Sa <nuno.sa@analog.com> Link: https://lore.kernel.org/r/20240214-axi-fan-control-no-of-v1-3-43ca656fe2e3@analog.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-02-25hwmon: (axi-fan-control) Make use of sysfs_emit()Nuno Sa1-1/+1
Use sysfs_emit() instead of directly call sprintf(). Signed-off-by: Nuno Sa <nuno.sa@analog.com> Link: https://lore.kernel.org/r/20240214-axi-fan-control-no-of-v1-2-43ca656fe2e3@analog.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-02-25hwmon: (axi-fan-control) Use device firmware agnostic APINuno Sa1-19/+20
Don't directly use OF and use device property APIs. In addition, this makes the probe() code neater and also allow us to move the of_device_id table to it's natural place. While at it, make sure to explicitly include mod_devicetable.h for the of_device_id table. Signed-off-by: Nuno Sa <nuno.sa@analog.com> Link: https://lore.kernel.org/r/20240214-axi-fan-control-no-of-v1-1-43ca656fe2e3@analog.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-02-25hwmon: (oxp-sensors) Add support for Ayaneo Air Plus 7320u.Sebastian Kranz1-0/+10
Add support for handheld AYANEO AIR Plus with the same EC registers to add proper fan control. Functionality was tested successfully. Signed-off-by: Sebastian Kranz <tklightforce@googlemail.com> Link: https://lore.kernel.org/r/20240209090157.3232-1-tklightforce@googlemail.com [groeck: Fixed up commit message] Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-02-25hwmon: (chipcap2) fix return path in cc2_request_alarm_irqs()Javier Carrasco1-5/+9
The return path can be improved by returning upon first failure. The current implementation would try to register the second interrupt even if the first one failed, which is unnecessary. Moreover, if no irqs are available, the return value should be zero (the driver supports the use case with no interrupts). Currently the initial value is unassigned and that may lead to returning an unknown value if stack variables are not automatically set to zero and no irqs were provided. Reported-by: Dan Carpenter <dan.carpenter@linaro.org> Closes: https://lore.kernel.org/linux-hwmon/294e4634-89d4-415e-a723-b208d8770d7c@gmail.com/T/#t Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com> Link: https://lore.kernel.org/r/20240207-chipcap2_init_vars-v1-2-08cafe43e20e@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-02-25hwmon: (chipcap2) fix uninitialized variable in cc2_get_reg_val()Javier Carrasco1-1/+3
The reg_val variable in cc2_get_reg_val() might be used without a known value if cc2_read_reg() fails. That leads to a useless data conversion because the returned error means the read operation failed and the data is not relevant. That makes its initial value irrelevant as well, so skip the data conversion instead. If no error happens, a value is assigned to reg_val and the data conversion is required. Reported-by: Dan Carpenter <dan.carpenter@linaro.org> Closes: https://lore.kernel.org/linux-hwmon/294e4634-89d4-415e-a723-b208d8770d7c@gmail.com/T/#t Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com> Link: https://lore.kernel.org/r/20240207-chipcap2_init_vars-v1-1-08cafe43e20e@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-02-25hwmon: Add driver for Astera Labs PT5161L retimerCosmo Chou3-0/+678
This driver implements support for temperature monitoring of Astera Labs PT5161L series PCIe retimer chips. This driver implementation originates from the CSDK available at Link: https://github.com/facebook/openbmc/tree/helium/common/recipes-lib/retimer-v2.14 The communication protocol utilized is based on the I2C/SMBus standard. Signed-off-by: Cosmo Chou <chou.cosmo@gmail.com> Link: https://lore.kernel.org/r/20240206125420.3884300-2-chou.cosmo@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-02-25hwmon: (coretemp) Use dynamic allocated memory for core temp_dataZhang Rui1-3/+21
The total memory needed for saving per core temperature data depends on the number of cores in a package. Using static allocated memory wastes memories on systems with low per package core count. Improve the code to use dynamic allocated memory so that it can be improved further when per package core count information becomes available. No functional change intended. Signed-off-by: Zhang Rui <rui.zhang@intel.com> Link: https://lore.kernel.org/r/20240202092144.71180-12-rui.zhang@intel.com [groeck: Fixed continuation line alignment] Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-02-25hwmon: (coretemp) Remove redundant temp_data->is_pkg_dataZhang Rui1-8/+11
temp_data->index saves the index in pdata->core_data[]. It is not used by package temp_data. Use temp_data->index as the indicator of package temp_data and remove redundant temp_data->is_pkg_data. No functional change. Signed-off-by: Zhang Rui <rui.zhang@intel.com> Link: https://lore.kernel.org/r/20240202092144.71180-11-rui.zhang@intel.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>