linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Warren <swarren@wwwdotorg.org>
To: Laxman Dewangan <ldewangan@nvidia.com>
Cc: dmitry.torokhov@gmail.com, linux-input@vger.kernel.org,
	linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] input: keyboard: tegra: support for defining row/columns based on SoC
Date: Tue, 12 Mar 2013 12:09:26 -0600	[thread overview]
Message-ID: <513F6F56.6000304@wwwdotorg.org> (raw)
In-Reply-To: <1363088189-14654-1-git-send-email-ldewangan@nvidia.com>

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@nvidia.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.

      reply	other threads:[~2013-03-12 18:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-12 11:36 [PATCH] input: keyboard: tegra: support for defining row/columns based on SoC Laxman Dewangan
2013-03-12 18:09 ` 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=513F6F56.6000304@wwwdotorg.org \
    --to=swarren@wwwdotorg.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=ldewangan@nvidia.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).