/Zephyr-Core-2.7.6/subsys/pm/ |
D | device_runtime.c | 24 const struct device *dev = pm->dev; in pm_device_runtime_state_set() local 28 atomic_clear_bit(&dev->pm->flags, PM_DEVICE_FLAG_TRANSITIONING); in pm_device_runtime_state_set() 30 switch (dev->pm->state) { in pm_device_runtime_state_set() 32 if ((dev->pm->usage == 0) && dev->pm->enable) { in pm_device_runtime_state_set() 33 ret = pm_device_state_set(dev, PM_DEVICE_STATE_SUSPENDED); in pm_device_runtime_state_set() 37 if ((dev->pm->usage > 0) || !dev->pm->enable) { in pm_device_runtime_state_set() 38 ret = pm_device_state_set(dev, PM_DEVICE_STATE_ACTIVE); in pm_device_runtime_state_set() 51 (void)k_condvar_broadcast(&dev->pm->condvar); in pm_device_runtime_state_set() 64 static int pm_device_request(const struct device *dev, in pm_device_request() argument 69 SYS_PORT_TRACING_FUNC_ENTER(pm, device_request, dev, state); in pm_device_request() [all …]
|
D | device.c | 32 for (const struct device *dev = devs + devc - 1; dev >= devs; dev--) { in _pm_devices() local 36 if (pm_device_is_busy(dev) || pm_device_wakeup_is_enabled(dev)) { in _pm_devices() 40 ret = pm_device_state_set(dev, state); in _pm_devices() 46 dev->name, pm_device_state_str(state), ret); in _pm_devices() 50 __pm_device_slots_start[num_susp] = dev; in _pm_devices() 96 int pm_device_state_set(const struct device *dev, in pm_device_state_set() argument 102 if (dev->pm_control == NULL) { in pm_device_state_set() 106 if (atomic_test_bit(&dev->pm->flags, PM_DEVICE_FLAG_TRANSITIONING)) { in pm_device_state_set() 112 if (dev->pm->state == PM_DEVICE_STATE_SUSPENDED) { in pm_device_state_set() 114 } else if (dev->pm->state == PM_DEVICE_STATE_OFF) { in pm_device_state_set() [all …]
|
/Zephyr-Core-2.7.6/include/drivers/ |
D | edac.h | 17 typedef void (*edac_notify_callback_f)(const struct device *dev, void *data); 42 int (*inject_set_param1)(const struct device *dev, uint64_t value); 43 int (*inject_get_param1)(const struct device *dev, uint64_t *value); 44 int (*inject_set_param2)(const struct device *dev, uint64_t value); 45 int (*inject_get_param2)(const struct device *dev, uint64_t *value); 46 int (*inject_set_error_type)(const struct device *dev, uint32_t value); 47 int (*inject_get_error_type)(const struct device *dev, uint32_t *value); 48 int (*inject_error_trigger)(const struct device *dev); 51 int (*ecc_error_log_get)(const struct device *dev, uint64_t *value); 52 int (*ecc_error_log_clear)(const struct device *dev); [all …]
|
D | uart.h | 249 typedef void (*uart_callback_t)(const struct device *dev, 316 typedef void (*uart_irq_callback_user_data_t)(const struct device *dev, 327 typedef void (*uart_irq_config_func_t)(const struct device *dev); 356 int (*callback_set)(const struct device *dev, 360 int (*tx)(const struct device *dev, const uint8_t *buf, size_t len, 362 int (*tx_abort)(const struct device *dev); 364 int (*rx_enable)(const struct device *dev, uint8_t *buf, size_t len, 366 int (*rx_buf_rsp)(const struct device *dev, uint8_t *buf, size_t len); 367 int (*rx_disable)(const struct device *dev); 372 int (*poll_in)(const struct device *dev, unsigned char *p_char); [all …]
|
D | counter.h | 108 typedef void (*counter_alarm_callback_t)(const struct device *dev, 138 typedef void (*counter_top_callback_t)(const struct device *dev, 173 typedef int (*counter_api_start)(const struct device *dev); 174 typedef int (*counter_api_stop)(const struct device *dev); 175 typedef int (*counter_api_get_value)(const struct device *dev, 177 typedef int (*counter_api_set_alarm)(const struct device *dev, 180 typedef int (*counter_api_cancel_alarm)(const struct device *dev, 182 typedef int (*counter_api_set_top_value)(const struct device *dev, 184 typedef uint32_t (*counter_api_get_pending_int)(const struct device *dev); 185 typedef uint32_t (*counter_api_get_top_value)(const struct device *dev); [all …]
|
D | espi_saf.h | 129 typedef int (*espi_saf_api_config)(const struct device *dev, 133 const struct device *dev, 136 typedef int (*espi_saf_api_activate)(const struct device *dev); 138 typedef bool (*espi_saf_api_get_channel_status)(const struct device *dev); 140 typedef int (*espi_saf_api_flash_read)(const struct device *dev, 142 typedef int (*espi_saf_api_flash_write)(const struct device *dev, 144 typedef int (*espi_saf_api_flash_erase)(const struct device *dev, 147 typedef int (*espi_saf_api_manage_callback)(const struct device *dev, 212 __syscall int espi_saf_config(const struct device *dev, 215 static inline int z_impl_espi_saf_config(const struct device *dev, in z_impl_espi_saf_config() argument [all …]
|
D | display.h | 117 typedef int (*display_blanking_on_api)(const struct device *dev); 124 typedef int (*display_blanking_off_api)(const struct device *dev); 131 typedef int (*display_write_api)(const struct device *dev, const uint16_t x, 141 typedef int (*display_read_api)(const struct device *dev, const uint16_t x, 151 typedef void *(*display_get_framebuffer_api)(const struct device *dev); 158 typedef int (*display_set_brightness_api)(const struct device *dev, 166 typedef int (*display_set_contrast_api)(const struct device *dev, 174 typedef void (*display_get_capabilities_api)(const struct device *dev, 183 typedef int (*display_set_pixel_format_api)(const struct device *dev, 192 typedef int (*display_set_orientation_api)(const struct device *dev, [all …]
|
D | bbram.h | 21 typedef int (*bbram_api_check_invalid)(const struct device *dev); 28 typedef int (*bbram_api_check_standby_power)(const struct device *dev); 35 typedef int (*bbram_api_check_power)(const struct device *dev); 42 typedef int (*bbram_api_get_size)(const struct device *dev, size_t *size); 49 typedef int (*bbram_api_read)(const struct device *dev, size_t offset, size_t size, 57 typedef int (*bbram_api_write)(const struct device *dev, size_t offset, size_t size, 78 __syscall int bbram_check_invalid(const struct device *dev); 80 static inline int z_impl_bbram_check_invalid(const struct device *dev) in z_impl_bbram_check_invalid() argument 83 (const struct bbram_driver_api *)dev->api; in z_impl_bbram_check_invalid() 89 return api->check_invalid(dev); in z_impl_bbram_check_invalid() [all …]
|
D | ps2.h | 38 typedef void (*ps2_callback_t)(const struct device *dev, uint8_t data); 47 typedef int (*ps2_config_t)(const struct device *dev, 49 typedef int (*ps2_read_t)(const struct device *dev, uint8_t *value); 50 typedef int (*ps2_write_t)(const struct device *dev, uint8_t value); 51 typedef int (*ps2_disable_callback_t)(const struct device *dev); 52 typedef int (*ps2_enable_callback_t)(const struct device *dev); 75 __syscall int ps2_config(const struct device *dev, 78 static inline int z_impl_ps2_config(const struct device *dev, in z_impl_ps2_config() argument 82 (struct ps2_driver_api *)dev->api; in z_impl_ps2_config() 84 return api->config(dev, callback_isr); in z_impl_ps2_config() [all …]
|
D | flash.h | 69 typedef int (*flash_api_read)(const struct device *dev, off_t offset, 80 typedef int (*flash_api_write)(const struct device *dev, off_t offset, 91 typedef int (*flash_api_erase)(const struct device *dev, off_t offset, 95 typedef int (*flash_api_write_protection)(const struct device *dev, 97 typedef const struct flash_parameters* (*flash_api_get_parameters)(const struct device *dev); 121 typedef void (*flash_api_pages_layout)(const struct device *dev, 126 typedef int (*flash_api_sfdp_read)(const struct device *dev, off_t offset, 128 typedef int (*flash_api_read_jedec_id)(const struct device *dev, uint8_t *id); 167 __syscall int flash_read(const struct device *dev, off_t offset, void *data, 170 static inline int z_impl_flash_read(const struct device *dev, off_t offset, in z_impl_flash_read() argument [all …]
|
/Zephyr-Core-2.7.6/tests/drivers/uart/uart_pm/src/ |
D | main.c | 19 static void polling_verify(const struct device *dev, bool is_async, bool active) in polling_verify() argument 30 uart_poll_out(dev, outs[i]); in polling_verify() 36 err = uart_poll_in(dev, &c); in polling_verify() 40 uart_poll_out(dev, outs[i]); in polling_verify() 44 err = uart_poll_in(dev, &c); in polling_verify() 49 err = uart_poll_in(dev, &c); in polling_verify() 54 static void async_callback(const struct device *dev, struct uart_event *evt, void *ctx) in async_callback() argument 67 static bool async_verify(const struct device *dev, bool active) in async_verify() argument 74 err = uart_callback_set(dev, async_callback, (void *)&tx_done); in async_verify() 86 err = uart_rx_enable(dev, rxbuf, sizeof(rxbuf), 1); in async_verify() [all …]
|
/Zephyr-Core-2.7.6/drivers/serial/ |
D | uart_stellaris.c | 82 #define DEV_CFG(dev) \ argument 83 ((const struct uart_device_config * const)(dev)->config) 84 #define DEV_DATA(dev) \ argument 85 ((struct uart_stellaris_dev_data_t * const)(dev)->data) 86 #define UART_STRUCT(dev) \ argument 87 ((volatile struct _uart *)(DEV_CFG(dev))->base) 90 #define UARTDR(dev) (*((volatile uint32_t *)(DEV_CFG(dev)->base + 0x000))) argument 91 #define UARTSR(dev) (*((volatile uint32_t *)(DEV_CFG(dev)->base + 0x004))) argument 92 #define UARTCR(dev) (*((volatile uint32_t *)(DEV_CFG(dev)->base + 0x004))) argument 93 #define UARTFR(dev) (*((volatile uint32_t *)(DEV_CFG(dev)->base + 0x018))) argument [all …]
|
D | uart_ns16550.c | 193 #define DEV_CFG(dev) \ argument 195 (dev)->config) 196 #define DEV_DATA(dev) \ argument 197 ((struct uart_ns16550_dev_data *)(dev)->data) 199 #define THR(dev) (get_port(dev) + REG_THR * reg_interval(dev)) argument 200 #define RDR(dev) (get_port(dev) + REG_RDR * reg_interval(dev)) argument 201 #define BRDL(dev) (get_port(dev) + REG_BRDL * reg_interval(dev)) argument 202 #define BRDH(dev) (get_port(dev) + REG_BRDH * reg_interval(dev)) argument 203 #define IER(dev) (get_port(dev) + REG_IER * reg_interval(dev)) argument 204 #define IIR(dev) (get_port(dev) + REG_IIR * reg_interval(dev)) argument [all …]
|
D | uart_xlnx_uartlite.c | 43 void (*irq_config_func)(const struct device *dev); 50 const struct device *dev; member 60 static inline uint32_t xlnx_uartlite_read_status(const struct device *dev) in xlnx_uartlite_read_status() argument 62 const struct xlnx_uartlite_config *config = dev->config; in xlnx_uartlite_read_status() 63 struct xlnx_uartlite_data *data = dev->data; in xlnx_uartlite_read_status() 74 static inline void xlnx_uartlite_clear_status(const struct device *dev) in xlnx_uartlite_clear_status() argument 76 struct xlnx_uartlite_data *data = dev->data; in xlnx_uartlite_clear_status() 82 static inline unsigned char xlnx_uartlite_read_rx_fifo(const struct device *dev) in xlnx_uartlite_read_rx_fifo() argument 84 const struct xlnx_uartlite_config *config = dev->config; in xlnx_uartlite_read_rx_fifo() 89 static inline void xlnx_uartlite_write_tx_fifo(const struct device *dev, in xlnx_uartlite_write_tx_fifo() argument [all …]
|
D | uart_pl011.c | 145 #define DEV_CFG(dev) \ argument 146 ((const struct uart_device_config * const)(dev)->config) 147 #define DEV_DATA(dev) \ argument 148 ((struct pl011_data *)(dev)->data) 149 #define PL011_REGS(dev) \ argument 150 ((volatile struct pl011_regs *)(DEV_CFG(dev))->base) 152 static void pl011_enable(const struct device *dev) in pl011_enable() argument 154 PL011_REGS(dev)->cr |= PL011_CR_UARTEN; in pl011_enable() 157 static void pl011_disable(const struct device *dev) in pl011_disable() argument 159 PL011_REGS(dev)->cr &= ~PL011_CR_UARTEN; in pl011_disable() [all …]
|
D | uart_cc13xx_cc26xx.c | 41 static inline struct uart_cc13xx_cc26xx_data *get_dev_data(const struct device *dev) in get_dev_data() argument 43 return dev->data; in get_dev_data() 46 static inline const struct uart_device_config *get_dev_conf(const struct device *dev) in get_dev_conf() argument 48 return dev->config; in get_dev_conf() 51 static int uart_cc13xx_cc26xx_poll_in(const struct device *dev, in uart_cc13xx_cc26xx_poll_in() argument 54 if (!UARTCharsAvail(get_dev_conf(dev)->regs)) { in uart_cc13xx_cc26xx_poll_in() 58 *c = UARTCharGetNonBlocking(get_dev_conf(dev)->regs); in uart_cc13xx_cc26xx_poll_in() 63 static void uart_cc13xx_cc26xx_poll_out(const struct device *dev, in uart_cc13xx_cc26xx_poll_out() argument 66 UARTCharPut(get_dev_conf(dev)->regs, c); in uart_cc13xx_cc26xx_poll_out() 71 while (UARTBusy(get_dev_conf(dev)->regs) == true) { in uart_cc13xx_cc26xx_poll_out() [all …]
|
D | uart_npcx.c | 46 #define DRV_CONFIG(dev) \ argument 47 ((const struct uart_npcx_config *)(dev)->config) 49 #define DRV_DATA(dev) \ argument 50 ((struct uart_npcx_data *)(dev)->data) 52 #define HAL_INSTANCE(dev) \ argument 53 (struct uart_reg *)(DRV_CONFIG(dev)->uconf.base) 78 static int uart_npcx_tx_fifo_ready(const struct device *dev) in uart_npcx_tx_fifo_ready() argument 80 struct uart_reg *const inst = HAL_INSTANCE(dev); in uart_npcx_tx_fifo_ready() 86 static int uart_npcx_rx_fifo_available(const struct device *dev) in uart_npcx_rx_fifo_available() argument 88 struct uart_reg *const inst = HAL_INSTANCE(dev); in uart_npcx_rx_fifo_available() [all …]
|
D | uart_handlers.c | 11 static inline int z_vrfy_uart_##op_(const struct device *dev) \ 13 Z_OOPS(Z_SYSCALL_DRIVER_UART(dev, op_)); \ 14 return z_impl_uart_ ## op_(dev); \ 18 static inline void z_vrfy_uart_##op_(const struct device *dev) \ 20 Z_OOPS(Z_SYSCALL_DRIVER_UART(dev, op_)); \ 21 z_impl_uart_ ## op_(dev); \ 27 static inline int z_vrfy_uart_poll_in(const struct device *dev, in UART_SIMPLE() 30 Z_OOPS(Z_SYSCALL_DRIVER_UART(dev, poll_in)); in UART_SIMPLE() 32 return z_impl_uart_poll_in(dev, p_char); in UART_SIMPLE() 36 static inline void z_vrfy_uart_poll_out(const struct device *dev, in z_vrfy_uart_poll_out() argument [all …]
|
/Zephyr-Core-2.7.6/drivers/counter/ |
D | counter_handlers.c | 14 static inline int z_vrfy_counter_##name(const struct device *dev) \ 16 Z_OOPS(Z_SYSCALL_DRIVER_COUNTER(dev, name)); \ 17 return z_impl_counter_ ## name((const struct device *)dev); \ 28 static inline bool z_vrfy_counter_is_counting_up(const struct device *dev) in COUNTER_HANDLER() 30 Z_OOPS(Z_SYSCALL_OBJ(dev, K_OBJ_DRIVER_COUNTER)); in COUNTER_HANDLER() 31 return z_impl_counter_is_counting_up((const struct device *)dev); in COUNTER_HANDLER() 35 static inline uint8_t z_vrfy_counter_get_num_of_channels(const struct device *dev) in z_vrfy_counter_get_num_of_channels() argument 37 Z_OOPS(Z_SYSCALL_OBJ(dev, K_OBJ_DRIVER_COUNTER)); in z_vrfy_counter_get_num_of_channels() 38 return z_impl_counter_get_num_of_channels((const struct device *)dev); in z_vrfy_counter_get_num_of_channels() 42 static inline uint32_t z_vrfy_counter_get_frequency(const struct device *dev) in z_vrfy_counter_get_frequency() argument [all …]
|
/Zephyr-Core-2.7.6/drivers/watchdog/ |
D | wdt_esp32.c | 57 #define DEV_CFG(dev) \ argument 58 ((const struct wdt_esp32_config *const)(dev)->config) 59 #define DEV_DATA(dev) \ argument 60 ((struct wdt_esp32_data *)(dev)->data) 61 #define DEV_BASE(dev) \ argument 62 ((volatile struct wdt_esp32_regs_t *)(DEV_CFG(dev))->base) 68 static inline void wdt_esp32_seal(const struct device *dev) in wdt_esp32_seal() argument 70 DEV_BASE(dev)->wprotect = 0U; in wdt_esp32_seal() 74 static inline void wdt_esp32_unseal(const struct device *dev) in wdt_esp32_unseal() argument 76 DEV_BASE(dev)->wprotect = TIMG_WDT_WKEY_VALUE; in wdt_esp32_unseal() [all …]
|
/Zephyr-Core-2.7.6/drivers/flash/ |
D | flash_handlers.c | 10 static inline int z_vrfy_flash_read(const struct device *dev, off_t offset, in z_vrfy_flash_read() argument 13 Z_OOPS(Z_SYSCALL_DRIVER_FLASH(dev, read)); in z_vrfy_flash_read() 15 return z_impl_flash_read((const struct device *)dev, offset, in z_vrfy_flash_read() 21 static inline int z_vrfy_flash_write(const struct device *dev, off_t offset, in z_vrfy_flash_write() argument 24 Z_OOPS(Z_SYSCALL_DRIVER_FLASH(dev, write)); in z_vrfy_flash_write() 26 return z_impl_flash_write((const struct device *)dev, offset, in z_vrfy_flash_write() 31 static inline int z_vrfy_flash_write_protection_set(const struct device *dev, in z_vrfy_flash_write_protection_set() argument 34 Z_OOPS(Z_SYSCALL_DRIVER_FLASH(dev, write_protection)); in z_vrfy_flash_write_protection_set() 35 return z_impl_flash_write_protection_set((const struct device *)dev, in z_vrfy_flash_write_protection_set() 40 static inline size_t z_vrfy_flash_get_write_block_size(const struct device *dev) in z_vrfy_flash_get_write_block_size() argument [all …]
|
/Zephyr-Core-2.7.6/drivers/audio/ |
D | tlv320dac310x.c | 53 #define DEV_CFG(dev) \ argument 54 ((struct codec_driver_config *const)(dev)->config) 55 #define DEV_DATA(dev) \ argument 56 ((struct codec_driver_data *const)(dev)->data) 58 static void codec_write_reg(const struct device *dev, struct reg_addr reg, 60 static void codec_read_reg(const struct device *dev, struct reg_addr reg, 62 static void codec_soft_reset(const struct device *dev); 63 static int codec_configure_dai(const struct device *dev, audio_dai_cfg_t *cfg); 64 static int codec_configure_clocks(const struct device *dev, 66 static int codec_configure_filters(const struct device *dev, [all …]
|
/Zephyr-Core-2.7.6/kernel/ |
D | device.c | 36 const struct device *dev = __device_start; in z_device_state_init() local 38 while (dev < __device_end) { in z_device_state_init() 39 z_object_init(dev); in z_device_state_init() 40 ++dev; in z_device_state_init() 71 const struct device *dev = entry->dev; in z_sys_init_run_level() local 72 int rc = entry->init(dev); in z_sys_init_run_level() 74 if (dev != NULL) { in z_sys_init_run_level() 85 dev->state->init_res = rc; in z_sys_init_run_level() 87 dev->state->initialized = true; in z_sys_init_run_level() 94 const struct device *dev; in z_impl_device_get_binding() local [all …]
|
/Zephyr-Core-2.7.6/tests/drivers/bbram/emul/src/ |
D | main.c | 17 const struct device *dev = device_get_binding(BBRAM_LABEL); in test_get_size() local 20 zassert_ok(bbram_get_size(dev, &size), NULL); in test_get_size() 26 const struct device *dev = device_get_binding(BBRAM_LABEL); in test_bbram_out_of_bounds() local 29 zassert_not_null(dev, NULL); in test_bbram_out_of_bounds() 30 zassert_equal(bbram_read(dev, 0, 0, buffer), -EFAULT, NULL); in test_bbram_out_of_bounds() 31 zassert_equal(bbram_read(dev, 0, BBRAM_SIZE + 1, buffer), -EFAULT, NULL); in test_bbram_out_of_bounds() 32 zassert_equal(bbram_read(dev, BBRAM_SIZE - 1, 2, buffer), -EFAULT, NULL); in test_bbram_out_of_bounds() 33 zassert_equal(bbram_write(dev, 0, 0, buffer), -EFAULT, NULL); in test_bbram_out_of_bounds() 34 zassert_equal(bbram_write(dev, 0, BBRAM_SIZE + 1, buffer), -EFAULT, NULL); in test_bbram_out_of_bounds() 35 zassert_equal(bbram_write(dev, BBRAM_SIZE - 1, 2, buffer), -EFAULT, NULL); in test_bbram_out_of_bounds() [all …]
|
/Zephyr-Core-2.7.6/tests/drivers/gpio/gpio_basic_api/src/ |
D | test_callback_manage.c | 13 static void callback_1(const struct device *dev, in callback_1() argument 20 static void callback_2(const struct device *dev, in callback_2() argument 26 static void callback_remove_self(const struct device *dev, in callback_remove_self() argument 32 dd->aux = gpio_remove_callback(dev, gpio_cb); in callback_remove_self() 35 static int init_callback(const struct device *dev, in init_callback() argument 39 int rc = gpio_pin_interrupt_configure(dev, PIN_IN, GPIO_INT_DISABLE); in init_callback() 42 rc = gpio_pin_interrupt_configure(dev, PIN_OUT, GPIO_INT_DISABLE); in init_callback() 46 rc = gpio_pin_configure(dev, PIN_OUT, GPIO_OUTPUT_LOW); in init_callback() 51 rc = gpio_pin_configure(dev, PIN_IN, in init_callback() 57 rc = gpio_add_callback(dev, &cb_data[0].gpio_cb); in init_callback() [all …]
|