- 20 4月, 2021 3 次提交
-
-
由 Erik Rosen 提交于
Add hardware monitoring support for ST STPDDC60 Unversal Digital Multicell Controller. Signed-off-by: NErik Rosen <erik.rosen@metormote.com> Link: https://lore.kernel.org/r/20210218115249.28513-3-erik.rosen@metormote.com [groeck: Fixed whitespace error in Makefile] Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
-
由 Erik Rosen 提交于
For the STPDDC60 chip, the vout alarm-limits are represented as an offset relative to the commanded output voltage. This means that the limits are dynamic and must not be cached by the pmbus driver. This patch adds a pmbus_set_sensor() function to pmbus_core to be able to set the update flag on selected sensors after auto-detection of limit attributes. Signed-off-by: NErik Rosen <erik.rosen@metormote.com> Link: https://lore.kernel.org/r/20210218115249.28513-2-erik.rosen@metormote.comSigned-off-by: NGuenter Roeck <linux@roeck-us.net>
-
由 Chris Packham 提交于
The IR36021 is a dual‐loop digital multi‐phase buck controller. Signed-off-by: NChris Packham <chris.packham@alliedtelesis.co.nz> Link: https://lore.kernel.org/r/20210301035954.16713-3-chris.packham@alliedtelesis.co.nzSigned-off-by: NGuenter Roeck <linux@roeck-us.net>
-
- 02 2月, 2021 3 次提交
-
-
由 Matthew Barth 提交于
There was an issue in how the tach feedbacks of dual rotor fans were reported during any change in fan speeds with revision "A" of the MAX31785. When the fan speeds would transition to a new target speed, the rotor not wired to the TACH input when TACHSEL = 0 would report a speed of 0 until the new target was reached. This has been fixed, resulting in a revision "B" update where the MFR_REVISION of "B" is 0x3061. Signed-off-by: NMatthew Barth <msbarth@linux.ibm.com> Link: https://lore.kernel.org/r/20210201212217.73721-1-msbarth@linux.ibm.com [groeck: Change 'ret' variable type to int] Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
-
由 Erik Rosen 提交于
It is no longer necessary to clear the cache to update the sensor value from the chip. Signed-off-by: NErik Rosen <erik.rosen@metormote.com> Link: https://lore.kernel.org/r/20210201195929.1200-3-erik.rosen@metormote.comSigned-off-by: NGuenter Roeck <linux@roeck-us.net>
-
由 Erik Rosen 提交于
Set the sensor->data field to -ENODATA to force a chip access next time the sensor value is read. Signed-off-by: NErik Rosen <erik.rosen@metormote.com> Link: https://lore.kernel.org/r/20210201195929.1200-2-erik.rosen@metormote.comSigned-off-by: NGuenter Roeck <linux@roeck-us.net>
-
- 30 1月, 2021 2 次提交
-
-
由 Guenter Roeck 提交于
MAX16508 is quite similar to MAX16601, except that it does not support the DEFAULT_NUM_POP register and we thus can not dynamically determine the number of populated phases. Cc: Alex Qiu <xqiu@google.com> Cc: Ugur Usug <Ugur.Usug@maximintegrated.com> Signed-off-by: NGuenter Roeck <linux@roeck-us.net> Link: https://lore.kernel.org/r/20210125185327.93282-2-linux@roeck-us.netReviewed-by: NAlex Qiu <xqiu@google.com> Tested-by: NAlex Qiu <xqiu@google.com> Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
-
由 Guenter Roeck 提交于
The MAX16601 can report the number of populated phases. Use this information to only create sysfs attributes for populated phases. Cc: Alex Qiu <xqiu@google.com> Cc: Ugur Usug <Ugur.Usug@maximintegrated.com> Signed-off-by: NGuenter Roeck <linux@roeck-us.net> Link: https://lore.kernel.org/r/20210125185327.93282-1-linux@roeck-us.netReviewed-by: NAlex Qiu <xqiu@google.com> Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
-
- 28 1月, 2021 3 次提交
-
-
由 Jiapeng Zhong 提交于
Fix the following coccicheck warnings: ./drivers/hwmon/pmbus/pmbus_core.c:1265:24-26: WARNING !A || A && B is equivalent to !A || B. Reported-by: NAbaci Robot <abaci@linux.alibaba.com> Signed-off-by: NJiapeng Zhong <abaci-bugfix@linux.alibaba.com> Link: https://lore.kernel.org/r/1611642100-29937-1-git-send-email-abaci-bugfix@linux.alibaba.comSigned-off-by: NGuenter Roeck <linux@roeck-us.net>
-
由 Eddie James 提交于
Several power supplies supported by the IBM CFFPS driver don't report valid data in the CAPABILITY register. This results in PEC being enabled when it's not supported by the device, and since the automatic version detection might fail, disable use of the CAPABILITY register across the board for this driver. Signed-off-by: NEddie James <eajames@linux.ibm.com> Link: https://lore.kernel.org/r/20201222152640.27749-3-eajames@linux.ibm.comSigned-off-by: NGuenter Roeck <linux@roeck-us.net>
-
由 Eddie James 提交于
Some PMBus chips don't respond with valid data when reading the CAPABILITY register. Add a flag that device drivers can set so that the PMBus core driver doesn't use CAPABILITY to determine it's behavior. Signed-off-by: NEddie James <eajames@linux.ibm.com> Link: https://lore.kernel.org/r/20201222152640.27749-2-eajames@linux.ibm.comSigned-off-by: NGuenter Roeck <linux@roeck-us.net>
-
- 11 12月, 2020 1 次提交
-
-
由 xiao.ma 提交于
The driver supports Q54SJ108A2 series modules of Delta. Standard attributes are in sysfs, and other attributes are in debugfs. Signed-off-by: Nxiao.ma <xiao.mx.ma@deltaww.com> Link: https://lore.kernel.org/r/20201202025900.1842-1-max701@126.com [groeck: Replaced spaces with tabs, dropped excessive spaces, fixed module prefix in documentation] Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
-
- 07 12月, 2020 1 次提交
-
-
由 Charles 提交于
Add the pmbus driver for the STMicroelectronics pm6764 voltage regulator. the output voltage use the MFR_READ_VOUT 0xD4 vout value returned is linear11 Signed-off-by: NCharles Hsu <hsu.yungteng@gmail.com> [groeck: Fixed various compile errors; marked pm6764tr_of_match __maybe_unused] Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
-
- 03 12月, 2020 2 次提交
-
-
由 Bartosz Golaszewski 提交于
The only action currently performed in pmbus_do_remove() is removing the debugfs hierarchy. We can schedule a devm action at probe time and remove pmbus_do_remove() entirely from all pmbus drivers. Signed-off-by: NBartosz Golaszewski <bgolaszewski@baylibre.com> Link: https://lore.kernel.org/r/20201026105352.20359-1-brgl@bgdev.pl [groeck: Removed references to pmbus_do_remove from documentation] Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
-
由 Dan Carpenter 提交于
The debugfs_create_dir() function never returns NULL. Normal users are not supposed to check the return value so the correct fix is just to delete this check. In the case where the debugfs_create_dir() fails, the function returns NULL. The other debugfs function check for NULL directory and handle it. Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com> Link: https://lore.kernel.org/r/20201022070659.GA2817762@mwandaSigned-off-by: NGuenter Roeck <linux@roeck-us.net>
-
- 04 11月, 2020 1 次提交
-
-
由 Robert Hancock 提交于
As part of commit a919ba06 ("hwmon: (pmbus) Stop caching register values"), the update of the sensor value is now triggered directly by the sensor attribute value being read from sysfs. This created (or at least made much more likely) a locking issue, since nothing protected the device page selection from being unexpectedly modified by concurrent reads. If sensor values on different pages on the same device were being concurrently read by multiple threads, this could cause spurious read errors due to the page register not reading back the same value last written, or sensor values being read from the incorrect page. Add locking of the update_lock mutex in pmbus_show_sensor and pmbus_show_samples so that these cannot result in concurrent reads from the underlying device. Fixes: a919ba06 ("hwmon: (pmbus) Stop caching register values") Signed-off-by: NRobert Hancock <robert.hancock@calian.com> Reviewed-by: NAlex Qiu <xqiu@google.com> Link: https://lore.kernel.org/r/20201103193315.3011800-1-robert.hancock@calian.comSigned-off-by: NGuenter Roeck <linux@roeck-us.net>
-
- 26 10月, 2020 1 次提交
-
-
由 Dan Carpenter 提交于
The snprintf() function returns the number of characters which would have been printed if there were enough space, but the scnprintf() returns the number of characters which were actually printed. If the buffer is not large enough, then using snprintf() would result in a read overflow and an information leak. Fixes: 8910c0bd ("hwmon: (pmbus/max20730) add device monitoring via debugfs") Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com> Link: https://lore.kernel.org/r/20201022070824.GC2817762@mwandaSigned-off-by: NGuenter Roeck <linux@roeck-us.net>
-
- 07 10月, 2020 1 次提交
-
-
由 Chu Lin 提交于
Problem: We use voltage dividers so that the voltage presented at the voltage sense pins is confusing. We might need to convert these readings to more meaningful readings given the voltage divider. Solution: Read the voltage divider resistance from dts and convert the voltage reading to a more meaningful reading. Testing: max20730 with voltage divider Signed-off-by: NChu Lin <linchuyuan@google.com> Reviewed-by: NGuenter Roeck <linux@roeck-us.net> Link: https://lore.kernel.org/r/20201004031445.2321090-3-linchuyuan@google.com [groeck: Return -EINVAL instead of -ENODEV on bad deevicetree data] Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
-
- 06 10月, 2020 2 次提交
-
-
由 Ugur Usug 提交于
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: NUgur 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: NGuenter Roeck <linux@roeck-us.net>
-
由 Steve Foreman 提交于
The max34* family have the IOUT_OC_WARN_LIMIT and IOUT_OC_CRIT_LIMIT registers swapped. Cc: stable@vger.kernel.org Signed-off-by: NSteve 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: NGuenter Roeck <linux@roeck-us.net>
-
- 04 10月, 2020 1 次提交
-
-
由 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>
-
- 24 9月, 2020 11 次提交
-
-
由 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>
-
由 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>
-
由 Stephen Kitt 提交于
pmbus_do_probe doesn't use the id information provided in its second argument, so this can be removed, which then allows using the single-parameter i2c probe function ("probe_new") for probes. 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); * configured v. probed comparisons are performed by comparing the configured name to the detected name, instead of the ids; this involves strcmp but is still cheaper than comparing all the device names when scanning the tables; * anything else is handled by calling i2c_match_id() with the same level of error-handling (if any) as before. Additionally, the mismatch message in the ltc2978 driver is adjusted so that it no longer assumes that the driver_data is an index into ltc2978_id. Signed-off-by: NStephen Kitt <steve@sk2.org> Acked-by: NWolfram Sang <wsa@kernel.org> Link: https://lore.kernel.org/r/20200808210004.30880-1-steve@sk2.orgSigned-off-by: NGuenter Roeck <linux@roeck-us.net>
-
由 Zbigniew Lukwinski 提交于
Adding implementation for new attributes (rated_min/rated_max) to cover PMBus specification about rated values reporting: MFR_VIN_MIN, MFR_VIN_MAX, MFR_IIN_MAX, MFR_PIN_MAX, MFR_VOUT_MIN, MFR_VOUT_MAX, MFR_IOUT_MAX, MFR_POUT_MAX, MFR_MAX_TEMP_1/2/3. Tested with OpenBMC stack. All rated attributes were available and reported correct values. Signed-off-by: NZbigniew Lukwinski <zbigniew.lukwinski@linux.intel.com> Link: https://lore.kernel.org/r/1596224237-32280-4-git-send-email-zbigniew.lukwinski@linux.intel.comSigned-off-by: NGuenter Roeck <linux@roeck-us.net>
-
由 Guenter Roeck 提交于
Starting with MAX34451, the chips of this series support STATUS_IOUT and STATUS_TEMPERATURE commands, and no longer report over-current and over-temperature status with STATUS_MFR_SPECIFIC. Fixes: 7a001dba ("hwmon: (pmbus/max34440) Add support for MAX34451.") Fixes: 50115ac9 ("hwmon: (pmbus/max34440) Add support for MAX34460 and MAX34461") Reported-by: NSteve Foreman <foremans@google.com> Cc: Steve Foreman <foremans@google.com> Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
-
- 08 9月, 2020 1 次提交
-
-
由 Bartosz Golaszewski 提交于
Shrink pmbus code by using devm_hwmon_device_register_with_groups() and devm_krealloc() instead of their non-managed variants. Signed-off-by: NBartosz Golaszewski <bgolaszewski@baylibre.com> Acked-by: NGuenter Roeck <linux@roeck-us.net> Link: https://lore.kernel.org/r/20200824173859.4910-3-brgl@bgdev.plSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 17 8月, 2020 1 次提交
-
-
由 Grant Peltier 提交于
Per the RAA228228 datasheet, READ_TEMPERATURE_1 is not a supported PMBus command. Signed-off-by: NGrant Peltier <grantpeltier93@gmail.com> Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
-
- 24 7月, 2020 2 次提交
-
-
由 Josh Lehan 提交于
Using s64 type, instead of long type, for internal calculations and for the sysfs interface. This allows 64-bit values to appear correctly on 32-bit kernels. As wattage is reported in microwatts, monitoring a power supply over 2KW requires this. Although it may seem unlikely to run a 32-bit kernel on such a large machine, enterprise servers often include a BMC, and the BMC might be running a 32-bit kernel. Signed-off-by: NJosh Lehan <krellan@google.com> [groeck: Removed Change-Id and other tags, reformatted description] Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
-
由 Ugur Usug 提交于
Add support for max20710 into the existing max20730 driver. Signed-off-by: NUgur Usug <ugur.usug@maximintegrated.com> Link: https://lore.kernel.org/r/BYAPR11MB317423C13909AE6F1913BBD7FD9C0@BYAPR11MB3174.namprd11.prod.outlook.com [groeck: Fixed various whitespace errors] Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
-
- 20 7月, 2020 1 次提交
-
-
由 Manikandan Elumalai 提交于
The adm1278 temp attribute need it for openbmc platform . This feature not enabled by default, so PMON_CONFIG needs to enable it. Signed-off-by: NManikandan Elumalai <manikandan.hcl.ers.epl@gmail.com> Link: https://lore.kernel.org/r/20200622153727.GA9347@cnn [groeck: Split long line] Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
-
- 09 7月, 2020 1 次提交
-
-
由 Chu Lin 提交于
Issue: When PEC is enabled, binding adm1272 to the adm1275 would fail due to PEC error. See below: adm1275: probe of xxxx failed with error -74 Diagnosis: Per the datasheet of adm1272, adm1278, adm1293 and amd1294, PMON_CONFIG (0xd4) is 16bits wide. On the other hand, PMON_CONFIG (0xd4) for adm1275 is 8bits wide. The driver should not assume everything is 8bits wide and read only 8bits from it. Solution: If it is adm1272, adm1278, adm1293 and adm1294, use i2c_read_word. Else, use i2c_read_byte Testing: Binding adm1272 to the driver. The change is only tested on adm1272. Signed-off-by: NChu Lin <linchuyuan@google.com> Link: https://lore.kernel.org/r/20200709040612.3977094-1-linchuyuan@google.comSigned-off-by: NGuenter Roeck <linux@roeck-us.net>
-
- 03 7月, 2020 1 次提交
-
-
由 Tao Ren 提交于
Fix a typo in SENSORS_IR35221 option: module name should be "ir35221" instead of "ir35521". Fixes: 8991ebd9 ("hwmon: (pmbus) Add client driver for IR35221") Cc: Samuel Mendoza-Jonas <sam@mendozajonas.com> Signed-off-by: NTao Ren <rentao.bupt@gmail.com> Link: https://lore.kernel.org/r/20200702221349.18139-1-rentao.bupt@gmail.comSigned-off-by: NGuenter Roeck <linux@roeck-us.net>
-
- 23 6月, 2020 1 次提交
-
-
由 Jan Kundrát 提交于
Commit 16358542 ("hwmon: (pmbus) Implement multi-phase support") added support for multi-phase pmbus devices. However, when calling pmbus_add_sensor() for fans, the patch swapped the `page` and `reg` attributes. As a result, the fan speeds were reported as 0 RPM on my device. Signed-off-by: NJan Kundrát <jan.kundrat@cesnet.cz> Fixes: 16358542 ("hwmon: (pmbus) Implement multi-phase support") Cc: stable@vger.kernel.org # v5.7+ Link: https://lore.kernel.org/r/449bc9e6c0e4305581e45905ce9d043b356a9932.1592904387.git.jan.kundrat@cesnet.cz [groeck: Fixed references to offending commit] Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
-