linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sebastian Reichel <sre@kernel.org>
To: Guenter Roeck <linux@roeck-us.net>
Cc: Andrey Smirnov <andrew.smirnov@gmail.com>,
	"Andrew F. Davis" <afd@ti.com>,
	Linux PM list <linux-pm@vger.kernel.org>,
	Chris Healy <cphealy@gmail.com>, Cory Tusar <cory.tusar@zii.aero>,
	Lucas Stach <l.stach@pengutronix.de>,
	Fabio Estevam <fabio.estevam@nxp.com>,
	linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v3 2/2] power: supply: ucs1002: Add HWMON interface
Date: Tue, 11 Jun 2019 21:46:51 +0200	[thread overview]
Message-ID: <20190611194651.rmyo4jhdy7xgrgpu@earth.universe> (raw)
In-Reply-To: <20190605183945.GA2442@roeck-us.net>

[-- Attachment #1: Type: text/plain, Size: 1964 bytes --]

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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2019-06-11 19:46 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-05  7:23 [PATCH v3 0/2] HWMON compatibility layer for power supplies Andrey Smirnov
2019-06-05  7:23 ` [PATCH v3 1/2] power: supply: Add HWMON compatibility layer Andrey Smirnov
2019-06-05  7:23 ` [PATCH v3 2/2] power: supply: ucs1002: Add HWMON interface Andrey Smirnov
2019-06-05 16:26   ` Andrew F. Davis
2019-06-05 17:47     ` Andrey Smirnov
2019-06-05 18:39       ` Guenter Roeck
2019-06-11 19:46         ` Sebastian Reichel [this message]
2019-06-12  2:02           ` Andrey Smirnov
2019-06-05 21:35 ` [PATCH v3 0/2] HWMON compatibility layer for power supplies Chris Healy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190611194651.rmyo4jhdy7xgrgpu@earth.universe \
    --to=sre@kernel.org \
    --cc=afd@ti.com \
    --cc=andrew.smirnov@gmail.com \
    --cc=cory.tusar@zii.aero \
    --cc=cphealy@gmail.com \
    --cc=fabio.estevam@nxp.com \
    --cc=l.stach@pengutronix.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux@roeck-us.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).