1f5fbb83fSMauro Carvalho Chehab /* SPDX-License-Identifier: GPL-2.0 */ 29d4fa1a1SMauro Carvalho Chehab /* 39d4fa1a1SMauro Carvalho Chehab * Support for Intel Camera Imaging ISP subsystem. 49d4fa1a1SMauro Carvalho Chehab * Copyright (c) 2015, Intel Corporation. 59d4fa1a1SMauro Carvalho Chehab * 69d4fa1a1SMauro Carvalho Chehab * This program is free software; you can redistribute it and/or modify it 79d4fa1a1SMauro Carvalho Chehab * under the terms and conditions of the GNU General Public License, 89d4fa1a1SMauro Carvalho Chehab * version 2, as published by the Free Software Foundation. 99d4fa1a1SMauro Carvalho Chehab * 109d4fa1a1SMauro Carvalho Chehab * This program is distributed in the hope it will be useful, but WITHOUT 119d4fa1a1SMauro Carvalho Chehab * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 129d4fa1a1SMauro Carvalho Chehab * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 139d4fa1a1SMauro Carvalho Chehab * more details. 149d4fa1a1SMauro Carvalho Chehab */ 159d4fa1a1SMauro Carvalho Chehab 169d4fa1a1SMauro Carvalho Chehab #ifndef __CSI_RX_PUBLIC_H_INCLUDED__ 179d4fa1a1SMauro Carvalho Chehab #define __CSI_RX_PUBLIC_H_INCLUDED__ 189d4fa1a1SMauro Carvalho Chehab 199d4fa1a1SMauro Carvalho Chehab #ifdef USE_INPUT_SYSTEM_VERSION_2401 209d4fa1a1SMauro Carvalho Chehab /***************************************************** 219d4fa1a1SMauro Carvalho Chehab * 229d4fa1a1SMauro Carvalho Chehab * Native command interface (NCI). 239d4fa1a1SMauro Carvalho Chehab * 249d4fa1a1SMauro Carvalho Chehab *****************************************************/ 259d4fa1a1SMauro Carvalho Chehab /** 269d4fa1a1SMauro Carvalho Chehab * @brief Get the csi rx frontend state. 279d4fa1a1SMauro Carvalho Chehab * Get the state of the csi rx frontend regiester-set. 289d4fa1a1SMauro Carvalho Chehab * 299d4fa1a1SMauro Carvalho Chehab * @param[in] id The global unique ID of the csi rx fe controller. 309d4fa1a1SMauro Carvalho Chehab * @param[out] state Point to the register-state. 319d4fa1a1SMauro Carvalho Chehab */ 329d4fa1a1SMauro Carvalho Chehab void csi_rx_fe_ctrl_get_state( 339d4fa1a1SMauro Carvalho Chehab const csi_rx_frontend_ID_t ID, 349d4fa1a1SMauro Carvalho Chehab csi_rx_fe_ctrl_state_t *state); 359d4fa1a1SMauro Carvalho Chehab /** 369d4fa1a1SMauro Carvalho Chehab * @brief Dump the csi rx frontend state. 379d4fa1a1SMauro Carvalho Chehab * Dump the state of the csi rx frontend regiester-set. 389d4fa1a1SMauro Carvalho Chehab * 399d4fa1a1SMauro Carvalho Chehab * @param[in] id The global unique ID of the csi rx fe controller. 409d4fa1a1SMauro Carvalho Chehab * @param[in] state Point to the register-state. 419d4fa1a1SMauro Carvalho Chehab */ 429d4fa1a1SMauro Carvalho Chehab void csi_rx_fe_ctrl_dump_state( 439d4fa1a1SMauro Carvalho Chehab const csi_rx_frontend_ID_t ID, 449d4fa1a1SMauro Carvalho Chehab csi_rx_fe_ctrl_state_t *state); 459d4fa1a1SMauro Carvalho Chehab /** 469d4fa1a1SMauro Carvalho Chehab * @brief Get the state of the csi rx fe dlane. 479d4fa1a1SMauro Carvalho Chehab * Get the state of the register set per dlane process. 489d4fa1a1SMauro Carvalho Chehab * 499d4fa1a1SMauro Carvalho Chehab * @param[in] id The global unique ID of the input-buffer controller. 509d4fa1a1SMauro Carvalho Chehab * @param[in] lane The lane ID. 519d4fa1a1SMauro Carvalho Chehab * @param[out] state Point to the dlane state. 529d4fa1a1SMauro Carvalho Chehab */ 539d4fa1a1SMauro Carvalho Chehab void csi_rx_fe_ctrl_get_dlane_state( 549d4fa1a1SMauro Carvalho Chehab const csi_rx_frontend_ID_t ID, 559d4fa1a1SMauro Carvalho Chehab const u32 lane, 569d4fa1a1SMauro Carvalho Chehab csi_rx_fe_ctrl_lane_t *dlane_state); 579d4fa1a1SMauro Carvalho Chehab /** 589d4fa1a1SMauro Carvalho Chehab * @brief Get the csi rx backend state. 599d4fa1a1SMauro Carvalho Chehab * Get the state of the csi rx backend regiester-set. 609d4fa1a1SMauro Carvalho Chehab * 619d4fa1a1SMauro Carvalho Chehab * @param[in] id The global unique ID of the csi rx be controller. 629d4fa1a1SMauro Carvalho Chehab * @param[out] state Point to the register-state. 639d4fa1a1SMauro Carvalho Chehab */ 649d4fa1a1SMauro Carvalho Chehab void csi_rx_be_ctrl_get_state( 659d4fa1a1SMauro Carvalho Chehab const csi_rx_backend_ID_t ID, 669d4fa1a1SMauro Carvalho Chehab csi_rx_be_ctrl_state_t *state); 679d4fa1a1SMauro Carvalho Chehab /** 689d4fa1a1SMauro Carvalho Chehab * @brief Dump the csi rx backend state. 699d4fa1a1SMauro Carvalho Chehab * Dump the state of the csi rx backend regiester-set. 709d4fa1a1SMauro Carvalho Chehab * 719d4fa1a1SMauro Carvalho Chehab * @param[in] id The global unique ID of the csi rx be controller. 729d4fa1a1SMauro Carvalho Chehab * @param[in] state Point to the register-state. 739d4fa1a1SMauro Carvalho Chehab */ 749d4fa1a1SMauro Carvalho Chehab void csi_rx_be_ctrl_dump_state( 759d4fa1a1SMauro Carvalho Chehab const csi_rx_backend_ID_t ID, 769d4fa1a1SMauro Carvalho Chehab csi_rx_be_ctrl_state_t *state); 779d4fa1a1SMauro Carvalho Chehab /* end of NCI */ 789d4fa1a1SMauro Carvalho Chehab 799d4fa1a1SMauro Carvalho Chehab /***************************************************** 809d4fa1a1SMauro Carvalho Chehab * 819d4fa1a1SMauro Carvalho Chehab * Device level interface (DLI). 829d4fa1a1SMauro Carvalho Chehab * 839d4fa1a1SMauro Carvalho Chehab *****************************************************/ 849d4fa1a1SMauro Carvalho Chehab /** 859d4fa1a1SMauro Carvalho Chehab * @brief Load the register value. 869d4fa1a1SMauro Carvalho Chehab * Load the value of the register of the csi rx fe. 879d4fa1a1SMauro Carvalho Chehab * 889d4fa1a1SMauro Carvalho Chehab * @param[in] ID The global unique ID for the ibuf-controller instance. 899d4fa1a1SMauro Carvalho Chehab * @param[in] reg The offset address of the register. 909d4fa1a1SMauro Carvalho Chehab * 919d4fa1a1SMauro Carvalho Chehab * @return the value of the register. 929d4fa1a1SMauro Carvalho Chehab */ 939d4fa1a1SMauro Carvalho Chehab hrt_data csi_rx_fe_ctrl_reg_load( 949d4fa1a1SMauro Carvalho Chehab const csi_rx_frontend_ID_t ID, 959d4fa1a1SMauro Carvalho Chehab const hrt_address reg); 969d4fa1a1SMauro Carvalho Chehab /** 979d4fa1a1SMauro Carvalho Chehab * @brief Store a value to the register. 989d4fa1a1SMauro Carvalho Chehab * Store a value to the registe of the csi rx fe. 999d4fa1a1SMauro Carvalho Chehab * 1009d4fa1a1SMauro Carvalho Chehab * @param[in] ID The global unique ID for the ibuf-controller instance. 1019d4fa1a1SMauro Carvalho Chehab * @param[in] reg The offset address of the register. 1029d4fa1a1SMauro Carvalho Chehab * @param[in] value The value to be stored. 1039d4fa1a1SMauro Carvalho Chehab * 1049d4fa1a1SMauro Carvalho Chehab */ 1059d4fa1a1SMauro Carvalho Chehab void csi_rx_fe_ctrl_reg_store( 1069d4fa1a1SMauro Carvalho Chehab const csi_rx_frontend_ID_t ID, 1079d4fa1a1SMauro Carvalho Chehab const hrt_address reg, 1089d4fa1a1SMauro Carvalho Chehab const hrt_data value); 1099d4fa1a1SMauro Carvalho Chehab /** 1109d4fa1a1SMauro Carvalho Chehab * @brief Load the register value. 1119d4fa1a1SMauro Carvalho Chehab * Load the value of the register of the csirx be. 1129d4fa1a1SMauro Carvalho Chehab * 1139d4fa1a1SMauro Carvalho Chehab * @param[in] ID The global unique ID for the ibuf-controller instance. 1149d4fa1a1SMauro Carvalho Chehab * @param[in] reg The offset address of the register. 1159d4fa1a1SMauro Carvalho Chehab * 1169d4fa1a1SMauro Carvalho Chehab * @return the value of the register. 1179d4fa1a1SMauro Carvalho Chehab */ 1189d4fa1a1SMauro Carvalho Chehab hrt_data csi_rx_be_ctrl_reg_load( 1199d4fa1a1SMauro Carvalho Chehab const csi_rx_backend_ID_t ID, 1209d4fa1a1SMauro Carvalho Chehab const hrt_address reg); 1219d4fa1a1SMauro Carvalho Chehab /** 1229d4fa1a1SMauro Carvalho Chehab * @brief Store a value to the register. 1239d4fa1a1SMauro Carvalho Chehab * Store a value to the registe of the csi rx be. 1249d4fa1a1SMauro Carvalho Chehab * 1259d4fa1a1SMauro Carvalho Chehab * @param[in] ID The global unique ID for the ibuf-controller instance. 1269d4fa1a1SMauro Carvalho Chehab * @param[in] reg The offset address of the register. 1279d4fa1a1SMauro Carvalho Chehab * @param[in] value The value to be stored. 1289d4fa1a1SMauro Carvalho Chehab * 1299d4fa1a1SMauro Carvalho Chehab */ 1309d4fa1a1SMauro Carvalho Chehab void csi_rx_be_ctrl_reg_store( 1319d4fa1a1SMauro Carvalho Chehab const csi_rx_backend_ID_t ID, 1329d4fa1a1SMauro Carvalho Chehab const hrt_address reg, 1339d4fa1a1SMauro Carvalho Chehab const hrt_data value); 1349d4fa1a1SMauro Carvalho Chehab /* end of DLI */ 1359d4fa1a1SMauro Carvalho Chehab #endif /* USE_INPUT_SYSTEM_VERSION_2401 */ 1369d4fa1a1SMauro Carvalho Chehab #endif /* __CSI_RX_PUBLIC_H_INCLUDED__ */ 137