Skip to content
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

Merged
merged 3 commits into from
May 19, 2021

Conversation

simonguinot
Copy link
Collaborator

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).

@github-actions github-actions bot added area: Devicetree area: Devicetree Binding PR modifies or adds a Device Tree binding area: Samples Samples labels May 14, 2021
@simonguinot simonguinot linked an issue May 14, 2021 that may be closed by this pull request
Copy link
Contributor

@mbolivar-nordic mbolivar-nordic left a 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.

@mbolivar-nordic mbolivar-nordic added the bug The issue is a bug, or the PR is fixing a bug label May 15, 2021
@mbolivar-nordic mbolivar-nordic added this to the v2.6.0 milestone May 15, 2021
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>
@zephyrbot zephyrbot added the area: LED Label to identify LED subsystem label May 17, 2021
Copy link
Contributor

@mbolivar-nordic mbolivar-nordic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks again!

@mbolivar-nordic
Copy link
Contributor

@Mani-Sadhasivam I'm not sure why you cleared your assignment since this is an LED PR. Please review.

@Mani-Sadhasivam
Copy link
Member

@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!

@carlescufi carlescufi merged commit 1adbe8b into zephyrproject-rtos:main May 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Devicetree Binding PR modifies or adds a Device Tree binding area: Devicetree area: LED Label to identify LED subsystem area: Samples Samples bug The issue is a bug, or the PR is fixing a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

drivers: led_pwm: Improper label assignment
5 participants