mfd: arizona: Add DT binding for irq_gpio property
Subsystems (2)
PATCH 1/1 mfd: arizona: Add DT binding for irq_gpio property
--- drivers/mfd/arizona-core.c | 5 +++++ 1 file changed, 5 insertions(+)
drivers/mfd/arizona-core.c +5 -0
@@ -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 ; }
Signature · 1 line
1.9.1
Quoted 10 lines · Sebastien Jan
Signed-off-by Sebastien Jan <[email protected]>--- drivers/mfd/arizona-core.c | 5 +++++ 1 file changed, 5 insertions(+)drivers/mfd/arizona-core.c +0
-0
drivers/mfd/arizona-core.c static int arizona_of_get_core_pdata(struct arizona *arizona) · line 820
Quoted 7 lines
drivers/mfd/arizona-core.c +4
-0@@ -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'.
Signature · 8 lines
Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog _______________________________________________ Alsa-devel mailing list [email protected] http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
Quoted 21 lines · Lee Jones
Quoted 10 lines · Sebastien Jan
Signed-off-by Sebastien Jan <[email protected]>--- drivers/mfd/arizona-core.c | 5 +++++ 1 file changed, 5 insertions(+)drivers/mfd/arizona-core.c +0
-0drivers/mfd/arizona-core.c static int arizona_of_get_core_pdata(struct arizona *arizona) · line 820
Quoted 7 lines
drivers/mfd/arizona-core.c +4
-0@@ -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.
Quoted 4 lines
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).