diff options
author | Eddie James <eajames@linux.ibm.com> | 2019-12-19 23:50:07 +0300 |
---|---|---|
committer | Guenter Roeck <linux@roeck-us.net> | 2020-01-24 00:15:10 +0300 |
commit | 74a71a831bea81ebb3feb379e62c8accbbec5476 (patch) | |
tree | 6d837aa51dd21bb6fa89fab6ece509f662db8231 /drivers/hwmon | |
parent | 1952d79a0d2635c9130a48a598dd2f1eea70c45b (diff) | |
download | linux-74a71a831bea81ebb3feb379e62c8accbbec5476.tar.xz |
hwmon: (pmbus/ibm-cffps) Fix the LED behavior when turned off
The driver should remain in control of the LED on the PSU, even while
off, not the PSU firmware as previously indicated.
Signed-off-by: Eddie James <eajames@linux.ibm.com>
Link: https://lore.kernel.org/r/1576788607-13567-4-git-send-email-eajames@linux.ibm.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'drivers/hwmon')
-rw-r--r-- | drivers/hwmon/pmbus/ibm-cffps.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/hwmon/pmbus/ibm-cffps.c b/drivers/hwmon/pmbus/ibm-cffps.c index b37faf1440d2..1c91ee1f9926 100644 --- a/drivers/hwmon/pmbus/ibm-cffps.c +++ b/drivers/hwmon/pmbus/ibm-cffps.c @@ -47,13 +47,9 @@ #define CFFPS_MFR_VAUX_FAULT BIT(6) #define CFFPS_MFR_CURRENT_SHARE_WARNING BIT(7) -/* - * LED off state actually relinquishes LED control to PSU firmware, so it can - * turn on the LED for faults. - */ -#define CFFPS_LED_OFF 0 #define CFFPS_LED_BLINK BIT(0) #define CFFPS_LED_ON BIT(1) +#define CFFPS_LED_OFF BIT(2) #define CFFPS_BLINK_RATE_MS 250 enum { @@ -436,6 +432,9 @@ static void ibm_cffps_create_led_class(struct ibm_cffps *psu) rc = devm_led_classdev_register(dev, &psu->led); if (rc) dev_warn(dev, "failed to register led class: %d\n", rc); + else + i2c_smbus_write_byte_data(client, CFFPS_SYS_CONFIG_CMD, + CFFPS_LED_OFF); } static struct pmbus_driver_info ibm_cffps_info[] = { |