[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACRpkdZ+Epa_Y2Kr3dy3-BM8qrcV3f3fWsJXUAbhMTqd268+hw@mail.gmail.com>
Date: Mon, 28 Nov 2011 14:04:06 +0100
From: Linus Walleij <linus.walleij@...aro.org>
To: Greg KH <gregkh@...e.de>
Cc: NeilBrown <neilb@...e.de>, Arnd Bergmann <arnd@...db.de>,
myungjoo.ham@...il.com, linux-kernel@...r.kernel.org,
Mike Lockwood <lockwood@...roid.com>,
Arve Hjønnevåg <arve@...roid.com>,
Kyungmin Park <kyungmin.park@...sung.com>,
Donggeun Kim <dg77.kim@...sung.com>,
Grant Likely <grant.likely@...retlab.ca>,
Kalle Komierowski <karl.komierowski@...ricsson.com>,
Johan PALSSON <johan.palsson@...ricsson.com>,
Daniel WILLERUD <daniel.willerud@...ricsson.com>,
Dmitry Torokhov <dmitry.torokhov@...il.com>,
Mian Yousaf KAUKAB <mian.yousaf.kaukab@...ricsson.com>,
morten.christiansen@...ricsson.com
Subject: Re: [RFC PATCH 0/3] introduce: Multistate Switch Class
On Mon, Nov 28, 2011 at 8:27 AM, Greg KH <gregkh@...e.de> wrote:
> On Mon, Nov 28, 2011 at 12:31:14PM +1100, NeilBrown wrote:
>>
>> My own thought is that this deserves a new device class which allows easy
>> hook-up of in-kernel signalling using notifications and which can be
>> exported as input devices in much the same way the 'gpio' devices can be
>> exported via gpio_keys. The switch could also optionally be exported through
>> sysfs much like gpio can be exported through sysfs.
>
> That might also work, but again, odds are the HID spec already defines
> this type of "switch", so why recreate it as a different type of device?
I think both yes and no, but I will stand corrected.
When you plug it into a host, I guess your device will
negotiate power withdrawal from the host as anything else,
no matter what device or interface classes it presents.
However in the other case I am under the impression that
devices supporting EPS
http://en.wikipedia.org/wiki/Common_External_Power_Supply
Or the "battery charging specification"
http://www.usb.org/developers/devclass_docs/batt_charging_1_1.zip
do so in their Phy transceiver drivers, say e.g.
drivers/usb/otg/ab8500-usb.c in our case. This is sometime
called a "chinese charger" or "dedicated charger". It's just
appearing on the micro-USB port, it doesn't enumerate and
the OS driver does not talk to it. I think it notifies the transceiver
by short-circuiting D+ and D- and the transceiver/phy
driver may in many cases notify charging circuitry and
userspace that it's been plugged in (switch uevent,
cable insertion input event or whatever we come up with).
So no, I don't think HID defines this, it's defined in a
physical layer spec, and the interfaces to OS:es are
transciever/phy-custom.
I've CC:ed Morten who was part of writing the charging
spec so he can correct me if I'm saying the wrong thing.
Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists