From: Jean Delvare <jdelvare@suse.de>
To: Bjorn Helgaas <helgaas@kernel.org>
Cc: "Wolfram Sang" <wsa@kernel.org>,
"Linux I2C" <linux-i2c@vger.kernel.org>,
"Volker Rümelin" <vr_qemu@t-online.de>,
"Vaibhav Gupta" <vaibhavgupta40@gmail.com>
Subject: Re: [PATCH] i2c: i801: Fix resume bug
Date: Mon, 31 Aug 2020 16:33:50 +0200 [thread overview]
Message-ID: <20200831163350.0359f964@endymion> (raw)
In-Reply-To: <20200828164036.GA2158745@bjorn-Precision-5520>
Hi Bjorn, Wolfram,
On Fri, 28 Aug 2020 11:40:36 -0500, Bjorn Helgaas wrote:
> On Fri, Aug 28, 2020 at 10:57:53AM +0200, Wolfram Sang wrote:
> > On Tue, Aug 25, 2020 at 07:13:03PM +0200, Jean Delvare wrote:
> > > +static unsigned char i801_setup_hstcfg(unsigned char hstcfg)
> > > +{
> > > + hstcfg &= ~SMBHSTCFG_I2C_EN; /* SMBus timing */
> > > + hstcfg |= SMBHSTCFG_HST_EN;
> > > + return hstcfg;
> > > +}
> >
> > What about putting the write to SMBHSTCFG here, too. When I read the
> > function name, I assumed it will do that.
>
> From the point of view of suspend/resume, I think it's nice to have a
> write in i801_resume() to match the one in i801_suspend().
I agree that symmetry is nice in general, but I must agree with
Wolfram, a function named "setup" which doesn't actually perform any
action is kind of confusing. I believe that moving the write in there
makes sense as both callers will do exactly that immediately after.
> Putting the write inside i801_setup_hstcfg() would mean i801_probe()
> would do *two* writes instead of the one it currently does.
I can't see why that would be the case.
--
Jean Delvare
SUSE L3 Support
next prev parent reply other threads:[~2020-08-31 14:33 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-25 17:13 [PATCH] i2c: i801: Fix resume bug Jean Delvare
2020-08-28 8:57 ` Wolfram Sang
2020-08-28 16:40 ` Bjorn Helgaas
2020-08-31 14:33 ` Jean Delvare [this message]
2020-08-31 14:59 ` Vaibhav Gupta
2020-09-01 9:35 ` Jean Delvare
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=20200831163350.0359f964@endymion \
--to=jdelvare@suse.de \
--cc=helgaas@kernel.org \
--cc=linux-i2c@vger.kernel.org \
--cc=vaibhavgupta40@gmail.com \
--cc=vr_qemu@t-online.de \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox