[PATCH] gpio: pca953x: add bus option to select the i2c bus.

Chris Packham judge.packham at gmail.com
Tue Dec 15 08:31:55 CET 2020


On Tue, Dec 15, 2020 at 4:49 AM Simon Glass <sjg at chromium.org> wrote:
>
> Hi Chris,
>
> On Sat, 12 Dec 2020 at 11:51, Chris Packham <judge.packham at gmail.com> wrote:
> >
> >
> >
> > On Sun, 13 Dec 2020, 4:44 AM Simon Glass, <sjg at chromium.org> wrote:
> >>
> >> Hi Joseph,
> >>
> >> On Tue, 8 Dec 2020 at 00:32, Joseph Liu <maxdog988 at gmail.com> wrote:
> >> >
> >> > From: Joseph Liu <kwliu at nuvoton.com>
> >> >
> >> > If DM_I2C is used, the command "i2c dev" will not reassign
> >> > gd->cur_i2c_bus.
> >> >
> >> > Add this bus option to change the active I2C bus.
> >> >
> >> > Signed-off-by: Joseph Liu <kwliu at nuvoton.com>
> >> > ---
> >> >  drivers/gpio/pca953x.c | 14 +++++++++++++-
> >> >  1 file changed, 13 insertions(+), 1 deletion(-)
> >> >
> >>
> >> This driver should be converted to driver model.
> >
> >
> > It has been. See drivers/gpio/pca953x_gpio.c
>
> I mean that it should use dm_i2c_read() instead of i2c_read(), so that
> the problems of an 'active' i2c bus go away. Also it should use
> devicetree.

That's what I'm saying, the pca953x_gpio.c is the DM version of the
pca953x.c driver. So the boards should be migrating to using the DM
driver and "gpio" commands instead of the old non-DM driver and
"pca953x" commands (not that my opinion counts for anything).


More information about the U-Boot mailing list