[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220825125932.GA598991@roeck-us.net>
Date: Thu, 25 Aug 2022 05:59:32 -0700
From: Guenter Roeck <linux@...ck-us.net>
To: Duke Du <dukedu83@...il.com>
Cc: jdelvare@...e.com, corbet@....net, linux-hwmon@...r.kernel.org,
linux-doc@...r.kernel.org, linux-kernel@...r.kernel.org,
fran.hsu@...ntatw.com, charles.hsu@...ntatw.com,
george.hung@...ntatw.com, duke.du@...ntatw.com
Subject: Re: [PATCH v3] hwmon: Add driver for the TEXAS TPS546D24 Buck
Converter.
On Thu, Aug 25, 2022 at 07:22:34PM +0800, Duke Du wrote:
> > >
> > > When the vout mode bit 7 is set, we update vout mode and clear bit 7
> > > in the driver probe function, this operation is the same as changing
> > > the reported value of PMBUS_VOUT_MODE ?
> >
> > Absolutely not. When changing the bit in the register, the chip operation
> > mode changes, and the associated values (VOUT*) change from relative
> > to absolute mode. When changing the value reported by the chip, nothing
> > changes from the chip side, it still operates in relative mode, and all
> > VOUT* registers are set to relative mode.
> >
> > Guenter
> >
> Got it, thanks for your reply !!
>
> Another question, If we don't need to change the mode from relative to absolute
> mode, could we just change the PMBus core to determine vout mode with only
> bit 5 and 6 ?
> And clearing the bit 7 in the driver (tps546d24.c) probe function
> would not be needed, right ?
>
Sorry, you lost me. The problem is that the chip supports relative mode,
and that the PMBus core doesn't. We can not just ignore bit 7 of vout mode;
that would result in bad data for all vout limit attributes since the PMBus
core (currently) only supports absolute mode. We could add support for
relative mode to the PMBus core, but that would be a major effort.
This is why I suggested to change the chip mode to absolute mode in the
tps546d24 driver. If you don't want to do that, you'll have to implement
relative mode support in the PMBus core. I'll be happy to review patches,
but you'll have to implement and test it since I have neither the time
nor the necessary hardware to do it myself.
Thanks,
Guenter
Powered by blists - more mailing lists