[PATCH linux dev-4.10 2/3] hwmon: pmbus: max31785: Mark virtual pages as virtual

Matt Spinler mspinler at linux.vnet.ibm.com
Fri Oct 27 07:58:40 AEDT 2017


Reviewed-by: Matt Spinler mspinler at linux.vnet.ibm.com


On 10/26/2017 1:19 AM, Andrew Jeffery wrote:
> Avoid setting PAGE to a unsupported value on the MAX31785 to avoid
> errors from the hardware in circumstances that we know it will fail.
>
> The virtual pages are used to expose the non-standard tacho measurements
> for the second rotor of a dual-rotor fan. Maxim's implementation breaks
> with the PMBus standard by providing a four-byte response to what is
> usually a two-byte command.
>
> Cc: Eddie James <eajames at linux.vnet.ibm.com>
> Cc: Matt Spinler <mspinler at linux.vnet.ibm.com>
> Signed-off-by: Andrew Jeffery <andrew at aj.id.au>
> ---
>   drivers/hwmon/pmbus/max31785.c | 1 +
>   1 file changed, 1 insertion(+)
>
> diff --git a/drivers/hwmon/pmbus/max31785.c b/drivers/hwmon/pmbus/max31785.c
> index 6a0d289ad346..c862ab51e3af 100644
> --- a/drivers/hwmon/pmbus/max31785.c
> +++ b/drivers/hwmon/pmbus/max31785.c
> @@ -436,6 +436,7 @@ static int max31785_of_fan_config(struct i2c_client *client,
>
>   			info->pages = max(info->pages, virtual + 1);
>   			info->func[virtual] |= PMBUS_HAVE_FAN12;
> +			info->func[virtual] |= PMBUS_PAGE_VIRTUAL;
>   		}
>   	}
>



More information about the openbmc mailing list