1 /* SPDX-License-Identifier: GPL-2.0 */ 2 /* 3 * Support for Intel Camera Imaging ISP subsystem. 4 * Copyright (c) 2015, Intel Corporation. 5 */ 6 7 #ifndef __GP_DEVICE_PUBLIC_H_INCLUDED__ 8 #define __GP_DEVICE_PUBLIC_H_INCLUDED__ 9 10 #include "system_local.h" 11 12 typedef struct gp_device_state_s gp_device_state_t; 13 14 /*! Read the state of GP_DEVICE[ID] 15 16 \param ID[in] GP_DEVICE identifier 17 \param state[out] gp device state structure 18 19 \return none, state = GP_DEVICE[ID].state 20 */ 21 void gp_device_get_state( 22 const gp_device_ID_t ID, 23 gp_device_state_t *state); 24 25 /*! Write to a control register of GP_DEVICE[ID] 26 27 \param ID[in] GP_DEVICE identifier 28 \param reg_addr[in] register byte address 29 \param value[in] The data to be written 30 31 \return none, GP_DEVICE[ID].ctrl[reg] = value 32 */ 33 STORAGE_CLASS_GP_DEVICE_H void gp_device_reg_store( 34 const gp_device_ID_t ID, 35 const unsigned int reg_addr, 36 const hrt_data value); 37 38 /*! Read from a control register of GP_DEVICE[ID] 39 40 \param ID[in] GP_DEVICE identifier 41 \param reg_addr[in] register byte address 42 \param value[in] The data to be written 43 44 \return GP_DEVICE[ID].ctrl[reg] 45 */ 46 STORAGE_CLASS_GP_DEVICE_H hrt_data gp_device_reg_load( 47 const gp_device_ID_t ID, 48 const hrt_address reg_addr); 49 50 #endif /* __GP_DEVICE_PUBLIC_H_INCLUDED__ */ 51