summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'for-3.15/hid-sensor-hub' into for-linusJiri Kosina2014-04-014-110/+164
|\
| * HID: hid-sensor-hub: Processing for duplicate physical idsSrinivas Pandruvada2014-02-172-88/+106
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In HID sensor hub, HID physical ids are used to represent different sensors. For example physical id of 0x73 in usage page = 0x20, represents an accelerometer. The HID sensor hub driver uses this physical ids to create platform devices using MFD. There is 1:1 correspondence between an phy id and a client driver. But in some cases these physical ids are reused. There is a phy id 0xe1, which specifies a custom sensor, which can exist multiple times to represent various custom sensors. In this case there can be multiple instances of client MFD drivers, processing specific custom sensor. In this case when client driver looks for report id or a field index, it should still get the report id specific to its own type. This is also true for reports, they should be directed towards correct instance. This change introduce a way to parse and tie physical devices to their correct instance. Summary of changes: - To get physical ids, use collections. If a collection of type=physical exist then use usage id as in the name of platform device name - As part of the platform data, we assign a hdsev instance, which has start and end of collection indexes. Using these indexes attributes can be tied to correct MFD client instances - When a report is received, call callback with correct hsdev instance. In this way using its private data stored as part of its registry, it can distinguish different sensors even when they have same physical and logical ids. This patch is co-authored with Archana Patni <archna.patni@intel.com>. Reported-by: Archana Patni <archana.patni@intel.com> Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Archana Patni <archana.patni@intel.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| * iio: hid-sensor-hub: Remove hard coded indexesSrinivas Pandruvada2014-02-172-22/+33
| | | | | | | | | | | | | | | | | | | | | | Remove the hard coded indexes, instead search for usage id and use the index to set the power and report state. This will fix issue, where the report descriptor doesn't contain the full list of possible selector for power and report state. Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Acked-by: Jonathan Cameron <jic23@kernel.org> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| * HID: hid-sensor-hub: Add selector apiSrinivas Pandruvada2014-02-172-0/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In some report descriptors, they leave holes in the selectors. In this case if we use hardcoded selector values, this will result in invalid values. For example, if there is selectors defined for Power State from OFF to D0 to D3. We can't use indexes of these states if some states are not implemented or not present in the report decriptors. In this case, we need to get the indexes from report descriptors. One API is added to get the index of a selector. This API will search for usage id in the field usage list and return the index. Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* | Merge branch 'for-3.15/hid-core-ll-transport-cleanup' into for-linusJiri Kosina2014-04-0121-444/+2386
|\ \ | | | | | | | | | | | | | | | | | | Conflicts: drivers/hid/hid-ids.h drivers/hid/hid-sony.c drivers/hid/i2c-hid/i2c-hid.c
| * | HID: hyperv: fix _raw_request() prototypeJiri Kosina2014-03-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | The 3rd argument is pointer to the buffer, not a single __u8. This has no bad sideeffect, as the stub is not using any of its argument, but better have it correct. Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| * | HID: hyperv: Implement a stub raw_request() entry pointK. Y. Srinivasan2014-03-281-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | commit 3c86726cfe38 ("HID: make .raw_request mandatory") made .raw_request mandatory and broke the Hyper-V mouse driver. This patch fixes the problem. Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| * | HID: remove hid_output_raw_report transport implementationsBenjamin Tissoires2014-03-145-60/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Nobody calls hid_output_raw_report anymore, and nobody should. We can now remove the various implementation in the different transport drivers and the declarations. 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>
| * | HID: sony: do not rely on hid_output_raw_reportBenjamin Tissoires2014-03-144-48/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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) To do so, we need to introduce two new quirks: * HID_QUIRK_NO_OUTPUT_REPORTS_ON_INTR_EP: this quirks prevents the transport driver to use the interrupt channel to send output report (and thus force to use HID_REQ_SET_REPORT command) * HID_QUIRK_SKIP_OUTPUT_REPORT_ID: this one forces usbhid to not include the report ID in the buffer it sends to the device through HID_REQ_SET_REPORT in case of an output report This also fixes a regression introduced in commit 3a75b24949a8 (HID: hidraw: replace hid_output_raw_report() calls by appropriates ones). The hidraw API was not able to communicate with the PS3 SixAxis controllers in USB mode. Reviewed-by: David Herrmann <dh.herrmann@gmail.com> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Tested-by: Antonio Ospite <ao2@ao2.it> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| * | Merge branch 'for-3.15/sony' into for-3.15/hid-core-ll-transport-cleanupJiri Kosina2014-03-143-66/+701
| |\ \
| | * | HID: hidp: Add a comment that some devices depend on the current behavior of ↵Frank Praznik2014-02-241-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | uniq Add a comment noting that some devices depend on the destination address being stored in uniq. Signed-off-by: Frank Praznik <frank.praznik@oh.rr.com> Reviewed-by: David Herrmann <dh.herrmann@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| | * | HID: sony: Prevent duplicate controller connections.Frank Praznik2014-02-241-0/+140
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a Sixaxis or Dualshock 4 controller is connected via USB while already connected via Bluetooth it will cause duplicate devices to be added to the input device list. To prevent this a global list of controllers and their MAC addresses is maintained and new controllers are checked against this list. If a duplicate is found, the probe function will exit with -EEXIST. On USB the MAC is retrieved via a feature report. On Bluetooth neither controller reports the MAC address in a feature report so the MAC is parsed from the uniq string. As uniq cannot be guaranteed to be a MAC address in every case (uHID or the behavior of HIDP changing) a parsing failure will not prevent the connection. Signed-off-by: Frank Praznik <frank.praznik@oh.rr.com> Reviewed-by: David Herrmann <dh.herrmann@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| | * | HID: sony: Perform a boundry check on the sixaxis battery level index.Frank Praznik2014-02-241-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make sure that an out-of-bounds read doesn't occur in the Sixaxis battery level lookup table in the event that the controller sends an invalid battery status value in the report. Signed-off-by: Frank Praznik <frank.praznik@oh.rr.com> Reviewed-by: David Herrmann <dh.herrmann@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| | * | HID: sony: Fix work queue issuesFrank Praznik2014-02-241-14/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Only initialize force feedback for devices that actually support it (Sixaxis and Dualshock 4) to prevent calls to schedule_work() with an uninitialized work queue. Move the cancel_work_sync() call out of sony_destroy_ff() since the state worker is used for the LEDs even when force-feedback is disabled. Remove the sony_destroy_ff() function since it is no longer used. Signed-off-by: Frank Praznik <frank.praznik@oh.rr.com> Reviewed-by: David Herrmann <dh.herrmann@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| | * | HID: sony: Fix multi-line comment stylingFrank Praznik2014-02-241-15/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Convert multi-line comments to comply with the kernel coding style. Signed-off-by: Frank Praznik <frank.praznik@oh.rr.com> Reviewed-by: David Herrmann <dh.herrmann@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| | * | HID: sony: Enable LED controls and rumble for the Sixaxis on Bluetooth.Frank Praznik2014-02-201-11/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a SIXAXIS_CONTROLLER macro to simplify conditionals where the connection type is irrelevant. Enable the LED and force feedback controls for Sixaxis controllers connected via Bluetooth. Send Sixaxis Bluetooth output reports on the control channel. Signed-off-by: Frank Praznik <frank.praznik@oh.rr.com> Reviewed-by: David Herrmann <dh.herrmann@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| | * | HID: sony: Correct Sixaxis battery reportingFrank Praznik2014-02-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The battery_charging and cable_state flags were backwards on the Sixaxis. The low bit of report byte 30 is 0 when charging and 1 when not. Bit 5 of byte 31 is 0 when a USB cable is connected and 1 when not. Signed-off-by: Frank Praznik <frank.praznik@oh.rr.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| | * | HID: sony: Add conditionals to enable all features in Bluetooth modeFrank Praznik2014-02-171-7/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add the conditionals to enable rumble, battery reporting, LED and touchpad support for the Dualshock 4 in Bluetooth mode. Add dualshock4_set_operational_bt to initialize the controller to the proper operational state. Signed-off-by: Frank Praznik <frank.praznik@oh.rr.com> Reviewed-by: David Herrmann <dh.herrmann@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| | * | HID: sony: Set initial battery level to 100% to avoid false low battery warningsFrank Praznik2014-02-171-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Set the initial battery level to 100% to avoid false low battery warnings if the battery state is polled before a report with the actual battery level is received. Signed-off-by: Frank Praznik <frank.praznik@oh.rr.com> Reviewed-by: David Herrmann <dh.herrmann@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| | * | HID: sony: Add Dualshock 4 Bluetooth battery and touchpad parsingFrank Praznik2014-02-171-8/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add Dualshock 4 battery and touchpad parsing for Bluetooth reports. Signed-off-by: Frank Praznik <frank.praznik@oh.rr.com> Reviewed-by: David Herrmann <dh.herrmann@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| | * | HID: sony: Add Dualshock 4 Bluetooth output report formattingFrank Praznik2014-02-171-5/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add formating for the Dualshock 4 output report data in Bluetooth mode. In Bluetooth mode the Dualshock 4 wants output reports sent on the control channel. Signed-off-by: Frank Praznik <frank.praznik@oh.rr.com> Reviewed-by: David Herrmann <dh.herrmann@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| | * | HID: sony: Add modified Dualshock 4 Bluetooth HID descriptorFrank Praznik2014-02-171-0/+214
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By default, the Dualshock 4 sends controller data via report 1. Once a valid output report 0x11 is received or a feature report of type 0x02 is requested the controller changes from sending data in report 1 to sending data in report 17, which is unmapped in the default descriptor. The mappings have to be moved to report 17 to let the HID driver properly process the incoming reports. Signed-off-by: Frank Praznik <frank.praznik@oh.rr.com> Reviewed-by: David Herrmann <dh.herrmann@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| | * | HID: sony: Use low-level transport driver functionsFrank Praznik2014-02-171-42/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Switch to the low-level transport driver functions. sony_set_output_report is removed since it is no longer used. Signed-off-by: Frank Praznik <frank.praznik@oh.rr.com> Reviewed-by: David Herrmann <dh.herrmann@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| | * | Merge branch 'for-3.15/hid-core-ll-transport-cleanup' into for-3.15/sonyJiri Kosina2014-02-1715-195/+606
| | |\ \
| | * | | HID: hid-sony: report actual brightness value when reading LEDSimon Wood2014-02-061-6/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Dualshock4 controller contains a RGB LED, which is enabled via the '/sys/class/leds' interface. At present the driver only returns whether each of the RGB LEDs is lit (ie not off), but no indication of it's brightness. This patch fixes the reading of the current brightnes so that it returns the value (rather than just off=0, on=LED_FULL). Tested on the DS4 and SixAxis (for compatibility). Signed-off-by: Simon Wood <simon@mungewell.org> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| | * | | HID: Kconfig updates for the Sony moduleFrank Praznik2014-02-041-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update the HID_SONY config with 'select POWER_SUPPLY' to fix build issues relating to undefined references to the power_supply_* functions in certain build configurations. Update the description text to reflect that Playstation 4 controllers are now supported. [jkosina@suse.cz: drop the POWER_SUPPLY hunk, as I've already fixed that] Signed-off-by: Frank Praznik <frank.praznik@oh.rr.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| | * | | HID: sony: fix build wrt. power_supplyJiri Kosina2014-02-031-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sony driver now makes use of power supply support. Make kernel config aware of it. Reported-by: fengguang.wu@intel.com Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| | * | | HID: sony: add output events for the multi-touch pad on the Dualshock 4Frank Praznik2014-01-281-0/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add output events for the multi-touch pad on the Dualshock 4. The touchpad has a resolution of 1920x940 and is capable of 2 simultaneous touches. A 'Type B' stateful slot protocol is implemented as defined in Documentation/input/multi-touch-protocol.txt Applications can use the touchpad data by processing the ABS_MT_SLOT, ABS_MT_TRACKING_ID, ABS_MT_POSITION_X and ABS_MT_POSITION_Y events. Signed-off-by: Frank Praznik <frank.praznik@oh.rr.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| | * | | HID: sony: add battery status reporting for the Sixaxis and Dualshock 4Frank Praznik2014-01-281-1/+185
| | | |/ | | |/| | | | | | | | | | | | | | | | | | | | | Add battery status reporting for the Sixaxis and Dualshock 4 controllers. Signed-off-by: Frank Praznik <frank.praznik@oh.rr.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| * | | HID: cp2112: remove the last hid_output_raw_report() callBenjamin Tissoires2014-03-141-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | HID: cp2112: remove various hid_out_raw_report callsBenjamin Tissoires2014-03-141-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | Merge branch 'for-3.15/hid-cp2112' into for-3.15/hid-core-ll-transport-cleanupJiri Kosina2014-03-145-0/+1080
| |\ \ \
| | * | | HID: cp2112: fix incorrect error propagation in cp2112_xfer()Jiri Kosina2014-02-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| | * | | HID: cp2112: can't be used without gpio supportJiri Kosina2014-02-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add Kconfig driver dependency on GPIOLIB. Reported-by: fengguang.wu@intel.com Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| | * | | HID: cp2112: convert to use hid_hw_raw_request()Jiri Kosina2014-02-181-8/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| | * | | Merge branch 'for-3.15/hid-core-ll-transport-cleanup' into for-3.15/hid-cp2112Jiri Kosina2014-02-1816-240/+714
| | |\ \ \
| | * | | | HID: cp2112: use proper specifier for size_tJiri Kosina2014-02-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | %zd is a proper format string specifier for size_t Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| | * | | | HID: cp2112: make sysfs attributes staticJiri Kosina2014-02-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | No need to pollute namespace with dev_attr_*. Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| | * | | | HID: add hid-cp2112 driverDavid Barksdale2014-02-175-0/+1078
| | | |/ / | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | | HID: hidraw: replace hid_output_raw_report() calls by appropriates onesBenjamin Tissoires2014-02-241-5/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove hid_output_raw_report() call as it is not a ll_driver callbacj, and switch to the hid_hw_* implementation. USB-HID used to fallback into SET_REPORT when there were no output interrupt endpoint, so emulating this if hid_hw_output_report() returns -ENOSYS. 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>
| * | | | HID: make .raw_request mandatoryBenjamin Tissoires2014-02-244-11/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SET_REPORT and GET_REPORT are mandatory in the HID specification. Make the corresponding API in hid-core mandatory too, which removes the need to test against it in some various places. Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Reviewed-by: David Herrmann <dh.herrmann@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| * | | | HID: input: hid-input remove hid_output_raw_report callBenjamin Tissoires2014-02-241-3/+7
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | hid_output_raw_report() is not a ll_driver callback and should not be used. To keep the same code path than before, we are forced to play with the different hid_hw_* calls: if the usb or i2c device does not support direct output reports, then we will rely on the SET_REPORT HID call. Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Reviewed-by: David Herrmann <dh.herrmann@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| * | | HID: core: check parameters when sending/receiving data from the deviceBenjamin Tissoires2014-02-172-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It is better to check them soon enough before triggering any kernel panic. Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Reviewed-by: David Herrmann <dh.herrmann@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| * | | HID: wiimote: replace hid_output_raw_report with hid_hw_output_report for ↵Benjamin Tissoires2014-02-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | output requests For BT transport layer, ret = hid_output_raw_report(A, B, C, HID_OUTPUT_REPORT); is equivalent to ret = hid_hw_output_report(A, B, C); So use the new API where available Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Reviewed-by: David Herrmann <dh.herrmann@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| * | | HID: replace hid_output_raw_report with hid_hw_raw_request for feature requestsBenjamin Tissoires2014-02-175-21/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ret = hid_output_raw_report(A, B, C, HID_FEATURE_REPORT); is equivalent to ret = hid_hw_raw_request(A, B[0], B, C, HID_FEATURE_REPORT, HID_REQ_SET_REPORT); whatever the transport layer is. So use the new API where available Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| * | | HID: logitech-dj: remove hid_output_raw_report callBenjamin Tissoires2014-02-171-15/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | hid-input do not use anymore hid_output_raw_report() to set the LEDs. Use the correct implementation now and make them working again. Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Reviewed-by: David Herrmann <dh.herrmann@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| * | | HID: usbhid: change return error of usbhid_output_reportBenjamin Tissoires2014-02-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If there is no urbout when sending a output report, ENOSYS (Function not implemented) is a better error than EIO (I/O error). Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Reviewed-by: David Herrmann <dh.herrmann@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| * | | HID: i2c-hid: use generic .request() implementationBenjamin Tissoires2014-02-171-31/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Having our own .request() implementation does not give anything, so use the generic binding. Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Reviewed-by: David Herrmann <dh.herrmann@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| * | | HID: i2c-hid: implement ll_driver transport-layer callbacksBenjamin Tissoires2014-02-171-9/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add output_report and raw_request to i2c-hid. The current implementation of i2c_hid_output_raw_report decides by itself if it should use a direct send of the output report or use the data register (SET_REPORT). Split that by reimplement the logic in __i2c_hid_output_raw_report() which will be dropped soon. Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| * | | HID: core: implement generic .request()Benjamin Tissoires2014-02-172-2/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | .request() can be emulated through .raw_request() we can implement this emulation in hid-core, and make .request not mandatory for transport layer drivers. Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Reviewed-by: David Herrmann <dh.herrmann@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
OpenPOWER on IntegriCloud