From: "David Härdeman" <david@hardeman.nu> To: Dmitry Torokhov <dmitry.torokhov@gmail.com> Cc: linux-kernel@vger.kernel.org, linux-input@vger.kernel.org, jbarnes@virtuousgeek.org, akpm@linux-foundation.org Subject: Re: [patch 2/2] Add a driver for the Winbond WPCD376I Consumer IR hardware Date: Thu, 13 Aug 2009 19:58:43 +0200 [thread overview] Message-ID: <20090813175843.GA11922@hardeman.nu> (raw) In-Reply-To: <20090813162726.DBD9A526EC9@mailhub.coreip.homeip.net> On Thu, Aug 13, 2009 at 08:56:37AM -0700, Dmitry Torokhov wrote: >On Thu, Aug 13, 2009 at 11:34:44AM +0200, David Härdeman wrote: >> The main problem right now is that getkeycode is practically useless since >> you can't blindly guess at a full range of 2^32 different scancodes to get >> the complete keymap. Perhaps a index-based getkeycode would make sense... > >The drivers that have such sparce keymaps are expected to issue >EV_MSC/MSC_SCAN events to aid userspace in identifying the "scancodes" >that are emitted by the device. Ok, I've added EV_MSC/MSC_SCAN support. >>>> +static struct device_attribute dev_attr_last_scancode = { >>>> + .attr = { >>>> + .name = "last_scancode", >>>> + .mode = 0444, >>>> + }, >>>> + .show = wbcir_show_last_scancode, >>>> + .store = NULL, >>>> + >>>> +}; >>> >>> Why is this needed? And if this is needed we have a nice macro >>> for that. >> >> I hope I've explained it wrt. EV_IR in my other mail. It's for building >> keymaps of unknown remotes. And it'll go away once EV_IR is supported so I >> don't think there's much point in fiddling with it now? >> > >Because once the driver is in mainline it becomes part of userspace ABI >and has to stay for a looong time. I've removed the sysfs attribute as EV_MSC/MSC_SCAN provides the same functionality. >> Thanks for the review. Are you willing to push the driver upstream through >> the input tree once I've implemented your suggested fixes? >> > >I'd need to take a look at your EV_IR patyches and see how they will >affect this driver. I do nt want to merge something that will stay one >way for half a release and then will switch to completely new interface. The EV_IR functionality is intended to be used in addition to regular key up/down/repeat events. Much like EV_MSC/MSC_SCAN but more descriptive and specific to IR protocols. Then advanced user-space apps can choose whether to use the in-kernel keymap or map remote codes directly to suitable events (and it allows remote keymaps to be built easily in user-space). As the future EV_IR functionality is additional to the current functionality, I hope the driver still can be merged before I have EV_IR patches ready for review. I'll post an updated patch shortly. -- David Härdeman
WARNING: multiple messages have this Message-ID (diff)
From: "David Härdeman" <david@hardeman.nu> To: Dmitry Torokhov <dmitry.torokhov@gmail.com> Cc: linux-kernel@vger.kernel.org, linux-input@vger.kernel.org, jbarnes@virtuousgeek.org, akpm@linux-foundation.org Subject: Re: [patch 2/2] Add a driver for the Winbond WPCD376I Consumer IR hardware Date: Thu, 13 Aug 2009 19:58:43 +0200 [thread overview] Message-ID: <20090813175843.GA11922@hardeman.nu> (raw) In-Reply-To: <20090813162726.DBD9A526EC9@mailhub.coreip.homeip.net> On Thu, Aug 13, 2009 at 08:56:37AM -0700, Dmitry Torokhov wrote: >On Thu, Aug 13, 2009 at 11:34:44AM +0200, David Härdeman wrote: >> The main problem right now is that getkeycode is practically useless since >> you can't blindly guess at a full range of 2^32 different scancodes to get >> the complete keymap. Perhaps a index-based getkeycode would make sense... > >The drivers that have such sparce keymaps are expected to issue >EV_MSC/MSC_SCAN events to aid userspace in identifying the "scancodes" >that are emitted by the device. Ok, I've added EV_MSC/MSC_SCAN support. >>>> +static struct device_attribute dev_attr_last_scancode = { >>>> + .attr = { >>>> + .name = "last_scancode", >>>> + .mode = 0444, >>>> + }, >>>> + .show = wbcir_show_last_scancode, >>>> + .store = NULL, >>>> + >>>> +}; >>> >>> Why is this needed? And if this is needed we have a nice macro >>> for that. >> >> I hope I've explained it wrt. EV_IR in my other mail. It's for building >> keymaps of unknown remotes. And it'll go away once EV_IR is supported so I >> don't think there's much point in fiddling with it now? >> > >Because once the driver is in mainline it becomes part of userspace ABI >and has to stay for a looong time. I've removed the sysfs attribute as EV_MSC/MSC_SCAN provides the same functionality. >> Thanks for the review. Are you willing to push the driver upstream through >> the input tree once I've implemented your suggested fixes? >> > >I'd need to take a look at your EV_IR patyches and see how they will >affect this driver. I do nt want to merge something that will stay one >way for half a release and then will switch to completely new interface. The EV_IR functionality is intended to be used in addition to regular key up/down/repeat events. Much like EV_MSC/MSC_SCAN but more descriptive and specific to IR protocols. Then advanced user-space apps can choose whether to use the in-kernel keymap or map remote codes directly to suitable events (and it allows remote keymaps to be built easily in user-space). As the future EV_IR functionality is additional to the current functionality, I hope the driver still can be merged before I have EV_IR patches ready for review. I'll post an updated patch shortly. -- David Härdeman -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2009-08-13 17:58 UTC|newest] Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top 2009-08-09 9:56 [patch 0/2] Winbond IR Driver - v2 david 2009-08-09 9:56 ` david 2009-08-09 9:56 ` [patch 1/2] Add a shutdown method to pnp drivers david 2009-08-09 9:56 ` david 2009-08-09 9:56 ` [patch 2/2] Add a driver for the Winbond WPCD376I Consumer IR hardware david 2009-08-09 9:56 ` david 2009-08-10 15:39 ` Bjorn Helgaas 2009-08-13 6:58 ` Dmitry Torokhov 2009-08-13 9:34 ` David Härdeman 2009-08-13 9:34 ` David Härdeman 2009-08-13 15:56 ` Dmitry Torokhov 2009-08-13 15:56 ` Dmitry Torokhov 2009-08-13 17:58 ` David Härdeman [this message] 2009-08-13 17:58 ` David Härdeman 2009-08-13 17:14 ` David Härdeman 2009-08-13 17:14 ` David Härdeman 2009-08-15 3:02 ` [patch 0/2] Winbond IR Driver - v2 Maxim Levitsky 2009-08-15 20:10 ` David Härdeman 2009-08-15 20:10 ` David Härdeman 2009-08-15 22:10 ` Maxim Levitsky 2009-08-15 22:10 ` Maxim Levitsky 2009-08-16 18:43 ` David Härdeman 2009-08-16 18:43 ` David Härdeman 2009-08-17 3:56 ` Maxim Levitsky 2009-08-17 3:56 ` Maxim Levitsky 2009-08-11 16:26 David Härdeman 2009-08-11 16:26 ` [patch 2/2] Add a driver for the Winbond WPCD376I Consumer IR hardware David Härdeman 2009-08-11 16:26 ` David Härdeman [not found] <20090813185050.356225129@hardeman.nu> 2009-08-13 18:57 ` David Härdeman 2009-08-13 18:57 ` David Härdeman
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20090813175843.GA11922@hardeman.nu \ --to=david@hardeman.nu \ --cc=akpm@linux-foundation.org \ --cc=dmitry.torokhov@gmail.com \ --cc=jbarnes@virtuousgeek.org \ --cc=linux-input@vger.kernel.org \ --cc=linux-kernel@vger.kernel.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.