Re: [PATCH 3/3] mfd: cs42l43: Add support for new cs42l44 variant

From: Lee Jones

Date: Thu Jul 16 2026 - 13:08:10 EST


On Thu, 16 Jul 2026, Charles Keepax wrote:

> On Thu, Jul 16, 2026 at 04:14:37PM +0100, Lee Jones wrote:
> > On Wed, 08 Jul 2026, Charles Keepax wrote:
> > > The cs42l44 is a cost optimised variant of cs42l43b. Add basic support
> > > for this new device.
> > >
> > > Signed-off-by: Charles Keepax <ckeepax@xxxxxxxxxxxxxxxxxxxxx>
> > > ---
> > > switch (devid) {
> > > case CS42L43_DEVID_VAL:
> > > + valid_id = (cs42l43->variant_id == CS42L43_DEVID_VAL);
> > > + break;
> > > case CS42L43B_DEVID_VAL:
> > > - if (devid != cs42l43->variant_id) {
> > > - dev_err(cs42l43->dev,
> > > - "Device ID (0x%06x) does not match variant ID (0x%06lx)\n",
> > > - devid, cs42l43->variant_id);
> > > - goto err;
> > > - }
> >
> > Needs a fall-through statement.
>
> I thought they weren't typically used if the case had no content,
> the resultant code looks like:
>
> case CS42L43B_DEVID_VAL:
> case CS42L44_DEVID_VAL:
> valid_id = (cs42l43->variant_id == CS42L43B_DEVID_VAL);
> break;
>
> But happy to add one if we really want it?

Not particularly. I'm happy to take your word for it.

> > > + case CS42L44_DEVID_VAL:
> > > + valid_id = (cs42l43->variant_id == CS42L43B_DEVID_VAL);
> > > break;
> > > default:
> > > dev_err(cs42l43->dev, "Unrecognised devid: 0x%06x\n", devid);
> > > goto err;
> > > }
> > >
> > > + if (!valid_id) {
> >
> > How is this nor handled in the default branch?
>
> The default case ends in goto err; so this doesn't run in that
> case.

So are there 'case's that do not populate valid_id?

--
Lee Jones