-
Notifications
You must be signed in to change notification settings - Fork 7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Minor fixes on labels for GPIO and PWM LEDs #35300
Minor fixes on labels for GPIO and PWM LEDs #35300
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great, thanks for the fix. I just have a couple of nitpicks in the bindings.
If the label property is missing in a "pwm-leds" compatible DT node (which is almost always the case), then the device name is now set to DT_NODE_FULL_NAME instead of "LED_PWM_$inst" previously. This allows applications to use the DEVICE_DT_NAME macro to retrieve the device name instead of gessing an arbitrary string. Signed-off-by: Simon Guinot <simon.guinot@seagate.com>
This patch adds a label property to the PWM LED parent node and fixes the label property description of the child node. Indeed it is the label of a parent node which can be used as device_get_binding() parameter to retrieve the LED device, and not the one of a child node. Fixes zephyrproject-rtos#34275 Signed-off-by: Simon Guinot <simon.guinot@seagate.com>
This patch adds a label property to the GPIO LED parent node and fixes the label property description of the child node. Indeed it is the label of a parent node which can be used as device_get_binding() parameter to retrieve the LED device, and not the one of a child node. In addition, this patch sets both this properties as not required because they are not. Signed-off-by: Simon Guinot <simon.guinot@seagate.com>
22b1568
to
4f6abd2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks again!
@Mani-Sadhasivam I'm not sure why you cleared your assignment since this is an LED PR. Please review. |
Ah, sorry. I got confused with the PR subject (thought it is the GPIO). Approved now, thanks! |
The first patch fixes/improves the name of a PWM LED device when the label property is missing in its DT node.
And the last two patches fix some minor issues about label properties in the DTS bindings of both GPIO and PWM LEDs (#34275).