[PATCH] backlight: corgi: Convert to use GPIO descriptors

Linus Walleij linus.walleij at linaro.org
Tue Dec 10 23:20:34 UTC 2019


On Sun, Dec 8, 2019 at 9:06 PM Robert Jarzmik <robert.jarzmik at free.fr> wrote:

> Linus Walleij <linus.walleij at linaro.org> writes:
> > @@ -525,13 +525,33 @@ static void spitz_bl_kick_battery(void)
> >       }
> >  }
> >
> > +static struct gpiod_lookup_table spitz_lcdcon_gpio_table = {
> > +     .dev_id = "spi0.1",
> How do you know the correct device name is "spi0.1" ?

With SPI devices it is always hard to know without access to the
actual hardware, so every patch is a request for testing...

I looked at arch/arm/mach-pxa/spitz.c and
it registers just one spi bus (AFAICT) with 3 chip
selects so that will be "spi0", and then
spi_register_board_info() is called with an array of 3
devices (spitz_spi_devices[]). Those are in order of
chip select so chip select 0, 1, 2. This is the second
device so chip select 1.

The code in drivers/spi/spi.c names the devices
using spi_dev_set_name() like this:
dev_set_name(&spi->dev, "%s.%u", dev_name(&spi->controller->dev),
                     spi->chip_select);

So it will theoretically "spi0.1"

Beware about bugs in the above interpreter because it is
just my brain.

Yours,
Linus Walleij


More information about the dri-devel mailing list