From: Jeff LaBundy <jeff@labundy.com>
To: Charles Keepax <ckeepax@opensource.cirrus.com>
Cc: Fred Treven <fred.treven@cirrus.com>,
dmitry.torokhov@gmail.com, ben.bright@cirrus.com,
james.ogletree@cirrus.com, lee@kernel.org, jdelvare@suse.de,
joel@jms.id.au, cy_huang@richtek.com, rdunlap@infradead.org,
eajames@linux.ibm.com, ping.bai@nxp.com, msp@baylibre.com,
arnd@arndb.de, bartosz.golaszewski@linaro.org,
linux-kernel@vger.kernel.org, linux-input@vger.kernel.org,
patches@opensource.cirrus.com
Subject: Re: [PATCH 1/2] Input: cs40l26: Support for CS40L26 Boosted Haptic Amplifier
Date: Tue, 11 Apr 2023 21:42:25 -0500 [thread overview]
Message-ID: <ZDYakQMOPsPTbGe0@nixie71> (raw)
In-Reply-To: <20230411092708.GX68926@ediswmail.ad.cirrus.com>
Hi Charles,
On Tue, Apr 11, 2023 at 09:27:08AM +0000, Charles Keepax wrote:
> On Mon, Apr 10, 2023 at 07:31:56PM -0500, Jeff LaBundy wrote:
> > On Mon, Apr 10, 2023 at 08:56:34AM +0000, Charles Keepax wrote:
> > > On Sat, Apr 08, 2023 at 10:44:39PM -0500, Jeff LaBundy wrote:
> > > I would far rather not have every single attempt to communicate
> > > with the device wrapped in a retry if the communication failed
> > > incase the device is hibernating. It seems much cleaner, and less
> > > likely to risk odd behaviour, to know we have brought the device
> > > out of hibernation.
>
> > A common way to deal with this is that of [1], where the bus calls
> > are simply wrapped with all retry logic limited to two places (read
> > and write). These functions could also print the register address
> > in case of failure, solving the problem of having dozens of custom
> > error messages thorughout the driver.
>
> I suspect this really comes down to a matter of taste, but my
> thoughts would be that the code is shorter that way, but not
> necessarily simpler. This feels far more error prone and likely
> to encounter issues where the device hibernates at a time someone
> hadn't properly thought through. I am far more comfortable with
> the device is blocked from hibernating whilst the driver is
> actively engaged with it and it keeps any special handling for
> exiting hibernate in one place.
Fair enough. I do concede that having this control in the driver as
opposed to DSP FW is more nimble and makes it easier to respond to
customer issues; I'm sure your battle scars will agree :)
>
> > Does the current implementation at least allow the device to hibernate
> > while the system is otherwise active, as opposed to _only_ during
> > runtime suspend? If so, that's still a marked improvement from L25
> > era where customers rightfully pointed out that the downstream driver
> > was not making efficient use of hibernation. ;)
>
> I am not entirely sure I follow this one, yes the device can only
> hibernate whilst it is runtime suspended. But I don't understand
> why that is a problem being runtime resumed implies this device
> is active, not the system is otherwise active. I am not sure if
> I am missing your point or there is some confusion here between
> runtime and system suspend. The device can only hibernate during
> runtime suspend, but the only thing that determines being runtime
> resumed is activity on this device so in general it shouldn't be
> hibernating at that point anyway.
D'oh! I meant to say suspend suspend; I'm aligned.
>
> > I don't feel particularly strongly about it, so if the current
> > implementation will stay, perhaps consider a few comments in this
> > area to describe how the device's state is managed.
> >
>
> I certainly never object to adding some comments.
>
> Thanks,
> Charles
Kind regards,
Jeff LaBundy
next prev parent reply other threads:[~2023-04-12 2:42 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <Support for CS40L26 Boosted Haptic Amplifier>
2023-04-06 22:16 ` [PATCH 1/2] Input: cs40l26: Support for CS40L26 Boosted Haptic Amplifier Fred Treven
2023-04-09 3:44 ` Jeff LaBundy
2023-04-10 8:56 ` Charles Keepax
2023-04-11 0:31 ` Jeff LaBundy
2023-04-11 9:27 ` Charles Keepax
2023-04-12 2:42 ` Jeff LaBundy [this message]
2023-04-14 20:51 ` Fred Treven
2023-04-15 20:54 ` Jeff LaBundy
2023-05-04 21:51 ` Fred Treven
2023-05-06 20:30 ` Jeff LaBundy
2023-05-09 10:22 ` Charles Keepax
2023-05-10 13:55 ` Jeff LaBundy
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=ZDYakQMOPsPTbGe0@nixie71 \
--to=jeff@labundy.com \
--cc=arnd@arndb.de \
--cc=bartosz.golaszewski@linaro.org \
--cc=ben.bright@cirrus.com \
--cc=ckeepax@opensource.cirrus.com \
--cc=cy_huang@richtek.com \
--cc=dmitry.torokhov@gmail.com \
--cc=eajames@linux.ibm.com \
--cc=fred.treven@cirrus.com \
--cc=james.ogletree@cirrus.com \
--cc=jdelvare@suse.de \
--cc=joel@jms.id.au \
--cc=lee@kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=msp@baylibre.com \
--cc=patches@opensource.cirrus.com \
--cc=ping.bai@nxp.com \
--cc=rdunlap@infradead.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.