/* * Copyright (c) 2013-2017, NVIDIA CORPORATION. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, * version 2, as published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #ifndef __TP2854_H__ #define __TP2854_H__ #include #include #define TP2854_IOCTL_SET_MODE _IOW('o', 1, struct tp2854_mode) //#define TP2854_IOCTL_GET_STATUS _IOR('o', 5, __u8) //#define TP2854_IOCTL_SET_POWER _IOW('o', 23, __u32) struct tp2854_mode { int res_x; int res_y; int fps; __u32 frame_length; __u32 coarse_time; __u32 coarse_time_short; __u16 gain; __u8 hdr_en; }; /* See notes in the nvc.h file on the GPIO usage */ enum tp2854_gpio_type { TP2854_GPIO_TYPE_PWRDN = 0, TP2854_GPIO_TYPE_RESET, }; struct tp2854_power_rail { struct regulator *dvdd; struct regulator *avdd; struct regulator *dovdd; }; struct tp2854_regulators { const char *avdd; const char *dvdd; const char *dovdd; }; struct tp2854_platform_data { unsigned cfg; unsigned num; const char *dev_name; unsigned gpio_count; /* see nvc.h GPIO notes */ struct nvc_gpio_pdata *gpio; /* see nvc.h GPIO notes */ struct nvc_imager_static_nvc *static_info; bool use_vcm_vdd; int (*probe_clock)(unsigned long); int (*power_on)(struct tp2854_power_rail *); int (*power_off)(struct tp2854_power_rail *); const char *mclk_name; struct nvc_imager_cap *cap; struct tp2854_regulators regulators; bool has_eeprom; bool use_cam_gpio; }; #endif /* __TP2854_H__ */