06 Sep, 2013
1 commit
-
…3.12/logitech', 'for-3.12/multitouch-win8', 'for-3.12/trasnport-driver-cleanup', 'for-3.12/uhid', 'for-3.12/upstream' and 'for-3.12/wiimote' into for-linus
20 Aug, 2013
1 commit
-
ACPI 5.0 specification requires the fourth parameter to the _DSM (Device
Specific Method) to be of type package instead of integer. Failing to do
that we get following warning on the console:ACPI Warning: \_SB_.PCI0.I2C1.TPL0._DSM: Argument #4 type mismatch - Found [Integer],
ACPI requires [Package] (20130517/nsarguments-95)Fix this by passing an empty package to the _DSM method. The HID over I2C
specification doesn't require any specific values to be passed with this
parameter.Signed-off-by: Mika Westerberg
Reviewed-by: Benjamin Tissoires
Signed-off-by: Jiri Kosina
05 Aug, 2013
1 commit
-
There is no need to pass constants via stack. The width may be explicitly
specified in the format.Signed-off-by: Andy Shevchenko
Reviewed-by: Benjamin Tissoires
Signed-off-by: Jiri Kosina
31 Jul, 2013
2 commits
-
Add device tree based support for HID over I2C devices.
Tested on an Odroid-X board with a Synaptics touchpad.
Signed-off-by: Benjamin Tissoires
Signed-off-by: Jiri Kosina -
HID core provides the same functionality, so drop the custom handler.
Besides, the current handler doesn't schedule any outgoing report so it
did not work, anyway.Signed-off-by: David Herrmann
Reviewed-by: Benjamin Tissoires
Signed-off-by: Jiri Kosina
04 Jul, 2013
1 commit
-
The current i2c hid driver does not support sending HID output reports using
the output register for devices which support receiving reports through this
method. This patch determines which method to use to send output reports based
on the value of wMaxOutputLength in the device's HID descriptor.Signed-off-by: Andrew Duggan
Reviewed-by: Benjamin Tissoires
Signed-off-by: Jiri Kosina
04 Apr, 2013
1 commit
-
With the current i2c hid driver set/get report does not work
as expected, for e.g sensor hub properties like power state,
frequency etc is not set properly on the device as a result
we do not get events.
The problem is that i2c hid driver in function i2c_hid_request
sets length equal to default buffer size for which the sensor
hub does not respond on get/set commands. Use report length
and calculate it based on report size and id.Reviewed-by: Mika Westerberg
Reviewed-by: Benjamin Tissoires
Signed-off-by: Huzefa Kankroliwala
Signed-off-by: Jiri Kosina
25 Feb, 2013
1 commit
-
This allows HID drivers to also get/set reports through hid_hw_request().
Tested-by: Mika Westerberg
Signed-off-by: Benjamin Tissoires
Signed-off-by: Mika Westerberg
Signed-off-by: Jiri Kosina
21 Feb, 2013
1 commit
-
…and 'for-3.9/i2c-hid' into for-linus
Conflicts:
drivers/hid/i2c-hid/i2c-hid.c
01 Feb, 2013
2 commits
-
PullHID fixes from Jiri Kosina:
- fix i2c-hid and hidraw interaction, by Benjamin Tissoires
- a quirk to make a particular device (Formosa IR receiver) work
properly, by Nicholas Santos* 'for-3.8/upstream-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid:
HID: i2c-hid: fix i2c_hid_output_raw_report
HID: usbhid: quirk for Formosa IR receiver
HID: remove x bit from sensor doc -
i2c_hid_output_raw_report is used by hidraw to forward set_report requests.
The current implementation of i2c_hid_set_report needs to take the
report_id as an argument. The report_id is stored in the first byte
of the buffer in argument of i2c_hid_output_raw_report.Not removing the report_id from the given buffer adds this byte 2 times
in the command, leading to a non working command.Reported-by: Andrew Duggan
Signed-off-by: Benjamin Tissoires
Signed-off-by: Jiri Kosina
18 Jan, 2013
1 commit
-
The HID over I2C protocol specification states that when the device is
enumerated from ACPI the HID descriptor address can be obtained by
executing "_DSM" for the device with function 1. Enable this.Signed-off-by: Mika Westerberg
Reviewed-by: Benjamin Tissoires
Signed-off-by: Jiri Kosina
04 Jan, 2013
1 commit
-
CONFIG_HOTPLUG is going away as an option. As a result, the __dev*
markings need to be removed.This change removes the use of __devinit, __devexit_p, __devinitdata,
__devinitconst, and __devexit from these drivers.Based on patches originally written by Bill Pemberton, but redone by me
in order to handle some of the coding style issues better, by hand.Cc: Bill Pemberton
Signed-off-by: Greg Kroah-Hartman
13 Dec, 2012
1 commit
-
We should not enter close function while someone else is in open.
This mutex prevents this race.There is also no need to override the ret value with -EIO in case of
a failure of i2c_hid_set_power.Signed-off-by: Benjamin Tissoires
Reviewed-by: Jean Delvare
Signed-off-by: Jiri Kosina
06 Dec, 2012
5 commits
-
ret_count has to be at least 3, as we have to count the 2 bytes that are used
for the size of the reply. Without this, memcpy() might be called with zero or
negative count.Reported-by: Jean Delvare
Signed-off-by: Jiri Kosina -
The previous memcpy implementation relied on the size advertized by the
device. There were no guarantees that buf was big enough.Some gymnastic is also required with the +2/-2 to take into account
the first 2 bytes of the returned buffer where the total returned
length is supplied by the device.Signed-off-by: Benjamin Tissoires
Signed-off-by: Jiri Kosina -
There is no point in keeping the irq in i2c_hid as it's already
there in client.Signed-off-by: Benjamin Tissoires
Reviewed-by: Jean Delvare
Signed-off-by: Jiri Kosina -
Simplifies i2c_hid_alloc_buffers tests, and makes this function
responsible of the assignment of ihid->bufsize.
The condition for the reallocation in i2c_hid_start is then simpler.Signed-off-by: Benjamin Tissoires
Reviewed-by: Jean Delvare
Signed-off-by: Jiri Kosina -
HID descriptors contains 4 bytes of reserved field.
The previous implementation was overriding the next fields in struct i2c_hid.Signed-off-by: Benjamin Tissoires
Reviewed-by: Jean Delvare
Signed-off-by: Jiri Kosina
05 Dec, 2012
10 commits
-
The pointless WARN_ON() has been removed from i2c_hid_remove(),
so we don't need bug.h any more.Reported-by: Jean Delvare
Signed-off-by: Jiri Kosina -
ihid can not be null, so there are no reasons to test it.
Signed-off-by: Benjamin Tissoires
Signed-off-by: Jiri Kosina -
If i2c_hid_get_report fails, exit i2c_hid_init_report.
The printk log is already called by i2c_hid_get_report, so no need
to add some more printks.Signed-off-by: Benjamin Tissoires
Reviewed-by: Jean Delvare
Signed-off-by: Jiri Kosina -
In the case where the hid driver in charge of handling the hid part
of the device (hid-generic for instance) fails at probe, neither
i2c_hid_start nor i2c_hid_stop are called.
Thus, the buffers allocated in i2c_hid_probe are never freed.Signed-off-by: Benjamin Tissoires
Signed-off-by: Jiri Kosina -
Signed-off-by: Benjamin Tissoires
Reviewed-by: Jean Delvare
Signed-off-by: Jiri Kosina -
Forwards appropriate return values.
As noone use the error returned by i2c_hid_get_input, let's make it
returning void.Signed-off-by: Benjamin Tissoires
Reviewed-by: Jean Delvare
Signed-off-by: Jiri Kosina -
These definitions are not used here, but are defined by the specification.
Keeping some of them for documentation purposes.Signed-off-by: Benjamin Tissoires
Reviewed-by: Jean Delvare
Signed-off-by: Jiri Kosina -
This avoids the problematic case:
if (condition)
i2c_hid_dbg(ihid, "Blah blah %d\n", i);
else
do_something_very_important();Which looks correct, however with the previous macro definition,
this expands to the unexpected:if (condition) {
if (debug) \
dev_printk(KERN_DEBUG, &ihid->client->dev,
"Blah blah %d\n", i);
else
do_something_very_important();
}Signed-off-by: Benjamin Tissoires
Reviewed-by: Jean Delvare
Signed-off-by: Jiri Kosina -
We should not initialize to 0 static declarations.
Signed-off-by: Benjamin Tissoires
Reviewed-by: Jean Delvare
Signed-off-by: Jiri Kosina -
no I2C driver has "i2c" in its name. It makes more sense to call this
i2c driver "hid".Signed-off-by: Benjamin Tissoires
Reviewed-by: Jean Delvare
Signed-off-by: Jiri Kosina
21 Nov, 2012
1 commit
-
In case we are returning from i2c_hid_probe() through the 'err' or
'err_mem_free' labels, there is noone freeing the buffers allocated by
i2c_hid_alloc_buffers().Reviewed-by: Benjamin Tissoires
Signed-off-by: Jiri Kosina
19 Nov, 2012
1 commit
-
Microsoft published the protocol specification of HID over i2c:
http://msdn.microsoft.com/en-us/library/windows/hardware/hh852380.aspxThis 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 devices enumeration will be available.Once the ACPI part is done, OEM will not have to declare HID over I2C
devices in their platform specific driver.Signed-off-by: Benjamin Tissoires
Signed-off-by: Jiri Kosina