s3c_camif.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /*
  2. * s3c24xx/s3c64xx SoC series Camera Interface (CAMIF) driver
  3. *
  4. * Copyright (C) 2012 Sylwester Nawrocki <sylvester.nawrocki@gmail.com>
  5. *
  6. * This program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License version 2 as
  8. * published by the Free Software Foundation.
  9. */
  10. #ifndef MEDIA_S3C_CAMIF_
  11. #define MEDIA_S3C_CAMIF_
  12. #include <linux/i2c.h>
  13. #include <media/v4l2-mediabus.h>
  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. struct s3c_camif_plat_data {
  32. struct s3c_camif_sensor_info sensor;
  33. int (*gpio_get)(void);
  34. int (*gpio_put)(void);
  35. };
  36. /* Platform default helper functions */
  37. int s3c_camif_gpio_get(void);
  38. int s3c_camif_gpio_put(void);
  39. #endif /* MEDIA_S3C_CAMIF_ */