Skip to content
Commit 69beec87 authored by Erwan Gouriou's avatar Erwan Gouriou Committed by Kumar Gala
Browse files

scripts: extract_dts_includes: generate controller #define's



When a node is referencing to a parent node and this node is
reported as controller, generate a #define to declare this controller.
Value is controller property 'label'
For instance, if following gpio controller is referenced in board dts:
green_led_1: led@1 {
    gpios = <&gpioa 5 GPIO_INT_ACTIVE_HIGH>;
    label = "User LD1";
};
Following will be generated:
\#define GPIO_LEDS_1_GPIO_CONTROLLER "GPIOA"

Besides, if defined, alias label will be generated as well for this
controller:
aliases {
    led0 = &green_led_1;
};
will trigger generation of:
\#define LED0_GPIO_CONTROLLER GPIO_LEDS_1_GPIO_CONTROLLER

Signed-off-by: default avatarErwan Gouriou <erwan.gouriou@linaro.org>
parent f3caef8e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment