History

Merge tag 'hwmon-for-v6.8-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging

Pull hwmon fixes from Guenter Roeck: - pmbus/mp2975: Fix driver initialization - gigabyte_waterforce: Add missing unlock in error handling path * tag 'hwmon-for-v6.8-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: hwmon: (pmbus/mp2975) Correct comment inside 'mp2975_read_byte_data' hwmon: (pmbus/mp2975) Fix driver initialization for MP2975 device hwmon: gigabyte_waterforce: Fix locking bug in waterforce_get_status()

Linus Torvalds committed 2 years ago

Commit 43e7ef62 parents 79837a7 91564412 files · +17 −1Browse files

Unified · Split

2 files
  1. drivers/hwmon/gigabyte_waterforce.c +1 −1
  2. drivers/hwmon/pmbus/mp2975.c +16 −0
drivers/hwmon/gigabyte_waterforce.c+1−1
@@ -146,7 +146,7 @@ static int waterforce_get_status(struct waterforce_data *priv) · 145 unmodified lines
146 /* Send command for getting status */146 /* Send command for getting status */
147 ret = waterforce_write_expanded(priv, get_status_cmd, GET_STATUS_CMD_LENGTH);147 ret = waterforce_write_expanded(priv, get_status_cmd, GET_STATUS_CMD_LENGTH);
148 if (ret < 0)148 if (ret < 0)
149 return ret;149 goto unlock_and_return;
150 150
151 ret = wait_for_completion_interruptible_timeout(&priv->status_report_received,151 ret = wait_for_completion_interruptible_timeout(&priv->status_report_received,
152 msecs_to_jiffies(STATUS_VALIDITY));152 msecs_to_jiffies(STATUS_VALIDITY));
drivers/hwmon/pmbus/mp2975.c+16−0
@@ -126,6 +126,21 @@ static const struct regulator_desc __maybe_unused mp2975_reg_desc[] = { · 125 unmodified lines
126 126
127#define to_mp2975_data(x) container_of(x, struct mp2975_data, info)127#define to_mp2975_data(x) container_of(x, struct mp2975_data, info)
128 128
129static int mp2975_read_byte_data(struct i2c_client *client, int page, int reg)
130{
131 switch (reg) {
132 case PMBUS_VOUT_MODE:
133 /*
134 * Report direct format as configured by MFR_DC_LOOP_CTRL.
135 * Unlike on MP2971/MP2973 the reported VOUT_MODE isn't automatically
136 * internally updated, but always reads as PB_VOUT_MODE_VID.
137 */
138 return PB_VOUT_MODE_DIRECT;
139 default:
140 return -ENODATA;
141 }
142}
143
129static int144static int
130mp2975_read_word_helper(struct i2c_client *client, int page, int phase, u8 reg,145mp2975_read_word_helper(struct i2c_client *client, int page, int phase, u8 reg,
131 u16 mask)146 u16 mask)
@@ -869,6 +884,7 @@ static struct pmbus_driver_info mp2975_info = { · 737 unmodified lines
869 PMBUS_HAVE_IIN | PMBUS_HAVE_IOUT | PMBUS_HAVE_STATUS_IOUT |884 PMBUS_HAVE_IIN | PMBUS_HAVE_IOUT | PMBUS_HAVE_STATUS_IOUT |
870 PMBUS_HAVE_TEMP | PMBUS_HAVE_STATUS_TEMP | PMBUS_HAVE_POUT |885 PMBUS_HAVE_TEMP | PMBUS_HAVE_STATUS_TEMP | PMBUS_HAVE_POUT |
871 PMBUS_HAVE_PIN | PMBUS_HAVE_STATUS_INPUT | PMBUS_PHASE_VIRTUAL,886 PMBUS_HAVE_PIN | PMBUS_HAVE_STATUS_INPUT | PMBUS_PHASE_VIRTUAL,
887 .read_byte_data = mp2975_read_byte_data,
872 .read_word_data = mp2975_read_word_data,888 .read_word_data = mp2975_read_word_data,
873#if IS_ENABLED(CONFIG_SENSORS_MP2975_REGULATOR)889#if IS_ENABLED(CONFIG_SENSORS_MP2975_REGULATOR)
874 .num_regulators = 1,890 .num_regulators = 1,

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t