Re: [PATCH v2] i2c-hid: introduce HID over i2c specification implementation

2012-11-09 Thread Benjamin Tissoires
Hi Jiri, On Fri, Nov 9, 2012 at 4:49 AM, Jiri Kosina wrote: > On Tue, 16 Oct 2012, Benjamin Tissoires wrote: > >> >> --- /dev/null >> >> +++ b/drivers/hid/i2c-hid/i2c-hid.c >> > ... >> >> +static int i2c_hid_alloc_buffers(struct i2c_hid *ihid) >> >> +{ >> >> + /* the worst case is computed

Re: [PATCH v2] i2c-hid: introduce HID over i2c specification implementation

2012-11-09 Thread Jiri Kosina
On Tue, 16 Oct 2012, Benjamin Tissoires wrote: > >> --- /dev/null > >> +++ b/drivers/hid/i2c-hid/i2c-hid.c > > ... > >> +static int i2c_hid_alloc_buffers(struct i2c_hid *ihid) > >> +{ > >> + /* the worst case is computed from the set_report command with a > >> + * reportID > 15 and the

Re: [PATCH v2] i2c-hid: introduce HID over i2c specification implementation

2012-11-09 Thread Jiri Kosina
On Tue, 16 Oct 2012, Benjamin Tissoires wrote: --- /dev/null +++ b/drivers/hid/i2c-hid/i2c-hid.c ... +static int i2c_hid_alloc_buffers(struct i2c_hid *ihid) +{ + /* the worst case is computed from the set_report command with a + * reportID 15 and the maximum report length

Re: [PATCH v2] i2c-hid: introduce HID over i2c specification implementation

2012-11-09 Thread Benjamin Tissoires
Hi Jiri, On Fri, Nov 9, 2012 at 4:49 AM, Jiri Kosina jkos...@suse.cz wrote: On Tue, 16 Oct 2012, Benjamin Tissoires wrote: --- /dev/null +++ b/drivers/hid/i2c-hid/i2c-hid.c ... +static int i2c_hid_alloc_buffers(struct i2c_hid *ihid) +{ + /* the worst case is computed from the

Re: [PATCH v2] i2c-hid: introduce HID over i2c specification implementation

2012-10-18 Thread Jian-Jhong Ding
Benjamin Tissoires writes: > Hi JJ, > > On Thu, Oct 18, 2012 at 11:07 AM, Jian-Jhong Ding wrote: >> Hi Benjamin, >> >> Some suggestions to make the error messages more "human", and a little >> question on the return value of i2c_hid_fetch_hid_descriptor. Please see >> below: > > I fully agree

Re: [PATCH v2] i2c-hid: introduce HID over i2c specification implementation

2012-10-18 Thread Benjamin Tissoires
Hi JJ, On Thu, Oct 18, 2012 at 11:07 AM, Jian-Jhong Ding wrote: > Hi Benjamin, > > Some suggestions to make the error messages more "human", and a little > question on the return value of i2c_hid_fetch_hid_descriptor. Please see > below: I fully agree with the more "human" error messages.

Re: [PATCH v2] i2c-hid: introduce HID over i2c specification implementation

2012-10-18 Thread Jian-Jhong Ding
Hi Benjamin, Some suggestions to make the error messages more "human", and a little question on the return value of i2c_hid_fetch_hid_descriptor. Please see below: Benjamin Tissoires writes: > diff --git a/drivers/hid/i2c-hid/i2c-hid.c b/drivers/hid/i2c-hid/i2c-hid.c > new file mode 100644 >

Re: [PATCH v2] i2c-hid: introduce HID over i2c specification implementation

2012-10-18 Thread Jian-Jhong Ding
Hi Benjamin, Some suggestions to make the error messages more human, and a little question on the return value of i2c_hid_fetch_hid_descriptor. Please see below: Benjamin Tissoires benjamin.tissoi...@gmail.com writes: diff --git a/drivers/hid/i2c-hid/i2c-hid.c b/drivers/hid/i2c-hid/i2c-hid.c

Re: [PATCH v2] i2c-hid: introduce HID over i2c specification implementation

2012-10-18 Thread Benjamin Tissoires
Hi JJ, On Thu, Oct 18, 2012 at 11:07 AM, Jian-Jhong Ding jj_d...@emc.com.tw wrote: Hi Benjamin, Some suggestions to make the error messages more human, and a little question on the return value of i2c_hid_fetch_hid_descriptor. Please see below: I fully agree with the more human error

Re: [PATCH v2] i2c-hid: introduce HID over i2c specification implementation

2012-10-18 Thread Jian-Jhong Ding
Benjamin Tissoires benjamin.tissoi...@gmail.com writes: Hi JJ, On Thu, Oct 18, 2012 at 11:07 AM, Jian-Jhong Ding jj_d...@emc.com.tw wrote: Hi Benjamin, Some suggestions to make the error messages more human, and a little question on the return value of i2c_hid_fetch_hid_descriptor. Please

Re: [PATCH v2] i2c-hid: introduce HID over i2c specification implementation

2012-10-16 Thread Benjamin Tissoires
Hi Jiri, On Tue, Oct 16, 2012 at 10:17 AM, Jiri Slaby wrote: > On 10/15/2012 10:38 PM, Benjamin Tissoires wrote: >> Notes: >> {1}: I don't have all the informations in the beginning of the probe >> function to >> get the real size I need to allocate. So the behavior is to allocate first a >>

Re: [PATCH v2] i2c-hid: introduce HID over i2c specification implementation

2012-10-16 Thread Jiri Slaby
On 10/15/2012 10:38 PM, Benjamin Tissoires wrote: > Notes: > {1}: I don't have all the informations in the beginning of the probe function > to > get the real size I need to allocate. So the behavior is to allocate first a > buffer by using HID_MIN_BUFFER_SIZE and once I got the information, I

Re: [PATCH v2] i2c-hid: introduce HID over i2c specification implementation

2012-10-16 Thread Jiri Slaby
On 10/15/2012 10:38 PM, Benjamin Tissoires wrote: Notes: {1}: I don't have all the informations in the beginning of the probe function to get the real size I need to allocate. So the behavior is to allocate first a buffer by using HID_MIN_BUFFER_SIZE and once I got the information, I can

Re: [PATCH v2] i2c-hid: introduce HID over i2c specification implementation

2012-10-16 Thread Benjamin Tissoires
Hi Jiri, On Tue, Oct 16, 2012 at 10:17 AM, Jiri Slaby jsl...@suse.cz wrote: On 10/15/2012 10:38 PM, Benjamin Tissoires wrote: Notes: {1}: I don't have all the informations in the beginning of the probe function to get the real size I need to allocate. So the behavior is to allocate first a

[PATCH v2] i2c-hid: introduce HID over i2c specification implementation

2012-10-15 Thread Benjamin Tissoires
Microsoft published the protocol specification of HID over i2c: http://msdn.microsoft.com/en-us/library/windows/hardware/hh852380.aspx This patch introduces an implementation of this protocol. This implementation does not includes the ACPI part of the specification. This will come when ACPI 5.0

[PATCH v2] i2c-hid: introduce HID over i2c specification implementation

2012-10-15 Thread Benjamin Tissoires
Microsoft published the protocol specification of HID over i2c: http://msdn.microsoft.com/en-us/library/windows/hardware/hh852380.aspx This patch introduces an implementation of this protocol. This implementation does not includes the ACPI part of the specification. This will come when ACPI 5.0