From: Farouk Bouabid <farouk.bouabid@cherry.de>
To: Andi Shyti <andi.shyti@kernel.org>, Peter Rosin <peda@axentia.se>
Cc: Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Quentin Schulz <quentin.schulz@cherry.de>,
Jean Delvare <jdelvare@suse.com>,
Guenter Roeck <linux@roeck-us.net>,
Heiko Stuebner <heiko@sntech.de>,
linux-i2c@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-hwmon@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-rockchip@lists.infradead.org,
Wolfram Sang <wsa+renesas@sang-engineering.com>
Subject: Re: [PATCH v7 2/8] i2c: muxes: add support for tsd,mule-i2c multiplexer
Date: Fri, 6 Sep 2024 11:32:59 +0200 [thread overview]
Message-ID: <c49c64f2-3d67-48ca-bb17-becd0d1cc515@cherry.de> (raw)
In-Reply-To: <74anzbicky6zgccg7ao7l446fziwcmqcanycczl264neuts7ym@fyd4sdfyir6e>
Hi Andi,
On 05.09.24 22:20, Andi Shyti wrote:
> Hi,
>
> On Wed, Sep 04, 2024 at 10:59:47AM GMT, Peter Rosin wrote:
>> 2024-09-04 at 10:35, Farouk Bouabid wrote:
>>> On 03.09.24 17:13, Andi Shyti wrote:
>>>
>>> [...]
>>>
>>>>> + ret = i2c_mux_add_adapter(muxc, 0, reg);
>>>>> + if (ret)
>>>>> + return ret;
>>>> do we need to delete the adapters we added in previous cycles?
>>>>
>>> We calldevm_action_or_reset() before the loop to add adapter-removal to the error path. I think that does the job
>>>
>>> for us or am I missing something ?
>> I missed that too, but it LGTM. It's safe to call i2c_mux_del_adapters() as
>> soon the mux core has been allocated, so there is no risk it is called too
>> early or something.
> Just a question, still: is it the same calling
> i2c_mux_add_adapter() and calling mux_remove()?
>
We are basically wrapping i2c_mux_adapters_del() by mux_remove()
(implemented in our driver) which is registered it as
devm_add_action_or_reset and would be called for a non-0 return of the
probe. i2c_mux_adapters_del() will then remove added adapters (do
nothing if none is added).
Thanks,
Farouk
next prev parent reply other threads:[~2024-09-06 9:33 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-02 16:38 [PATCH v7 0/8] Add tsd,mule-i2c-mux support Farouk Bouabid
2024-09-02 16:38 ` [PATCH v7 1/8] dt-bindings: i2c: add support for tsd,mule-i2c-mux Farouk Bouabid
2024-09-02 16:38 ` [PATCH v7 2/8] i2c: muxes: add support for tsd,mule-i2c multiplexer Farouk Bouabid
2024-09-03 15:13 ` Andi Shyti
2024-09-03 15:44 ` Peter Rosin
2024-09-04 8:35 ` Farouk Bouabid
2024-09-04 8:59 ` Peter Rosin
2024-09-05 20:20 ` Andi Shyti
2024-09-06 9:32 ` Farouk Bouabid [this message]
2024-09-04 10:23 ` Farouk Bouabid
2024-09-05 20:33 ` Andi Shyti
2024-09-02 16:38 ` [PATCH v7 3/8] dt-bindings: hwmon: add support for ti,amc6821 Farouk Bouabid
2024-09-02 16:38 ` [PATCH v7 4/8] hwmon: (amc6821) add support for tsd,mule Farouk Bouabid
2024-09-02 16:38 ` [PATCH v7 5/8] arm64: dts: rockchip: add tsd,mule-i2c-mux on rk3588-jaguar Farouk Bouabid
2024-09-02 16:38 ` [PATCH v7 6/8] arm64: dts: rockchip: add tsd,mule-i2c-mux on rk3399-puma Farouk Bouabid
2024-09-02 16:38 ` [PATCH v7 7/8] arm64: dts: rockchip: add tsd,mule-i2c-mux on rk3588-tiger Farouk Bouabid
2024-09-02 16:38 ` [PATCH v7 8/8] arm64: dts: rockchip: add tsd,mule-i2c-mux on px30-ringneck Farouk Bouabid
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=c49c64f2-3d67-48ca-bb17-becd0d1cc515@cherry.de \
--to=farouk.bouabid@cherry.de \
--cc=andi.shyti@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=heiko@sntech.de \
--cc=jdelvare@suse.com \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=linux@roeck-us.net \
--cc=peda@axentia.se \
--cc=quentin.schulz@cherry.de \
--cc=robh@kernel.org \
--cc=wsa+renesas@sang-engineering.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).