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

Add few shell filters #84179

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

fabiobaltieri
Copy link
Member

Add few shell filter functions, i2c, regulator and dac.

pdgendt
pdgendt previously approved these changes Jan 17, 2025
kartben
kartben previously approved these changes Jan 17, 2025
keith-zephyr
keith-zephyr previously approved these changes Jan 17, 2025
@@ -94,14 +94,31 @@ static int cmd_write_value(const struct shell *sh, size_t argc, char **argv)
return 0;
}

static bool device_is_dac(const struct device *dev)
{
return device_is_ready(dev) && DEVICE_API_IS(dac, dev);
Copy link
Contributor

Choose a reason for hiding this comment

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

shell_device_filter already checks device_is_ready so this is superfluous

Copy link
Member Author

Choose a reason for hiding this comment

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

Hey you are right! I had copy pasted this from other drivers, removed from all of these and added an extra patch to clean up the existing ones. Thanks!

Add shell device name filtering using DEVICE_API_IS.

Signed-off-by: Fabio Baltieri <[email protected]>
Add shell device name filtering using DEVICE_API_IS.

Signed-off-by: Fabio Baltieri <[email protected]>
Add shell device name filtering using DEVICE_API_IS.

Signed-off-by: Fabio Baltieri <[email protected]>
Drop few redundant device_is_ready for functions that are only used as
argument to shell_device_filter, as shell_device_filter checks for that
alrady.

Suggested-by: Yishai Jaffe <[email protected]>
Signed-off-by: Fabio Baltieri <[email protected]>
@fabiobaltieri fabiobaltieri dismissed stale reviews from keith-zephyr, kartben, and pdgendt via 705c71e January 19, 2025 00:40
@zephyrbot zephyrbot added area: Comparator area: LED Label to identify LED subsystem area: Stepper area: PWM Pulse Width Modulation labels Jan 19, 2025
@zephyrbot zephyrbot requested a review from anangl January 19, 2025 00:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Comparator area: DAC Digital-to-Analog Converter area: I2C area: LED Label to identify LED subsystem area: PWM Pulse Width Modulation area: Regulators area: Stepper
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants