From 26ecaba4af068f51be0fe5e37b0f7518af2d3029 Mon Sep 17 00:00:00 2001 From: Daniel Leung Date: Wed, 24 May 2023 15:27:04 -0700 Subject: [PATCH] drivers: syscalls: use zephyr_syscall_header This adds a few line use zephyr_syscall_header() to include headers containing syscall function prototypes. Signed-off-by: Daniel Leung --- drivers/adc/CMakeLists.txt | 2 ++ drivers/auxdisplay/CMakeLists.txt | 2 ++ drivers/cache/CMakeLists.txt | 2 ++ drivers/can/CMakeLists.txt | 2 ++ drivers/console/CMakeLists.txt | 5 +++++ drivers/counter/CMakeLists.txt | 7 +++++++ drivers/dac/CMakeLists.txt | 2 ++ drivers/dma/CMakeLists.txt | 2 ++ drivers/eeprom/CMakeLists.txt | 2 ++ drivers/entropy/CMakeLists.txt | 2 ++ drivers/espi/CMakeLists.txt | 2 ++ drivers/flash/CMakeLists.txt | 12 ++++++++++++ drivers/fuel_gauge/CMakeLists.txt | 2 ++ drivers/gpio/CMakeLists.txt | 2 ++ drivers/hwinfo/CMakeLists.txt | 2 ++ drivers/i2c/CMakeLists.txt | 2 ++ drivers/i2s/CMakeLists.txt | 2 ++ drivers/i3c/CMakeLists.txt | 2 ++ drivers/ipm/CMakeLists.txt | 2 ++ drivers/led/CMakeLists.txt | 2 ++ drivers/mbox/CMakeLists.txt | 2 ++ drivers/peci/CMakeLists.txt | 2 ++ drivers/ps2/CMakeLists.txt | 2 ++ drivers/ptp_clock/CMakeLists.txt | 2 ++ drivers/pwm/CMakeLists.txt | 2 ++ drivers/reset/CMakeLists.txt | 2 ++ drivers/retained_mem/CMakeLists.txt | 2 ++ drivers/rtc/CMakeLists.txt | 2 ++ drivers/sensor/CMakeLists.txt | 2 ++ drivers/serial/CMakeLists.txt | 2 ++ drivers/smbus/CMakeLists.txt | 2 ++ drivers/spi/CMakeLists.txt | 2 ++ drivers/usb/bc12/CMakeLists.txt | 2 ++ drivers/virtualization/CMakeLists.txt | 4 ++++ drivers/w1/CMakeLists.txt | 2 ++ drivers/watchdog/CMakeLists.txt | 2 ++ 36 files changed, 92 insertions(+) diff --git a/drivers/adc/CMakeLists.txt b/drivers/adc/CMakeLists.txt index 24e593c2eda..63be06b419a 100644 --- a/drivers/adc/CMakeLists.txt +++ b/drivers/adc/CMakeLists.txt @@ -1,5 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 +zephyr_syscall_header(${ZEPHYR_BASE}/include/zephyr/drivers/adc.h) + zephyr_library() zephyr_library_sources_ifdef(CONFIG_ADC adc_common.c) diff --git a/drivers/auxdisplay/CMakeLists.txt b/drivers/auxdisplay/CMakeLists.txt index 1cc566fbfe0..654d68921c7 100644 --- a/drivers/auxdisplay/CMakeLists.txt +++ b/drivers/auxdisplay/CMakeLists.txt @@ -1,5 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 +zephyr_syscall_header(${ZEPHYR_BASE}/include/zephyr/drivers/auxdisplay.h) + zephyr_library() zephyr_library_sources_ifdef(CONFIG_AUXDISPLAY_HD44780 auxdisplay_hd44780.c) zephyr_library_sources_ifdef(CONFIG_AUXDISPLAY_ITRON auxdisplay_itron.c) diff --git a/drivers/cache/CMakeLists.txt b/drivers/cache/CMakeLists.txt index d99135ca435..47c790f0a89 100644 --- a/drivers/cache/CMakeLists.txt +++ b/drivers/cache/CMakeLists.txt @@ -1,5 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 +zephyr_syscall_header(${ZEPHYR_BASE}/include/zephyr/cache.h) + zephyr_library() zephyr_library_property(ALLOW_EMPTY TRUE) diff --git a/drivers/can/CMakeLists.txt b/drivers/can/CMakeLists.txt index c5a39471ea9..3302c7e6af5 100644 --- a/drivers/can/CMakeLists.txt +++ b/drivers/can/CMakeLists.txt @@ -1,5 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 +zephyr_syscall_header(${ZEPHYR_BASE}/include/zephyr/drivers/can.h) + zephyr_library() zephyr_sources_ifdef(CONFIG_CAN_MCUX_MCAN can_mcux_mcan.c) diff --git a/drivers/console/CMakeLists.txt b/drivers/console/CMakeLists.txt index 40d1e53081d..8e5e26aaabc 100644 --- a/drivers/console/CMakeLists.txt +++ b/drivers/console/CMakeLists.txt @@ -1,5 +1,10 @@ # SPDX-License-Identifier: Apache-2.0 +zephyr_syscall_header_ifdef( + CONFIG_UART_MUX + ${ZEPHYR_BASE}/include/zephyr/drivers/console/uart_mux.h +) + zephyr_library() zephyr_library_sources_ifdef(CONFIG_GSM_MUX gsm_mux.c) diff --git a/drivers/counter/CMakeLists.txt b/drivers/counter/CMakeLists.txt index 38ae41fbf9f..147f0ca761c 100644 --- a/drivers/counter/CMakeLists.txt +++ b/drivers/counter/CMakeLists.txt @@ -1,5 +1,12 @@ # SPDX-License-Identifier: Apache-2.0 +zephyr_syscall_header_ifdef( + CONFIG_COUNTER_MAXIM_DS3231 + ${ZEPHYR_BASE}/include/zephyr/drivers/rtc/maxim_ds3231.h +) + +zephyr_syscall_header(${ZEPHYR_BASE}/include/zephyr/drivers/counter.h) + zephyr_library() zephyr_library_sources_ifdef(CONFIG_TIMER_TMR_CMSDK_APB timer_tmr_cmsdk_apb.c) diff --git a/drivers/dac/CMakeLists.txt b/drivers/dac/CMakeLists.txt index 800bc895fde..5689bea3086 100644 --- a/drivers/dac/CMakeLists.txt +++ b/drivers/dac/CMakeLists.txt @@ -1,5 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 +zephyr_syscall_header(${ZEPHYR_BASE}/include/zephyr/drivers/dac.h) + zephyr_library() zephyr_library_sources_ifdef(CONFIG_DAC_MCUX_DAC dac_mcux_dac.c) diff --git a/drivers/dma/CMakeLists.txt b/drivers/dma/CMakeLists.txt index 8b91184cc2b..4f8fd755086 100644 --- a/drivers/dma/CMakeLists.txt +++ b/drivers/dma/CMakeLists.txt @@ -1,5 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 +zephyr_syscall_header(${ZEPHYR_BASE}/include/zephyr/drivers/dma.h) + zephyr_library() zephyr_library_sources_ifdef(CONFIG_DMA_SAM_XDMAC dma_sam_xdmac.c) diff --git a/drivers/eeprom/CMakeLists.txt b/drivers/eeprom/CMakeLists.txt index fd278351740..e3fd985d038 100644 --- a/drivers/eeprom/CMakeLists.txt +++ b/drivers/eeprom/CMakeLists.txt @@ -1,5 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 +zephyr_syscall_header(${ZEPHYR_BASE}/include/zephyr/drivers/eeprom.h) + zephyr_library() zephyr_library_sources_ifdef(CONFIG_USERSPACE eeprom_handlers.c) diff --git a/drivers/entropy/CMakeLists.txt b/drivers/entropy/CMakeLists.txt index f46f16e9696..99184f3b1e5 100644 --- a/drivers/entropy/CMakeLists.txt +++ b/drivers/entropy/CMakeLists.txt @@ -1,5 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 +zephyr_syscall_header(${ZEPHYR_BASE}/include/zephyr/drivers/entropy.h) + zephyr_library() zephyr_library_sources_ifdef(CONFIG_ENTROPY_TELINK_B91_TRNG entropy_b91_trng.c) diff --git a/drivers/espi/CMakeLists.txt b/drivers/espi/CMakeLists.txt index cfdf84fd757..77455ebda01 100644 --- a/drivers/espi/CMakeLists.txt +++ b/drivers/espi/CMakeLists.txt @@ -1,5 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 +zephyr_syscall_header(${ZEPHYR_BASE}/include/zephyr/drivers/espi.h) + zephyr_library() zephyr_library_sources_ifdef(CONFIG_ESPI_XEC espi_mchp_xec.c) diff --git a/drivers/flash/CMakeLists.txt b/drivers/flash/CMakeLists.txt index a68281b071f..181f16101db 100644 --- a/drivers/flash/CMakeLists.txt +++ b/drivers/flash/CMakeLists.txt @@ -1,5 +1,17 @@ # SPDX-License-Identifier: Apache-2.0 +zephyr_syscall_header_ifdef( + CONFIG_FLASH_SIMULATOR + ${ZEPHYR_BASE}/include/zephyr/drivers/flash/flash_simulator.h +) + +zephyr_syscall_header_ifdef( + CONFIG_NORDIC_QSPI_NOR + ${ZEPHYR_BASE}/include/zephyr/drivers/flash/nrf_qspi_nor.h +) + +zephyr_syscall_header(${ZEPHYR_BASE}/include/zephyr/drivers/flash.h) + zephyr_library() zephyr_library_sources_ifdef(CONFIG_SOC_FLASH_CC13XX_CC26XX soc_flash_cc13xx_cc26xx.c) diff --git a/drivers/fuel_gauge/CMakeLists.txt b/drivers/fuel_gauge/CMakeLists.txt index a2d8148a1a4..bf7d5e4918e 100644 --- a/drivers/fuel_gauge/CMakeLists.txt +++ b/drivers/fuel_gauge/CMakeLists.txt @@ -1,5 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 +zephyr_syscall_header(${ZEPHYR_BASE}/include/zephyr/drivers/fuel_gauge.h) + add_subdirectory_ifdef(CONFIG_SBS_GAUGE_NEW_API sbs_gauge) add_subdirectory_ifdef(CONFIG_MAX17048 max17048) diff --git a/drivers/gpio/CMakeLists.txt b/drivers/gpio/CMakeLists.txt index 1237fe7bd74..16eb3caeb2a 100644 --- a/drivers/gpio/CMakeLists.txt +++ b/drivers/gpio/CMakeLists.txt @@ -1,5 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 +zephyr_syscall_header(${ZEPHYR_BASE}/include/zephyr/drivers/gpio.h) + zephyr_library() zephyr_library_sources_ifdef(CONFIG_GPIO_TELINK_B91 gpio_b91.c) diff --git a/drivers/hwinfo/CMakeLists.txt b/drivers/hwinfo/CMakeLists.txt index 45d0fb297c1..6ff5d1929f6 100644 --- a/drivers/hwinfo/CMakeLists.txt +++ b/drivers/hwinfo/CMakeLists.txt @@ -1,5 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 +zephyr_syscall_header(${ZEPHYR_BASE}/include/zephyr/drivers/hwinfo.h) + zephyr_library() zephyr_library_sources_ifdef(CONFIG_USERSPACE hwinfo_handlers.c) diff --git a/drivers/i2c/CMakeLists.txt b/drivers/i2c/CMakeLists.txt index 9f381a69b2c..25e4b234994 100644 --- a/drivers/i2c/CMakeLists.txt +++ b/drivers/i2c/CMakeLists.txt @@ -1,5 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 +zephyr_syscall_header(${ZEPHYR_BASE}/include/zephyr/drivers/i2c.h) + zephyr_library() zephyr_library_sources(i2c_common.c) diff --git a/drivers/i2s/CMakeLists.txt b/drivers/i2s/CMakeLists.txt index 4b3ce8eca37..c6f6d17f4f9 100644 --- a/drivers/i2s/CMakeLists.txt +++ b/drivers/i2s/CMakeLists.txt @@ -1,5 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 +zephyr_syscall_header(${ZEPHYR_BASE}/include/zephyr/drivers/i2s.h) + zephyr_library() zephyr_library_sources(i2s_common.c) diff --git a/drivers/i3c/CMakeLists.txt b/drivers/i3c/CMakeLists.txt index 4371cd38500..2645dbeabb5 100644 --- a/drivers/i3c/CMakeLists.txt +++ b/drivers/i3c/CMakeLists.txt @@ -2,6 +2,8 @@ # # SPDX-License-Identifier: Apache-2.0 +zephyr_syscall_header(${ZEPHYR_BASE}/include/zephyr/drivers/i3c.h) + zephyr_library() zephyr_library_sources( diff --git a/drivers/ipm/CMakeLists.txt b/drivers/ipm/CMakeLists.txt index cee766242d3..63148148e87 100644 --- a/drivers/ipm/CMakeLists.txt +++ b/drivers/ipm/CMakeLists.txt @@ -1,5 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 +zephyr_syscall_header(${ZEPHYR_BASE}/include/zephyr/drivers/ipm.h) + zephyr_library() zephyr_library_sources_ifdef(CONFIG_IPM_MCUX ipm_mcux.c) diff --git a/drivers/led/CMakeLists.txt b/drivers/led/CMakeLists.txt index ba1dd973fa2..c9a7478286d 100644 --- a/drivers/led/CMakeLists.txt +++ b/drivers/led/CMakeLists.txt @@ -1,5 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 +zephyr_syscall_header(${ZEPHYR_BASE}/include/zephyr/drivers/led.h) + zephyr_library() zephyr_library_sources_ifdef(CONFIG_HT16K33 ht16k33.c) diff --git a/drivers/mbox/CMakeLists.txt b/drivers/mbox/CMakeLists.txt index 69969bc6050..be9d00e36e6 100644 --- a/drivers/mbox/CMakeLists.txt +++ b/drivers/mbox/CMakeLists.txt @@ -1,5 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 +zephyr_syscall_header(${ZEPHYR_BASE}/include/zephyr/drivers/mbox.h) + zephyr_library() zephyr_library_sources_ifdef(CONFIG_USERSPACE mbox_handlers.c) diff --git a/drivers/peci/CMakeLists.txt b/drivers/peci/CMakeLists.txt index 61cfc9deeb9..f73bcd12034 100644 --- a/drivers/peci/CMakeLists.txt +++ b/drivers/peci/CMakeLists.txt @@ -1,5 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 +zephyr_syscall_header(${ZEPHYR_BASE}/include/zephyr/drivers/peci.h) + zephyr_library() zephyr_library_sources_ifdef(CONFIG_PECI_XEC peci_mchp_xec.c) diff --git a/drivers/ps2/CMakeLists.txt b/drivers/ps2/CMakeLists.txt index 006c70d63f6..bfcaae96ea2 100644 --- a/drivers/ps2/CMakeLists.txt +++ b/drivers/ps2/CMakeLists.txt @@ -1,5 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 +zephyr_syscall_header(${ZEPHYR_BASE}/include/zephyr/drivers/ps2.h) + zephyr_library() zephyr_library_sources_ifdef(CONFIG_PS2_XEC ps2_mchp_xec.c) diff --git a/drivers/ptp_clock/CMakeLists.txt b/drivers/ptp_clock/CMakeLists.txt index 719dc0398a7..7987b588cea 100644 --- a/drivers/ptp_clock/CMakeLists.txt +++ b/drivers/ptp_clock/CMakeLists.txt @@ -1,5 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 +zephyr_syscall_header(${ZEPHYR_BASE}/include/zephyr/drivers/ptp_clock.h) + zephyr_library() zephyr_library_sources_ifdef(CONFIG_PTP_CLOCK ptp_clock.c) diff --git a/drivers/pwm/CMakeLists.txt b/drivers/pwm/CMakeLists.txt index be63c0977c2..fcd0075eeed 100644 --- a/drivers/pwm/CMakeLists.txt +++ b/drivers/pwm/CMakeLists.txt @@ -1,5 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 +zephyr_syscall_header(${ZEPHYR_BASE}/include/zephyr/drivers/pwm.h) + zephyr_library() zephyr_library_sources_ifdef(CONFIG_PWM_TELINK_B91 pwm_b91.c) diff --git a/drivers/reset/CMakeLists.txt b/drivers/reset/CMakeLists.txt index a589886a4da..d65dd5a5e95 100644 --- a/drivers/reset/CMakeLists.txt +++ b/drivers/reset/CMakeLists.txt @@ -1,5 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 +zephyr_syscall_header(${ZEPHYR_BASE}/include/zephyr/drivers/reset.h) + zephyr_library() zephyr_library_sources_ifdef(CONFIG_RESET_GD32 reset_gd32.c) zephyr_library_sources_ifdef(CONFIG_RESET_RPI_PICO reset_rpi_pico.c) diff --git a/drivers/retained_mem/CMakeLists.txt b/drivers/retained_mem/CMakeLists.txt index c3c9ea6d0bd..f8e34a5a7c7 100644 --- a/drivers/retained_mem/CMakeLists.txt +++ b/drivers/retained_mem/CMakeLists.txt @@ -1,5 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 +zephyr_syscall_header(${ZEPHYR_BASE}/include/zephyr/drivers/retained_mem.h) + zephyr_library() zephyr_library_sources_ifdef(CONFIG_RETAINED_MEM_NRF_GPREGRET retained_mem_nrf_gpregret.c) zephyr_library_sources_ifdef(CONFIG_RETAINED_MEM_ZEPHYR_RAM retained_mem_zephyr_ram.c) diff --git a/drivers/rtc/CMakeLists.txt b/drivers/rtc/CMakeLists.txt index b807adc927b..6272b12a41e 100644 --- a/drivers/rtc/CMakeLists.txt +++ b/drivers/rtc/CMakeLists.txt @@ -1,6 +1,8 @@ # Copyright (c) 2022 Bjarki Arge Andreasen # SPDX-License-Identifier: Apache-2.0 +zephyr_syscall_header(${ZEPHYR_BASE}/include/zephyr/drivers/rtc.h) + zephyr_library() zephyr_library_sources_ifdef(CONFIG_USERSPACE rtc_handlers.c) diff --git a/drivers/sensor/CMakeLists.txt b/drivers/sensor/CMakeLists.txt index 3821ba469e8..d13ac7e56eb 100644 --- a/drivers/sensor/CMakeLists.txt +++ b/drivers/sensor/CMakeLists.txt @@ -142,6 +142,8 @@ add_subdirectory_ifdef(CONFIG_WSEN_PDUS wsen_pdus) add_subdirectory_ifdef(CONFIG_WSEN_TIDS wsen_tids) add_subdirectory_ifdef(CONFIG_XMC4XXX_TEMP xmc4xxx_temp) +zephyr_syscall_header(${ZEPHYR_BASE}/include/zephyr/drivers/sensor.h) + zephyr_library() zephyr_library_property(ALLOW_EMPTY TRUE) diff --git a/drivers/serial/CMakeLists.txt b/drivers/serial/CMakeLists.txt index fcbfd6b079a..a860c8d1d61 100644 --- a/drivers/serial/CMakeLists.txt +++ b/drivers/serial/CMakeLists.txt @@ -1,5 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 +zephyr_syscall_header(${ZEPHYR_BASE}/include/zephyr/drivers/uart.h) + zephyr_library() zephyr_library_sources_ifdef(CONFIG_UART_ALTERA_JTAG uart_altera_jtag.c) zephyr_library_sources_ifdef(CONFIG_UART_ALTERA uart_altera.c) diff --git a/drivers/smbus/CMakeLists.txt b/drivers/smbus/CMakeLists.txt index e7c76704d2b..13a260681f0 100644 --- a/drivers/smbus/CMakeLists.txt +++ b/drivers/smbus/CMakeLists.txt @@ -1,5 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 +zephyr_syscall_header(${ZEPHYR_BASE}/include/zephyr/drivers/smbus.h) + zephyr_library() zephyr_library_sources_ifdef(CONFIG_SMBUS_SHELL smbus_shell.c) diff --git a/drivers/spi/CMakeLists.txt b/drivers/spi/CMakeLists.txt index 0f7d5bcb16b..a544b4e7b68 100644 --- a/drivers/spi/CMakeLists.txt +++ b/drivers/spi/CMakeLists.txt @@ -1,5 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 +zephyr_syscall_header(${ZEPHYR_BASE}/include/zephyr/drivers/spi.h) + zephyr_library() zephyr_library_sources_ifdef(CONFIG_SPI_TELINK_B91 spi_b91.c) diff --git a/drivers/usb/bc12/CMakeLists.txt b/drivers/usb/bc12/CMakeLists.txt index abf068604b7..31b9c3212a2 100644 --- a/drivers/usb/bc12/CMakeLists.txt +++ b/drivers/usb/bc12/CMakeLists.txt @@ -1,5 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 +zephyr_syscall_header(${ZEPHYR_BASE}/include/zephyr/drivers/usb/usb_bc12.h) + zephyr_library() zephyr_library_sources_ifdef(CONFIG_USB_BC12_PI3USB9201 bc12_pi3usb9201.c) diff --git a/drivers/virtualization/CMakeLists.txt b/drivers/virtualization/CMakeLists.txt index 2829e64169d..c16ed84e319 100644 --- a/drivers/virtualization/CMakeLists.txt +++ b/drivers/virtualization/CMakeLists.txt @@ -1,5 +1,9 @@ # SPDX-License-Identifier: Apache-2.0 +zephyr_syscall_header( + ${ZEPHYR_BASE}/include/zephyr/drivers/virtualization/ivshmem.h +) + zephyr_library() zephyr_library_sources_ifdef(CONFIG_IVSHMEM virt_ivshmem.c) diff --git a/drivers/w1/CMakeLists.txt b/drivers/w1/CMakeLists.txt index 29680119e0d..57d010f4e4d 100644 --- a/drivers/w1/CMakeLists.txt +++ b/drivers/w1/CMakeLists.txt @@ -1,5 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 +zephyr_syscall_header(${ZEPHYR_BASE}/include/zephyr/drivers/w1.h) + zephyr_library() zephyr_sources_ifdef(CONFIG_USERSPACE w1_handlers.c) diff --git a/drivers/watchdog/CMakeLists.txt b/drivers/watchdog/CMakeLists.txt index cd40a5a7984..12317539ac7 100644 --- a/drivers/watchdog/CMakeLists.txt +++ b/drivers/watchdog/CMakeLists.txt @@ -1,5 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 +zephyr_syscall_header(${ZEPHYR_BASE}/include/zephyr/drivers/watchdog.h) + zephyr_library() zephyr_library_sources_ifdef(CONFIG_IWDG_STM32 wdt_iwdg_stm32.c)