Re: [PATCH v2 RESEND 2/2] mfd: cs42l43: Move to core detach helper
From: Charles Keepax
Date: Mon Nov 16 2026 - 05:09:04 EST
On Fri, Nov 13, 2026 at 07:30:29PM +0000, Lee Jones wrote:
> On Mon, 02 Nov 2026, Charles Keepax wrote:
>
> > Now the core has a helper to signal a device will detach from
> > the SoundWire bus, there is no need for the cs42l43 driver code
> > to separately track that. Switch to using the new core helper.
> >
> > Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@xxxxxxxxx>
> > Signed-off-by: Charles Keepax <ckeepax@xxxxxxxxxxxxxxxxxxxxx>
> > ---
> > - reinit_completion(&cs42l43->device_detach);
> > + sdw_slave_signal_unattach(cs42l43->sdw);
>
> Isn't 'cs42l43->sdw' NULL when the device is connected via I2C?
Yup but still safe.
+static inline void sdw_slave_signal_unattach(struct sdw_slave
*slave)
+{
+ if (!slave)
+ return;
> Also, doesn't the comment in cs42l43_soft_reset() still claim that this
> function waits for the device to detach from the bus?
Yeah that is a fair point I will update the comment and do a
spin.
Thanks,
Charles