Skip to content

Commit eef92b8

Browse files
jilaypandyakartben
authored andcommitted
drivers: stepper: tmc: create rampstat Kconfig template
create rampstat Kconfig template to enable respective tmc drivers to reuse the common configurations Signed-off-by: Jilay Pandya <[email protected]>
1 parent 44eece3 commit eef92b8

File tree

2 files changed

+23
-17
lines changed

2 files changed

+23
-17
lines changed

drivers/stepper/adi_tmc/Kconfig.tmc5041

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,6 @@ config STEPPER_ADI_TMC5041
99
help
1010
Stepper driver for TMC5041.
1111

12-
config STEPPER_ADI_TMC5041_RAMPSTAT_POLL
13-
bool "TMC5041 poll ramp status"
14-
depends on STEPPER_ADI_TMC5041
15-
default y
16-
help
17-
When enabled, the ramp status will be polled on TMC5041, to check for events:
18-
- TMC5041_POS_REACHED_EVENT
19-
- TMC5041_STOP_SG_EVENT
20-
- TMC5041_STOP_LEFT_EVENT
21-
- TMC5041_STOP_RIGHT_EVENT
22-
23-
config STEPPER_ADI_TMC5041_RAMPSTAT_POLL_INTERVAL_IN_MSEC
24-
int "TMC5041 poll ramp status interval in ms"
25-
depends on STEPPER_ADI_TMC5041_RAMPSTAT_POLL
26-
default 100
27-
help
28-
The interval in ms to poll the ramp status on TMC5041.
12+
module = TMC5041
13+
module-str = tmc5041
14+
rsource "Kconfig.tmc_rampgen_template"
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# SPDX-FileCopyrightText: Copyright (c) 2024 Jilay Sandeep Pandya
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
config STEPPER_ADI_$(module)_RAMPSTAT_POLL
5+
bool "$(module-str) poll ramp status"
6+
depends on STEPPER_ADI_$(module)
7+
default y
8+
help
9+
When enabled, the ramp status will be polled on TMC, to check for events:
10+
- TMC_POS_REACHED_EVENT
11+
- TMC_STOP_SG_EVENT
12+
- TMC_STOP_LEFT_EVENT
13+
- TMC_STOP_RIGHT_EVENT
14+
15+
config STEPPER_ADI_$(module)_RAMPSTAT_POLL_INTERVAL_IN_MSEC
16+
int "$(module-str) poll ramp status interval in ms"
17+
depends on STEPPER_ADI_$(module)_RAMPSTAT_POLL
18+
default 100
19+
help
20+
The interval in ms to poll the ramp status on TMC.

0 commit comments

Comments
 (0)