Merge remote-tracking branch 'unicore32/unicore32'
[deliverable/linux.git] / drivers / media / platform / exynos4-is / fimc-is-sensor.h
CommitLineData
b8d9834a
SN
1/*
2 * Samsung EXYNOS4x12 FIMC-IS (Imaging Subsystem) driver
3 *
4 * Copyright (C) 2013 Samsung Electronics Co., Ltd.
5 *
6 * Authors: Sylwester Nawrocki <s.nawrocki@samsung.com>
7 * Younghwan Joo <yhwan.joo@samsung.com>
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
12 */
13#ifndef FIMC_IS_SENSOR_H_
14#define FIMC_IS_SENSOR_H_
15
d265d9ac
SN
16#include <linux/of.h>
17#include <linux/types.h>
b8d9834a 18
d265d9ac 19#define S5K6A3_OPEN_TIMEOUT 2000 /* ms */
b8d9834a
SN
20#define S5K6A3_SENSOR_WIDTH 1392
21#define S5K6A3_SENSOR_HEIGHT 1392
22
b8d9834a
SN
23enum fimc_is_sensor_id {
24 FIMC_IS_SENSOR_ID_S5K3H2 = 1,
25 FIMC_IS_SENSOR_ID_S5K6A3,
26 FIMC_IS_SENSOR_ID_S5K4E5,
27 FIMC_IS_SENSOR_ID_S5K3H7,
28 FIMC_IS_SENSOR_ID_CUSTOM,
29 FIMC_IS_SENSOR_ID_END
30};
31
32#define IS_SENSOR_CTRL_BUS_I2C0 0
33#define IS_SENSOR_CTRL_BUS_I2C1 1
34
35struct sensor_drv_data {
36 enum fimc_is_sensor_id id;
d265d9ac
SN
37 /* sensor open timeout in ms */
38 unsigned short open_timeout;
b8d9834a
SN
39};
40
41/**
42 * struct fimc_is_sensor - fimc-is sensor data structure
b8d9834a
SN
43 * @drvdata: a pointer to the sensor's parameters data structure
44 * @i2c_bus: ISP I2C bus index (0...1)
45 * @test_pattern: true to enable video test pattern
b8d9834a
SN
46 */
47struct fimc_is_sensor {
b8d9834a
SN
48 const struct sensor_drv_data *drvdata;
49 unsigned int i2c_bus;
d265d9ac 50 u8 test_pattern;
b8d9834a
SN
51};
52
d265d9ac
SN
53const struct sensor_drv_data *fimc_is_sensor_get_drvdata(
54 struct device_node *node);
b8d9834a
SN
55
56#endif /* FIMC_IS_SENSOR_H_ */
This page took 0.21495 seconds and 5 git commands to generate.