- 02 Jan, 2024 7 commits
-
-
Uwe Kleine-König authored
pdev is a bad name for a global variable. Still more as the driver has functions where pdev is a local variable. Rename it to smsc47m1_pdev. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Link: https://lore.kernel.org/r/68a959b56da7f9452557d08c72249182364b0dd0.1701957841.git.u.kleine-koenig@pengutronix.deSigned-off-by: Guenter Roeck <linux@roeck-us.net>
-
Uwe Kleine-König authored
Use platform_device_register_full() instead of open coding this function. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Link: https://lore.kernel.org/r/ab326fb9b1ad2191583b4cb3a8bd624dfedb908e.1701957841.git.u.kleine-koenig@pengutronix.de [groeck: Removed double empty line] Signed-off-by: Guenter Roeck <linux@roeck-us.net>
-
Uwe Kleine-König authored
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() will be 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> Link: https://lore.kernel.org/r/a732270539ef63094a32d0ff582f78e640caf3e4.1701957841.git.u.kleine-koenig@pengutronix.deSigned-off-by: Guenter Roeck <linux@roeck-us.net>
-
Uwe Kleine-König authored
As described in the added code comment, a reference to .exit.text is ok for drivers registered via module_platform_driver_probe(). Make this explicit to prevent the following section mismatch warning WARNING: modpost: drivers/hwmon/smsc47m1: section mismatch in reference: smsc47m1_driver+0x8 (section: .data) -> smsc47m1_remove (section: .exit.text) that triggers on an allmodconfig W=1 build. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Link: https://lore.kernel.org/r/57977a88a9b99b6555b227aa4994ac3df10c6490.1701957840.git.u.kleine-koenig@pengutronix.deSigned-off-by: Guenter Roeck <linux@roeck-us.net>
-
Serge Semin authored
Add myself as a maintainer of the Baikal-T1 PVT sensors driver. Signed-off-by: Serge Semin <Sergey.Semin@baikalelectronics.ru> Link: https://lore.kernel.org/r/20231122170506.27267-2-Sergey.Semin@baikalelectronics.ruSigned-off-by: Guenter Roeck <linux@roeck-us.net>
-
Stefan Gloor authored
Add information regarding the existing support for sts3x series and update the datasheet links. Signed-off-by: Stefan Gloor <code@stefan-gloor.ch> Link: https://lore.kernel.org/r/20231204165004.8491-2-code@stefan-gloor.chSigned-off-by: Guenter Roeck <linux@roeck-us.net>
-
Delphine CC Chiu authored
Add a driver to support ltc4286 chip Signed-off-by: Delphine CC Chiu <Delphine_CC_Chiu@Wiwynn.com> Link: https://lore.kernel.org/r/20231123015440.199822-3-Delphine_CC_Chiu@Wiwynn.com [groeck: Fixed formatting] Signed-off-by: Guenter Roeck <linux@roeck-us.net>
-
- 12 Dec, 2023 1 commit
-
-
Delphine CC Chiu authored
Add a device tree bindings for ltc4286 device. Signed-off-by: Delphine CC Chiu <Delphine_CC_Chiu@Wiwynn.com> Reviewed-by: Conor Dooley <conor.dooley@microchip.com> Link: https://lore.kernel.org/r/20231123015440.199822-2-Delphine_CC_Chiu@Wiwynn.com [groeck: Fixed path to ltc4286.rst] Signed-off-by: Guenter Roeck <linux@roeck-us.net>
-
- 11 Dec, 2023 32 commits
-
-
Daniel Matyas authored
Added custom channel-specific (temp1) attribute for resolution. The wait time for a conversion in one-shot mode (enable = 0) depends on the resolution. When resolution is 12-bit, the conversion time is 140ms, but the minimum update_interval is 125ms. Handled this problem by waiting an additional 15ms (125ms + 15ms = 140ms). Added 'mask' parameter to the shutdown_write() function. Now it can either write or update bits, depending on the value of mask. This is needed, because for alarms a write is necessary, but for resolution only the resolution bits should be updated. Signed-off-by: Daniel Matyas <daniel.matyas@analog.com> Link: https://lore.kernel.org/r/20231031182158.124608-5-daniel.matyas@analog.comSigned-off-by: Guenter Roeck <linux@roeck-us.net>
-
Daniel Matyas authored
When user writes a value to update_interval which does not match the possible values, instead of returning invalid error, return the closest value. Signed-off-by: Daniel Matyas <daniel.matyas@analog.com> Link: https://lore.kernel.org/r/20231031182158.124608-4-daniel.matyas@analog.comSigned-off-by: Guenter Roeck <linux@roeck-us.net>
-
Daniel Matyas authored
Added 'mask' parameter to the shutdown_write() function. Now it can either write or update bits, depending on the value of mask. This is needed, because for alarms a write is necessary, but for resolution only the resolution bits should be updated. Signed-off-by: Daniel Matyas <daniel.matyas@analog.com> Link: https://lore.kernel.org/r/20231031182158.124608-3-daniel.matyas@analog.comSigned-off-by: Guenter Roeck <linux@roeck-us.net>
-
Daniel Matyas authored
Created of_match_table and id_table entries for max31828 and max31829. When adi,flt-q and/or adi,alrm-pol are not mentioned, the default configuration is loaded based on the type of the chip. Signed-off-by: Daniel Matyas <daniel.matyas@analog.com> Link: https://lore.kernel.org/r/20231031182158.124608-2-daniel.matyas@analog.comSigned-off-by: Guenter Roeck <linux@roeck-us.net>
-
Daniel Matyas authored
Used fwnode to retrieve data from the devicetree in the init_client function. If the uint32 properties are not present, the default values are used for max31827 chip. Signed-off-by: Daniel Matyas <daniel.matyas@analog.com> Link: https://lore.kernel.org/r/20231031182158.124608-1-daniel.matyas@analog.comSigned-off-by: Guenter Roeck <linux@roeck-us.net>
-
Marius Zachmann authored
Replaces the integer 0 with NULL. Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202312100455.k6m2eO4N-lkp@intel.com/Signed-off-by: Marius Zachmann <mail@mariuszachmann.de> Link: https://lore.kernel.org/r/20231210220357.77036-1-mail@mariuszachmann.deSigned-off-by: Guenter Roeck <linux@roeck-us.net>
-
Michal Simek authored
The Analog Monitoring System (AMS) defines 51 channels (Documentation/devicetree/bindings/iio/adc/xlnx,zynqmp-ams.yaml) that's why increase number to 51. Signed-off-by: Michal Simek <michal.simek@amd.com> Acked-by: Conor Dooley <conor.dooley@microchip.com> Link: https://lore.kernel.org/r/5110a313a5ce52ce6d7b5cb6b08368d42063dc30.1701419691.git.michal.simek@amd.comSigned-off-by: Guenter Roeck <linux@roeck-us.net>
-
Armin Wolf authored
A user reported that on this machine, disabling BIOS fan control is necessary in order to change the fan speed. Tested-by: <serverror@serverror.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Pali Rohár <pali@kernel.org> Signed-off-by: Armin Wolf <W_Armin@gmx.de> Link: https://lore.kernel.org/r/20231123004820.50635-10-W_Armin@gmx.deSigned-off-by: Guenter Roeck <linux@roeck-us.net>
-
Armin Wolf authored
Document the WMI SMM interface so that future developers can better understand how it works. Signed-off-by: Armin Wolf <W_Armin@gmx.de> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Pali Rohár <pali@kernel.org> Link: https://lore.kernel.org/r/20231123004820.50635-9-W_Armin@gmx.deSigned-off-by: Guenter Roeck <linux@roeck-us.net>
-
Armin Wolf authored
Some Dell machines like the Dell Optiplex 7000 do not support the legacy SMM interface, but instead expect all SMM calls to be issued over a special WMI interface. Add support for this interface so users can control the fans on those machines. Tested-by: <serverror@serverror.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Pali Rohár <pali@kernel.org> Signed-off-by: Armin Wolf <W_Armin@gmx.de> Link: https://lore.kernel.org/r/20231123004820.50635-8-W_Armin@gmx.deSigned-off-by: Guenter Roeck <linux@roeck-us.net>
-
Armin Wolf authored
In the future, multiple SMM calling backends will exist, with each backend being required to initialize its data. Introduce a helper function for this so the code necessary to initialize dell_smm_data is not duplicated between different backends. Tested-by: <serverror@serverror.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Pali Rohár <pali@kernel.org> Signed-off-by: Armin Wolf <W_Armin@gmx.de> Link: https://lore.kernel.org/r/20231123004820.50635-7-W_Armin@gmx.deSigned-off-by: Guenter Roeck <linux@roeck-us.net>
-
Armin Wolf authored
Currently, i8k_dmi_table contains both entries used for DMI matching and entries used to override config options. This does not allow for differentiating between "its safe to issue raw SMM calls on this machine" and "its not safe to issue raw SMM calls on this machine, but here are some config values". Since future SMM backends will need to differentiate between those two cases, move those config entries into a separate table. i8k_dmi_table now serves as a general "its safe to issue raw SMM calls" table. Tested-by: <serverror@serverror.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Pali Rohár <pali@kernel.org> Signed-off-by: Armin Wolf <W_Armin@gmx.de> Link: https://lore.kernel.org/r/20231123004820.50635-6-W_Armin@gmx.deSigned-off-by: Guenter Roeck <linux@roeck-us.net>
-
Armin Wolf authored
Future SMM calling backends will not be able to probe during module init, meaning the DMI tables holding config data would have to drop their __initconst attribute. Prevent this by moving the config handling to module init. Tested-by: <serverror@serverror.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Pali Rohár <pali@kernel.org> Signed-off-by: Armin Wolf <W_Armin@gmx.de> Link: https://lore.kernel.org/r/20231123004820.50635-5-W_Armin@gmx.deSigned-off-by: Guenter Roeck <linux@roeck-us.net>
-
Armin Wolf authored
Future SMM calling backends will not be able to probe during module init, meaning the DMI tables used for whitelisting features would have to drop their __initconst attribute. Prevent this by moving the whitelist handling to module init. Tested-by: <serverror@serverror.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Pali Rohár <pali@kernel.org> Signed-off-by: Armin Wolf <W_Armin@gmx.de> Link: https://lore.kernel.org/r/20231123004820.50635-4-W_Armin@gmx.deSigned-off-by: Guenter Roeck <linux@roeck-us.net>
-
Armin Wolf authored
Future SMM calling backends will not be able to probe during module init, meaning the DMI tables used for backlisting broken features would have to drop their __initconst attribute. Prevent this by moving the blacklist handling to module init. Tested-by: <serverror@serverror.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Pali Rohár <pali@kernel.org> Signed-off-by: Armin Wolf <W_Armin@gmx.de> Link: https://lore.kernel.org/r/20231123004820.50635-3-W_Armin@gmx.deSigned-off-by: Guenter Roeck <linux@roeck-us.net>
-
Armin Wolf authored
Modern Dell machines support multiple ways to issue an SMM call. Prepare support for those by introducing dell_smm_ops, which is used by dell_smm_call() to perform a SMM call. Each SMM backend needs to provide a dell_smm_ops structure. Tested-by: <serverror@serverror.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Pali Rohár <pali@kernel.org> Signed-off-by: Armin Wolf <W_Armin@gmx.de> Link: https://lore.kernel.org/r/20231123004820.50635-2-W_Armin@gmx.deSigned-off-by: Guenter Roeck <linux@roeck-us.net>
-
James Seo authored
The EliteDesk 800 G6 stores a raw WMI string within the ACPI object in its BIOS corresponding to one instance of HPBIOS_PlatformEvents.Name. This is evidently a valid way of representing a WMI data item as far as the Microsoft ACPI-WMI mapper is concerned, but is preventing the driver from loading. This seems quite rare, but add support for such strings. Treating this as a quirk pretty much means adding that support anyway. Also clean up an oversight in update_numeric_sensor_from_wobj() in which the result of hp_wmi_strdup() was being used without error checking. Reported-by: Lukasz Stelmach <l.stelmach@samsung.com> Closes: https://lore.kernel.org/linux-hwmon/7850a0bd-60e7-88f8-1d6c-0bb0e3234fdc@roeck-us.net/Tested-by: Lukasz Stelmach <l.stelmach@samsung.com> Signed-off-by: James Seo <james@equiv.tech> Link: https://lore.kernel.org/r/20231123054918.157098-1-james@equiv.techSigned-off-by: Guenter Roeck <linux@roeck-us.net>
-
Andy Shevchenko authored
MILLI and MICRO may be used in the driver to make code more robust against possible miscalculations. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20231128180654.395692-4-andriy.shevchenko@linux.intel.comSigned-off-by: Guenter Roeck <linux@roeck-us.net>
-
Andy Shevchenko authored
Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and also it prints the error value. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20231128180654.395692-3-andriy.shevchenko@linux.intel.com [groeck: Fixed excessive line length] Signed-off-by: Guenter Roeck <linux@roeck-us.net>
-
Andy Shevchenko authored
The driver uses math.h and not util_macros.h. All the same for the kernel.h, replace it with what the driver is using. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20231128180654.395692-2-andriy.shevchenko@linux.intel.comSigned-off-by: Guenter Roeck <linux@roeck-us.net>
-
Patrick Rudolph authored
The PECI CPU sensors are available as soon as the CPU is powered, however the PECI DIMM sensors are available after DRAM has been trained and thresholds have been written by host firmware. The default timeout of 30 seconds isn't enough for modern multisocket platforms utilizing DDR5 memory to bring up the memory and enable PECI sensor data. Bump the default timeout to 10 minutes in case the system starts without cached DDR5 training data. Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com> Link: https://lore.kernel.org/r/20231130090422.2535542-1-patrick.rudolph@9elements.com [groeck: List affected driver in patch subject] Signed-off-by: Guenter Roeck <linux@roeck-us.net>
-
Kees Cook authored
Without visibility into the initializers for data->innr, GCC suspects using it as an index could walk off the end of the various 14-element arrays in data. Perform an explicit clamp to the array size. Silences the following warning with GCC 12+: ../drivers/hwmon/pc87360.c: In function 'pc87360_update_device': ../drivers/hwmon/pc87360.c:341:49: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=] 341 | data->in_max[i] = pc87360_read_value(data, | ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~ 342 | LD_IN, i, | ~~~~~~~~~ 343 | PC87365_REG_IN_MAX); | ~~~~~~~~~~~~~~~~~~~ ../drivers/hwmon/pc87360.c:209:12: note: at offset 255 into destination object 'in_max' of size 14 209 | u8 in_max[14]; /* Register value */ | ^~~~~~ Cc: Jim Cromie <jim.cromie@gmail.com> Cc: Jean Delvare <jdelvare@suse.com> Cc: Guenter Roeck <linux@roeck-us.net> Cc: linux-hwmon@vger.kernel.org Signed-off-by: Kees Cook <keescook@chromium.org> Reviewed-by: Gustavo A. R. Silva <gustavoars@kernel.org> Link: https://lore.kernel.org/r/20231130200207.work.679-kees@kernel.org [groeck: Added comment into code clarifying context] Signed-off-by: Guenter Roeck <linux@roeck-us.net>
-
Xing Tong Wu authored
Setting the fan speed is only valid in manual mode; it is not possible to set the fan's speed in automatic mode. Return error when attempting to set the fan speed in automatic mode. Signed-off-by: Xing Tong Wu <xingtong.wu@siemens.com> Link: https://lore.kernel.org/r/20231121081604.2499-3-xingtong_wu@163.comSigned-off-by: Guenter Roeck <linux@roeck-us.net>
-
Xing Tong Wu authored
The nct6116 has 2 additional PWM pins compared to the nct6106. Extend the nct6106 PWM arrays to support the nct6116. Signed-off-by: Xing Tong Wu <xingtong.wu@siemens.com> Link: https://lore.kernel.org/r/20231121081604.2499-2-xingtong_wu@163.comSigned-off-by: Guenter Roeck <linux@roeck-us.net>
-
Javier Carrasco authored
These attributes are widely used in the hwmon subsystem, but they still must be documented. Add tempY_emergency_alarm, tempY_max_alarm and tempY_min_alarm to the ABI documentation according to their current usage and access rights in the hwmon subsystem. Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com> Link: https://lore.kernel.org/r/20231116-hwmon_abi-v1-4-8bfb7f51145a@gmail.comSigned-off-by: Guenter Roeck <linux@roeck-us.net>
-
Javier Carrasco authored
This attribute is defined as read-only by all drivers that support it. It seems that the access rights and description for this attribute were copied from the intrusionY_alarm, which has indeed RW rights and must be cleared by the user. These are the modules that currently use this attribute: - adt7x10 - i5500_temp - jc42 - lm83 - lm90 - lm95245 - max31760 - max6621 - mc34vr500 - tmp401 - tmp464 - tmp513 Fix the attribute description and make it read-only. Fixes: 365b5d63 ("ABI: sysfs-class-hwmon: add a description for tempY_crit_alarm") Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com> Link: https://lore.kernel.org/r/20231116-hwmon_abi-v1-3-8bfb7f51145a@gmail.comSigned-off-by: Guenter Roeck <linux@roeck-us.net>
-
Javier Carrasco authored
All these attributes already exist and are used by the hwmon subsystem, but they still must be documented. The missing attributes are the following: - humidityY_alarm - humidityY_fault - humidityY_label - humidityY_max - humidityY_max_hyst - humidityY_min - humidityY_min_hyst Add the missing humidity attributes to the ABI documentation according to their current usage and access rights in the hwmon subsystem. Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com> Link: https://lore.kernel.org/r/20231116-hwmon_abi-v1-2-8bfb7f51145a@gmail.comSigned-off-by: Guenter Roeck <linux@roeck-us.net>
-
Javier Carrasco authored
Preliminary step to add the missing humidity attributes in the ABI documentation. Adding new elements alphabetically is a common practice that has been loosely followed in the sysfs-class-hwmon documentation. Since most of the humidity attributes must be added to the file, a single attribute needs to be rearranged to reinforce alphabetical order. Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com> Link: https://lore.kernel.org/r/20231116-hwmon_abi-v1-1-8bfb7f51145a@gmail.comSigned-off-by: Guenter Roeck <linux@roeck-us.net>
-
Peter Yin authored
Add support for mp5990 device from Monolithic Power Systems, Inc. (MPS) vendor. This is a Hot-Swap Controller. Signed-off-by: Peter Yin <peteryin.openbmc@gmail.com> Link: https://lore.kernel.org/r/20231113155008.2147090-3-peteryin.openbmc@gmail.com [groeck: Improved and clarified comments] Signed-off-by: Guenter Roeck <linux@roeck-us.net>
-
Peter Yin authored
Add a device tree bindings for mp5990 device. Signed-off-by: Peter Yin <peteryin.openbmc@gmail.com> Acked-by: Conor Dooley <conor.dooley@microchip.com> Link: https://lore.kernel.org/r/20231113155008.2147090-2-peteryin.openbmc@gmail.comSigned-off-by: Guenter Roeck <linux@roeck-us.net>
-
Rob Herring authored
Use preferred i2c_get_match_data() instead of of_match_device() and i2c_match_id() to get the driver match data. With this, adjust the includes to explicitly include the correct headers. Adjust the 'chips' enum to not use 0, so that no match data can be distinguished from a valid enum value. Signed-off-by: Rob Herring <robh@kernel.org> Link: https://lore.kernel.org/r/20231115205703.3730448-3-robh@kernel.org [groeck: Use double cast for enum chips assignment to make compiler happy] Signed-off-by: Guenter Roeck <linux@roeck-us.net>
-
Guenter Roeck authored
Changing the "kinds" enum start value to be 1-indexed instead of 0-indexed caused look-ups in nct6775_device_names[] to be misaligned or off the end. Initialize the string list with explicit indexes. Cc: Rob Herring <robh@kernel.org> Cc: Kees Cook <keescook@chromium.org> Fixes: 10a0575e ("hwmon: nct6775-i2c: Use i2c_get_match_data()") Reviewed-by: Rob Herring <robh@kernel.org> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
-