提交 6586b14c 编写于 作者: G Guenter Roeck

hwmon: (pmbus) Use device specific function to read fan configuration

Fan control implementation tends to be device specific, so start using
the device specific function call to read fan configuration registers.
Signed-off-by: NGuenter Roeck <guenter.roeck@ericsson.com>
Reviewed-by: NTom Grennan <tom.grennan@ericsson.com>
上级 2cfa6aed
...@@ -1295,9 +1295,7 @@ static void pmbus_add_fan_attributes(struct i2c_client *client, ...@@ -1295,9 +1295,7 @@ static void pmbus_add_fan_attributes(struct i2c_client *client,
break; break;
if (!pmbus_check_word_register(client, page, if (!pmbus_check_word_register(client, page,
pmbus_fan_registers[f]) pmbus_fan_registers[f]))
|| !pmbus_check_byte_register(client, page,
pmbus_fan_config_registers[f]))
break; break;
/* /*
...@@ -1305,7 +1303,7 @@ static void pmbus_add_fan_attributes(struct i2c_client *client, ...@@ -1305,7 +1303,7 @@ static void pmbus_add_fan_attributes(struct i2c_client *client,
* Each fan configuration register covers multiple fans, * Each fan configuration register covers multiple fans,
* so we have to do some magic. * so we have to do some magic.
*/ */
regval = pmbus_read_byte_data(client, page, regval = _pmbus_read_byte_data(client, page,
pmbus_fan_config_registers[f]); pmbus_fan_config_registers[f]);
if (regval < 0 || if (regval < 0 ||
(!(regval & (PB_FAN_1_INSTALLED >> ((f & 1) * 4))))) (!(regval & (PB_FAN_1_INSTALLED >> ((f & 1) * 4)))))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册