2 * Support for Intel Camera Imaging ISP subsystem.
3 * Copyright (c) 2015, Intel Corporation.
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms and conditions of the GNU General Public License,
7 * version 2, as published by the Free Software Foundation.
9 * This program is distributed in the hope it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
15 #ifndef __INPUT_SYSTEM_PRIVATE_H_INCLUDED__
16 #define __INPUT_SYSTEM_PRIVATE_H_INCLUDED__
18 #include "input_system_public.h"
20 STORAGE_CLASS_INPUT_SYSTEM_C input_system_err_t input_system_get_state(
21 const input_system_ID_t ID,
22 input_system_state_t *state)
28 /* get the states of all CSI RX frontend devices */
29 for (i = 0; i < N_CSI_RX_FRONTEND_ID; i++) {
30 csi_rx_fe_ctrl_get_state(
31 (csi_rx_frontend_ID_t)i,
32 &(state->csi_rx_fe_ctrl_state[i]));
35 /* get the states of all CIS RX backend devices */
36 for (i = 0; i < N_CSI_RX_BACKEND_ID; i++) {
37 csi_rx_be_ctrl_get_state(
38 (csi_rx_backend_ID_t)i,
39 &(state->csi_rx_be_ctrl_state[i]));
42 /* get the states of all pixelgen devices */
43 for (i = 0; i < N_PIXELGEN_ID; i++) {
44 pixelgen_ctrl_get_state(
46 &(state->pixelgen_ctrl_state[i]));
49 /* get the states of all stream2mmio devices */
50 for (i = 0; i < N_STREAM2MMIO_ID; i++) {
51 stream2mmio_get_state(
53 &(state->stream2mmio_state[i]));
56 /* get the states of all ibuf-controller devices */
57 for (i = 0; i < N_IBUF_CTRL_ID; i++) {
60 &(state->ibuf_ctrl_state[i]));
63 /* get the states of all isys irq controllers */
64 for (i = 0; i < N_ISYS_IRQ_ID; i++) {
65 isys_irqc_state_get((isys_irq_ID_t)i, &(state->isys_irqc_state[i]));
68 /* TODO: get the states of all ISYS2401 DMA devices */
69 for (i = 0; i < N_ISYS2401_DMA_ID; i++) {
72 return INPUT_SYSTEM_ERR_NO_ERROR;
74 STORAGE_CLASS_INPUT_SYSTEM_C void input_system_dump_state(
75 const input_system_ID_t ID,
76 input_system_state_t *state)
82 /* dump the states of all CSI RX frontend devices */
83 for (i = 0; i < N_CSI_RX_FRONTEND_ID; i++) {
84 csi_rx_fe_ctrl_dump_state(
85 (csi_rx_frontend_ID_t)i,
86 &(state->csi_rx_fe_ctrl_state[i]));
89 /* dump the states of all CIS RX backend devices */
90 for (i = 0; i < N_CSI_RX_BACKEND_ID; i++) {
91 csi_rx_be_ctrl_dump_state(
92 (csi_rx_backend_ID_t)i,
93 &(state->csi_rx_be_ctrl_state[i]));
96 /* dump the states of all pixelgen devices */
97 for (i = 0; i < N_PIXELGEN_ID; i++) {
98 pixelgen_ctrl_dump_state(
100 &(state->pixelgen_ctrl_state[i]));
103 /* dump the states of all st2mmio devices */
104 for (i = 0; i < N_STREAM2MMIO_ID; i++) {
105 stream2mmio_dump_state(
107 &(state->stream2mmio_state[i]));
110 /* dump the states of all ibuf-controller devices */
111 for (i = 0; i < N_IBUF_CTRL_ID; i++) {
112 ibuf_ctrl_dump_state(
114 &(state->ibuf_ctrl_state[i]));
117 /* dump the states of all isys irq controllers */
118 for (i = 0; i < N_ISYS_IRQ_ID; i++) {
119 isys_irqc_state_dump((isys_irq_ID_t)i, &(state->isys_irqc_state[i]));
122 /* TODO: dump the states of all ISYS2401 DMA devices */
123 for (i = 0; i < N_ISYS2401_DMA_ID; i++) {
128 #endif /* __INPUT_SYSTEM_PRIVATE_H_INCLUDED__ */