Hi, I'm using switch_class and switch_gpio drivers for headset detection, however I had to make some modifications to the current code to make it work. I'd like to share that and also get feedback from you.
1. When requesting the gpio-based interrupt line I had problems with the current flag (IRQF_TRIGGER_LOW) because it's not supported by the Interrupt Handler mechanism. The types of interrupts supported in my case are rising/falling triggers. For headset detection, it seems logical to me to use rising/falling triggers for insertion/removal detection, so I think we can use them instead directly in the switch_gpio driver. Although probably I'm missing a situation when level triggers need to be used. If that is the case, then letting switch_gpio client drivers to specify the irqflags could be a good idea. 2. The DEVPATH value generated by the uevent doesn't match with the one specified in HeadsetObserver class, which is currently "DEVPATH=/devices/virtual/switch/h2w". switch_class driver generates a value "DEVPATH=/class/switch/h2w". I guess that is only a matter of updating HeadsetObserver code. Please let me know your comments. -Misa --~--~---------~--~----~------------~-------~--~----~ unsubscribe: [email protected] website: http://groups.google.com/group/android-kernel -~----------~----~----~----~------~----~------~--~---
