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 fr

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 ma

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 w

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. How

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 > in

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 >> buf

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