Lines Matching +full:ctrl +full:- +full:ids

1 /* SPDX-License-Identifier: GPL-2.0+ */
5 * Copyright (C) 2019-2022 Maximilian Luz <luzmaximilian@gmail.com>
28 /* -- Safe counters. -------------------------------------------------------- */
31 * struct ssh_seq_counter - Safe counter for SSH sequence IDs.
39 * struct ssh_rqid_counter - Safe counter for SSH request IDs.
47 /* -- Event/notification system. -------------------------------------------- */
50 * struct ssam_nf_head - Notifier head for SSAM events.
52 * @head: List-head for notifier blocks registered under this head.
60 * struct ssam_nf - Notifier callback- and activation-registry for SSAM events.
61 * @lock: Lock guarding (de-)registration of notifier blocks. Note: This
64 * @refcount: The root of the RB-tree used for reference-counting enabled
75 /* -- Event/async request completion system. -------------------------------- */
80 * struct ssam_event_item - Struct for event queuing and completion.
99 * struct ssam_event_queue - Queue for completing received events.
102 * @head: The list-head of the queue.
114 * struct ssam_event_target - Set of queues for a single SSH target ID.
122 * struct ssam_cplt - SSAM event/async request completion system.
142 /* -- Main SSAM device structures. ------------------------------------------ */
145 * enum ssam_controller_state - State values for &struct ssam_controller.
166 * struct ssam_controller_caps - Controller device capabilities.
169 * @screen_on_sleep_idle_timeout: SAM UART screen-on sleep idle timeout.
170 * @screen_off_sleep_idle_timeout: SAM UART screen-off sleep idle timeout.
184 * struct ssam_controller - SSAM controller device.
223 #define ssam_dbg(ctrl, fmt, ...) rtl_dbg(&(ctrl)->rtl, fmt, ##__VA_ARGS__) argument
224 #define ssam_info(ctrl, fmt, ...) rtl_info(&(ctrl)->rtl, fmt, ##__VA_ARGS__) argument
225 #define ssam_warn(ctrl, fmt, ...) rtl_warn(&(ctrl)->rtl, fmt, ##__VA_ARGS__) argument
226 #define ssam_err(ctrl, fmt, ...) rtl_err(&(ctrl)->rtl, fmt, ##__VA_ARGS__) argument
229 * ssam_controller_receive_buf() - Provide input-data to the controller.
230 * @ctrl: The controller.
235 * received via the lower-level transport.
238 * layer of the controller has been shut down, %-ESHUTDOWN.
241 ssize_t ssam_controller_receive_buf(struct ssam_controller *ctrl, const u8 *buf, in ssam_controller_receive_buf() argument
244 return ssh_ptl_rx_rcvbuf(&ctrl->rtl.ptl, buf, n); in ssam_controller_receive_buf()
248 * ssam_controller_write_wakeup() - Notify the controller that the underlying
250 * @ctrl: The controller.
252 static inline void ssam_controller_write_wakeup(struct ssam_controller *ctrl) in ssam_controller_write_wakeup() argument
254 ssh_ptl_tx_wakeup_transfer(&ctrl->rtl.ptl); in ssam_controller_write_wakeup()
257 int ssam_controller_init(struct ssam_controller *ctrl, struct serdev_device *s);
258 int ssam_controller_start(struct ssam_controller *ctrl);
259 void ssam_controller_shutdown(struct ssam_controller *ctrl);
260 void ssam_controller_destroy(struct ssam_controller *ctrl);
262 int ssam_notifier_disable_registered(struct ssam_controller *ctrl);
263 void ssam_notifier_restore_registered(struct ssam_controller *ctrl);
265 int ssam_irq_setup(struct ssam_controller *ctrl);
266 void ssam_irq_free(struct ssam_controller *ctrl);
267 int ssam_irq_arm_for_wakeup(struct ssam_controller *ctrl);
268 void ssam_irq_disarm_wakeup(struct ssam_controller *ctrl);
273 int ssam_get_firmware_version(struct ssam_controller *ctrl, u32 *version);
274 int ssam_ctrl_notif_display_off(struct ssam_controller *ctrl);
275 int ssam_ctrl_notif_display_on(struct ssam_controller *ctrl);
276 int ssam_ctrl_notif_d0_exit(struct ssam_controller *ctrl);
277 int ssam_ctrl_notif_d0_entry(struct ssam_controller *ctrl);
279 int ssam_controller_suspend(struct ssam_controller *ctrl);
280 int ssam_controller_resume(struct ssam_controller *ctrl);