LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Anton Vorontsov <cbou@mail.ru>
To: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Cc: Paul Sokolovsky <pmiscml@gmail.com>, ian <spyro@f2s.com>,
kernel-discuss@handhelds.org, Greg KH <gregkh@suse.de>,
linux-kernel@vger.kernel.org,
David Woodhouse <dwmw2@infradead.org>,
Shem Multinymous <multinymous@gmail.com>
Subject: Re: [Kernel-discuss] Re: [PATCH 3/8] Universal power supply class (was: battery class)
Date: Mon, 7 May 2007 01:38:29 +0400 [thread overview]
Message-ID: <20070506213829.GD10236@zarina> (raw)
In-Reply-To: <20070506180604.GA31940@khazad-dum.debian.net>
On Sun, May 06, 2007 at 03:06:04PM -0300, Henrique de Moraes Holschuh wrote:
> On Sat, 05 May 2007, Paul Sokolovsky wrote:
> > Saturday, May 5, 2007, 4:46:26 PM, you wrote:
> > > On Sat, 2007-05-05 at 00:54 -0300, Henrique de Moraes Holschuh wrote:
> > >> Given that USB-power *is* usually also "dumb" (i.e. it doesn't do any
> > >> control signaling over the USB bus for power-control purposes),
> >
> > > it might be dumb, but it is useful to know wether the PDA is charging
> > > from usb or mains power. and some devices allow one to switch on / off
> > > the ability to charge via usb
> >
> > And USB does have power budgetting requirements, etc. (like
> > was already pointed in own of initial review messages). So, USB
> > is definitely not the same thing as "dumb DC".
>
> Everything does. A dumb DC power source is a dumb DC power source. USB is
> no different here, *unless* it is using USB signaling to control the power
> link, at which point it is not a dumb DC power source anymore.
>
> There really is no difference beween an AC brick, a DC brick, an AC/DC
> brick, or an USB port supplying DC power in a dumb way in a laptop or
> handheld: they are all supposed-continous DC power supplies with a maximum
> power budget.
>
> But the "GUI should show it differently" part does make sense. I am not
> completely convinced a high number of top-level types is the best way to go
> about it, though. I'd use subtypes, and a comprehensive enough set of
> standard types and sub-types, along with a description of exactly what they
> are to be used for. This will make it MUCH easier on the userspace side for
> GUI authors, and it will be much better for people to not use the wrong
> types when converting to the new class...
Um... well, if we'll speak for easiness, then just "type" is more easy and
less error-prone than type + subtype. ;-) So, personally I see nothing
wrong with MAINS/USB/Battery/UPS power supply types. Though, as you may
noticed I'm easy to convince. ;-) So, if you'll elaborate it, I might
finally will see my wrongness.
Just in case I'll be convinced...
.type = POWER_SUPPLY_TYPE_MAINS,
.subtype = POWER_SUPPLY_SUBTYPE_USB,
Looks okay?
.type = POWER_SUPPLY_TYPE_MAINS,
.subtype = POWER_SUPPLY_SUBTYPE_AC,
And SUBTYPE_AC looks not good already, because we indeed tried to
avoid AC/DC meanings in type fields, because current_type attribute
will be better. So, what subtype name we should use?
.type = POWER_SUPPLY_TYPE_BATTERY,
.subtype = POWER_SUPPLY_SUBTYPE_????,
What should be in "????" for plain batteries? Should UPS be
subtype of battery type?
.type = POWER_SUPPLY_TYPE_MAINS,
.subtype = POWER_SUPPLY_SUBTYPE_UPS,
Just wrong.
So, notice that subtype brings complications, not solves them.
Thanks!
--
Anton Vorontsov
email: cbou@mail.ru
backup email: ya-cbou@yandex.ru
irc://irc.freenode.org/bd2
next prev parent reply other threads:[~2007-05-06 21:42 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-03 21:31 Anton Vorontsov
2007-05-03 22:14 ` [Kernel-discuss] " ian
2007-05-03 22:55 ` Anton Vorontsov
2007-05-03 22:53 ` Greg KH
2007-05-03 23:08 ` CaT
2007-05-03 23:54 ` Anton Vorontsov
2007-05-04 4:55 ` Shem Multinymous
2007-05-05 3:54 ` Henrique de Moraes Holschuh
2007-05-05 12:32 ` Anton Vorontsov
2007-05-05 13:39 ` [Kernel-discuss] " pHilipp Zabel
2007-05-05 18:50 ` Jan Engelhardt
2007-05-06 21:13 ` Anton Vorontsov
2007-05-05 14:29 ` Paul Sokolovsky
2007-05-05 14:39 ` Damien Tournoud
2007-05-06 21:50 ` Anton Vorontsov
2007-05-05 13:46 ` ian
2007-05-05 14:06 ` Paul Sokolovsky
2007-05-06 18:06 ` Henrique de Moraes Holschuh
2007-05-06 21:38 ` Anton Vorontsov [this message]
2007-05-06 18:09 ` Henrique de Moraes Holschuh
2007-05-06 21:07 ` Anton Vorontsov
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=20070506213829.GD10236@zarina \
--to=cbou@mail.ru \
--cc=dwmw2@infradead.org \
--cc=gregkh@suse.de \
--cc=hmh@hmh.eng.br \
--cc=kernel-discuss@handhelds.org \
--cc=linux-kernel@vger.kernel.org \
--cc=multinymous@gmail.com \
--cc=pmiscml@gmail.com \
--cc=spyro@f2s.com \
--subject='Re: [Kernel-discuss] Re: [PATCH 3/8] Universal power supply class (was: battery class)' \
/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
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).