1 /* SPDX-License-Identifier: GPL-2.0-only */ 2 /* 3 * s3c24xx/s3c64xx SoC series Camera Interface (CAMIF) driver 4 * 5 * Copyright (C) 2012 Sylwester Nawrocki <sylvester.nawrocki@gmail.com> 6 */ 7 8 #ifndef MEDIA_S3C_CAMIF_ 9 #define MEDIA_S3C_CAMIF_ 10 11 #include <linux/i2c.h> 12 #include <media/v4l2-mediabus.h> 13 14 /** 15 * struct s3c_camif_sensor_info - an image sensor description 16 * @i2c_board_info: pointer to an I2C sensor subdevice board info 17 * @clock_frequency: frequency of the clock the host provides to a sensor 18 * @mbus_type: media bus type 19 * @i2c_bus_num: i2c control bus id the sensor is attached to 20 * @flags: the parallel bus flags defining signals polarity (V4L2_MBUS_*) 21 * @use_field: 1 if parallel bus FIELD signal is used (only s3c64xx) 22 */ 23 struct s3c_camif_sensor_info { 24 struct i2c_board_info i2c_board_info; 25 unsigned long clock_frequency; 26 enum v4l2_mbus_type mbus_type; 27 u16 i2c_bus_num; 28 u16 flags; 29 u8 use_field; 30 }; 31 32 struct s3c_camif_plat_data { 33 struct s3c_camif_sensor_info sensor; 34 int (*gpio_get)(void); 35 int (*gpio_put)(void); 36 }; 37 38 /* Platform default helper functions */ 39 int s3c_camif_gpio_get(void); 40 int s3c_camif_gpio_put(void); 41 42 #endif /* MEDIA_S3C_CAMIF_ */ 43