lkml.org 
[lkml]   [2019]   [Jun]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3 2/2] power: supply: ucs1002: Add HWMON interface
Hi,

On Wed, Jun 05, 2019 at 11:39:45AM -0700, Guenter Roeck wrote:
> On Wed, Jun 05, 2019 at 10:47:25AM -0700, Andrey Smirnov wrote:
> > On Wed, Jun 5, 2019 at 9:26 AM Andrew F. Davis <afd@ti.com> wrote:
> > >
> > > On 6/5/19 3:23 AM, Andrey Smirnov wrote:
> > > > Expose current sensors found on UCS1002 via HWMON.
> > > >
> > > > Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
> > > > Reviewed-by: Guenter Roeck <linux@roeck-us.net>
> > > > Cc: Chris Healy <cphealy@gmail.com>
> > > > Cc: Cory Tusar <cory.tusar@zii.aero>
> > > > Cc: Lucas Stach <l.stach@pengutronix.de>
> > > > Cc: Fabio Estevam <fabio.estevam@nxp.com>
> > > > Cc: Guenter Roeck <linux@roeck-us.net>
> > > > Cc: Sebastian Reichel <sre@kernel.org>
> > > > Cc: linux-kernel@vger.kernel.org
> > > > Cc: linux-pm@vger.kernel.org
> > > > ---
> > > > drivers/power/supply/ucs1002_power.c | 6 ++++++
> > > > 1 file changed, 6 insertions(+)
> > > >
> > > > diff --git a/drivers/power/supply/ucs1002_power.c b/drivers/power/supply/ucs1002_power.c
> > > > index 677f20a4d76f..a4b6b37549cf 100644
> > > > --- a/drivers/power/supply/ucs1002_power.c
> > > > +++ b/drivers/power/supply/ucs1002_power.c
> > > > @@ -571,6 +571,12 @@ static int ucs1002_probe(struct i2c_client *client,
> > > > return ret;
> > > > }
> > > >
> > > > + ret = devm_power_supply_add_hwmon_sysfs(info->charger);
> > >
> > > Could this be added to the core power supply framework on registering so
> > > all devices get this, vs each driver having to add this line?
> > >
> >
> > I'd say it is up to Sebastian to decide if this should be opt-out
> > rather than opt-in. I have no objections to either approach.
> >
>
> Same here, and agreed.

I think this should be registered in power_supply_register() and
free'd in power_supply_unregister(). It's not device specific at
all and the functionality can be configured via Kconfig.

-- Sebastian
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2019-06-11 21:47    [W:0.094 / U:0.100 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site