linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sebastian Reichel <sre@kernel.org>
To: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Cc: "Andrew F. Davis" <afd@ti.com>,
	"Pallala, Ramakrishna" <ramakrishna.pallala@intel.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"Tc, Jenny" <jenny.tc@intel.com>,
	Andreas Dannenberg <dannenberg@ti.com>
Subject: Re: [PATCH] power: bq24261_charger: Add support for TI BQ24261 charger
Date: Tue, 22 Sep 2015 17:37:25 +0200	[thread overview]
Message-ID: <20150922153725.GA4235@earth> (raw)
In-Reply-To: <55F22740.4080003@samsung.com>

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

Hi,

On Fri, Sep 11, 2015 at 09:58:40AM +0900, Krzysztof Kozlowski wrote:
> On 11.09.2015 01:42, Andrew F. Davis wrote:
> > On 09/09/2015 06:47 PM, Krzysztof Kozlowski wrote:
> >>>>> +- ti,enable-user-write: boolean, if present driver will allow the
> >>>>> user space
> >>>>> +    to control the charging current and voltage through sysfs;
> >>>>
> >>>> This is not DT property. It does not describe hardware.
> >>> We needed a mechanism to enable the sysfs writes on certain properties.
> >>> If DT is not the place where should it go?
> >>
> >> DT is not the place. As I discussed later with Andreas, if you really
> >> need this and if mainline is a place for that then probably this should
> >> be compile option (a Kconfig symbol).
> >>
> > 
> > I think this would actually be a good use for module parameters, this way
> > it could still be set at boot without re-compiling.
> > 
> > I think compile-time disabling sysfs properties because they are
> > "dangerous" is
> > a little bit too artificially restricting and controlling, you can set
> > permissions
> > so only root can change them already. The kernel should not be
> > restricting root,
> > I understand the fear of someone rooting a machine and remotely over
> > charging
> > a LiPo[1], but these physical limits are hardware descriptions and can
> > and should
> > be set by DT, beyond this root should have full control over their machine.
> 
> 
> Indeed module parameters could be used for enabling/disabling debug
> options... but as fair as I understand these are for purely development
> purposes. That is why they got into DT initially, right? To allow the
> developer to play with it on the development board?
> 
> This is why I am really not convinced that this should go to mainline.
> 
> Anyway if it goes, then maybe compiling it out is the safest choice?
> What's the purpose of having it in kernel all the time? If this was a
> debug option, than some experienced user could turn it on and report to
> LKML with extended debug data. But it's not a debug but development option?

Changing the current limit is useful for "expert" users with custom
usb power supplies, that are not correctly detected by extcon. I
also think a module parameter would be the best option here.

-- Sebastian

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  reply	other threads:[~2015-09-22 15:37 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-06 17:23 [PATCH] power: bq24261_charger: Add support for TI BQ24261 charger Ramakrishna Pallala
2015-09-07  3:57 ` Krzysztof Kozlowski
2015-09-09  2:26   ` Andreas Dannenberg
2015-09-09  4:17     ` Krzysztof Kozlowski
2015-09-09 17:31       ` Andreas Dannenberg
2015-09-09 23:49         ` Krzysztof Kozlowski
2015-09-10 14:50           ` Laurentiu Palcu
2015-09-09 18:11   ` Pallala, Ramakrishna
2015-09-09 23:47     ` Krzysztof Kozlowski
2015-09-10 16:42       ` Andrew F. Davis
2015-09-11  0:58         ` Krzysztof Kozlowski
2015-09-22 15:37           ` Sebastian Reichel [this message]
2015-09-22 15:43             ` Pallala, Ramakrishna
     [not found] ` <1441560187-23611-1-git-send-email-ramakrishna.pallala-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2015-09-09  3:01   ` Fabio Estevam
2015-09-09 22:27 ` Andreas Dannenberg
2015-10-19 17:34   ` Pallala, Ramakrishna
  -- strict thread matches above, loose matches on Subject: below --
2015-09-09 22:47 Alexey Klimov

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=20150922153725.GA4235@earth \
    --to=sre@kernel.org \
    --cc=afd@ti.com \
    --cc=dannenberg@ti.com \
    --cc=devicetree@vger.kernel.org \
    --cc=jenny.tc@intel.com \
    --cc=k.kozlowski@samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=ramakrishna.pallala@intel.com \
    /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).