From: Jarkko Nikula <jarkko.nikula@linux.intel.com>
To: Jean Delvare <jdelvare@suse.de>, Linux I2C <linux-i2c@vger.kernel.org>
Subject: Re: [PATCH] i2c: i801: Restore INTREN on unload
Date: Wed, 10 Nov 2021 16:31:41 +0200 [thread overview]
Message-ID: <d4f76584-7548-baae-837d-b87300086196@linux.intel.com> (raw)
In-Reply-To: <20211109160257.4c089eef@endymion>
On 11/9/21 5:02 PM, Jean Delvare wrote:
> If driver interrupts are enabled, SMBHSTCNT_INTREN will be 1 after
> the first transaction, and will stay to that value forever. This
> means that interrupts will be generated for both host-initiated
> transactions and also SMBus Alert events even after the driver is
> unloaded. To be on the safe side, we should restore the initial state
> of this bit at suspend and reboot time, as we do for several other
> configuration bits already and for the same reason: the BIOS should
> be handed the device in the same configuration state in which we
> received it. Otherwise interrupts may be generated which nobody
> will process.
>
> Signed-off-by: Jean Delvare <jdelvare@suse.de>
> Tested-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
> ---
> This probably doesn't change much on its own in practice, however it
> is mandatory to make this change before Jarkko's fix for the SMB_ALERT
> interrupt storm gets applied, otherwise the fix will be incomplete.
>
> Jarkko, this is not exactly the patch you tested, I added restoration
> to the suspend path as well to be 100% safe.
>
Same Tested-by holds here.
We have one laptop with RMI4 SMBus connected touchpad and trackpad. I
wanted to check it does the suspend path here cease them to not work but
they work after your patch.
Now we restore INTREN on suspend but do not explicitly enable it after
resume. I didn't fully get how RMI4 stack resumes but perhaps they will
do some power on, reset, etc command transaction and that gets the
INTREN enabled and allow host notify.
Jarkko
next prev parent reply other threads:[~2021-11-10 14:31 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-09 15:02 [PATCH] i2c: i801: Restore INTREN on unload Jean Delvare
2021-11-10 14:31 ` Jarkko Nikula [this message]
2021-11-16 10:23 ` Jean Delvare
2021-11-23 9:42 ` Wolfram Sang
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=d4f76584-7548-baae-837d-b87300086196@linux.intel.com \
--to=jarkko.nikula@linux.intel.com \
--cc=jdelvare@suse.de \
--cc=linux-i2c@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 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.