回复: [RFC PATCH 2/4] mfd: Add driver for Realtek RTS490x I3C hub

From: 周寅

Date: Fri Oct 16 2026 - 08:49:24 EST


On Wed, 14 Oct 2026, Lee Jones wrote:

> > + int ret;
> > + int i;
>
> Please declare loop counters inside the 'for' statement.

Will do, and I'll apply the same to the rest of the series.

> > + i3c_device_get_info(i3cdev, &info);
> > + if (I3C_PID_MANUF_ID(info.pid) != RTS490X_MANUFACTURER_ID)
> > + return -ENODEV;
>
> Doesn't 'rts490x_i3c_ids' already match on 'I3C_MATCH_MANUF' with
> 'RTS490X_MANUFACTURER_ID'? When would this check ever trigger?

You are right, it never triggers. I'll drop it.

> > + dev_info(dev, "%s I3C hub with %u target ports\n",
> > + rts490x->model, rts490x->num_target_ports);
>
> Keep the kernel log clean whenever possible please.

Will drop it. With that gone, nothing reads the model name or the part ID
any more, so in the next revision I plan to drop the part-ID table as
well and read the port count from the TARGET_PORT_COUNT field of the
capability register (REG#10), as defined by the I3C Hub Common
Architecture Specification.

> > +MODULE_DESCRIPTION("Realtek RTS490x I3C hub MFD driver");
>
> Please drop "MFD" from the description.

Will change it to "Realtek RTS490x I3C hub core driver".

Best regards,
Zain