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