Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp5003855ybi; Tue, 11 Jun 2019 17:09:55 -0700 (PDT) X-Google-Smtp-Source: APXvYqxzAOBHHvBW3NZ9eI1nVjqx3eMQmBat9QBTrsLi2DaMooXiEky0fEdWA6+O7V2rccpo1XHQ X-Received: by 2002:a17:902:6bc8:: with SMTP id m8mr76956508plt.227.1560298195843; Tue, 11 Jun 2019 17:09:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560298195; cv=none; d=google.com; s=arc-20160816; b=WljP4XPUEkiSmP+LBs6xYcz4R4tt4G3JtHTp2wb9XcQnVNq23d8PNlnKk8z5JoHIxA 08tAIibyN9ltudMGoVQ9RcrJ46T2Es/r45lrXp8MlqMqNAyoPnecWnC5bxxf9Aeklo6b hgtvfUaDxJJ/Q4M1rOJXMiVZWoDq+FEEK6EeEuy4RaEBtQRWmusUILRRdmevCn/VjcSJ O9z9D45DW9giHgHpVDDMMXJb7A4iYrd1qTlCAfOKwgicZI/BTKbH8p+tk09lva5Ltr9s 9SjROe8xv09zF8QLKBZPHvjBZujc7FkLoVxFQZu28ni5Vdr0fewRGbWe/k4CszcVVPOu ZKhg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=qv/fYNld6NG5xq+UEuMFH7GtOAD2tBYZz9mvwCrYyr0=; b=PquhvczbXQm20mt2JtOAVMISD5oM4+9xYgjO9oVc9tuTDvpasDJYcWEFOxSITaxg04 2c7kkLOOY1zD0VpE2l4SSZt2FgVqZ3JVImT8Mkrt8wXd32XxsJv+acyBzamjluxuIkSQ Dld7cW+YNvmC/iziG4mmJ13qvVeeqvxQAFI/zmx4ZqCie8UraFeL2wdEndbWPfuoW9JZ ALVTCB6AvG8V1Gf/8uHPZiN/vyDc2Dtm6jBWXxLVXgEr4gwKjOoB8L268tC4IQoDa5pR h4xgpbQPV71ZX25auHBlV71N/Ze5rYgC7LoJgC5pdJyNdygd0h+bcloeh5LQN38/tEKt n2xw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=NmpKMBrZ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l11si13187928pgp.438.2019.06.11.17.09.41; Tue, 11 Jun 2019 17:09:55 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=NmpKMBrZ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2406268AbfFKTq4 (ORCPT + 99 others); Tue, 11 Jun 2019 15:46:56 -0400 Received: from mail.kernel.org ([198.145.29.99]:58798 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2405627AbfFKTq4 (ORCPT ); Tue, 11 Jun 2019 15:46:56 -0400 Received: from earth.universe (unknown [185.62.205.103]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 7A97021734; Tue, 11 Jun 2019 19:46:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1560282414; bh=KmHH51L9OWNGt+JXZgeXpCttosUAXb7SFFEMqYwrEX8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=NmpKMBrZAm/zovGDFzVVJNDPkVxtHzZAPEd8JnPShvNCXa8bx/4rGKuOA3joFJkYz WmxCy3WPzlCH1oHk9rtzoAzhXDxenGIzxK7Za89waYvOGhM6Eo4u5iZmBF7Aj47f+V mJnELLOCK0P1qMJw0ihfgu4xAeCfkx+rDcqi8hZk= Received: by earth.universe (Postfix, from userid 1000) id EF7E33C0C77; Tue, 11 Jun 2019 21:46:51 +0200 (CEST) Date: Tue, 11 Jun 2019 21:46:51 +0200 From: Sebastian Reichel To: Guenter Roeck Cc: Andrey Smirnov , "Andrew F. Davis" , Linux PM list , Chris Healy , Cory Tusar , Lucas Stach , Fabio Estevam , linux-kernel Subject: Re: [PATCH v3 2/2] power: supply: ucs1002: Add HWMON interface Message-ID: <20190611194651.rmyo4jhdy7xgrgpu@earth.universe> References: <20190605072323.21990-1-andrew.smirnov@gmail.com> <20190605072323.21990-3-andrew.smirnov@gmail.com> <20190605183945.GA2442@roeck-us.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="67udbxn3w4jw6xeb" Content-Disposition: inline In-Reply-To: <20190605183945.GA2442@roeck-us.net> User-Agent: NeoMutt/20180716 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --67udbxn3w4jw6xeb Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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 wrote: > > > > > > On 6/5/19 3:23 AM, Andrey Smirnov wrote: > > > > Expose current sensors found on UCS1002 via HWMON. > > > > > > > > Signed-off-by: Andrey Smirnov > > > > Reviewed-by: Guenter Roeck > > > > Cc: Chris Healy > > > > Cc: Cory Tusar > > > > Cc: Lucas Stach > > > > Cc: Fabio Estevam > > > > Cc: Guenter Roeck > > > > Cc: Sebastian Reichel > > > > 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/s= upply/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 *cl= ient, > > > > return ret; > > > > } > > > > > > > > + ret =3D 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? > > > > >=20 > > 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. > >=20 >=20 > 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 --67udbxn3w4jw6xeb Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEE72YNB0Y/i3JqeVQT2O7X88g7+poFAl0ABScACgkQ2O7X88g7 +pr18hAAok54gDCuCHySN6XdU81SMHYeFoyCmMFGc/1baJdQCmAQmCB3JDcGOMYW XS6GO/mQprQd6JT9pSj5S9fyVEuOjs0uSo7TU/wJ4UEsNmVhUB6g63uhmmuaaj0S Xz+l5X9Ih8v/D5agoLimN1KWx3HhGevRpOt2Vpv/frxcOOoICtA0q9KnD2yJdJks XrWdvDjZuPUps2eqc2mlWk4k17raLs89oMgLzLfw6w5mBJ6vezKT58CTBJX3SMhE oVR9xfzBCARCrMfPW2T2N7S6/zAUz7pYn5nSTkR3IYSF0InWVq8ithSnMuotA9En cS040flGqohlHUT74iZngj5zDCMFYVm2hzzYlcwvYDtLZFBug3JiSBGonrLEYOqG V62gD4dV0Mp5pmOgq6oPO/c9rws0JOtPbHCQj2xeoeiHRyi+zZ9qes6H6DZ2lcBu 2vD5BwEa9ilmrAkxDAe6a9x5JFfZIZB/846/k4v76OVUvvG6R7JCc7LPZ/MMSS+4 NokuvvMg1B/ZjVAd16bkXVjI3i1xN0DFtUnVUrBdUW1ZjDbaHXibNl3qHAXSMdqe JfvGqpdaeZMUVRt9DGr/I8NRNfdMcEyIMgKo6sNL0L/cEePNdjSW1ThK7J1jz96j 7lWUXz8uP+Owd7y9jzaMMcvldeCXrdMaSoByO3s81DfkZlVWWXE= =3nYa -----END PGP SIGNATURE----- --67udbxn3w4jw6xeb--