[alsa-devel] [PATCH] mfd: arizona: Add DT binding for irq_gpio property

Lee Jones lee.jones at linaro.org
Tue Nov 3 14:29:52 CET 2015


On Tue, 03 Nov 2015, Sebastien Jan wrote:

> Signed-off-by: Sebastien Jan <sjan at 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


More information about the Alsa-devel mailing list