-
Notifications
You must be signed in to change notification settings - Fork 7.3k
drivers: stepper: tmc_spi: remove print_status_byte #88795
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: tmc_spi: remove print_status_byte #88795
Conversation
38e5a2c
to
688b264
Compare
688b264
to
f71cadb
Compare
f71cadb
to
e31c200
Compare
dab87ce
to
847e8b0
Compare
847e8b0
to
73af0c0
Compare
@@ -76,7 +60,7 @@ int tmc_spi_read_register(const struct spi_dt_spec *bus, const uint8_t read_addr | |||
((uint32_t)rx_buffer[3] << 8) + (uint32_t)rx_buffer[4]; | |||
|
|||
print_tx_rx_buffer(tx_buffer, rx_buffer); |
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.
Does it make sense to even drop this? I assume, on the spi layer this would be logged?
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 let's drop it or make it a Kconfig symbol?
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 guess drop it, but i remember it correctly, the SPI logs would only show the data buffer address (not sure).
But I would say, we can drop this.
#include "adi_tmc_spi.h" | ||
|
||
#define BUFFER_SIZE 5U | ||
|
||
#include <zephyr/logging/log.h> | ||
|
||
LOG_MODULE_REGISTER(tmc_spi, CONFIG_SPI_LOG_LEVEL); |
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.
LOG_MODULE_REGISTER(tmc_spi, CONFIG_SPI_LOG_LEVEL); | |
LOG_MODULE_REGISTER(tmc_spi, CONFIG_STEPPER_LOG_LEVEL); |
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.
this is required for print_tx_rx_buffer
, should we drop that function as well?
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.
That was also my question here.
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 think decoding the tmc specific SPI status is a nice debug feature. So consider combining with: #88102
73af0c0
to
18b5a7d
Compare
print_status_byte is specific to tmc50xx and hence shoud not be placeed in common tmc_spi.c which is supposed to be reused by a variety of drivers Signed-off-by: Jilay Pandya <[email protected]>
18b5a7d
to
13a0af7
Compare
print_status_byte is specific to tmc50xx and hence shoud not be placeed in common tmc_spi.c which is supposed to be reused by a variety of drivers
This print of status byte should rather be part of driver code