gpio: rcar: Fix runtime PM imbalance on error
[linux/fpc-iii.git] / drivers / media / platform / exynos4-is / fimc-is-sensor.h
blob9aefc63889dee0963ea150c9e75bb5c257de9ee0
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /*
3 * Samsung EXYNOS4x12 FIMC-IS (Imaging Subsystem) driver
5 * Copyright (C) 2013 Samsung Electronics Co., Ltd.
7 * Authors: Sylwester Nawrocki <s.nawrocki@samsung.com>
8 * Younghwan Joo <yhwan.joo@samsung.com>
9 */
10 #ifndef FIMC_IS_SENSOR_H_
11 #define FIMC_IS_SENSOR_H_
13 #include <linux/of.h>
14 #include <linux/types.h>
16 #define S5K6A3_OPEN_TIMEOUT 2000 /* ms */
17 #define S5K6A3_SENSOR_WIDTH 1392
18 #define S5K6A3_SENSOR_HEIGHT 1392
20 enum fimc_is_sensor_id {
21 FIMC_IS_SENSOR_ID_S5K3H2 = 1,
22 FIMC_IS_SENSOR_ID_S5K6A3,
23 FIMC_IS_SENSOR_ID_S5K4E5,
24 FIMC_IS_SENSOR_ID_S5K3H7,
25 FIMC_IS_SENSOR_ID_CUSTOM,
26 FIMC_IS_SENSOR_ID_END
29 #define IS_SENSOR_CTRL_BUS_I2C0 0
30 #define IS_SENSOR_CTRL_BUS_I2C1 1
32 struct sensor_drv_data {
33 enum fimc_is_sensor_id id;
34 /* sensor open timeout in ms */
35 unsigned short open_timeout;
38 /**
39 * struct fimc_is_sensor - fimc-is sensor data structure
40 * @drvdata: a pointer to the sensor's parameters data structure
41 * @i2c_bus: ISP I2C bus index (0...1)
42 * @test_pattern: true to enable video test pattern
44 struct fimc_is_sensor {
45 const struct sensor_drv_data *drvdata;
46 unsigned int i2c_bus;
47 u8 test_pattern;
50 const struct sensor_drv_data *fimc_is_sensor_get_drvdata(
51 struct device_node *node);
53 #endif /* FIMC_IS_SENSOR_H_ */