On Mon, May 01, 2017 at 02:49:57PM +0200, David Härdeman wrote: > On Mon, May 01, 2017 at 11:38:30AM +0100, Sean Young wrote: > >On Sat, Apr 29, 2017 at 12:52:12PM +0200, David Härdeman wrote: > >> Whether we decide to go for any new keytable ioctl():s or not in rc-core, we > >> should provide the protocol information of keypresses to userspace. > >> > >> Note that this means that the RC_TYPE_* definitions become part of the > >> userspace <-> kernel API/ABI (meaning a full patch should maybe move those > >> defines under include/uapi). > >> > >> This would also need to be ack:ed by the input maintainers. > > > >This was already NACKed in the past. > > > >http://www.spinics.net/lists/linux-input/msg46941.html > > > > Didn't know that, thanks for the pointer. I still think we should > revisit this though. Even if we don't add protocol-aware EVIOC[SG]KEY_V2 > ioctls, that information is useful for a configuration tool when > creating keymaps for a new remote. > > And examining the parent hardware device (as Dmitry seemed to suggest) > doesn't help with protocol identification. > > Another option if we don't want to touch the input layer would be to > export the last_* members from struct rc_dev in sysfs (and I'm guessing > a timestamp would be necessary then). Seems like a lot of work to > accomplish what would otherwise be a one-line change in the input layer > though (one-line since I'm assuming we could provide the protocol > defines in a separate header, other than input-event-codes.h as the > protocols are subsystem-specific). So I have some patches for reading and writing scancodes, which will give you a u64 scancode, protocol and other bits of information. This can also be used for transmit where the IR encoders will be used. http://www.spinics.net/lists/linux-media/msg109836.html I wanted to make sure that these patches are also sufficient for sending scancodes for the lirc_zilog driver before merging, which is what I'm working on right now. Sean