Skip to content

drivers: stepper: unify msx-gpios #88798

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jilaypandya
Copy link
Member

@jilaypandya jilaypandya commented Apr 18, 2025

currently there are two different ways how microstepping gpios are handled in step/dir drivers. This PR aims to unify the two different approaches.

This resolves the issue: #88066

@github-actions github-actions bot added the platform: ADI Analog Devices, Inc. label Apr 18, 2025
@jilaypandya jilaypandya requested a review from dipakgmx April 18, 2025 14:41
@jilaypandya jilaypandya linked an issue Apr 18, 2025 that may be closed by this pull request
currently there are two different ways how microstepping gpios are handled
in step/dir drivers. This PR aims to unify the two different approaches.

Signed-off-by: Jilay Pandya <[email protected]>
#define STEP_DIR_STEPPER_DT_INST_COMMON_CONFIG_INIT(inst) \
STEP_DIR_STEPPER_DT_COMMON_CONFIG_INIT(DT_DRV_INST(inst))
#define STEP_DIR_STEPPER_DT_INST_COMMON_CONFIG_INIT(inst, msx_gpio_array) \
STEP_DIR_STEPPER_DT_COMMON_CONFIG_INIT(DT_DRV_INST(inst), msx_gpio_array)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why not read the property in here? Currently there is again potential for giving the property different names since the driver does the property checking.

Copy link
Member Author

Choose a reason for hiding this comment

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

the *msx-pins cannot be scalar initialized here, or? The pointer has to be initialized to an already existing array.

@@ -150,7 +152,7 @@ int step_dir_stepper_common_move_by(const struct device *dev, const int32_t micr
* @return 0 on success, or a negative error code on failure.
*/
int step_dir_stepper_common_set_microstep_interval(const struct device *dev,
const uint64_t microstep_interval_ns);
const uint64_t microstep_interval_ns);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Unrelated formatting :^)

@jilaypandya jilaypandya requested a review from faxe1008 April 19, 2025 08:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

dts: stepper: unify msx-gpios
4 participants