The basic API of rc-core used to be:
dev = rc_allocate_device();
dev->x = a;
dev->y = b;
dev->z = c;
rc_register_device();
which is a pretty common pattern in the kernel, after the introduction of
protocol arrays the API looks something like:
dev = rc_allocate_device();
dev->x = a;
rc_set_allowed_protocols(dev, RC_BIT_X);
dev->z = c;
rc_register_device();
There's no real need for the protocols to be an array, so change it
back to be consistent (and in preparation for the following patches).
[[email protected]: added missing changes at some files]
Signed-off-by: David Härdeman <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
The allowed and enabled protocol masks need to be expanded to be per
filter type in order to support wakeup filter protocol selection. To
ease that process abstract access to the rc_dev::allowed_protos and
rc_dev::enabled_protocols members with inline functions.
Signed-off-by: James Hogan <[email protected]>
Reviewed-by: Antti Seppälä <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
This allows the hid drivers to be independent from the transport layer.
The patch was constructed by replacing all occurences of
usbhid_submit_report() by its hid_hw_request() counterpart.
Then, drivers not requiring USB_HID anymore have their USB_HID
dependency cleaned in the Kconfig file.
Finally, few drivers still depends on USB_HID. Many of them
are requiring the io wait callback. They are found in the next patch.
Signed-off-by: Benjamin Tissoires <[email protected]>
Reviewed-by: Mika Westerberg <[email protected]>
For the sensor-hub part:
Tested-by: Mika Westerberg <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
Smatch complains that the NULL checking in this function is not
consistent and could lead to a NULL dereference. The comments say that
we should return here if rc_dev is NULL so I've changed the test to
match the comment.
Signed-off-by: Dan Carpenter <[email protected]>
Reviewed-by: Bruno Prémont <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
Implement support for picoLCD's CIR header using RC_CORE for decoding
the IR event stream.
Signed-off-by: Bruno Prémont <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
In order to make code maintenance easier, split the vairous
functions into individial files (this removes a bunch of #ifdefs).
Signed-off-by: Bruno Prémont <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>