Skip to content
Commit ded17a91 authored by Kumar Gala's avatar Kumar Gala Committed by Kumar Gala
Browse files

scripts: extract_dts_includes: Fix extract_controller for a list



extract_controller only handle the first phandle in a cell property.
However we could easily have something like this where the phandles
vary:

gpios = <&gpiod 13 GPIO_INT_ACTIVE_LOW
         &gpioc 14 GPIO_INT_ACTIVE_LOW>;

So we need to walk the property list for each phandle and produce a
define associated with it.

Also, if alias to the node is defined, indexed alias define
is generated for every indexed controller define:
 #define GPIO_LEDS_0_GPIO_CONTROLLER_0	"GPIOA"
 #define GPIO_LEDS_0_GPIO_CONTROLLER_1	"GPIOB"
 #define LED1_GPIO_CONTROLLER_0		GPIO_LEDS_0_GPIO_CONTROLLER_0
 #define LED1_GPIO_CONTROLLER_1		GPIO_LEDS_0_GPIO_CONTROLLER_1

Signed-off-by: default avatarKumar Gala <kumar.gala@linaro.org>
parent 97a1ea22
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment