Re: [PATCH v1 1/1] mfd: intel_soc_pmic_core: Use explicit name of GPIO controller

From: Linus Walleij
Date: Sun Oct 23 2016 - 19:23:13 EST

On Thu, Oct 20, 2016 at 1:45 PM, Andy Shevchenko
<andriy.shevchenko@xxxxxxxxxxxxxxx> wrote:
> [Ville]
>> The gpio_chip->label which is
>> used for the lookup is based on KBUILD_MODNAME and the moduled is
>> called gpio-crystalcove.
> ...which I think is wrong. Only few drivers are binding to file / module
> name.
> Perhaps it should be fixed all together.
> Naming a bit chaotic in drivers/gpio/*::chip.label, though majority of
> them are using dev_name() of actual device.
> Linus, what is your opinion?

The docs says:

* struct gpio_chip - abstract a GPIO controller
* @label: a functional name for the GPIO device, such as a part
* number or the name of the SoC IP-block implementing it.

Apart from that it is just a name. It does not need to be unique per
instance since the gpiocip0 ... gpiochipN plus sysfs topology
takes care of identifying the chip. I have no strong opinion on it.

Linus Walleij