Skip to content

Commit 1acafc4

Browse files
committed
drivers: w1: sort Kconfig and CMaKe includes
Use the # zephyr-keep-sorted-start/stop comment to have CI check the alphabetical order of includes, to help reducing the chance of conflicts while contributing drivers. Signed-off-by: Josuah Demangeon <me@josuah.net>
1 parent 33b40b0 commit 1acafc4

File tree

2 files changed

+13
-9
lines changed

2 files changed

+13
-9
lines changed

drivers/w1/CMakeLists.txt

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,20 @@ zephyr_syscall_header(${ZEPHYR_BASE}/include/zephyr/drivers/w1.h)
55
zephyr_library()
66

77
zephyr_sources_ifdef(CONFIG_USERSPACE w1_handlers.c)
8-
zephyr_library_sources_ifdef(CONFIG_W1_SHELL w1_shell.c)
8+
zephyr_library_sources_ifdef(CONFIG_W1_SHELL w1_shell.c)
99
zephyr_library_sources(w1_common.c)
1010

1111
# drivers implementing link functions (read, write, reset)
12-
zephyr_library_sources_ifdef(CONFIG_W1_DS2482_800 w1_ds2482-800.c w1_ds2482-800_channel.c)
13-
zephyr_library_sources_ifdef(CONFIG_W1_DS2484 w1_ds2484.c)
14-
zephyr_library_sources_ifdef(CONFIG_W1_DS2485 w1_ds2485.c)
12+
# zephyr-keep-sorted-start
1513
zephyr_library_sources_ifdef(CONFIG_W1_DS2477_85_COMMON w1_ds2477_85_common.c)
16-
zephyr_library_sources_ifdef(CONFIG_W1_MAX32 w1_max32.c)
17-
zephyr_library_sources_ifdef(CONFIG_W1_TEST w1_test.c)
18-
zephyr_library_sources_ifdef(CONFIG_W1_ZEPHYR_GPIO w1_zephyr_gpio.c)
19-
zephyr_library_sources_ifdef(CONFIG_W1_ZEPHYR_SERIAL w1_zephyr_serial.c)
14+
zephyr_library_sources_ifdef(CONFIG_W1_DS2482_800 w1_ds2482-800.c w1_ds2482-800_channel.c)
15+
zephyr_library_sources_ifdef(CONFIG_W1_DS2484 w1_ds2484.c)
16+
zephyr_library_sources_ifdef(CONFIG_W1_DS2485 w1_ds2485.c)
17+
zephyr_library_sources_ifdef(CONFIG_W1_MAX32 w1_max32.c)
18+
zephyr_library_sources_ifdef(CONFIG_W1_TEST w1_test.c)
19+
zephyr_library_sources_ifdef(CONFIG_W1_ZEPHYR_GPIO w1_zephyr_gpio.c)
20+
zephyr_library_sources_ifdef(CONFIG_W1_ZEPHYR_SERIAL w1_zephyr_serial.c)
21+
# zephyr-keep-sorted-stop
2022

2123
# network functions:
2224
if(CONFIG_W1_NET)

drivers/w1/Kconfig

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,16 @@ config W1_SHELL_BUFFER_SIZE
3939
To be able to write more than 8 bytes make
4040
sure to also increase SHELL_ARGC_MAX accordingly.
4141

42+
# zephyr-keep-sorted-start
43+
rsource "Kconfig.ds2477_85"
4244
rsource "Kconfig.ds2482-800"
4345
rsource "Kconfig.ds2484"
44-
rsource "Kconfig.ds2477_85"
4546
rsource "Kconfig.ds2485"
4647
rsource "Kconfig.max32"
4748
rsource "Kconfig.test"
4849
rsource "Kconfig.zephyr_gpio"
4950
rsource "Kconfig.zephyr_serial"
51+
# zephyr-keep-sorted-stop
5052

5153
config W1_NET
5254
bool "1-Wire network layer"

0 commit comments

Comments
 (0)