From: Viresh Kumar <viresh.kumar@st.com>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Rajeev KUMAR <rajeev-dlh.kumar@st.com>,
Linus Walleij <linus.walleij@linaro.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Rakesh Iyer <riyer@nvidia.com>,
Trilok Soni <tsoni@codeaurora.org>,
Kukjin Kim <kgene.kim@samsung.com>,
Stephen Warren <swarren@nvidia.com>,
Michael Hennerich <michael.hennerich@analog.com>,
Thomas Abraham <thomas.abraham@linaro.org>,
"linux-input@vger.kernel.org" <linux-input@vger.kernel.org>,
Wanlong Gao <gaowanlong@cn.fujitsu.com>,
Hui Wang <jason77.wang@gmail.com>,
Wan ZongShun <mcuos.com@gmail.com>,
Rob Herring <rob.herring@calxeda.com>,
Yong Zhang <yong.zhang0@gmail.com>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
Kyle Manna <kyle.manna@fuel7.com>,
Wolfram Sang <w.sang@pengutronix.de>, Felipe Balbi <balbi@ti.com>,
H Hartley Sweeten <hsweeten@visionengravers.com>,
Anirudh Ghayal <aghayal>
Subject: Re: [PATCH 1/2] Input: matrix-keymap - uninline and prepare for device tree support
Date: Thu, 26 Apr 2012 13:53:12 +0530 [thread overview]
Message-ID: <4F9905F0.6030402@st.com> (raw)
In-Reply-To: <20120426081750.GA2684@core.coreip.homeip.net>
On 4/26/2012 1:47 PM, Dmitry Torokhov wrote:
> diff --git a/drivers/input/keyboard/spear-keyboard.c b/drivers/input/keyboard/spear-keyboard.c
> index 3b6b528..7c8f2bc 100644
> --- a/drivers/input/keyboard/spear-keyboard.c
> +++ b/drivers/input/keyboard/spear-keyboard.c
> @@ -49,7 +49,9 @@
> #define KEY_VALUE 0x00FFFFFF
> #define ROW_MASK 0xF0
> #define COLUMN_MASK 0x0F
> -#define ROW_SHIFT 4
> +#define NUM_ROWS 16
> +#define NUM_COLS 16
> +
> #define KEY_MATRIX_SHIFT 6
>
> struct spear_kbd {
> @@ -60,7 +62,7 @@ struct spear_kbd {
> unsigned int irq;
> unsigned int mode;
> unsigned short last_key;
> - unsigned short keycodes[256];
> + unsigned short keycodes[NUM_ROWS * NUM_COLS];
> };
>
> static irqreturn_t spear_kbd_interrupt(int irq, void *dev_id)
> @@ -212,18 +214,17 @@ static int __devinit spear_kbd_probe(struct platform_device *pdev)
> input_dev->open = spear_kbd_open;
> input_dev->close = spear_kbd_close;
>
> - __set_bit(EV_KEY, input_dev->evbit);
> + error = matrix_keypad_build_keymap(keymap, NULL, NUM_ROWS, NUM_COLS,
> + kbd->keycodes, input_dev);
> + if (error) {
> + dev_err(&pdev->dev, "Failed to build keymap\n");
> + goto errr_put_clk;
> + }
> +
> if (pdata->rep)
> __set_bit(EV_REP, input_dev->evbit);
> input_set_capability(input_dev, EV_MSC, MSC_SCAN);
>
> - input_dev->keycode = kbd->keycodes;
> - input_dev->keycodesize = sizeof(kbd->keycodes[0]);
> - input_dev->keycodemax = ARRAY_SIZE(kbd->keycodes);
> -
> - matrix_keypad_build_keymap(keymap, ROW_SHIFT,
> - input_dev->keycode, input_dev->keybit);
> -
> input_set_drvdata(input_dev, kbd);
>
> error = request_irq(irq, spear_kbd_interrupt, 0, "keyboard", kbd);
Have you rebased these patches over my patchset for SPEAr and Tegra?
--
viresh
WARNING: multiple messages have this Message-ID (diff)
From: viresh.kumar@st.com (Viresh Kumar)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/2] Input: matrix-keymap - uninline and prepare for device tree support
Date: Thu, 26 Apr 2012 13:53:12 +0530 [thread overview]
Message-ID: <4F9905F0.6030402@st.com> (raw)
In-Reply-To: <20120426081750.GA2684@core.coreip.homeip.net>
On 4/26/2012 1:47 PM, Dmitry Torokhov wrote:
> diff --git a/drivers/input/keyboard/spear-keyboard.c b/drivers/input/keyboard/spear-keyboard.c
> index 3b6b528..7c8f2bc 100644
> --- a/drivers/input/keyboard/spear-keyboard.c
> +++ b/drivers/input/keyboard/spear-keyboard.c
> @@ -49,7 +49,9 @@
> #define KEY_VALUE 0x00FFFFFF
> #define ROW_MASK 0xF0
> #define COLUMN_MASK 0x0F
> -#define ROW_SHIFT 4
> +#define NUM_ROWS 16
> +#define NUM_COLS 16
> +
> #define KEY_MATRIX_SHIFT 6
>
> struct spear_kbd {
> @@ -60,7 +62,7 @@ struct spear_kbd {
> unsigned int irq;
> unsigned int mode;
> unsigned short last_key;
> - unsigned short keycodes[256];
> + unsigned short keycodes[NUM_ROWS * NUM_COLS];
> };
>
> static irqreturn_t spear_kbd_interrupt(int irq, void *dev_id)
> @@ -212,18 +214,17 @@ static int __devinit spear_kbd_probe(struct platform_device *pdev)
> input_dev->open = spear_kbd_open;
> input_dev->close = spear_kbd_close;
>
> - __set_bit(EV_KEY, input_dev->evbit);
> + error = matrix_keypad_build_keymap(keymap, NULL, NUM_ROWS, NUM_COLS,
> + kbd->keycodes, input_dev);
> + if (error) {
> + dev_err(&pdev->dev, "Failed to build keymap\n");
> + goto errr_put_clk;
> + }
> +
> if (pdata->rep)
> __set_bit(EV_REP, input_dev->evbit);
> input_set_capability(input_dev, EV_MSC, MSC_SCAN);
>
> - input_dev->keycode = kbd->keycodes;
> - input_dev->keycodesize = sizeof(kbd->keycodes[0]);
> - input_dev->keycodemax = ARRAY_SIZE(kbd->keycodes);
> -
> - matrix_keypad_build_keymap(keymap, ROW_SHIFT,
> - input_dev->keycode, input_dev->keybit);
> -
> input_set_drvdata(input_dev, kbd);
>
> error = request_irq(irq, spear_kbd_interrupt, 0, "keyboard", kbd);
Have you rebased these patches over my patchset for SPEAr and Tegra?
--
viresh
WARNING: multiple messages have this Message-ID (diff)
From: Viresh Kumar <viresh.kumar@st.com>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: "linux-input@vger.kernel.org" <linux-input@vger.kernel.org>,
Wan ZongShun <mcuos.com@gmail.com>,
Rob Herring <rob.herring@calxeda.com>,
Michael Hennerich <michael.hennerich@analog.com>,
Stephen Warren <swarren@nvidia.com>,
Kyle Manna <kyle.manna@fuel7.com>,
Anirudh Ghayal <aghayal@codeaurora.org>,
H Hartley Sweeten <hsweeten@visionengravers.com>,
Yong Zhang <yong.zhang0@gmail.com>,
Hui Wang <jason77.wang@gmail.com>,
Wanlong Gao <gaowanlong@cn.fujitsu.com>,
Wolfram Sang <w.sang@pengutronix.de>,
Linus Walleij <linus.walleij@linaro.org>,
Sourav Poddar <sourav.poddar@ti.com>, Felipe Balbi <balbi@ti.com>,
Trilok Soni <tsoni@codeaurora.org>,
Kukjin Kim <kgene.kim@samsung.com>,
Thomas Abraham <thomas.abraham@linaro.org>,
Rajeev KUMAR <rajeev-dlh.kumar@st.com>,
Rakesh Iyer <riyer@nvidia.com>, Olof Johansson <olof@lixom.net>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH 1/2] Input: matrix-keymap - uninline and prepare for device tree support
Date: Thu, 26 Apr 2012 13:53:12 +0530 [thread overview]
Message-ID: <4F9905F0.6030402@st.com> (raw)
In-Reply-To: <20120426081750.GA2684@core.coreip.homeip.net>
On 4/26/2012 1:47 PM, Dmitry Torokhov wrote:
> diff --git a/drivers/input/keyboard/spear-keyboard.c b/drivers/input/keyboard/spear-keyboard.c
> index 3b6b528..7c8f2bc 100644
> --- a/drivers/input/keyboard/spear-keyboard.c
> +++ b/drivers/input/keyboard/spear-keyboard.c
> @@ -49,7 +49,9 @@
> #define KEY_VALUE 0x00FFFFFF
> #define ROW_MASK 0xF0
> #define COLUMN_MASK 0x0F
> -#define ROW_SHIFT 4
> +#define NUM_ROWS 16
> +#define NUM_COLS 16
> +
> #define KEY_MATRIX_SHIFT 6
>
> struct spear_kbd {
> @@ -60,7 +62,7 @@ struct spear_kbd {
> unsigned int irq;
> unsigned int mode;
> unsigned short last_key;
> - unsigned short keycodes[256];
> + unsigned short keycodes[NUM_ROWS * NUM_COLS];
> };
>
> static irqreturn_t spear_kbd_interrupt(int irq, void *dev_id)
> @@ -212,18 +214,17 @@ static int __devinit spear_kbd_probe(struct platform_device *pdev)
> input_dev->open = spear_kbd_open;
> input_dev->close = spear_kbd_close;
>
> - __set_bit(EV_KEY, input_dev->evbit);
> + error = matrix_keypad_build_keymap(keymap, NULL, NUM_ROWS, NUM_COLS,
> + kbd->keycodes, input_dev);
> + if (error) {
> + dev_err(&pdev->dev, "Failed to build keymap\n");
> + goto errr_put_clk;
> + }
> +
> if (pdata->rep)
> __set_bit(EV_REP, input_dev->evbit);
> input_set_capability(input_dev, EV_MSC, MSC_SCAN);
>
> - input_dev->keycode = kbd->keycodes;
> - input_dev->keycodesize = sizeof(kbd->keycodes[0]);
> - input_dev->keycodemax = ARRAY_SIZE(kbd->keycodes);
> -
> - matrix_keypad_build_keymap(keymap, ROW_SHIFT,
> - input_dev->keycode, input_dev->keybit);
> -
> input_set_drvdata(input_dev, kbd);
>
> error = request_irq(irq, spear_kbd_interrupt, 0, "keyboard", kbd);
Have you rebased these patches over my patchset for SPEAr and Tegra?
--
viresh
next prev parent reply other threads:[~2012-04-26 8:23 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-26 8:17 [PATCH 1/2] Input: matrix-keymap - uninline and prepare for device tree support Dmitry Torokhov
2012-04-26 8:17 ` Dmitry Torokhov
2012-04-26 8:23 ` Viresh Kumar [this message]
2012-04-26 8:23 ` Viresh Kumar
2012-04-26 8:23 ` Viresh Kumar
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=4F9905F0.6030402@st.com \
--to=viresh.kumar@st.com \
--cc=balbi@ti.com \
--cc=dmitry.torokhov@gmail.com \
--cc=gaowanlong@cn.fujitsu.com \
--cc=hsweeten@visionengravers.com \
--cc=jason77.wang@gmail.com \
--cc=kgene.kim@samsung.com \
--cc=kyle.manna@fuel7.com \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mcuos.com@gmail.com \
--cc=michael.hennerich@analog.com \
--cc=rajeev-dlh.kumar@st.com \
--cc=riyer@nvidia.com \
--cc=rob.herring@calxeda.com \
--cc=swarren@nvidia.com \
--cc=thomas.abraham@linaro.org \
--cc=tsoni@codeaurora.org \
--cc=w.sang@pengutronix.de \
--cc=yong.zhang0@gmail.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 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.