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

Merged
merged 4 commits into from
Jan 22, 2025
Merged

Add few shell filters #84179

merged 4 commits into from
Jan 22, 2025

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
Collaborator

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]>
@kartben kartben merged commit 0bc123d into zephyrproject-rtos:main Jan 22, 2025
24 checks passed
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.

10 participants