* [PATCH] mfd: arizona: Add DT binding for irq_gpio property
@ 2015-11-03 11:20 Sebastien Jan
2015-11-03 13:29 ` Lee Jones
0 siblings, 1 reply; 3+ messages in thread
From: Sebastien Jan @ 2015-11-03 11:20 UTC (permalink / raw)
To: Samuel Ortiz, Lee Jones, Mark Brown; +Cc: alsa-devel, patches, Sebastien Jan
Signed-off-by: Sebastien Jan <sjan@baylibre.com>
---
drivers/mfd/arizona-core.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/mfd/arizona-core.c b/drivers/mfd/arizona-core.c
index 44cfdbb..23a0f93 100644
--- a/drivers/mfd/arizona-core.c
+++ b/drivers/mfd/arizona-core.c
@@ -814,6 +814,11 @@ static int arizona_of_get_core_pdata(struct arizona *arizona)
count++;
}
+ arizona->pdata.irq_gpio = of_get_named_gpio(arizona->dev->of_node,
+ "wlf,irq_gpio", 0);
+ if (arizona->pdata.irq_gpio < 0)
+ arizona->pdata.irq_gpio = 0;
+
return 0;
}
--
1.9.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] mfd: arizona: Add DT binding for irq_gpio property
2015-11-03 11:20 [PATCH] mfd: arizona: Add DT binding for irq_gpio property Sebastien Jan
@ 2015-11-03 13:29 ` Lee Jones
2015-11-03 13:47 ` Sebastien Jan
0 siblings, 1 reply; 3+ messages in thread
From: Lee Jones @ 2015-11-03 13:29 UTC (permalink / raw)
To: Sebastien Jan; +Cc: alsa-devel, Mark Brown, Samuel Ortiz, patches
On Tue, 03 Nov 2015, Sebastien Jan wrote:
> Signed-off-by: Sebastien Jan <sjan@baylibre.com>
> ---
> drivers/mfd/arizona-core.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/drivers/mfd/arizona-core.c b/drivers/mfd/arizona-core.c
> index 44cfdbb..23a0f93 100644
> --- a/drivers/mfd/arizona-core.c
> +++ b/drivers/mfd/arizona-core.c
> @@ -814,6 +814,11 @@ static int arizona_of_get_core_pdata(struct arizona *arizona)
> count++;
> }
>
> + arizona->pdata.irq_gpio = of_get_named_gpio(arizona->dev->of_node,
> + "wlf,irq_gpio", 0);
> + if (arizona->pdata.irq_gpio < 0)
> + arizona->pdata.irq_gpio = 0;
This is wrong on a number of levels.
Firstly, all properties must be documented. Secondly, underscores
aren't allowed in DT. Thirdly, this is a generic binding -- no need
for the vendor prefix. And lastly, GPIO bindings already have a
format -- it should be simply 'irq-gpios'.
--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] mfd: arizona: Add DT binding for irq_gpio property
2015-11-03 13:29 ` Lee Jones
@ 2015-11-03 13:47 ` Sebastien Jan
0 siblings, 0 replies; 3+ messages in thread
From: Sebastien Jan @ 2015-11-03 13:47 UTC (permalink / raw)
To: Lee Jones; +Cc: alsa-devel, Mark Brown, Samuel Ortiz, patches
On 03/11/2015 14:29, Lee Jones wrote:
> On Tue, 03 Nov 2015, Sebastien Jan wrote:
>
>> Signed-off-by: Sebastien Jan <sjan@baylibre.com>
>> ---
>> drivers/mfd/arizona-core.c | 5 +++++
>> 1 file changed, 5 insertions(+)
>>
>> diff --git a/drivers/mfd/arizona-core.c b/drivers/mfd/arizona-core.c
>> index 44cfdbb..23a0f93 100644
>> --- a/drivers/mfd/arizona-core.c
>> +++ b/drivers/mfd/arizona-core.c
>> @@ -814,6 +814,11 @@ static int arizona_of_get_core_pdata(struct arizona *arizona)
>> count++;
>> }
>>
>> + arizona->pdata.irq_gpio = of_get_named_gpio(arizona->dev->of_node,
>> + "wlf,irq_gpio", 0);
>> + if (arizona->pdata.irq_gpio < 0)
>> + arizona->pdata.irq_gpio = 0;
> This is wrong on a number of levels.
>
> Firstly, all properties must be documented. Secondly, underscores
> aren't allowed in DT. Thirdly, this is a generic binding -- no need
> for the vendor prefix. And lastly, GPIO bindings already have a
> format -- it should be simply 'irq-gpios'.
Thanks Lee, I'll post a v2 with these changes (and updated bindings
document).
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-11-03 13:47 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-03 11:20 [PATCH] mfd: arizona: Add DT binding for irq_gpio property Sebastien Jan
2015-11-03 13:29 ` Lee Jones
2015-11-03 13:47 ` Sebastien Jan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox