On Wed, Mar 18, 2009 at 10:52 PM, Misael Lopez <[email protected]> wrote:
>>> Below are the my changes in kernel side. As mentioned in previous
>>> mail, I'm using Switch GPIO driver (which uses Switch Class driver) to
>>> generate the headset uevent. In the patch, it's also included the
>>> board file (for OMAP 3430SDP board) although it's not part of standard
>>> android kernel it may be useful for reference.
>>
>> Do you have a pointer to those drivers?
>
> Those drivers are provided along with the android kernel. You can find them 
> at:
>
> http://android.git.kernel.org/?p=kernel/common.git;a=tree;f=drivers/switch;h=c02cb39fc78a60aa4b046481596d7b184b39fa8a;hb=453dc2b690b52248ac6dcb068965f1a37d675cef

Ah, thanks, missed that.

Perhaps such a generic "switch" name would be good to change, that's
very vague.

Also, why a special class?  Why not use the input layer for stuff like
this?

And, why have a name attribute that should be obvious from the name of
the struct device?  Why the duplication?

Also, putting 280 bytes on the stack isn't that nice in the
switch_set_state() function, is it really needed?  Why can't that be
dynamic?

And I don't think the "name" has to be duplicated here as it is already
transmitted in the uevent.

Hey code review on the android-kernel list, it's about time :)

thanks,

greg k-h

--~--~---------~--~----~------------~-------~--~----~
unsubscribe: [email protected]
website: http://groups.google.com/group/android-kernel
-~----------~----~----~----~------~----~------~--~---

Reply via email to