Re: [PATCH 0/7] HID: picoLCD updates

2012-08-19 Thread Bruno Prémont
On Sat, 18 August 2012 Alan Stern wrote: > On Sat, 18 Aug 2012, Bruno Prémont wrote: > > > One thing I just though about, how does usbhid handle the calls to > > usbhid_submit_report() when hid_hw_stop()/hid_hw_close() have already > > been called? > > Looks like they aren't synchronized at all.

Re: [PATCH 6/7 v2] HID: picoLCD: drop version check during probe

2012-08-19 Thread Bruno Prémont
Commit 4ea5454203d991ec85264f64f89ca8855fce69b0 [HID: Fix race condition between driver core and ll-driver] introduced new locking around probe/remove functions that prevents any report/reply from hardware to reach driver until it returned from probe. As such, the ask-reply way to checking picoLCD

[PATCH 0/6] HID: picoLCD additional fixes + CIR support

2012-08-19 Thread Bruno Prémont
Hi, This series fixes some race conditions in picoLCD driver during remove() and adds support for IR functionality. Repeatedly binding/unbinding device at hid-picolcd driver level or at usbhid level now works properly (except in rare occasions which trigger a paging error in interrupt context (me

[PATCH 1/6] HID: picoLCD: prevent NULL pointer dereferences

2012-08-19 Thread Bruno Prémont
Driver code expects to get access to struct picolcd_data from hiddev and is not prepared to find a NULL pointer there. Most prominent candidate to trip on it is picolcd_fb_deferred_io(). Delay removing struct picolcd_data from hiddev until all sub-devices have been unregistered. Signed-off-by: Bru

[PATCH 2/6] HID: picoLCD: rework hid-fbdev interaction

2012-08-19 Thread Bruno Prémont
Split out all FB related data out of struct picolcd_data into a struct picolcd_fb_data that is allocated with fb_info. This way fb_info may cleanly outlive struct picolcd_data for as long as needed for its last user to drop his reference. Access to struct picolcd_data is now protected with struct

[PATCH 3/6] HID: picoLCD: Add support for CIR

2012-08-19 Thread Bruno Prémont
Implement support for picoLCD's CIR header using RC_CORE for decoding the IR event stream. Signed-off-by: Bruno Prémont --- drivers/hid/hid-picolcd.h |5 ++- drivers/hid/hid-picolcd_cir.c | 95 +++- drivers/hid/hid-picolcd_core.c |3 +- 3 files

[PATCH 4/6] HID: picoLCD: optimize for inactive debugfs

2012-08-19 Thread Bruno Prémont
Matthieu CASTET adjusted picolcd_debug_out_report() to only operate when there is an active listener on debugfs for events. Do the same on the more important picolcd_debug_raw_event() that is called in interrupt context as opposed to picolcd_debug_out_report() which happens in whichever context th

[PATCH 5/6] HID: picoLCD: fix dumping of IR_DATA report

2012-08-19 Thread Bruno Prémont
The first payload byte indicates how many IR data bytes are following, not including itself. The IR data bytes appear in pairs as they represent a series of 16bit intervals. Signed-off-by: Bruno Prémont --- drivers/hid/hid-picolcd_debugfs.c |4 ++-- 1 files changed, 2 insertions(+), 2 deleti

[PATCH 6/6] HID: picoLCD: use proper device as input_dev parent

2012-08-19 Thread Bruno Prémont
Signed-off-by: Bruno Prémont --- drivers/hid/hid-picolcd_core.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/hid/hid-picolcd_core.c b/drivers/hid/hid-picolcd_core.c index 580269b..86df26e 100644 --- a/drivers/hid/hid-picolcd_core.c +++ b/drivers/hid/hid-picol

Re: [PATCH 0/7] HID: picoLCD updates

2012-08-19 Thread Alan Stern
On Sun, 19 Aug 2012, Bruno Prémont wrote: > > I don't know bout hid_hw_close(). Certainly no more reports should be > > submitted following usbhid_stop(). > > Ok, I did just that, prevent new calls to usbhid_submit_report(), after > calling hid_hw_close(), fixed one bug in my code that triggers

Re: [PATCH] input: qt1070: add device tree support

2012-08-19 Thread Bo Shen
Hi Sir, On 8/18/2012 2:26, Shubhrajyoti wrote: Hi Bo, On Friday 17 August 2012 03:33 PM, Bo Shen wrote: This patch enable the qt1070 device tree support If using device tree, the node of qt1070 looks like i2c@0 { // this is an example status = "okay

[PATCH v2] input: dts: qt1070: add device tree support

2012-08-19 Thread Bo Shen
This patch enable the qt1070 device tree support If using device tree, the node of qt1070 looks like i2c@0 { // this is an example status = "okay"; // Enable i2c master qt1070@1b { compatible = "atmel,qt1070";