From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Lucas Stach <l.stach@pengutronix.de>
Cc: linux-input@vger.kernel.org, patchwork-lst@pengutronix.de,
kernel@pengutronix.de
Subject: Re: [PATCH resend 2/3] Input: synaptics-rmi4 - add dummy F54 attention handler
Date: Mon, 4 Nov 2019 16:03:59 -0800 [thread overview]
Message-ID: <20191105000359.GS57214@dtor-ws> (raw)
In-Reply-To: <20191104114454.10500-2-l.stach@pengutronix.de>
On Mon, Nov 04, 2019 at 12:44:53PM +0100, Lucas Stach wrote:
> F54 is IRQ capable, even if it is not used in the current driver
> implementation. The common driver code in rmi_create_function_irq always
> installs a irq handler for functions that are IRQ capable. Without a
> assigned attention handler, this means a NULL pointer being passed as
> the nested IRQ handler. This seems to work with some architecture
> implementations, but crashes on others like ARM64.
>
> Don't rely on implementation defined behavior and actually install
> a proper attention handler.
Instead of supplying dummy IRQ handler, can't we simply disable relevant
interrupts bits?
>
> Fixes: 24d28e4f1271 ("Input: synaptics-rmi4 - convert irq distribution
> to irq_domain")
> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
> ---
> drivers/input/rmi4/rmi_f54.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/drivers/input/rmi4/rmi_f54.c b/drivers/input/rmi4/rmi_f54.c
> index 4841354af0d7..22390e89c680 100644
> --- a/drivers/input/rmi4/rmi_f54.c
> +++ b/drivers/input/rmi4/rmi_f54.c
> @@ -732,6 +732,11 @@ static void rmi_f54_remove(struct rmi_function *fn)
> v4l2_device_unregister(&f54->v4l2);
> }
>
> +static irqreturn_t rmi_f54_attention(int irq, void *ctx)
> +{
> + return IRQ_HANDLED;
> +}
> +
> struct rmi_function_handler rmi_f54_handler = {
> .driver = {
> .name = F54_NAME,
> @@ -740,4 +745,5 @@ struct rmi_function_handler rmi_f54_handler = {
> .probe = rmi_f54_probe,
> .config = rmi_f54_config,
> .remove = rmi_f54_remove,
> + .attention = rmi_f54_attention,
> };
> --
> 2.20.1
>
Thanks.
--
Dmitry
next prev parent reply other threads:[~2019-11-05 0:04 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-04 11:44 [PATCH resend 1/3] Input: synaptics-rmi4 - fix video buffer size Lucas Stach
2019-11-04 11:44 ` [PATCH resend 2/3] Input: synaptics-rmi4 - add dummy F54 attention handler Lucas Stach
2019-11-05 0:03 ` Dmitry Torokhov [this message]
2019-11-05 11:46 ` Lucas Stach
2019-11-04 11:44 ` [PATCH resend 3/3] Input: synaptics-rmi4 - simplify data read in rmi_f54_work Lucas Stach
2019-11-05 0:02 ` Dmitry Torokhov
2019-11-05 0:02 ` [PATCH resend 1/3] Input: synaptics-rmi4 - fix video buffer size Dmitry Torokhov
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=20191105000359.GS57214@dtor-ws \
--to=dmitry.torokhov@gmail.com \
--cc=kernel@pengutronix.de \
--cc=l.stach@pengutronix.de \
--cc=linux-input@vger.kernel.org \
--cc=patchwork-lst@pengutronix.de \
/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).