[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <513F6F56.6000304@wwwdotorg.org>
Date: Tue, 12 Mar 2013 12:09:26 -0600
From: Stephen Warren <swarren@...dotorg.org>
To: Laxman Dewangan <ldewangan@...dia.com>
CC: dmitry.torokhov@...il.com, linux-input@...r.kernel.org,
linux-tegra@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] input: keyboard: tegra: support for defining row/columns
based on SoC
On 03/12/2013 05:36 AM, Laxman Dewangan wrote:
> NVIDIA's Tegra20 and Tegra30 supports the 16x8 keyboard matrix and T114
> support the 11x8 Key matrix.
>
> Add support for defining the maximum row/columns based on SoC through
> proper compatibity.
Aside from the few nits below,
Reviewed-by: Stephen Warren <swarren@...dia.com>
> diff --git a/drivers/input/keyboard/tegra-kbc.c b/drivers/input/keyboard/tegra-kbc.c
> @@ -108,6 +115,9 @@ struct tegra_kbc {
> u32 wakeup_key;
> struct timer_list timer;
> struct clk *clk;
> + const struct tegra_kbc_hw_support *hw_support;
> + int max_keys;
> + int max_row_columns;
That isn't really max_row_columns, that's num_gpios or perhaps
num_rows_and_columns.
> + if (num_cols > kbc->hw_support->max_columns) {
> + dev_err(kbc->dev,
> + "Number of column is more than supported on SoCs\n");
That's be slightly better as:
Number of columns is more than supported by this hardware.
Similar for the row check above.
> @@ -579,6 +622,12 @@ static int tegra_kbc_probe(struct platform_device *pdev)
> }
>
> kbc->dev = &pdev->dev;
> + kbc->hw_support = match->data;
> + kbc->max_keys = (kbc->hw_support->max_rows *
> + kbc->hw_support->max_columns);
> + kbc->max_row_columns = (kbc->hw_support->max_rows +
> + kbc->hw_support->max_columns);
You don't need the () around either of those expressions.
--
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