Re: [PATCH] hwmon: (pmbus) More stringent checking of VOUT_MODEregister

From: Guenter Roeck
Date: Mon Mar 07 2011 - 17:12:25 EST


On Mon, Mar 07, 2011 at 04:44:43PM -0500, Greg Schnorr wrote:
> Looks good, tested and works on one such VOUT_MODE poor design...
>
> On 3/1/11 9:32 PM, "Guenter Roeck" <guenter.roeck@xxxxxxxxxxxx> wrote:
>
> > Some PMBus chips do not support the VOUT_MODE register. To make matters worse,
> > such chips may not return an error when reading the register either, but
> > instead
> > return 0xff.
> >
> > Check if the register exists using pmbus_check_byte_register() before reading
> > its value. In addition, validate the returned value and ignore it if it is
> > 0xff
> > (which is invalid).
> >
> > Reported-by: Greg Schnorr <gschnorr@xxxxxxxxx>
> > Signed-off-by: Guenter Roeck <guenter.roeck@xxxxxxxxxxxx>
> Acked-by: Greg Schnorr <gschnorr@xxxxxxxxx>
>
Thanks!

Guenter
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/