From: Felipe Balbi <balbi@ti.com>
To: Pavel Machek <pavel@ucw.cz>
Cc: NeilBrown <neilb@suse.de>, Kishon Vijay Abraham I <kishon@ti.com>,
NeilBrown <neil@brown.name>, <linux-kernel@vger.kernel.org>,
GTA04 owners <gta04-owner@goldelico.com>,
Tony Lindgren <tony@atomide.com>, <linux-omap@vger.kernel.org>
Subject: Re: [PATCH 5/6] phy: twl4030-usb: add support for reading resistor on ID pin.
Date: Sun, 7 Jun 2015 22:45:40 -0500 [thread overview]
Message-ID: <20150608034540.GB6129@saruman.tx.rr.com> (raw)
In-Reply-To: <20150606131009.GD1329@xo-6d-61-c0.localdomain>
[-- Attachment #1: Type: text/plain, Size: 1973 bytes --]
On Sat, Jun 06, 2015 at 03:10:09PM +0200, Pavel Machek wrote:
> On Tue 2015-06-02 07:37:31, NeilBrown wrote:
> > On Mon, 1 Jun 2015 19:06:52 +0530 Kishon Vijay Abraham I <kishon@ti.com>
> > wrote:
> >
> > > Hi,
> > >
> > > On Thursday 16 April 2015 01:33 PM, NeilBrown wrote:
> > > > From: NeilBrown <neilb@suse.de>
> > > >
> > > > The twl4030 phy can measure, with low precision, the
> > > > resistance-to-ground of the ID pin.
> > > >
> > > > Add a function to read the value, and export the result
> > > > via sysfs.
> > >
> > > Little sceptical about adding new sysfs entries. Do you have a good reason to
> > > add this?
> >
> > The hardware can report the value, so why not present it to user-space?
> >
> > I originally used this with a udev rule which would configure the maximum
> > current based on the resistance measure - to work with the particular charger
> > hardware I have.
> >
> > More recent patches try to do all of the max-current configuration in the
> > kernel, so I could live without exporting the value via sysfs if that is a
> > show-stopper.
> >
> > I can't see where the scepticism comes from though. It is a well defined
> > and cleary documented feature of the hardware. Why not expose it?
>
> sysfs interface is supposed to work for different chargers, without userspace
> noticing.
>
> Are these values the ones that are likely to be useful there?
These values come from Battery Charger specification 1.1+, IIRC, so no
other values should show up unless documented in future BC revisions.
> > > > + Possible values are:
> > > > + ground
> > > > + 102k
> > > > + 200k
> > > > + 440k
> > > > + floating
> > > > + unknown
>
> ...or would it make more sense to export for example numerical ohms, as that's
> what are other chargers likely to provide?
How do you expose "floating" in Ohms ? UINT_MAX might be one way, but
that would have to be documented.
--
balbi
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2015-06-08 3:48 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-16 8:03 [PATCH 0/6] Enhancements to twl4030 phy to support better charging NeilBrown
2015-04-16 8:03 ` [PATCH 5/6] phy: twl4030-usb: add support for reading resistor on ID pin NeilBrown
2015-06-01 13:36 ` Kishon Vijay Abraham I
2015-06-01 21:37 ` NeilBrown
2015-06-02 13:49 ` Kishon Vijay Abraham I
2015-06-02 14:06 ` [Gta04-owner] " Dr. H. Nikolaus Schaller
2015-06-02 20:11 ` Pavel Machek
2015-06-02 20:47 ` Dr. H. Nikolaus Schaller
2015-06-06 13:10 ` Pavel Machek
2015-06-08 3:45 ` Felipe Balbi [this message]
2015-06-23 9:09 ` [Gta04-owner] " Dr. H. Nikolaus Schaller
2015-04-16 8:03 ` [PATCH 4/6] phy: twl4030-usb: add ABI documentation NeilBrown
2015-04-17 22:14 ` Pavel Machek
2015-04-17 22:34 ` NeilBrown
2015-04-16 8:03 ` [PATCH 3/6] phy: twl4030-usb: remove incorrect pm_runtime_get_sync() in probe function NeilBrown
2015-04-16 8:03 ` [PATCH 6/6] phy: twl4030-usb: add extcon to report cable connections NeilBrown
2015-05-11 13:38 ` Kishon Vijay Abraham I
2015-05-11 15:58 ` Chanwoo Choi
2015-04-16 8:03 ` [PATCH 2/6] phy: twl4030-usb: remove pointless 'suspended' test in 'suspend' callback NeilBrown
2015-04-16 8:03 ` [PATCH 1/6] phy: twl4030-usb: make runtime pm more reliable NeilBrown
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=20150608034540.GB6129@saruman.tx.rr.com \
--to=balbi@ti.com \
--cc=gta04-owner@goldelico.com \
--cc=kishon@ti.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=neil@brown.name \
--cc=neilb@suse.de \
--cc=pavel@ucw.cz \
--cc=tony@atomide.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
Powered by JetHome