linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	Marco Felsch <m.felsch@pengutronix.de>,
	Rob Herring <robh+dt@kernel.org>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	Fengping Yu <fengping.yu@mediatek.com>,
	Yingjoe Chen <yingjoe.chen@mediatek.com>,
	Fabien Parent <fparent@baylibre.com>,
	Kevin Hilman <khilman@baylibre.com>,
	linux-input@vger.kernel.org, devicetree@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v20 2/3] Input: mt6779-keypad - Add MediaTek keypad driver
Date: Thu, 27 Jan 2022 17:20:49 +0200	[thread overview]
Message-ID: <YfK4UcuCfF7JfI7H@smile.fi.intel.com> (raw)
In-Reply-To: <20220127111526.3716689-3-mkorpershoek@baylibre.com>

On Thu, Jan 27, 2022 at 12:15:25PM +0100, Mattijs Korpershoek wrote:
> From: "fengping.yu" <fengping.yu@mediatek.com>
> 
> This patch adds matrix keypad support for Mediatek SoCs.

Some comments which may be addressed now or in the follow-up patch(es).
Up to you.

...

> +static const struct regmap_config mt6779_keypad_regmap_cfg = {
> +	.reg_bits = 32,
> +	.val_bits = 32,

> +	.reg_stride = sizeof(u32),

I'm wondering if we need this when we have reg_bits = 32 already.

> +	.max_register = 36,
> +};

...

> +	regmap_write(keypad->regmap, MTK_KPD_DEBOUNCE,
> +		     (debounce * 32) & MTK_KPD_DEBOUNCE_MASK);

I'm wondering if << 5 is more specific to show that the value
is based on 2^5 units.

...

> +	error = devm_add_action_or_reset(&pdev->dev, mt6779_keypad_clk_disable, keypad->clk);

You have this long line...

> +	error = devm_request_threaded_irq(&pdev->dev, irq,
> +					  NULL, mt6779_keypad_irq_handler,
> +					  IRQF_ONESHOT,
> +					  MTK_KPD_NAME, keypad);

...at the same time you may reduce LOCs here...

> +	if (error) {
> +		dev_err(&pdev->dev, "Failed to request IRQ#%d:%d\n",
> +			irq, error);

...and here.

> +		return error;
> +	}

-- 
With Best Regards,
Andy Shevchenko



  reply	other threads:[~2022-01-27 15:22 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-27 11:15 [PATCH v20 0/3] Add matrix keypad driver support for Mediatek SoCs Mattijs Korpershoek
2022-01-27 11:15 ` [PATCH v20 1/3] dt-bindings: input: Add bindings for Mediatek matrix keypad Mattijs Korpershoek
2022-02-01 23:46   ` Rob Herring
2022-01-27 11:15 ` [PATCH v20 2/3] Input: mt6779-keypad - Add MediaTek keypad driver Mattijs Korpershoek
2022-01-27 15:20   ` Andy Shevchenko [this message]
2022-01-28 10:03     ` Mattijs Korpershoek
2022-01-28 13:23       ` Andy Shevchenko
2022-01-27 11:15 ` [PATCH v20 3/3] arm64: defconfig: Add CONFIG_KEYBOARD_MT6779=m Mattijs Korpershoek

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=YfK4UcuCfF7JfI7H@smile.fi.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=fengping.yu@mediatek.com \
    --cc=fparent@baylibre.com \
    --cc=khilman@baylibre.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=m.felsch@pengutronix.de \
    --cc=matthias.bgg@gmail.com \
    --cc=mkorpershoek@baylibre.com \
    --cc=robh+dt@kernel.org \
    --cc=yingjoe.chen@mediatek.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;
as well as URLs for NNTP newsgroup(s).