-
Notifications
You must be signed in to change notification settings - Fork 6.9k
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
drivers: stepper: adi: tmc2209 minor fixes #82706
Conversation
c1a826c
to
d596e65
Compare
9e95b7b
to
478f0c9
Compare
478f0c9
to
ac00e2c
Compare
IF_ENABLED(DT_INST_NODE_HAS_PROP(inst, msx_gpios) \ | ||
, (.msx_pins = tmc22xx_stepper_msx_pins_##inst)) \ |
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.
is this clang-format?!
IF_ENABLED(DT_INST_NODE_HAS_PROP(inst, msx_gpios) \ | |
, (.msx_pins = tmc22xx_stepper_msx_pins_##inst)) \ | |
IF_ENABLED(DT_INST_NODE_HAS_PROP(inst, msx_gpios), ( \ | |
.msx_pins = tmc22xx_stepper_msx_pins_##inst)) \ |
or some variation of that, if it's clang-format consider adding a /* clang-format off */
block
38a8350
to
8b80118
Compare
IF_ENABLED(DT_INST_NODE_HAS_PROP(inst, msx_gpios) \ | ||
, .msx_pins = tmc22xx_stepper_msx_pins_##inst) \ |
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.
still there?
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.
the space after , ?
Parentheses I have removed
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.
the comma on the new line all alone, it should go on the previous one, the parenthesis I think you have to put it back, not totally sure about it though, see if it builds, my preferred format would be
IF_ENABLED(DT_INST_NODE_HAS_PROP(inst, msx_gpios), (
.msx_pins = tmc22xx_stepper_msx_pins_##inst,
))
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.
I would go for a bold:
IF_ENABLED( \
DT_INST_NODE_HAS_PROP(inst, msx_gpios), \
(.msx_pins = tmc22xx_stepper_msx_pins_##inst) \
) \
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.
yeah as long as there's no stray ,
dangling around, and I'd suggest keeping the ,
after ##inst
otherwise it'd fail if you add something after it
… msx The current implementation of tmc2209 driver does not allow instantiation of the driver without configuring msx pins. Signed-off-by: Jilay Pandya <[email protected]>
for the brevity renaming direction_gpios to dir_gpios since STEP/DIR interface is quite an established term in context of stepper controllers. Signed-off-by: Jilay Pandya <[email protected]>
8b80118
to
6e69d36
Compare
The current implementation of tmc2209 driver does not allow instantiation of the driver without configuring msx pins.
(Found by removing msx_gpios from overlay and then could not compile the driver)
Second Commit renames direction-gpios to dir-gpios since STEP/DIR is a well established term in context of stepper controllers