lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Tue, 11 Jan 2011 12:01:55 -0800
From:	Dmitry Torokhov <dmitry.torokhov@...il.com>
To:	Rakesh Iyer <riyer@...dia.com>
Cc:	'Pavel Machek' <pavel@....cz>,
	"jj@...osbits.net" <jj@...osbits.net>,
	"tsoni@...eaurora.org" <tsoni@...eaurora.org>,
	"shubhrajyoti@...com" <shubhrajyoti@...com>,
	"ccross@...roid.com" <ccross@...roid.com>,
	"konkers@...roid.com" <konkers@...roid.com>,
	"olof@...om.net" <olof@...om.net>, Andrew Chew <AChew@...dia.com>,
	"linux-tegra@...r.kernel.org" <linux-tegra@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"linux-input@...r.kernel.org" <linux-input@...r.kernel.org>
Subject: Re: [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@...dia.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ