summaryrefslogtreecommitdiffstats
path: root/drivers/hid/hid-cp2112.c
AgeCommit message (Collapse)Author
2014-03-14HID: cp2112: remove the last hid_output_raw_report() callBenjamin Tissoires
tests have shown that output reports use hid_hw_output_report(). Reviewed-by: David Herrmann <dh.herrmann@gmail.com> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2014-03-14HID: cp2112: remove various hid_out_raw_report callsBenjamin Tissoires
hid_out_raw_report is going to be obsoleted as it is not part of the unified HID low level transport documentation (Documentation/hid/hid-transport.txt) hid_output_raw_report(hdev, buf, sizeof(buf), HID_FEATURE_REPORT); is strictly equivalent to: hid_hw_raw_request(hdev, buf[0], buf, sizeof(buf), HID_FEATURE_REPORT, HID_REQ_SET_REPORT); Then replace buf[0] by the appropriate define. So use the new api. Reviewed-by: David Herrmann <dh.herrmann@gmail.com> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2014-02-18HID: cp2112: fix incorrect error propagation in cp2112_xfer()Jiri Kosina
Both cp2112_read_req() and cp2112_write_req() are returning negative value in cases of error, but cp2112_xfer() is storing the return value into unsigned size_t-typed 'count'. Fix this by making 'count' signed type. Reported-by: fengguang.wu@intel.com Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2014-02-18HID: cp2112: convert to use hid_hw_raw_request()Jiri Kosina
Commit cafebc0 ("HID: remove hid_get_raw_report in struct hid_device") obsoletes the use of hdev->hid_get_raw_report(), as calling hid_hw_raw_request() is functionally equivalent. Convert cp2112 to use this notation. Reported-by: fengguang.wu@intel.com Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2014-02-17HID: cp2112: use proper specifier for size_tJiri Kosina
%zd is a proper format string specifier for size_t Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2014-02-17HID: cp2112: make sysfs attributes staticJiri Kosina
No need to pollute namespace with dev_attr_*. Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2014-02-17HID: add hid-cp2112 driverDavid Barksdale
This patch adds support for the Silicon Labs CP2112 "Single-Chip HID USB to SMBus Master Bridge." This is a HID device driver which registers as an i2c adapter and gpiochip to expose these functions of the CP2112. The customizable USB descriptor fields are exposed as sysfs attributes. The SMBus byte-read, byte-data-read/write, and word-data-read transfer modes have been tested by talking to an i2c sensor. The GPIO functions and USB descriptor field programming have also been tested. Signed-off-by: David Barksdale <dbarksdale@uplogix.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>