[PATCH linux dev-4.10 v2 3/3] pmbus: max31785: Work around back-to-back writes with FAN_CONFIG_1_2

Joel Stanley joel at jms.id.au
Tue Aug 1 14:27:49 AEST 2017


On Tue, Aug 1, 2017 at 12:49 PM, Andrew Jeffery <andrew at aj.id.au> wrote:
> --- a/drivers/hwmon/pmbus/max31785.c
> +++ b/drivers/hwmon/pmbus/max31785.c
> @@ -48,6 +48,55 @@ enum max31785_regs {
>
>  #define MAX31785_NR_PAGES              23
>
> +/*
> + * MAX31785 dragons ahead

ENODRAGONS. Daenerys will not be pleased.

> + *
> + * It seems there's an undocumented timing constraint when performing
> + * back-to-back writes where the first write is to FAN_CONFIG_1_2. The device
> + * provides no indication of this besides NACK'ing master Txs; no bits are set
> + * in STATUS_BYTE to suggest anything has gone wrong.
> + *
> + * Given that, do a one-shot retry of the write.
> + *
> + * The max31785_*_write_*_data() functions should be used at any point where
> + * the prior write is to FAN_CONFIG_1_2.
> + */
> +static int max31785_i2c_smbus_write_byte_data(struct i2c_client *client,
> +                                             int command, u16 data)

nit: data should be a u8.

I will fix it when I apply. Thanks for the patches!

Cheers,

Joel


More information about the openbmc mailing list