lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJ0PZbQVO-NMO_DxuSuY5xU3zXus=x+x3SFpXZEcA7n-CGX9Uw@mail.gmail.com>
Date:	Mon, 5 Mar 2012 16:59:42 +0900
From:	MyungJoo Ham <myungjoo.ham@...il.com>
To:	Mark Brown <broonie@...nsource.wolfsonmicro.com>
Cc:	Greg KH <gregkh@...uxfoundation.org>,
	Arnd Bergmann <arnd@...db.de>,
	LKML <linux-kernel@...r.kernel.org>, NeilBrown <neilb@...e.de>,
	Randy Dunlap <rdunlap@...otime.net>,
	Mike Lockwood <lockwood@...roid.com>,
	Arve Hjønnevag <arve@...roid.com>,
	Kyungmin Park <kyungmin.park@...sung.com>,
	Linus Walleij <linus.walleij@...aro.org>,
	Dmitry Torokhov <dmitry.torokhov@...il.com>,
	Morten CHRISTIANSEN <morten.christiansen@...ricsson.com>,
	John Stultz <john.stultz@...aro.org>,
	Joerg Roedel <joerg.roedel@....com>
Subject: Re: [PULL-REQUEST] EXTCON Patches (Re: [PATCH v6 0/5] Introduce
 External Connector Class (extcon))

On Wed, Feb 29, 2012 at 9:35 PM, Mark Brown
<broonie@...nsource.wolfsonmicro.com> wrote:
> On Wed, Feb 29, 2012 at 11:05:39AM +0900, MyungJoo Ham wrote:
>> On Wed, Feb 29, 2012 at 2:45 AM, Mark Brown
>
>> > Don't know if anyone has a specific plan at the moment, though there's
>> > enough people care that I'd imagine it'll happen if Android decides to
>> > use this stuff.
>
>> > That said I don't see this as a blocker myself - it's more like an
>> > afternoon or whatever of work than a serious development effort to do
>> > the updates, but a similar thing applies to most of the Android
>> > userspace updates.
>
>> I'm not sure which Android kernel devide drivers are going to be upstreamed.
>
> There's a lot of things that are just generic functionality and aren't
> at all Android specific, a lot of which is already upstream but just not
> exporting the switch API but instead using other existing kernel APIs.
>
>> However, if the swtich device driver writers decide to keep the
>> functionality limited to the original Android switch class by not
>> providing cable names additionally, the changes will probably be
>> limited to ":s/switch/extcon/g" for API calls and struct name.
>
> For things like headphone detection the actual switch they're providing
> has issues too even just within the switch API - it's called "h2w" with
> magic values.

Reading an H2W switch device driver
(http://git.ziggy471.com/frankenstine.git/plain/arch/arm/mach-msm/htc_headset_mgr.c),
I don't see why it won't be compatible after replacing the name from
switch to extcon except for one more parameter at
switch_dev_register() to extcon_dev_register(). This needs to add the
struct device* dev of the caller probe function:
switch_dev_register(&hi->sdev); should become
extcon_dev_register(&hi->sdev, &pdev->dev);

Because the probe function of this H2W driver keeps
hi->sdev->supported_cable NULL, which was not available in switch
class, any magic values with switch_set_state() and switch_get_state()
should not be affected. Besides, adding callbacks (print_name,
print_state) overrides the behavior of extcon as well as with switch.
I don't see elsewhere to keep any magic values within switch device
drivers.


Cheers!
MyungJoo.

-- 
MyungJoo Ham, Ph.D.
System S/W Lab, S/W Center, Samsung Electronics
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ