Home
last modified time | relevance | path

Searched refs:priv (Results 1 – 25 of 98) sorted by relevance

1234

/Zephyr-latest/drivers/disk/
Dsdmmc_stm32.c98 static void stm32_sdmmc_fc_enable(struct stm32_sdmmc_priv *priv) in stm32_sdmmc_fc_enable() argument
100 MMC_TypeDef *sdmmcx = priv->hsd.Instance; in stm32_sdmmc_fc_enable()
108 struct stm32_sdmmc_priv *priv = dev->data; in stm32_sdmmc_isr() local
111 HAL_MMC_IRQHandler(&priv->hsd); in stm32_sdmmc_isr()
113 HAL_SD_IRQHandler(&priv->hsd); in stm32_sdmmc_isr()
120 struct stm32_sdmmc_priv *priv = CONTAINER_OF(hsd, struct stm32_sdmmc_priv, hsd); \
122 priv->status = hsd->ErrorCode; \
124 k_sem_give(&priv->sync); \
137 static int stm32_sdmmc_clock_enable(struct stm32_sdmmc_priv *priv) in stm32_sdmmc_clock_enable() argument
146 (clock_control_subsys_t)&priv->pclken[1], in stm32_sdmmc_clock_enable()
[all …]
/Zephyr-latest/drivers/usb/uhc/
Duhc_virtual.c64 struct uhc_vrt_data *priv = uhc_get_private(dev); in vrt_event_submit() local
73 k_fifo_put(&priv->fifo, event); in vrt_event_submit()
74 k_work_submit(&priv->work); in vrt_event_submit()
80 struct uhc_vrt_data *priv = uhc_get_private(dev); in vrt_xfer_control() local
96 priv->req = UVB_REQUEST_SETUP; in vrt_xfer_control()
97 priv->busy = true; in vrt_xfer_control()
99 return uvb_advert_pkt(priv->host_node, uvb_pkt); in vrt_xfer_control()
120 priv->req = UVB_REQUEST_DATA; in vrt_xfer_control()
121 priv->busy = true; in vrt_xfer_control()
123 return uvb_advert_pkt(priv->host_node, uvb_pkt); in vrt_xfer_control()
[all …]
Duhc_max3421e.c62 struct max3421e_data *priv = uhc_get_private(dev); in max3421e_read_hirq() local
94 priv->hirq = hirq; in max3421e_read_hirq()
172 struct max3421e_data *priv = uhc_get_private(dev); in max3421e_hien_disable() local
174 priv->hien &= ~hint; in max3421e_hien_disable()
176 return max3421e_write_byte(dev, MAX3421E_REG_HIEN, priv->hien); in max3421e_hien_disable()
183 struct max3421e_data *priv = uhc_get_private(dev); in max3421e_peraddr() local
186 if (priv->addr != addr) { in max3421e_peraddr()
194 priv->addr = addr; in max3421e_peraddr()
204 struct max3421e_data *priv = uhc_get_private(dev); in max3421e_tgl_update() local
205 uint8_t ep_idx = MAX3421E_EP(priv->hxfr); in max3421e_tgl_update()
[all …]
/Zephyr-latest/drivers/sdhc/
Dsdhc_renesas_ra.c97 struct sdhc_ra_priv *priv = dev->data; in sdhc_ra_get_card_present() local
103 fsp_err = R_SDHI_StatusGet(&priv->sdmmc_ctrl, &status); in sdhc_ra_get_card_present()
114 struct sdhc_ra_priv *priv = dev->data; in sdhc_ra_card_busy() local
119 fsp_err = R_SDHI_StatusGet(&priv->sdmmc_ctrl, &status); in sdhc_ra_card_busy()
141 static int sdhc_ra_send_cmd(struct sdhc_ra_priv *priv, struct sdmmc_ra_command *ra_cmd, int retries) in sdhc_ra_send_cmd() argument
146 fsp_err = sdhi_command_send_wait(&priv->sdmmc_ctrl, ra_cmd->opcode, ra_cmd->arg, in sdhc_ra_send_cmd()
163 struct sdhc_ra_priv *priv = dev->data; in sdhc_ra_request() local
191 k_sem_reset(&priv->sdmmc_event.transfer_sem); in sdhc_ra_request()
192 k_sem_take(&priv->thread_lock, K_FOREVER); in sdhc_ra_request()
214 ret = sdhc_ra_send_cmd(priv, &ra_cmd, retries); in sdhc_ra_request()
[all …]
/Zephyr-latest/drivers/usb/udc/
Dudc_stm32.c77 struct udc_stm32_data *priv = hpcd2data(hpcd); in HAL_PCD_ResetCallback() local
78 const struct device *dev = priv->dev; in HAL_PCD_ResetCallback()
85 HAL_PCD_EP_Open(&priv->pcd, USB_CONTROL_EP_OUT, cfg->ep0_mps, in HAL_PCD_ResetCallback()
91 HAL_PCD_EP_Open(&priv->pcd, USB_CONTROL_EP_IN, cfg->ep0_mps, in HAL_PCD_ResetCallback()
95 udc_submit_event(priv->dev, UDC_EVT_RESET, 0); in HAL_PCD_ResetCallback()
100 struct udc_stm32_data *priv = hpcd2data(hpcd); in HAL_PCD_ConnectCallback() local
102 udc_submit_event(priv->dev, UDC_EVT_VBUS_READY, 0); in HAL_PCD_ConnectCallback()
107 struct udc_stm32_data *priv = hpcd2data(hpcd); in HAL_PCD_DisconnectCallback() local
109 udc_submit_event(priv->dev, UDC_EVT_VBUS_REMOVED, 0); in HAL_PCD_DisconnectCallback()
114 struct udc_stm32_data *priv = hpcd2data(hpcd); in HAL_PCD_SuspendCallback() local
[all …]
Dudc_ambiq.c98 const struct udc_ambiq_data *priv = udc_get_private(dev); in udc_ambiq_tx() local
109 status = am_hal_usb_ep_xfer(priv->usb_handle, ep, NULL, 0); in udc_ambiq_tx()
111 status = am_hal_usb_ep_xfer(priv->usb_handle, ep, buf->data, buf->len); in udc_ambiq_tx()
125 struct udc_ambiq_data *priv = udc_get_private(dev); in udc_ambiq_rx() local
141 status = am_hal_usb_ep_xfer(priv->usb_handle, ep, buf->data, rx_size); in udc_ambiq_rx()
153 struct udc_ambiq_data *priv = udc_get_private(dev); in udc_ambiq_evt_callback() local
158 am_hal_usb_intr_usb_enable(priv->usb_handle, in udc_ambiq_evt_callback()
162 am_hal_usb_ep_init(priv->usb_handle, 0, 0, EP0_MPS); in udc_ambiq_evt_callback()
164 am_hal_usb_set_dev_speed(priv->usb_handle, priv->usb_speed); in udc_ambiq_evt_callback()
171 am_hal_usb_set_dev_state(priv->usb_handle, AM_HAL_USB_DEV_STATE_ACTIVE); in udc_ambiq_evt_callback()
[all …]
Dudc_dwc2.c231 struct udc_dwc2_data *const priv = udc_get_private(dev); in dwc2_get_iept_pktctn() local
236 return priv->max_pktcnt; in dwc2_get_iept_pktctn()
242 struct udc_dwc2_data *const priv = udc_get_private(dev); in dwc2_get_iept_xfersize() local
247 return priv->max_xfersize; in dwc2_get_iept_xfersize()
372 struct udc_dwc2_data *const priv = udc_get_private(dev); in dwc2_tx_fifo_write() local
401 if (!priv->bufferdma) { in dwc2_tx_fifo_write()
456 priv->tx_len[ep_idx] = len; in dwc2_tx_fifo_write()
466 if (priv->bufferdma) { in dwc2_tx_fifo_write()
495 if (priv->sof_num & 1) { in dwc2_tx_fifo_write()
509 if (!priv->bufferdma) { in dwc2_tx_fifo_write()
[all …]
Dudc_mcux_ip3511.c82 struct udc_mcux_data *priv = udc_get_private(dev); in udc_mcux_control() local
85 status = mcux_if->deviceControl(priv->mcux_device.controllerHandle, in udc_mcux_control()
102 struct udc_mcux_data *priv = udc_get_private(dev); in udc_mcux_ep_feed() local
122 status = mcux_if->deviceRecv(priv->mcux_device.controllerHandle, in udc_mcux_ep_feed()
127 status = mcux_if->deviceSend(priv->mcux_device.controllerHandle, in udc_mcux_ep_feed()
354 struct udc_mcux_data *priv = udc_get_private(dev); in udc_mcux_handler_zlt() local
362 status = mcux_if->deviceRecv(priv->mcux_device.controllerHandle, in udc_mcux_handler_zlt()
413 struct udc_mcux_data *priv = udc_get_private(dev); in udc_mcux_event_submit() local
426 k_fifo_put(&priv->fifo, ev); in udc_mcux_event_submit()
427 k_work_submit_to_queue(udc_get_work_q(), &priv->work); in udc_mcux_event_submit()
[all …]
Dudc_mcux_ehci.c82 struct udc_mcux_data *priv = udc_get_private(dev); in udc_mcux_control() local
85 status = mcux_if->deviceControl(priv->mcux_device.controllerHandle, in udc_mcux_control()
102 struct udc_mcux_data *priv = udc_get_private(dev); in udc_mcux_ep_feed() local
122 status = mcux_if->deviceRecv(priv->mcux_device.controllerHandle, in udc_mcux_ep_feed()
127 status = mcux_if->deviceSend(priv->mcux_device.controllerHandle, in udc_mcux_ep_feed()
354 struct udc_mcux_data *priv = udc_get_private(dev); in udc_mcux_handler_zlt() local
362 status = mcux_if->deviceRecv(priv->mcux_device.controllerHandle, in udc_mcux_handler_zlt()
413 struct udc_mcux_data *priv = udc_get_private(dev); in udc_mcux_event_submit() local
426 k_fifo_put(&priv->fifo, ev); in udc_mcux_event_submit()
427 k_work_submit_to_queue(udc_get_work_q(), &priv->work); in udc_mcux_event_submit()
[all …]
Dudc_kinetis.c235 struct usbfsotg_data *priv = udc_get_private(dev); in usbfsotg_ctrl_feed_start() local
241 if (priv->busy[cfg->stat.odd]) { in usbfsotg_ctrl_feed_start()
248 priv->out_buf[cfg->stat.odd] = buf; in usbfsotg_ctrl_feed_start()
249 priv->busy[cfg->stat.odd] = true; in usbfsotg_ctrl_feed_start()
259 struct usbfsotg_data *priv = udc_get_private(dev); in usbfsotg_ctrl_feed_start_next() local
265 if (priv->busy[!cfg->stat.odd]) { in usbfsotg_ctrl_feed_start_next()
272 priv->out_buf[!cfg->stat.odd] = buf; in usbfsotg_ctrl_feed_start_next()
273 priv->busy[!cfg->stat.odd] = true; in usbfsotg_ctrl_feed_start_next()
444 struct usbfsotg_data *priv = udc_get_private(dev); in usbfsotg_event_submit() local
458 k_fifo_put(&priv->fifo, ev); in usbfsotg_event_submit()
[all …]
Dudc_numaker.c200 struct udc_numaker_data *priv = udc_get_private(dev); in numaker_usbd_reset_addr() local
204 priv->addr = 0; in numaker_usbd_reset_addr()
210 struct udc_numaker_data *priv = udc_get_private(dev); in numaker_usbd_set_addr() local
213 if (base->FADDR != priv->addr) { in numaker_usbd_set_addr()
214 base->FADDR = priv->addr; in numaker_usbd_set_addr()
263 struct udc_numaker_data *priv = udc_get_private(dev); in numaker_usbd_send_msg() local
266 err = k_msgq_put(priv->msgq, msg, K_NO_WAIT); in numaker_usbd_send_msg()
276 k_msgq_purge(priv->msgq); in numaker_usbd_send_msg()
278 err = k_msgq_put(priv->msgq, &msg_reconn, K_NO_WAIT); in numaker_usbd_send_msg()
391 struct udc_numaker_data *priv = udc_get_private(dev); in numaker_usbd_bus_reset_th() local
[all …]
/Zephyr-latest/drivers/flash/
Dsoc_flash_rv32m1.c48 struct flash_priv *priv = dev->data; in flash_mcux_erase() local
53 if (k_sem_take(&priv->write_lock, K_FOREVER)) { in flash_mcux_erase()
57 addr = offset + priv->pflash_block_base; in flash_mcux_erase()
60 rc = FLASH_Erase(&priv->config, addr, len, kFLASH_ApiEraseKey); in flash_mcux_erase()
63 k_sem_give(&priv->write_lock); in flash_mcux_erase()
71 struct flash_priv *priv = dev->data; in flash_mcux_read() local
79 addr = offset + priv->pflash_block_base; in flash_mcux_read()
89 struct flash_priv *priv = dev->data; in flash_mcux_write() local
94 if (k_sem_take(&priv->write_lock, K_FOREVER)) { in flash_mcux_write()
98 addr = offset + priv->pflash_block_base; in flash_mcux_write()
[all …]
Dsoc_flash_lpc.c59 struct flash_priv *priv = dev->data; in flash_lpc_erase() local
66 if (k_sem_take(&priv->write_lock, K_FOREVER)) { in flash_lpc_erase()
71 prepare_erase_write(offset, len, priv->sector_size); in flash_lpc_erase()
79 k_sem_give(&priv->write_lock); in flash_lpc_erase()
87 struct flash_priv *priv = dev->data; in flash_lpc_read() local
90 addr = offset + priv->pflash_block_base; in flash_lpc_read()
100 struct flash_priv *priv = dev->data; in flash_lpc_write() local
105 if (k_sem_take(&priv->write_lock, K_FOREVER)) { in flash_lpc_write()
109 addr = offset + priv->pflash_block_base; in flash_lpc_write()
112 prepare_erase_write(offset, len, priv->sector_size); in flash_lpc_write()
[all …]
Dsoc_flash_mcux.c184 struct flash_priv *priv = dev->data; in flash_mcux_erase() local
189 if (k_sem_take(&priv->write_lock, K_FOREVER)) { in flash_mcux_erase()
193 addr = offset + priv->pflash_block_base; in flash_mcux_erase()
196 rc = FLASH_Erase(&priv->config, in flash_mcux_erase()
208 k_sem_give(&priv->write_lock); in flash_mcux_erase()
227 struct flash_priv *priv = dev->data; in flash_mcux_read() local
236 addr = offset + priv->pflash_block_base; in flash_mcux_read()
246 rc = FLASH_Read(&priv->config, addr, data, len); in flash_mcux_read()
255 rc = FLASH_VerifyErase(&priv->config, in flash_mcux_read()
294 struct flash_priv *priv = dev->data; in flash_mcux_write() local
[all …]
Dflash_cadence_qspi_nor.c41 struct flash_cad_priv *priv = dev->data; in flash_cad_read() local
42 struct cad_qspi_params *cad_params = &priv->params; in flash_cad_read()
63 struct flash_cad_priv *priv = dev->data; in flash_cad_erase() local
64 struct cad_qspi_params *cad_params = &priv->params; in flash_cad_erase()
85 struct flash_cad_priv *priv = dev->data; in flash_cad_write() local
86 struct cad_qspi_params *cad_params = &priv->params; in flash_cad_write()
121 struct flash_cad_priv *priv = dev->data; in flash_cad_init() local
122 struct cad_qspi_params *cad_params = &priv->params; in flash_cad_init()
Dsoc_flash_cc13xx_cc26xx.c38 struct flash_priv *priv = dev->data; in flash_cc13xx_cc26xx_init() local
40 k_sem_init(&priv->mutex, 1, 1); in flash_cc13xx_cc26xx_init()
108 struct flash_priv *priv = dev->data; in flash_cc13xx_cc26xx_erase() local
128 if (k_sem_take(&priv->mutex, K_FOREVER)) { in flash_cc13xx_cc26xx_erase()
160 k_sem_give(&priv->mutex); in flash_cc13xx_cc26xx_erase()
188 struct flash_priv *priv = dev->data; in flash_cc13xx_cc26xx_write() local
209 if (k_sem_take(&priv->mutex, K_FOREVER)) { in flash_cc13xx_cc26xx_write()
241 k_sem_give(&priv->mutex); in flash_cc13xx_cc26xx_write()
/Zephyr-latest/drivers/clock_control/
Dclock_control_npcm.c213 struct clk_cfg_t *priv; in npcm_clock_control_on() local
216 priv = npcm_get_cfg(sub_system); in npcm_clock_control_on()
217 if (!priv) { in npcm_clock_control_on()
223 NPCM_PWDWN_CTL(pmc_base, NPCM_CLOCK_REG_OFFSET(priv->clock_id)) &= in npcm_clock_control_on()
224 ~(BIT(NPCM_CLOCK_REG_BIT_OFFSET(priv->clock_id))); in npcm_clock_control_on()
232 struct clk_cfg_t *priv; in npcm_clock_control_off() local
235 priv = npcm_get_cfg(sub_system); in npcm_clock_control_off()
236 if (!priv) { in npcm_clock_control_off()
242 NPCM_PWDWN_CTL(pmc_base, NPCM_CLOCK_REG_OFFSET(priv->clock_id)) |= in npcm_clock_control_off()
243 ~(BIT(NPCM_CLOCK_REG_BIT_OFFSET(priv->clock_id))); in npcm_clock_control_off()
[all …]
/Zephyr-latest/drivers/sensor/maxim/max17055/
Dmax17055.c154 struct max17055_data *const priv = dev->data; in max17055_channel_get() local
160 tmp = priv->voltage * 1250 / 16; in max17055_channel_get()
165 tmp = priv->ocv * 1250 / 16; in max17055_channel_get()
172 current_ma = current_to_ma(config->rsense_mohms, priv->avg_current); in max17055_channel_get()
177 valp->val1 = priv->state_of_charge / 256; in max17055_channel_get()
178 valp->val2 = priv->state_of_charge % 256 * 1000000 / 256; in max17055_channel_get()
181 valp->val1 = priv->internal_temp / 256; in max17055_channel_get()
182 valp->val2 = priv->internal_temp % 256 * 1000000 / 256; in max17055_channel_get()
185 tmp = capacity_to_ma(config->rsense_mohms, priv->full_cap); in max17055_channel_get()
189 tmp = capacity_to_ma(config->rsense_mohms, priv->remaining_cap); in max17055_channel_get()
[all …]
/Zephyr-latest/tests/subsys/sip_svc/src/
Dmain.c39 struct private_data *priv = (struct private_data *)response->priv_data; in get_sync_callback() local
41 priv->time_end = k_cycle_get_64(); in get_sync_callback()
44 k_sem_give(&(priv->semaphore)); in get_sync_callback()
58 struct private_data priv; in sip_svc_send_sync_request() local
70 k_sem_init(&(priv.semaphore), 0, 1); in sip_svc_send_sync_request()
74 req.priv_data = (void *)&priv; in sip_svc_send_sync_request()
76 priv.time_start = k_cycle_get_64(); in sip_svc_send_sync_request()
80 err = k_sem_take(&(priv.semaphore), K_FOREVER); in sip_svc_send_sync_request()
83 t = k_cyc_to_us_ceil64(priv.time_end - priv.time_start); in sip_svc_send_sync_request()
99 struct private_data *priv = (struct private_data *)response->priv_data; in get_async_callback() local
[all …]
/Zephyr-latest/subsys/logging/backends/
Dlog_backend_ipc_service.c18 static void bound_cb(void *priv) in bound_cb() argument
20 struct log_multidomain_backend *backend_remote = priv; in bound_cb()
25 static void error_cb(const char *message, void *priv) in error_cb() argument
27 struct log_multidomain_backend *backend_remote = priv; in error_cb()
32 static void recv_cb(const void *data, size_t len, void *priv) in recv_cb() argument
34 struct log_multidomain_backend *backend_remote = priv; in recv_cb()
65 ept_cfg.priv = (void *)backend_remote; in backend_ipc_service_init()
/Zephyr-latest/subsys/logging/
Dlog_link_ipc_service.c21 static void bound_cb(void *priv) in bound_cb() argument
23 struct log_multidomain_link *link_remote = priv; in bound_cb()
28 static void error_cb(const char *message, void *priv) in error_cb() argument
30 struct log_multidomain_link *link_remote = priv; in error_cb()
35 static void recv_cb(const void *data, size_t len, void *priv) in recv_cb() argument
37 struct log_multidomain_link *link_remote = priv; in recv_cb()
67 ept_cfg.priv = (void *)link_remote; in link_ipc_service_init()
/Zephyr-latest/samples/subsys/sip_svc/src/
Dmain.c33 struct private_data *priv = (struct private_data *)response->priv_data; in get_voltage_callback() local
39 priv->voltage_channel0 = resp_data[1]; in get_voltage_callback()
42 k_sem_give(&(priv->semaphore)); in get_voltage_callback()
53 struct private_data priv; in main() local
67 k_sem_init(&(priv.semaphore), 0, 1); in main()
73 request.priv_data = (void *)&priv; in main()
101 err = k_sem_take(&(priv.semaphore), K_FOREVER); in main()
105 voltage = ((float)priv.voltage_channel0 / 65536); in main()
/Zephyr-latest/include/zephyr/ipc/
Dipc_service.h152 void (*bound)(void *priv);
166 void (*received)(const void *data, size_t len, void *priv);
173 void (*error)(const char *message, void *priv);
203 void *priv; member
/Zephyr-latest/tests/subsys/ipc/ipc_service/src/
Dmain.c10 static void received_cb(const void *data, size_t len, void *priv) in received_cb() argument
12 uintptr_t expected = (uintptr_t) priv; in received_cb()
47 ept_cfg.priv = (void *) 20; in ZTEST()
63 ept_cfg.priv = (void *) 30; in ZTEST()
/Zephyr-latest/subsys/bluetooth/mesh/shell/
Dpriv_beacon.c144 SHELL_CMD_ARG(priv-beacon-get, NULL, NULL, cmd_priv_beacon_get, 1, 0),
145 SHELL_CMD_ARG(priv-beacon-set, NULL, "<Val(off, on)> <RandInt(10s steps)>",
147 SHELL_CMD_ARG(priv-gatt-proxy-get, NULL, NULL, cmd_priv_gatt_proxy_get, 1, 0),
148 SHELL_CMD_ARG(priv-gatt-proxy-set, NULL, "Val(off, on)> ", cmd_priv_gatt_proxy_set,
150 SHELL_CMD_ARG(priv-node-id-get, NULL, "<NetKeyIdx>", cmd_priv_node_id_get, 2, 0),
151 SHELL_CMD_ARG(priv-node-id-set, NULL, "<NetKeyIdx> <State>", cmd_priv_node_id_set, 3,

1234