fimc-is-sensor.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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. #include <linux/of.h>
  16. #include <linux/types.h>
  17. #define S5K6A3_OPEN_TIMEOUT 2000 /* ms */
  18. #define S5K6A3_SENSOR_WIDTH 1392
  19. #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
  27. };
  28. #define IS_SENSOR_CTRL_BUS_I2C0 0
  29. #define IS_SENSOR_CTRL_BUS_I2C1 1
  30. struct sensor_drv_data {
  31. enum fimc_is_sensor_id id;
  32. /* sensor open timeout in ms */
  33. unsigned short open_timeout;
  34. };
  35. /**
  36. * struct fimc_is_sensor - fimc-is sensor data structure
  37. * @drvdata: a pointer to the sensor's parameters data structure
  38. * @i2c_bus: ISP I2C bus index (0...1)
  39. * @test_pattern: true to enable video test pattern
  40. */
  41. struct fimc_is_sensor {
  42. const struct sensor_drv_data *drvdata;
  43. unsigned int i2c_bus;
  44. u8 test_pattern;
  45. };
  46. const struct sensor_drv_data *fimc_is_sensor_get_drvdata(
  47. struct device_node *node);
  48. #endif /* FIMC_IS_SENSOR_H_ */