lkml.org 
[lkml]   [2011]   [Jan]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3] input: tegra-kbc - Add tegra keyboard driver
On Tue, Jan 11, 2011 at 11:34:09AM -0800, Rakesh Iyer wrote:
> Hello All.
>
> I have combined Pavel's and Dmitry's comments so I can address them as one issue.
>
> Dmitry's comment
>
> > On Mon, Jan 10, 2011 at 02:49:25PM -0800, Rakesh Iyer wrote:
> > > > On Fri, Jan 07, 2011 at 09:45:07AM -0800, riyer@nvidia.com wrote:
> > > > > +
> > > > > +struct tegra_kbc {
> > > > > + void __iomem *mmio;
> > > > > + struct input_dev *idev;
> > > > > + int irq;
> > > > > + unsigned int wake_enable_rows;
> > > > > + unsigned int wake_enable_cols;
> > > > > + spinlock_t lock;
> > > > > + unsigned int repoll_time;
> > > > > + unsigned long cp_dly_jiffies;
> > > > > + int fifo[KBC_MAX_KPENT];
> > > > > + const struct tegra_kbc_platform_data *pdata;
> > > > > + int *plain_keycode;
> > > > > + int *fn_keycode;
> > > >
> > > > There should not be separate keycodes for FN and normal kys - FN is just
> > > > a modifier, like SHIFT or CTRL or ALT are and shoudl be handled in upper
> > > > layers.
> > >
> > > We had the same thought regarding Function as a modifier akin to Shift, Ctrl an Alt.
> > > But this does not appear to be the case.
> > >
> > > This keyboard is used primarily for Laptop-like form factors where function keys are used
> > to overload the existing keys.
> >
> > So it is same SHIFT.
> >
> > > In addition the Fn key mappings aren't identical in different keyboard layouts.
> >
> >
> > Same as SHIFT - depending on layout used shifted KEY_1 produces either '!' or '1'.
>
> The FN key modifiers are not identical to Shift Modifier. They map to
> totally different keys for this keyboard. If you are suggesting that
> you weren't implying they map to the same thing, then I agree it can
> be treated as a modifier.

Yes, I meant that FN is _similar_ to SHIFT, I did not suggest that they
produce the same mapping.

> But the problem is the higher layers don't necessarily do so.

It is just a matter of setting it up. The console has option for adding
modifiers, xkb as well so please use them. No need to push this task
into the kernel.

> The documentation I have read all suggest the Fn key isn't a valid
> modifier for the operating system,

Huh? Why not? It mabe not a standard modifier but to say that it is not
a valid one is a stretch.

> and that most keyboard hardware
> abstracts the Fn keypress and generates the modified key.

Some hardware, like keyboards in most laptops, does abstract FN key.
They do it by emitting completely different scancode. With such hardware
the fact that FN is depressed is completely undetectable to the OS.

Your case is different, FN is regular key to whuch you assign a special
meaning, like you do for SHIFT, CTRL. ALT and other modifiers. And just
like SHIFT, CTRL, ALT and others it should not be hardcoded in the
kernel.

Thanks.

--
Dmitry


\
 
 \ /
  Last update: 2011-01-11 21:05    [W:0.085 / U:0.472 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site