- 05 Oct, 2020 3 commits
-
-
Geert Uytterhoeven authored
Remove the duplicate "Mellanox" in the help text for the Mellanox FAN driver configuration option. Fixes: 65afb4c8 ("hwmon: (mlxreg-fan) Add support for Mellanox FAN driver") Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Link: https://lore.kernel.org/r/20201005124843.26688-1-geert+renesas@glider.beSigned-off-by: Guenter Roeck <linux@roeck-us.net>
-
Ugur Usug authored
Add debugfs interface support for accessing device specific registers (MFR_VOUT_MIN, MFR_DEVSET1 and MFR_DEVSET2) and others including OPERATION, ON_OFF_CONFIG, SMB_ALERT_MASK, VOUT_MODE, VOUT_COMMAND and VOUT_MAX. Signed-off-by: Ugur Usug <ugur.usug@maximintegrated.com> Link: https://lore.kernel.org/r/MWHPR11MB1965C01083AD013C630646B2FD3B0@MWHPR11MB1965.namprd11.prod.outlook.com [groeck: Resolved conflics seen due to PMBus driver API changes] Signed-off-by: Guenter Roeck <linux@roeck-us.net>
-
Steve Foreman authored
The max34* family have the IOUT_OC_WARN_LIMIT and IOUT_OC_CRIT_LIMIT registers swapped. Cc: stable@vger.kernel.org Signed-off-by: Steve Foreman <foremans@google.com> [groeck: Updated subject, use C comment style, tab after defines] [groeck: Added missing break; statements (by alexandru.ardelean@analog.com)] Signed-off-by: Guenter Roeck <linux@roeck-us.net>
-
- 04 Oct, 2020 10 commits
-
-
Serge Semin authored
If the PVT sensor is suddenly powered down while a caller is waiting for the conversion completion, the request won't be finished and the task will hang up on this procedure until the power is back up again. Let's call the wait_for_completion_timeout() method instead to prevent that. The cached timeout is exactly what we need to predict for how long conversion could normally last. Fixes: 87976ce2 ("hwmon: Add Baikal-T1 PVT sensor driver") Signed-off-by: Serge Semin <Sergey.Semin@baikalelectronics.ru> Link: https://lore.kernel.org/r/20200920110924.19741-4-Sergey.Semin@baikalelectronics.ruSigned-off-by: Guenter Roeck <linux@roeck-us.net>
-
Serge Semin authored
Instead of converting the update timeout data to the milliseconds each time on the read procedure let's preserve the currently set timeout in the dedicated driver private data cache. The cached value will be then used in the timeout read method and in the alarm-less data conversion to prevent the caller task hanging up in case if the PVT sensor is suddenly powered down. Fixes: 87976ce2 ("hwmon: Add Baikal-T1 PVT sensor driver") Signed-off-by: Serge Semin <Sergey.Semin@baikalelectronics.ru> Link: https://lore.kernel.org/r/20200920110924.19741-3-Sergey.Semin@baikalelectronics.ruSigned-off-by: Guenter Roeck <linux@roeck-us.net>
-
Serge Semin authored
Baikal-T1 PVT sensor has got a dedicated power supply domain (feed up by the external GPVT/VPVT_18 pins). In case if it isn't powered up, the registers will be accessible, but the sensor conversion just won't happen. Due to that an attempt to read data from any PVT sensor will cause the task hanging up. For instance that will happen if XP11 jumper isn't installed on the Baikal-T1-based BFK3.1 board. Let's at least test whether the conversion work on the device probe procedure. By doing so will make sure that the PVT sensor is powered up at least at boot time. Fixes: 87976ce2 ("hwmon: Add Baikal-T1 PVT sensor driver") Signed-off-by: Serge Semin <Sergey.Semin@baikalelectronics.ru> Link: https://lore.kernel.org/r/20200920110924.19741-2-Sergey.Semin@baikalelectronics.ruSigned-off-by: Guenter Roeck <linux@roeck-us.net>
-
Alban Bedel authored
Add regulator support for boards where the sensor first need to be powered up before it can be used. Signed-off-by: Alban Bedel <alban.bedel@aerq.com> Link: https://lore.kernel.org/r/20201001145738.17326-4-alban.bedel@aerq.comSigned-off-by: Guenter Roeck <linux@roeck-us.net>
-
Xu Yilun authored
This patch adds hwmon functionality for Intel MAX 10 BMC chip. This BMC chip connects to a set of sensor chips to monitor current, voltage, thermal and power of different components on board. The BMC firmware is responsible for sensor data sampling and recording in shared registers. Host driver reads the sensor data from these shared registers and exposes them to users as hwmon interfaces. Signed-off-by: Xu Yilun <yilun.xu@intel.com> Signed-off-by: Wu Hao <hao.wu@intel.com> Signed-off-by: Matthew Gerlach <matthew.gerlach@linux.intel.com> Signed-off-by: Tom Rix <trix@redhat.com> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Link: https://lore.kernel.org/r/1600669071-26235-3-git-send-email-yilun.xu@intel.com [groeck: Adjusted subject] Signed-off-by: Guenter Roeck <linux@roeck-us.net>
-
Vadim Pasternak authored
Monolithic Power Systems, Inc. (MPS) dual-loop, digital, multi-phase controller. Signed-off-by: Vadim Pasternak <vadimp@nvidia.com> Acked-by: Rob Herring <robh@kernel.org> Link: https://lore.kernel.org/r/20200926204957.10268-3-vadimp@nvidia.comSigned-off-by: Guenter Roeck <linux@roeck-us.net>
-
Vadim Pasternak authored
Add support for mp295 device from Monolithic Power Systems, Inc. (MPS) vendor. This is a dual-loop, digital, multi-phase controller. This device: - Supports two power rail. - Provides 8 pulse-width modulations (PWMs), and can be configured up to 8-phase operation for rail 1 and up to 4-phase operation for rail 2. - Supports two pages 0 and 1 for telemetry and also pages 2 and 3 for configuration. - Can configured VOUT readout in direct or VID format and allows setting of different formats on rails 1 and 2. For VID the following protocols are available: VR13 mode with 5-mV DAC; VR13 mode with 10-mV DAC, IMVP9 mode with 5-mV DAC. Signed-off-by: Vadim Pasternak <vadimp@nvidia.com> Link: https://lore.kernel.org/r/20200926204957.10268-2-vadimp@nvidia.com [groeck: Cleaned up a couple of error returns; fixed up API changes] Signed-off-by: Guenter Roeck <linux@roeck-us.net>
-
Wang Qing authored
Modify the comment typo: "compliment" -> "complement". Signed-off-by: Wang Qing <wangqing@vivo.com> Link: https://lore.kernel.org/r/1601086116-32218-1-git-send-email-wangqing@vivo.comSigned-off-by: Guenter Roeck <linux@roeck-us.net>
-
Naveen Krishna Chatradhi authored
Update the documentation with the newly added features * Set the accumulation interval based on resolution Signed-off-by: Naveen Krishna Chatradhi <nchatrad@amd.com> Link: https://lore.kernel.org/r/20200929105322.8919-5-nchatrad@amd.comSigned-off-by: Guenter Roeck <linux@roeck-us.net>
-
Naveen Krishna Chatradhi authored
Factor out the common code in the accumulation functions for core and socket accumulation. While at it, handle the return value of the amd_create_sensor() function. Signed-off-by: Naveen Krishna Chatradhi <nchatrad@amd.com> Link: https://lore.kernel.org/r/20200929105322.8919-4-nchatrad@amd.comSigned-off-by: Guenter Roeck <linux@roeck-us.net>
-
- 30 Sep, 2020 2 commits
-
-
Naveen Krishna Chatradhi authored
On a system with course grain resolution of energy unit (milli J) the accumulation thread can be executed less frequently than on the system with fine grain resolution(micro J). This patch sets the accumulation thread interval to an optimum value calculated based on the (energy unit) resolution supported by the hardware (assuming a peak wattage of 240W). Signed-off-by: Naveen Krishna Chatradhi <nchatrad@amd.com> Link: https://lore.kernel.org/r/20200929105322.8919-3-nchatrad@amd.comSigned-off-by: Guenter Roeck <linux@roeck-us.net>
-
Akshay Gupta authored
At present, core & socket labels are defined in struct sensor_accumulator This patch moves it to the amd_energy_data structure, which will help in calling memset on struct sensor_accumulator to optimize the code. Signed-off-by: Akshay Gupta <Akshay.Gupta@amd.com> Link: https://lore.kernel.org/r/20200929105322.8919-2-nchatrad@amd.comSigned-off-by: Guenter Roeck <linux@roeck-us.net>
-
- 24 Sep, 2020 3 commits
-
-
Chris Packham authored
Convert the adm9240 driver to using regmap and add error handling. Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz> Link: https://lore.kernel.org/r/20200924085102.15219-4-chris.packham@alliedtelesis.co.nz [groeck: Fixed context conflict against 'hwmon: use simple i2c probe function'] Signed-off-by: Guenter Roeck <linux@roeck-us.net>
-
Chris Packham authored
Split the body of adm9240_update_device() into two helper functions adm9240_update_measure() and adm9240_update_config(). Although neither of the new helpers returns an error yet lay the groundwork for propagating failures through to the sysfs readers. Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz> Link: https://lore.kernel.org/r/20200924085102.15219-3-chris.packham@alliedtelesis.co.nzSigned-off-by: Guenter Roeck <linux@roeck-us.net>
-
Chris Packham authored
Use loops for reading temp_max and initialising FAN_MIN/TEMP_MAX rather than duplicating code. Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz> Link: https://lore.kernel.org/r/20200924085102.15219-2-chris.packham@alliedtelesis.co.nzSigned-off-by: Guenter Roeck <linux@roeck-us.net>
-
- 23 Sep, 2020 22 commits
-
-
Wei Huang authored
Zen3 thermal info is supported via a new PCI device ID. Also the voltage telemetry registers and the current factors need to be defined. k10temp driver then searches for CPU family 0x19 and configures k10temp_data accordingly. Signed-off-by: Wei Huang <wei.huang2@amd.com> Link: https://lore.kernel.org/r/20200914200715.1997757-1-wei.huang2@amd.comSigned-off-by: Guenter Roeck <linux@roeck-us.net>
-
Guenter Roeck authored
0-day rightfully complains about a sometimes uninitialized variable in pmbus_get_boolean(). drivers/hwmon/pmbus/pmbus_core.c:903:13: warning: variable 'ret' is used uninitialized whenever 'if' condition is true } else if (!s1 || !s2) { While that is technically true, it won't be hit in the field since the condition indicates a programming error. Move the check of that condition into the code generating the attribute entry, and refuse generating the attribute if the condition is true. Swap the condition check in pmbus_get_boolean() to ensure that static analyzers don't get a hiccup (because we check if s1 and s2 are NULL, static analyzers may believe that they can be NULL independently of each other). Reported-by: kernel test robot <lkp@intel.com> Cc: Alex Qiu <xqiu@google.com> Reviewed-by: Alex Qiu <xqiu@google.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
-
Andrew Jeffery authored
Enable runtime debug control of whether the PEC byte is exchanged with the PMBus device. Some manufacturers have asked for the PEC to be disabled as part of debugging driver communication issues with devices. Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Link: https://lore.kernel.org/r/20200910021106.2958382-1-andrew@aj.id.au [groeck: Replace %1llu with %llu] Signed-off-by: Guenter Roeck <linux@roeck-us.net>
-
Guenter Roeck authored
Caching register values can be very expensive for PMBus chips. Some modern chips may have 10 or more pages, with several sensors supported per page. For example, MAX16601 creates more than 90 sysfs attributes. Register caching for such chips is time consuming, especially if only a few attributes are read on a regular basis. For MAX16601, it was observed that it can take up to two seconds to read all attributes on a slow I2C bus. In this situation, register caching results in the opposite of its intention: It increases the number of I2C operations, in some cases substantially, and it results in large latency when trying to access individual sensor data. Drop all register caching to solve the problem. Since it is no longer necessary, drop status register mapping as part of the change, and specify status registers directly. Cc: Alex Qiu <xqiu@google.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net> Reviewed-by: Alex Qiu <xqiu@google.com> Tested-by: Alex Qiu <xqiu@google.com> Link: https://lore.kernel.org/r/20200904163314.259087-1-linux@roeck-us.netSigned-off-by: Guenter Roeck <linux@roeck-us.net>
-
Guenter Roeck authored
The debugfs code was intended to aid figuring out functionality of undocumented registers. Turns out that wasn't very helpful, since register locations change too much between AMD chip revisions, and the data isn't really valuable for chips where it isn't already supported. On top of that, its existence has been used as argument for providing pseudo-API debugfs functions in other drivers. So let's just take it out. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
-
Tim Harvey authored
Add a fan sensor to report RPM's from a fan tach input. Signed-off-by: Tim Harvey <tharvey@gateworks.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
-
Wei Huang authored
The voltage telemetry registers for Zen2 are different from Zen1. Also the factors of CPU current values are changed on Zen2. Add new definitions for these register. Signed-off-by: Wei Huang <wei.huang2@amd.com> Link: https://lore.kernel.org/r/20200827054242.2347-2-wei.huang2@amd.comSigned-off-by: Guenter Roeck <linux@roeck-us.net>
-
Wei Huang authored
Many SMN thermal registers in Zen CPU families are common across different generations. For long-term code maintenance, it is better to rename these macro and function names to Zen. Signed-off-by: Wei Huang <wei.huang2@amd.com> Link: https://lore.kernel.org/r/20200827054242.2347-1-wei.huang2@amd.comSigned-off-by: Guenter Roeck <linux@roeck-us.net>
-
Joe Perches authored
Use semicolons and braces. Signed-off-by: Joe Perches <joe@perches.com> Link: https://lore.kernel.org/r/5e1ca60df261e3bfd0e6510e388581a1d1f52c77.1598331149.git.joe@perches.comSigned-off-by: Guenter Roeck <linux@roeck-us.net>
-
Alexandru Tachici authored
Add bindings for the Analog Devices ADM1266 sequencer. Signed-off-by: Alexandru Tachici <alexandru.tachici@analog.com> Reviewed-by: Rob Herring <robh@kernel.org> Link: https://lore.kernel.org/r/20200812142055.9213-7-alexandru.tachici@analog.comSigned-off-by: Guenter Roeck <linux@roeck-us.net>
-
Alexandru Tachici authored
Use the nvmem kernel api to expose the black box chip functionality to userspace. Using this feature, the device is capable of recording to nonvolatile flash memory the vital data about the system status that caused the system to perform a black box write. A blackbox is 64 bytes of data containing all the status registers, last two states of the sequencer, timestamp and counters. The mapping of this data is described in the adm1266 datasheet. On power-up the driver sets the unix time to the adm1266 using the SET_RTC command. This value is incremented by an internal clock and it is used as timestamp for the black box feature. Signed-off-by: Alexandru Tachici <alexandru.tachici@analog.com> Link: https://lore.kernel.org/r/20200812142055.9213-6-alexandru.tachici@analog.comSigned-off-by: Guenter Roeck <linux@roeck-us.net>
-
Alexandru Tachici authored
Add a debugfs entry which prints the current state of the adm1266 sequencer. Signed-off-by: Alexandru Tachici <alexandru.tachici@analog.com> Link: https://lore.kernel.org/r/20200812142055.9213-5-alexandru.tachici@analog.comSigned-off-by: Guenter Roeck <linux@roeck-us.net>
-
Alexandru Tachici authored
Adm1266 exposes 9 GPIOs and 16 PDIOs which are currently read-only. They are controlled by the internal sequencing engine. This patch makes adm1266 driver expose GPIOs and PDIOs to user-space using GPIO provider kernel api. Signed-off-by: Alexandru Tachici <alexandru.tachici@analog.com> Link: https://lore.kernel.org/r/20200812142055.9213-4-alexandru.tachici@analog.comSigned-off-by: Guenter Roeck <linux@roeck-us.net>
-
Alexandru Tachici authored
PmBus devices support Block Write-Block Read Process Call described in SMBus specification v 2.0 with the exception that Block writes and reads are permitted to have up 255 data bytes instead of max 32 bytes (SMBus). This patch adds Block WR process call support for ADM1266. Signed-off-by: Alexandru Tachici <alexandru.tachici@analog.com> Link: https://lore.kernel.org/r/20200812142055.9213-3-alexandru.tachici@analog.comSigned-off-by: Guenter Roeck <linux@roeck-us.net>
-
Alexandru Tachici authored
Add pmbus probing driver for the adm1266 Cascadable Super Sequencer with Margin Control and Fault Recording. Driver is using the pmbus_core, creating sysfs files under hwmon for inputs: vh1->vh4 and vp1->vp13. Signed-off-by: Alexandru Tachici <alexandru.tachici@analog.com> Link: https://lore.kernel.org/r/20200812142055.9213-2-alexandru.tachici@analog.com [groeck: Use .probe_new function, adjust for changed pmbus_do_probe API] Signed-off-by: Guenter Roeck <linux@roeck-us.net>
-
Chris Ruehl authored
Add documentation for the newly added DTS support in the shtc1 driver. To align with the drivers logic to have high precision by default a boolean sensirion,low-precision is used to switch to low precision. Signed-off-by: Chris Ruehl <chris.ruehl@gtsys.com.hk> Reviewed-by: Rob Herring <robh@kernel.org> Link: https://lore.kernel.org/r/20200815012227.32538-3-chris.ruehl@gtsys.com.hkSigned-off-by: Guenter Roeck <linux@roeck-us.net>
-
Chris Ruehl authored
Add support for DTS bindings for the sensirion shtc1,shtw1 and shtc3. Signed-off-by: Chris Ruehl <chris.ruehl@gtsys.com.hk> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Link: https://lore.kernel.org/r/20200815012227.32538-2-chris.ruehl@gtsys.com.hk [groeck: Resolved conflicts] Signed-off-by: Guenter Roeck <linux@roeck-us.net>
-
Anson Huang authored
dev_err_probe() can reduce code size, uniform error handling and record the defer probe reason etc., use it to simplify the code. Signed-off-by: Anson Huang <Anson.Huang@nxp.com> Link: https://lore.kernel.org/r/1597649673-22329-1-git-send-email-Anson.Huang@nxp.comSigned-off-by: Guenter Roeck <linux@roeck-us.net>
-
Stephen Kitt authored
As part of the ongoing i2c transition to the simple probe ("probe_new"), this patch uses i2c_match_id to retrieve the driver_data for the probed device. The id parameter is thus no longer necessary and the simple probe can be used instead. Signed-off-by: Stephen Kitt <steve@sk2.org> Link: https://lore.kernel.org/r/20200821160035.590142-1-steve@sk2.orgSigned-off-by: Guenter Roeck <linux@roeck-us.net>
-
Stephen Kitt authored
As part of the ongoing i2c transition to the simple probe ("probe_new"), this patch uses i2c_match_id to retrieve the driver_data for the probed device. The id parameter is thus no longer necessary and the simple probe can be used instead. Signed-off-by: Stephen Kitt <steve@sk2.org> Link: https://lore.kernel.org/r/20200821160159.591293-1-steve@sk2.orgSigned-off-by: Guenter Roeck <linux@roeck-us.net>
-
Stephen Kitt authored
As part of the ongoing i2c transition to the simple probe ("probe_new"), this patch uses i2c_match_id to retrieve the driver_data for the probed device. The id parameter is thus no longer necessary and the simple probe can be used instead. Signed-off-by: Stephen Kitt <steve@sk2.org> Link: https://lore.kernel.org/r/20200821160231.592571-1-steve@sk2.orgSigned-off-by: Guenter Roeck <linux@roeck-us.net>
-
Stephen Kitt authored
Many hwmon drivers don't use the id information provided by the old i2c probe function, and the remainder can easily be adapted to the new form ("probe_new") by calling i2c_match_id explicitly. This avoids scanning the identifier tables during probes. Drivers which didn't use the id are converted as-is; drivers which did are modified to call i2c_match_id() with the same level of error-handling (if any) as before. This patch wraps up the transition for hwmon, with four stragglers not included in the previous large patch. Signed-off-by: Stephen Kitt <steve@sk2.org> Link: https://lore.kernel.org/r/20200821160354.594715-1-steve@sk2.orgSigned-off-by: Guenter Roeck <linux@roeck-us.net>
-