123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130 |
- #include "smcinvoke_object.h"
- typedef struct {
- uint32_t version;
- uint32_t protect;
- uint32_t csid_hw_idx_mask;
- uint32_t cdm_hw_idx_mask;
- uint64_t vc_mask;
- uint64_t phy_lane_sel_mask;
- uint64_t reserved;
- } ITCDriverSensorInfo;
- #define ITrustedCameraDriver_ERROR_NOT_ALLOWED 10
- #define ITrustedCameraDriver_OP_dynamicProtectSensor 0
- #define ITrustedCameraDriver_OP_getVersion 1
- #define ITrustedCameraDriver_OP_dynamicConfigureFDPort 3
- static inline int32_t
- ITrustedCameraDriver_release(struct Object self)
- {
- return Object_invoke(self, Object_OP_release, 0, 0);
- }
- static inline int32_t
- ITrustedCameraDriver_retain(struct Object self)
- {
- return Object_invoke(self, Object_OP_retain, 0, 0);
- }
- static inline int32_t
- ITrustedCameraDriver_dynamicProtectSensor(struct Object self,
- const ITCDriverSensorInfo *phy_info_ptr)
- {
- union ObjectArg a[1] = {{{0, 0}}};
- a[0].bi = (struct ObjectBufIn) { phy_info_ptr, sizeof(ITCDriverSensorInfo) };
- return Object_invoke(self, ITrustedCameraDriver_OP_dynamicProtectSensor, a,
- ObjectCounts_pack(1, 0, 0, 0));
- }
- static inline int32_t
- ITrustedCameraDriver_getVersion(struct Object self, uint32_t *arch_ver_ptr,
- uint32_t *max_ver_ptr, uint32_t *min_ver_ptr)
- {
- union ObjectArg a[1] = {{{0, 0}}};
- int32_t result;
- struct {
- uint32_t m_arch_ver;
- uint32_t m_max_ver;
- uint32_t m_min_ver;
- } o = {0};
- a[0].b = (struct ObjectBuf) { &o, 12 };
- result = Object_invoke(self, ITrustedCameraDriver_OP_getVersion, a,
- ObjectCounts_pack(0, 1, 0, 0));
- *arch_ver_ptr = o.m_arch_ver;
- *max_ver_ptr = o.m_max_ver;
- *min_ver_ptr = o.m_min_ver;
- return result;
- }
- static inline int32_t
- ITrustedCameraDriver_dynamicConfigureFDPort(struct Object self, uint32_t protect)
- {
- union ObjectArg a[1] = {{{0, 0}}};
- a[0].b = (struct ObjectBuf) { &protect, sizeof(uint32_t) };
- return Object_invoke(self, ITrustedCameraDriver_OP_dynamicConfigureFDPort, a,
- ObjectCounts_pack(1, 0, 0, 0));
- }
|