- 04 10月, 2020 4 次提交
-
-
由 Vadim Pasternak 提交于
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: NVadim 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: NGuenter Roeck <linux@roeck-us.net>
-
由 Wang Qing 提交于
Modify the comment typo: "compliment" -> "complement". Signed-off-by: NWang Qing <wangqing@vivo.com> Link: https://lore.kernel.org/r/1601086116-32218-1-git-send-email-wangqing@vivo.comSigned-off-by: NGuenter Roeck <linux@roeck-us.net>
-
由 Naveen Krishna Chatradhi 提交于
Update the documentation with the newly added features * Set the accumulation interval based on resolution Signed-off-by: NNaveen Krishna Chatradhi <nchatrad@amd.com> Link: https://lore.kernel.org/r/20200929105322.8919-5-nchatrad@amd.comSigned-off-by: NGuenter Roeck <linux@roeck-us.net>
-
由 Naveen Krishna Chatradhi 提交于
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: NNaveen Krishna Chatradhi <nchatrad@amd.com> Link: https://lore.kernel.org/r/20200929105322.8919-4-nchatrad@amd.comSigned-off-by: NGuenter Roeck <linux@roeck-us.net>
-
- 30 9月, 2020 2 次提交
-
-
由 Naveen Krishna Chatradhi 提交于
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: NNaveen Krishna Chatradhi <nchatrad@amd.com> Link: https://lore.kernel.org/r/20200929105322.8919-3-nchatrad@amd.comSigned-off-by: NGuenter Roeck <linux@roeck-us.net>
-
由 Akshay Gupta 提交于
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: NAkshay Gupta <Akshay.Gupta@amd.com> Link: https://lore.kernel.org/r/20200929105322.8919-2-nchatrad@amd.comSigned-off-by: NGuenter Roeck <linux@roeck-us.net>
-
- 24 9月, 2020 34 次提交
-
-
由 Chris Packham 提交于
Convert the adm9240 driver to using regmap and add error handling. Signed-off-by: NChris 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: NGuenter Roeck <linux@roeck-us.net>
-
由 Chris Packham 提交于
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: NChris Packham <chris.packham@alliedtelesis.co.nz> Link: https://lore.kernel.org/r/20200924085102.15219-3-chris.packham@alliedtelesis.co.nzSigned-off-by: NGuenter Roeck <linux@roeck-us.net>
-
由 Chris Packham 提交于
Use loops for reading temp_max and initialising FAN_MIN/TEMP_MAX rather than duplicating code. Signed-off-by: NChris Packham <chris.packham@alliedtelesis.co.nz> Link: https://lore.kernel.org/r/20200924085102.15219-2-chris.packham@alliedtelesis.co.nzSigned-off-by: NGuenter Roeck <linux@roeck-us.net>
-
由 Wei Huang 提交于
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: NWei Huang <wei.huang2@amd.com> Link: https://lore.kernel.org/r/20200914200715.1997757-1-wei.huang2@amd.comSigned-off-by: NGuenter Roeck <linux@roeck-us.net>
-
由 Guenter Roeck 提交于
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: Nkernel test robot <lkp@intel.com> Cc: Alex Qiu <xqiu@google.com> Reviewed-by: NAlex Qiu <xqiu@google.com> Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
-
由 Andrew Jeffery 提交于
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: NAndrew 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: NGuenter Roeck <linux@roeck-us.net>
-
由 Guenter Roeck 提交于
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: NGuenter Roeck <linux@roeck-us.net> Reviewed-by: NAlex Qiu <xqiu@google.com> Tested-by: NAlex Qiu <xqiu@google.com> Link: https://lore.kernel.org/r/20200904163314.259087-1-linux@roeck-us.netSigned-off-by: NGuenter Roeck <linux@roeck-us.net>
-
由 Guenter Roeck 提交于
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: NGuenter Roeck <linux@roeck-us.net>
-
由 Tim Harvey 提交于
Add a fan sensor to report RPM's from a fan tach input. Signed-off-by: NTim Harvey <tharvey@gateworks.com> Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
-
由 Wei Huang 提交于
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: NWei Huang <wei.huang2@amd.com> Link: https://lore.kernel.org/r/20200827054242.2347-2-wei.huang2@amd.comSigned-off-by: NGuenter Roeck <linux@roeck-us.net>
-
由 Wei Huang 提交于
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: NWei Huang <wei.huang2@amd.com> Link: https://lore.kernel.org/r/20200827054242.2347-1-wei.huang2@amd.comSigned-off-by: NGuenter Roeck <linux@roeck-us.net>
-
由 Joe Perches 提交于
Use semicolons and braces. Signed-off-by: NJoe Perches <joe@perches.com> Link: https://lore.kernel.org/r/5e1ca60df261e3bfd0e6510e388581a1d1f52c77.1598331149.git.joe@perches.comSigned-off-by: NGuenter Roeck <linux@roeck-us.net>
-
由 Alexandru Tachici 提交于
Add bindings for the Analog Devices ADM1266 sequencer. Signed-off-by: NAlexandru Tachici <alexandru.tachici@analog.com> Reviewed-by: NRob Herring <robh@kernel.org> Link: https://lore.kernel.org/r/20200812142055.9213-7-alexandru.tachici@analog.comSigned-off-by: NGuenter Roeck <linux@roeck-us.net>
-
由 Alexandru Tachici 提交于
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: NAlexandru Tachici <alexandru.tachici@analog.com> Link: https://lore.kernel.org/r/20200812142055.9213-6-alexandru.tachici@analog.comSigned-off-by: NGuenter Roeck <linux@roeck-us.net>
-
由 Alexandru Tachici 提交于
Add a debugfs entry which prints the current state of the adm1266 sequencer. Signed-off-by: NAlexandru Tachici <alexandru.tachici@analog.com> Link: https://lore.kernel.org/r/20200812142055.9213-5-alexandru.tachici@analog.comSigned-off-by: NGuenter Roeck <linux@roeck-us.net>
-
由 Alexandru Tachici 提交于
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: NAlexandru Tachici <alexandru.tachici@analog.com> Link: https://lore.kernel.org/r/20200812142055.9213-4-alexandru.tachici@analog.comSigned-off-by: NGuenter Roeck <linux@roeck-us.net>
-
由 Alexandru Tachici 提交于
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: NAlexandru Tachici <alexandru.tachici@analog.com> Link: https://lore.kernel.org/r/20200812142055.9213-3-alexandru.tachici@analog.comSigned-off-by: NGuenter Roeck <linux@roeck-us.net>
-
由 Alexandru Tachici 提交于
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: NAlexandru 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: NGuenter Roeck <linux@roeck-us.net>
-
由 Chris Ruehl 提交于
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: NChris Ruehl <chris.ruehl@gtsys.com.hk> Reviewed-by: NRob Herring <robh@kernel.org> Link: https://lore.kernel.org/r/20200815012227.32538-3-chris.ruehl@gtsys.com.hkSigned-off-by: NGuenter Roeck <linux@roeck-us.net>
-
由 Chris Ruehl 提交于
Add support for DTS bindings for the sensirion shtc1,shtw1 and shtc3. Signed-off-by: NChris Ruehl <chris.ruehl@gtsys.com.hk> Reviewed-by: NGuenter 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: NGuenter Roeck <linux@roeck-us.net>
-
由 Anson Huang 提交于
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: NAnson Huang <Anson.Huang@nxp.com> Link: https://lore.kernel.org/r/1597649673-22329-1-git-send-email-Anson.Huang@nxp.comSigned-off-by: NGuenter Roeck <linux@roeck-us.net>
-
由 Stephen Kitt 提交于
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: NStephen Kitt <steve@sk2.org> Link: https://lore.kernel.org/r/20200821160035.590142-1-steve@sk2.orgSigned-off-by: NGuenter Roeck <linux@roeck-us.net>
-
由 Stephen Kitt 提交于
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: NStephen Kitt <steve@sk2.org> Link: https://lore.kernel.org/r/20200821160159.591293-1-steve@sk2.orgSigned-off-by: NGuenter Roeck <linux@roeck-us.net>
-
由 Stephen Kitt 提交于
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: NStephen Kitt <steve@sk2.org> Link: https://lore.kernel.org/r/20200821160231.592571-1-steve@sk2.orgSigned-off-by: NGuenter Roeck <linux@roeck-us.net>
-
由 Stephen Kitt 提交于
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: NStephen Kitt <steve@sk2.org> Link: https://lore.kernel.org/r/20200821160354.594715-1-steve@sk2.orgSigned-off-by: NGuenter Roeck <linux@roeck-us.net>
-
由 Stephen Kitt 提交于
This driver doesn't use the id information provided by the old i2c probe function, so it can trivially be converted to the simple ("probe_new") form. Signed-off-by: NStephen Kitt <steve@sk2.org> Link: https://lore.kernel.org/r/20200813162851.1519546-1-steve@sk2.orgSigned-off-by: NGuenter Roeck <linux@roeck-us.net>
-
由 Stephen Kitt 提交于
This driver doesn't use the id information provided by the old i2c probe function, so it can trivially be converted to the simple ("probe_new") form. Signed-off-by: NStephen Kitt <steve@sk2.org> Link: https://lore.kernel.org/r/20200813162704.1517951-1-steve@sk2.orgSigned-off-by: NGuenter Roeck <linux@roeck-us.net>
-
由 Stephen Kitt 提交于
This driver doesn't use the id information provided by the old i2c probe function, so it can trivially be converted to the simple ("probe_new") form. Signed-off-by: NStephen Kitt <steve@sk2.org> Link: https://lore.kernel.org/r/20200813162544.1516647-1-steve@sk2.orgSigned-off-by: NGuenter Roeck <linux@roeck-us.net>
-
由 Stephen Kitt 提交于
This driver doesn't use the id information provided by the old i2c probe function, so it can trivially be converted to the simple ("probe_new") form. Signed-off-by: NStephen Kitt <steve@sk2.org> Link: https://lore.kernel.org/r/20200813162300.1514695-1-steve@sk2.orgSigned-off-by: NGuenter Roeck <linux@roeck-us.net>
-
由 Stephen Kitt 提交于
This driver doesn't use the id information provided by the old i2c probe function, so it can trivially be converted to the simple ("probe_new") form. Signed-off-by: NStephen Kitt <steve@sk2.org> Link: https://lore.kernel.org/r/20200813162026.1512242-1-steve@sk2.orgSigned-off-by: NGuenter Roeck <linux@roeck-us.net>
-
由 Stephen Kitt 提交于
This driver doesn't use the id information provided by the old i2c probe function, so it can trivially be converted to the simple ("probe_new") form. Signed-off-by: NStephen Kitt <steve@sk2.org> Link: https://lore.kernel.org/r/20200813161845.1511261-1-steve@sk2.orgSigned-off-by: NGuenter Roeck <linux@roeck-us.net>
-
由 Stephen Kitt 提交于
This driver doesn't use the id information provided by the old i2c probe function, so it can trivially be converted to the simple ("probe_new") form. Signed-off-by: NStephen Kitt <steve@sk2.org> Acked-by: NCorentin LABBE <clabbe.montjoie@gmail.com> Tested-by: NCorentin Labbe <clabbe.montjoie@gmail.com> Link: https://lore.kernel.org/r/20200813161129.1507599-1-steve@sk2.orgSigned-off-by: NGuenter Roeck <linux@roeck-us.net>
-
由 Stephen Kitt 提交于
This driver doesn't use the id information provided by the old i2c probe function, so it can trivially be converted to the simple ("probe_new") form. Signed-off-by: NStephen Kitt <steve@sk2.org> Link: https://lore.kernel.org/r/20200813160958.1506536-1-steve@sk2.orgSigned-off-by: NGuenter Roeck <linux@roeck-us.net>
-
由 Stephen Kitt 提交于
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 as follows: * if the information in i2c_client is sufficient, that's used instead (client->name); * anything else is handled by calling i2c_match_id() with the same level of error-handling (if any) as before. A few drivers aren't included in this patch because they have a different set of maintainers. They will be covered by other patches. Signed-off-by: NStephen Kitt <steve@sk2.org> Link: https://lore.kernel.org/r/20200813160222.1503401-1-steve@sk2.orgSigned-off-by: NGuenter Roeck <linux@roeck-us.net>
-