Re: [PATCH v4 1/1] power: supply: Add HWMON compatibility layer

From: Andrey Smirnov
Date: Tue Jul 09 2019 - 03:27:55 EST


On Thu, Jun 27, 2019 at 11:27 AM Sebastian Reichel <sre@xxxxxxxxxx> wrote:
>
> Hi,
>
> On Wed, Jun 12, 2019 at 01:44:04AM -0700, Andrey Smirnov wrote:
> > Add code implementing HWMON adapter/compatibility layer to allow
> > expositing various sensors present on power supply devices via HWMON
> > subsystem. This is done in order to allow userspace to use single
> > ABI/library(libsensors) to access/manipulate all of the sensors of the
> > system.
> >
> > Signed-off-by: Andrey Smirnov <andrew.smirnov@xxxxxxxxx>
> > Reviewed-by: Guenter Roeck <linux@xxxxxxxxxxxx>
> > Tested-by: Chris Healy <cphealy@xxxxxxxxx>
> > ---
>
> Thanks, queued.
>

Hmm, I just realized that power supply exposing POWER_SUPPLY_PROP_TEMP
will have a thermal zone created for it by default, which will expose
said reading via thermal/HWMON integration layer. Do we want to do
anything about this duplication of functionality? Maybe hide it here
if desc->no_thermal is true? Or just drop reporting temperature from
this patch?

Thanks,
Andrey Smirnov