All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: AngeloGioacchino Del Regno  <angelogioacchino.delregno@collabora.com>
Cc: Mattijs Korpershoek <mkorpershoek@baylibre.com>,
	Andy Shevchenko <andriy.shevchenko@linux.intel.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 v21 2/3] Input: mt6779-keypad - Add MediaTek keypad driver
Date: Sat, 5 Mar 2022 15:04:55 -0800	[thread overview]
Message-ID: <YiPsl41Sawjlc2E+@google.com> (raw)
In-Reply-To: <300114e2-6794-db3c-a51c-3f900b6476f9@collabora.com>

On Fri, Mar 04, 2022 at 11:31:38AM +0100, AngeloGioacchino Del Regno wrote:
> Il 03/03/22 16:43, Mattijs Korpershoek ha scritto:
> > From: "fengping.yu" <fengping.yu@mediatek.com>
> > +
> > +static const struct regmap_config mt6779_keypad_regmap_cfg = {
> > +	.reg_bits = 32,
> > +	.val_bits = 32,
> > +	.reg_stride = sizeof(u32),
> > +	.max_register = 36,
> 
> Are you sure that you can't use .fast_io = true?
> 
> Another version for the same question:
> Are you sure that you need to lock with a mutex here, and not with a spinlock?
> 
> Since you're performing reads over a MMIO, I think that there's a very good
> chance that you can use fast_io.

I think there are good ideas here, but they are not critical (this is a
keypad we are dealing with) and so can be investigated at a later time.

I added reporting of EV_MSC/MSC_SCAN as it is customary for
keyboard/keypad drivers, and applied the patch.

Thank you.

-- 
Dmitry

WARNING: multiple messages have this Message-ID (diff)
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Cc: Mattijs Korpershoek <mkorpershoek@baylibre.com>,
	Andy Shevchenko <andriy.shevchenko@linux.intel.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 v21 2/3] Input: mt6779-keypad - Add MediaTek keypad driver
Date: Sat, 5 Mar 2022 15:04:55 -0800	[thread overview]
Message-ID: <YiPsl41Sawjlc2E+@google.com> (raw)
In-Reply-To: <300114e2-6794-db3c-a51c-3f900b6476f9@collabora.com>

On Fri, Mar 04, 2022 at 11:31:38AM +0100, AngeloGioacchino Del Regno wrote:
> Il 03/03/22 16:43, Mattijs Korpershoek ha scritto:
> > From: "fengping.yu" <fengping.yu@mediatek.com>
> > +
> > +static const struct regmap_config mt6779_keypad_regmap_cfg = {
> > +	.reg_bits = 32,
> > +	.val_bits = 32,
> > +	.reg_stride = sizeof(u32),
> > +	.max_register = 36,
> 
> Are you sure that you can't use .fast_io = true?
> 
> Another version for the same question:
> Are you sure that you need to lock with a mutex here, and not with a spinlock?
> 
> Since you're performing reads over a MMIO, I think that there's a very good
> chance that you can use fast_io.

I think there are good ideas here, but they are not critical (this is a
keypad we are dealing with) and so can be investigated at a later time.

I added reporting of EV_MSC/MSC_SCAN as it is customary for
keyboard/keypad drivers, and applied the patch.

Thank you.

-- 
Dmitry

_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

WARNING: multiple messages have this Message-ID (diff)
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Cc: Mattijs Korpershoek <mkorpershoek@baylibre.com>,
	Andy Shevchenko <andriy.shevchenko@linux.intel.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 v21 2/3] Input: mt6779-keypad - Add MediaTek keypad driver
Date: Sat, 5 Mar 2022 15:04:55 -0800	[thread overview]
Message-ID: <YiPsl41Sawjlc2E+@google.com> (raw)
In-Reply-To: <300114e2-6794-db3c-a51c-3f900b6476f9@collabora.com>

On Fri, Mar 04, 2022 at 11:31:38AM +0100, AngeloGioacchino Del Regno wrote:
> Il 03/03/22 16:43, Mattijs Korpershoek ha scritto:
> > From: "fengping.yu" <fengping.yu@mediatek.com>
> > +
> > +static const struct regmap_config mt6779_keypad_regmap_cfg = {
> > +	.reg_bits = 32,
> > +	.val_bits = 32,
> > +	.reg_stride = sizeof(u32),
> > +	.max_register = 36,
> 
> Are you sure that you can't use .fast_io = true?
> 
> Another version for the same question:
> Are you sure that you need to lock with a mutex here, and not with a spinlock?
> 
> Since you're performing reads over a MMIO, I think that there's a very good
> chance that you can use fast_io.

I think there are good ideas here, but they are not critical (this is a
keypad we are dealing with) and so can be investigated at a later time.

I added reporting of EV_MSC/MSC_SCAN as it is customary for
keyboard/keypad drivers, and applied the patch.

Thank you.

-- 
Dmitry

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  parent reply	other threads:[~2022-03-05 23:05 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-03 15:42 [PATCH v21 0/3] Add matrix keypad driver support for Mediatek SoCs Mattijs Korpershoek
2022-03-03 15:42 ` Mattijs Korpershoek
2022-03-03 15:42 ` Mattijs Korpershoek
2022-03-03 15:43 ` [PATCH v21 1/3] dt-bindings: input: Add bindings for Mediatek matrix keypad Mattijs Korpershoek
2022-03-03 15:43   ` Mattijs Korpershoek
2022-03-03 15:43   ` Mattijs Korpershoek
2022-03-04 10:53   ` AngeloGioacchino Del Regno
2022-03-04 10:53     ` AngeloGioacchino Del Regno
2022-03-04 10:53     ` AngeloGioacchino Del Regno
2022-03-05 23:02   ` Dmitry Torokhov
2022-03-05 23:02     ` Dmitry Torokhov
2022-03-05 23:02     ` Dmitry Torokhov
2022-03-03 15:43 ` [PATCH v21 2/3] Input: mt6779-keypad - Add MediaTek keypad driver Mattijs Korpershoek
2022-03-03 15:43   ` Mattijs Korpershoek
2022-03-03 15:43   ` Mattijs Korpershoek
2022-03-04 10:31   ` AngeloGioacchino Del Regno
2022-03-04 10:31     ` AngeloGioacchino Del Regno
2022-03-04 10:31     ` AngeloGioacchino Del Regno
2022-03-04 12:38     ` Andy Shevchenko
2022-03-04 12:38       ` Andy Shevchenko
2022-03-04 12:38       ` Andy Shevchenko
2022-03-14  8:00       ` Mattijs Korpershoek
2022-03-14  8:00         ` Mattijs Korpershoek
2022-03-14  8:00         ` Mattijs Korpershoek
2022-03-05 23:04     ` Dmitry Torokhov [this message]
2022-03-05 23:04       ` Dmitry Torokhov
2022-03-05 23:04       ` Dmitry Torokhov
2022-03-14  7:57     ` Mattijs Korpershoek
2022-03-14  7:57       ` Mattijs Korpershoek
2022-03-14  7:57       ` Mattijs Korpershoek
2022-03-03 15:43 ` [PATCH v21 3/3] arm64: defconfig: Add CONFIG_KEYBOARD_MT6779=m Mattijs Korpershoek
2022-03-03 15:43   ` Mattijs Korpershoek
2022-03-03 15:43   ` 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=YiPsl41Sawjlc2E+@google.com \
    --to=dmitry.torokhov@gmail.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=devicetree@vger.kernel.org \
    --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 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.