* [PATCH v1 1/1] mfd: intel_soc_pmic_core: Use explicit name of GPIO controller
@ 2016-10-20 9:36 Andy Shevchenko
2016-10-20 11:13 ` Ville Syrjälä
0 siblings, 1 reply; 4+ messages in thread
From: Andy Shevchenko @ 2016-10-20 9:36 UTC (permalink / raw)
To: Lee Jones, linux-kernel
Cc: Andy Shevchenko, Linus Walleij, Ville Syrjälä
The Crystal Cove GPIO driver has its explicit name, i.e. crystal_cove_gpio.
Use it explicitly to be in align with the rest of code, pretty grepping, and
prevent potential breakage if GPIO driver file name ever changed.
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/mfd/intel_soc_pmic_core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mfd/intel_soc_pmic_core.c b/drivers/mfd/intel_soc_pmic_core.c
index 12d6ebb4..7fd8e87 100644
--- a/drivers/mfd/intel_soc_pmic_core.c
+++ b/drivers/mfd/intel_soc_pmic_core.c
@@ -34,7 +34,7 @@ static struct gpiod_lookup_table panel_gpio_table = {
.dev_id = "0000:00:02.0",
.table = {
/* Panel EN/DISABLE */
- GPIO_LOOKUP("gpio_crystalcove", 94, "panel", GPIO_ACTIVE_HIGH),
+ GPIO_LOOKUP("crystal_cove_gpio", 94, "panel", GPIO_ACTIVE_HIGH),
{ },
},
};
--
2.9.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v1 1/1] mfd: intel_soc_pmic_core: Use explicit name of GPIO controller
2016-10-20 9:36 [PATCH v1 1/1] mfd: intel_soc_pmic_core: Use explicit name of GPIO controller Andy Shevchenko
@ 2016-10-20 11:13 ` Ville Syrjälä
2016-10-20 11:45 ` Andy Shevchenko
0 siblings, 1 reply; 4+ messages in thread
From: Ville Syrjälä @ 2016-10-20 11:13 UTC (permalink / raw)
To: Andy Shevchenko; +Cc: Lee Jones, linux-kernel, Linus Walleij
On Thu, Oct 20, 2016 at 12:36:13PM +0300, Andy Shevchenko wrote:
> The Crystal Cove GPIO driver has its explicit name, i.e. crystal_cove_gpio.
>
> Use it explicitly to be in align with the rest of code, pretty grepping, and
> prevent potential breakage if GPIO driver file name ever changed.
>
> Cc: Linus Walleij <linus.walleij@linaro.org>
> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
> drivers/mfd/intel_soc_pmic_core.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/mfd/intel_soc_pmic_core.c b/drivers/mfd/intel_soc_pmic_core.c
> index 12d6ebb4..7fd8e87 100644
> --- a/drivers/mfd/intel_soc_pmic_core.c
> +++ b/drivers/mfd/intel_soc_pmic_core.c
> @@ -34,7 +34,7 @@ static struct gpiod_lookup_table panel_gpio_table = {
> .dev_id = "0000:00:02.0",
> .table = {
> /* Panel EN/DISABLE */
> - GPIO_LOOKUP("gpio_crystalcove", 94, "panel", GPIO_ACTIVE_HIGH),
> + GPIO_LOOKUP("crystal_cove_gpio", 94, "panel", GPIO_ACTIVE_HIGH),
This looks like it would break things. The gpio_chip->label which is
used for the lookup is based on KBUILD_MODNAME and the moduled is
called gpio-crystalcove.
> { },
> },
> };
> --
> 2.9.3
--
Ville Syrjälä
Intel OTC
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v1 1/1] mfd: intel_soc_pmic_core: Use explicit name of GPIO controller
2016-10-20 11:13 ` Ville Syrjälä
@ 2016-10-20 11:45 ` Andy Shevchenko
2016-10-23 23:22 ` Linus Walleij
0 siblings, 1 reply; 4+ messages in thread
From: Andy Shevchenko @ 2016-10-20 11:45 UTC (permalink / raw)
To: Ville Syrjälä; +Cc: Lee Jones, linux-kernel, Linus Walleij
On Thu, 2016-10-20 at 14:13 +0300, Ville Syrjälä wrote:
> On Thu, Oct 20, 2016 at 12:36:13PM +0300, Andy Shevchenko wrote:
> > The Crystal Cove GPIO driver has its explicit name, i.e.
> > crystal_cove_gpio.
> >
> > Use it explicitly to be in align with the rest of code, pretty
> > grepping, and
> > prevent potential breakage if GPIO driver file name ever changed.
> >
> > Cc: Linus Walleij <linus.walleij@linaro.org>
> > Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> > ---
> > drivers/mfd/intel_soc_pmic_core.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/mfd/intel_soc_pmic_core.c
> > b/drivers/mfd/intel_soc_pmic_core.c
> > index 12d6ebb4..7fd8e87 100644
> > --- a/drivers/mfd/intel_soc_pmic_core.c
> > +++ b/drivers/mfd/intel_soc_pmic_core.c
> > @@ -34,7 +34,7 @@ static struct gpiod_lookup_table panel_gpio_table
> > = {
> > .dev_id = "0000:00:02.0",
> > .table = {
> > /* Panel EN/DISABLE */
> > - GPIO_LOOKUP("gpio_crystalcove", 94, "panel",
> > GPIO_ACTIVE_HIGH),
> > + GPIO_LOOKUP("crystal_cove_gpio", 94, "panel",
> > GPIO_ACTIVE_HIGH),
>
> This looks like it would break things.
Yeah. Good catch.
> 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?
--
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Intel Finland Oy
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v1 1/1] mfd: intel_soc_pmic_core: Use explicit name of GPIO controller
2016-10-20 11:45 ` Andy Shevchenko
@ 2016-10-23 23:22 ` Linus Walleij
0 siblings, 0 replies; 4+ messages in thread
From: Linus Walleij @ 2016-10-23 23:22 UTC (permalink / raw)
To: Andy Shevchenko; +Cc: Ville Syrjälä, Lee Jones, linux-kernel
On Thu, Oct 20, 2016 at 1:45 PM, Andy Shevchenko
<andriy.shevchenko@linux.intel.com> 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.
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-10-23 23:23 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-20 9:36 [PATCH v1 1/1] mfd: intel_soc_pmic_core: Use explicit name of GPIO controller Andy Shevchenko
2016-10-20 11:13 ` Ville Syrjälä
2016-10-20 11:45 ` Andy Shevchenko
2016-10-23 23:22 ` Linus Walleij
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).