From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Stephen Boyd <swboyd@chromium.org>
Cc: linux-kernel@vger.kernel.org, linux-input@vger.kernel.org,
Jingle Wu <jingle.wu@emc.com.tw>, Wolfram Sang <wsa@kernel.org>
Subject: Re: [PATCH] Input: elan_i2c: Disable irq on shutdown
Date: Thu, 3 Jun 2021 11:53:28 -0700 [thread overview]
Message-ID: <YLklKF+zn4iVwy14@google.com> (raw)
In-Reply-To: <CAE-0n50PZ+vUH_dSQnunViWrkEdQNHyLNHjKbrsbEbO-YL8DRA@mail.gmail.com>
On Wed, Jun 02, 2021 at 11:13:40PM -0700, Stephen Boyd wrote:
> Quoting Dmitry Torokhov (2021-06-02 21:33:41)
> > On Wed, Jun 02, 2021 at 06:33:49PM -0700, Stephen Boyd wrote:
> > > Quoting Dmitry Torokhov (2021-06-02 18:18:17)
> > > >
> > > > I do not think keeping counter balanced would be important here, as we
> > > > are shutting down, and upon reboot everything will be reinitialized from
> > > > scratch. Also, we are lucky in that there is just a handful of I2C
> > > > drivers defining shutdown() methods.
> > > >
> > > > > Please don't make me shave this yak.
> > > >
> > > > I'm afraid someone has to... I'm adding Wolfram to CC to get his take on
> > > > this.
> > > >
> > >
> > > I suppose another option would be to introduce some common function that
> > > i2c drivers can use for their shutdown op, like i2c_generic_shutdown()
> > > that would disable the irq? I would guess that it isn't a great idea to
> > > blanket disable the irq in case some i2c driver wants to do something
> > > that may require that irq to come in once more during shutdown to signal
> > > that things are off or something like that.
> > >
> > > Would having this common function that this driver opts into work for
> > > you?
> >
> > Opting in in this fashion will still require changes in the majority
> > of drivers (any I2C touchscreen or touchpad may be touched while system
> > is being shut down, so all of them will need to have interrupt freed or
> > disabled, or they may initiate I2C transfer). How about something like
> > this;
>
> Yes, this approach should work. I assume a device that doesn't have a
> shutdown function will be happy to let the i2c core disable the irq for
> it so it looks low risk.
>
> Will you send a proper patch to Wolfram or would you like me to wrap it
> up and resend?
If you could do that I'd be more than happy.
Thanks.
--
Dmitry
prev parent reply other threads:[~2021-06-03 18:54 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-10 22:00 [PATCH] Input: elan_i2c: Disable irq on shutdown Stephen Boyd
2021-05-11 2:01 ` Dmitry Torokhov
2021-05-11 5:11 ` Stephen Boyd
2021-06-03 1:18 ` Dmitry Torokhov
2021-06-03 1:33 ` Stephen Boyd
2021-06-03 4:33 ` Dmitry Torokhov
2021-06-03 6:13 ` Stephen Boyd
2021-06-03 18:53 ` Dmitry Torokhov [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=YLklKF+zn4iVwy14@google.com \
--to=dmitry.torokhov@gmail.com \
--cc=jingle.wu@emc.com.tw \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=swboyd@chromium.org \
--cc=wsa@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 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.