From: Stephen Warren <swarren@wwwdotorg.org>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: linux-input@vger.kernel.org, Viresh Kumar <viresh.kumar@st.com>,
devicetree-discuss@lists.ozlabs.org,
linux-kernel@vger.kernel.org,
Rob Herring <rob.herring@calxeda.com>,
Rakesh Iyer <riyer@nvidia.com>
Subject: Re: [PATCH 2/2] Input: matrix_keymap - wire up device tree support
Date: Wed, 09 May 2012 09:46:22 -0600 [thread overview]
Message-ID: <4FAA914E.7040908@wwwdotorg.org> (raw)
In-Reply-To: <20120509052540.GC10514@core.coreip.homeip.net>
On 05/08/2012 11:25 PM, Dmitry Torokhov wrote:
> On Mon, Apr 30, 2012 at 10:00:42AM -0600, Stephen Warren wrote:
>> On 04/29/2012 10:19 PM, Dmitry Torokhov wrote:
>>> On Thu, Apr 26, 2012 at 09:05:18AM -0600, Stephen Warren wrote:
>>>> On 04/26/2012 02:19 AM, Dmitry Torokhov wrote:
>>>>> When platform keymap is not supplied to matrix_keypad_build_keymap()
>>>>> and device tree support is enabled, try locating specified property
>>>>> and load keymap from it. If property name is not defined, try using
>>>>> "linux,keymap".
>>>>>
>>>>> Based on earlier patch by Viresh Kumar <viresh.kumar@st.com>
>>>>
>>>> I think this series looks mostly OK. A few comments below.
>>>>
>>>> We don't actually have the KBC driver hooked up on any boards yet, so I
>>>> can't actually test this yet.
>>>>
>>>> How will the linux,fn-keymap handling work? It looks like this code is
>>>> allocating a keymap data structure with one additional row to represent
>>>> fn-not-pressed vs. fn-pressed.
>>>
>>> No, it loads 2x rows (therefore giving you twice original keymap size).
>>
>> Yes, I mean an extra row signal, so therefore twice as many rows.
>>
>>>> I assume this will work without issue
>>>> even though the second half is not filled in. Won't this allow the
>>>> linux,keymap property entries to pass validation "if (row >= rows)" for
>>>> one more row than it should?
>>>
>>> Maybe... I think we should revisit this when you actually have
>>> linux,fn-keymap. Probably will need to export matrix_keypad_parse_
>>
>> Would it be better to just drop the support for the linux,fn-keymap
>> property, until the full support is there? That wouldn't lose any
>> functionality, but would avoid this potential error-checking issue.
>
> Fair enough, how about the version below?
Yes, I think that will work.
I would expect that when linux,fn-keymap support gets added, perhaps the
"keymap_rows *= 2" would move into the DT keymap parsing code, since
only it will know whether its going to parse the second property. But I
don't think that influences the current patch.
prev parent reply other threads:[~2012-05-09 15:46 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-26 8:19 [PATCH 2/2] Input: matrix_keymap - wire up device tree support Dmitry Torokhov
2012-04-26 15:05 ` Stephen Warren
2012-04-30 4:19 ` Dmitry Torokhov
2012-04-30 16:00 ` Stephen Warren
2012-05-09 5:25 ` Dmitry Torokhov
2012-05-09 15:46 ` Stephen Warren [this message]
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=4FAA914E.7040908@wwwdotorg.org \
--to=swarren@wwwdotorg.org \
--cc=devicetree-discuss@lists.ozlabs.org \
--cc=dmitry.torokhov@gmail.com \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=riyer@nvidia.com \
--cc=rob.herring@calxeda.com \
--cc=viresh.kumar@st.com \
/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: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox