Lines Matching +full:data +full:- +full:transfer

1 /* SPDX-License-Identifier: GPL-2.0-only */
36 HSI_ARB_RR, /* Round-robin arbitration */
44 HSI_STATUS_COMPLETED, /* Message transfer is completed */
46 HSI_STATUS_PROCEEDING, /* Message transfer is ongoing */
48 HSI_STATUS_ERROR, /* Error when message transfer was ongoing */
58 * struct hsi_channel - channel resource used by the hsi clients
68 * struct hsi_config - Configuration for RX/TX HSI modules
90 * struct hsi_board_info - HSI client board info
96 * @platform_data: Platform related data
97 * @archdata: Architecture-dependent device data
121 * struct hsi_client - HSI client attached to an HSI port
138 static inline void hsi_client_set_drvdata(struct hsi_client *cl, void *data) in hsi_client_set_drvdata() argument
140 dev_set_drvdata(&cl->device, data); in hsi_client_set_drvdata()
145 return dev_get_drvdata(&cl->device); in hsi_client_drvdata()
153 * struct hsi_client_driver - Driver associated to an HSI client
167 driver_unregister(&drv->driver); in hsi_unregister_client_driver()
171 * struct hsi_msg - HSI message descriptor
173 * @cl: HSI device client that issues the transfer
175 * @context: Client context data associated to the transfer
176 * @complete: Transfer completion callback
178 * @status: Status of the transfer when completed
179 * @actual_len: Actual length of data transferred on completion
181 * @ttype: Transfer type (TX if set, RX otherwise)
182 * @break_frame: if true HSI will send/receive a break frame. Data buffers are
205 * struct hsi_port - HSI port device
213 * @async: Asynchronous transfer callback
216 * @start_tx: Callback to inform that a client wants to TX data
217 * @stop_tx: Callback to inform that a client no longer wishes to TX data
240 #define hsi_get_port(cl) to_hsi_port((cl)->device.parent)
248 return cl->pclaimed; in hsi_port_claimed()
251 static inline void hsi_port_set_drvdata(struct hsi_port *port, void *data) in hsi_port_set_drvdata() argument
253 dev_set_drvdata(&port->device, data); in hsi_port_set_drvdata()
258 return dev_get_drvdata(&port->device); in hsi_port_drvdata()
262 * struct hsi_controller - HSI controller device
285 int hsi_remove_client(struct device *dev, void *data);
300 void *data) in hsi_controller_set_drvdata() argument
302 dev_set_drvdata(&hsi->device, data); in hsi_controller_set_drvdata()
307 return dev_get_drvdata(&hsi->device); in hsi_controller_drvdata()
313 return (num < hsi->num_ports) ? hsi->port[num] : NULL; in hsi_find_port_num()
324 * hsi_id - Get HSI controller ID associated to a client
331 return to_hsi_controller(cl->device.parent->parent)->id; in hsi_id()
335 * hsi_port_id - Gets the port number a client is attached to
342 return to_hsi_port(cl->device.parent)->num; in hsi_port_id()
346 * hsi_setup - Configure the client's port
352 * Return -errno on failure, 0 on success
357 return -EACCES; in hsi_setup()
358 return hsi_get_port(cl)->setup(cl); in hsi_setup()
362 * hsi_flush - Flush all pending transactions on the client's port
368 * Return -errno on failure, 0 on success
373 return -EACCES; in hsi_flush()
374 return hsi_get_port(cl)->flush(cl); in hsi_flush()
378 * hsi_async_read - Submit a read transfer
380 * @msg: HSI message descriptor of the transfer
382 * Return -errno on failure, 0 on success
386 msg->ttype = HSI_MSG_READ; in hsi_async_read()
391 * hsi_async_write - Submit a write transfer
393 * @msg: HSI message descriptor of the transfer
395 * Return -errno on failure, 0 on success
399 msg->ttype = HSI_MSG_WRITE; in hsi_async_write()
404 * hsi_start_tx - Signal the port that the client wants to start a TX
407 * Return -errno on failure, 0 on success
412 return -EACCES; in hsi_start_tx()
413 return hsi_get_port(cl)->start_tx(cl); in hsi_start_tx()
417 * hsi_stop_tx - Signal the port that the client no longer wants to transmit
420 * Return -errno on failure, 0 on success
425 return -EACCES; in hsi_stop_tx()
426 return hsi_get_port(cl)->stop_tx(cl); in hsi_stop_tx()