Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1504708 > unrolled thread
| Started by | Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
|---|---|
| First post | 2016-10-20 11:40 +0200 |
| Last post | 2016-10-24 01:30 +0200 |
| Articles | 4 — 3 participants |
Back to article view | Back to linux.kernel
[PATCH v1 1/1] mfd: intel_soc_pmic_core: Use explicit name of GPIO controller Andy Shevchenko <andriy.shevchenko@linux.intel.com> - 2016-10-20 11:40 +0200
Re: [PATCH v1 1/1] mfd: intel_soc_pmic_core: Use explicit name of GPIO controller Ville Syrjälä <ville.syrjala@linux.intel.com> - 2016-10-20 13:20 +0200
Re: [PATCH v1 1/1] mfd: intel_soc_pmic_core: Use explicit name of GPIO controller Andy Shevchenko <andriy.shevchenko@linux.intel.com> - 2016-10-20 13:50 +0200
Re: [PATCH v1 1/1] mfd: intel_soc_pmic_core: Use explicit name of GPIO controller Linus Walleij <linus.walleij@linaro.org> - 2016-10-24 01:30 +0200
| From | Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
|---|---|
| Date | 2016-10-20 11:40 +0200 |
| Subject | [PATCH v1 1/1] mfd: intel_soc_pmic_core: Use explicit name of GPIO controller |
| Message-ID | <suhZn-5G9-27@gated-at.bofh.it> |
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
[toc] | [next] | [standalone]
| From | Ville Syrjälä <ville.syrjala@linux.intel.com> |
|---|---|
| Date | 2016-10-20 13:20 +0200 |
| Subject | Re: [PATCH v1 1/1] mfd: intel_soc_pmic_core: Use explicit name of GPIO controller |
| Message-ID | <sujya-6NY-23@gated-at.bofh.it> |
| In reply to | #1504708 |
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
[toc] | [prev] | [next] | [standalone]
| From | Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
|---|---|
| Date | 2016-10-20 13:50 +0200 |
| Subject | Re: [PATCH v1 1/1] mfd: intel_soc_pmic_core: Use explicit name of GPIO controller |
| Message-ID | <suk1b-6Yw-1@gated-at.bofh.it> |
| In reply to | #1504778 |
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
[toc] | [prev] | [next] | [standalone]
| From | Linus Walleij <linus.walleij@linaro.org> |
|---|---|
| Date | 2016-10-24 01:30 +0200 |
| Subject | Re: [PATCH v1 1/1] mfd: intel_soc_pmic_core: Use explicit name of GPIO controller |
| Message-ID | <svAng-7PA-23@gated-at.bofh.it> |
| In reply to | #1504802 |
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
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web