From: Wolfram Sang <wsa+renesas@sang-engineering.com>
To: Wojciech Siudy <wojciech.siudy@nokia.com>
Cc: linux-kernel@vger.kernel.org, linux-i2c@vger.kernel.org,
peda@axentia.se, andi.shyti@kernel.org, mariusz.madej@nokia.com
Subject: Re: [PATCH v6 RESEND 2/2] i2c: muxes: pca954x: Reset if (de)select fails
Date: Mon, 28 Jul 2025 12:39:06 +0200 [thread overview]
Message-ID: <aIdTSrxDFSt98Tjl@shikoro> (raw)
In-Reply-To: <20250603124721.449739-3-wojciech.siudy@nokia.com>
[-- Attachment #1: Type: text/plain, Size: 1155 bytes --]
Hi,
thanks for improving this driver!
> +static void pca954x_reset_mux(struct pca954x *data)
> +{
> + dev_warn(&data->client->dev, "resetting the device\n");
To me, this is not the proper place for such a report. Can't the reset
framework be instrumented in some way?
> + pca954x_reset_assert(data);
> + udelay(1);
> + pca954x_reset_deassert(data);
> +}
> +
> static int pca954x_select_chan(struct i2c_mux_core *muxc, u32 chan)
> {
> struct pca954x *data = i2c_mux_priv(muxc);
> @@ -328,6 +348,8 @@ static int pca954x_select_chan(struct i2c_mux_core *muxc, u32 chan)
> ret = pca954x_reg_write(muxc->parent, client, regval);
> data->last_chan = ret < 0 ? 0 : regval;
> }
> + if (ret == -ETIMEDOUT && (data->reset_cont))
Braces around 'data...' not needed. Use '--strict' with checkpatch to
get notified.
> + pca954x_reset_mux(data);
>
> return ret;
> }
> - return pca954x_reg_write(muxc->parent, client,
> + ret = pca954x_reg_write(muxc->parent, client,
> data->last_chan);
Indentation of the above line needs to be adapted.
Rest looks good to me.
Happy hacking,
Wolfram
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2025-07-28 10:39 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-03 12:47 [PATCH v6 RESEND 0/2] i2c: muxes: pca954x: Reset if (de)select fails Wojciech Siudy
2025-06-03 12:47 ` [PATCH v6 RESEND 1/2] i2c: muxes: pca954x: Use reset controller only Wojciech Siudy
2025-07-28 10:31 ` Wolfram Sang
2025-08-01 2:10 ` Wolfram Sang
2025-06-03 12:47 ` [PATCH v6 RESEND 2/2] i2c: muxes: pca954x: Reset if (de)select fails Wojciech Siudy
2025-07-28 10:39 ` Wolfram Sang [this message]
2025-08-01 2:14 ` 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=aIdTSrxDFSt98Tjl@shikoro \
--to=wsa+renesas@sang-engineering.com \
--cc=andi.shyti@kernel.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mariusz.madej@nokia.com \
--cc=peda@axentia.se \
--cc=wojciech.siudy@nokia.com \
/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).