m5602_s5k83a.h 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. /*
  2. * Driver for the s5k83a sensor
  3. *
  4. * Copyright (C) 2008 Erik Andrén
  5. * Copyright (C) 2007 Ilyes Gouta. Based on the m5603x Linux Driver Project.
  6. * Copyright (C) 2005 m5603x Linux Driver Project <m5602@x3ng.com.br>
  7. *
  8. * Portions of code to USB interface and ALi driver software,
  9. * Copyright (c) 2006 Willem Duinker
  10. * v4l2 interface modeled after the V4L2 driver
  11. * for SN9C10x PC Camera Controllers
  12. *
  13. * This program is free software; you can redistribute it and/or
  14. * modify it under the terms of the GNU General Public License as
  15. * published by the Free Software Foundation, version 2.
  16. *
  17. */
  18. #ifndef M5602_S5K83A_H_
  19. #define M5602_S5K83A_H_
  20. #include "m5602_sensor.h"
  21. #define S5K83A_FLIP 0x01
  22. #define S5K83A_HFLIP_TUNE 0x03
  23. #define S5K83A_VFLIP_TUNE 0x05
  24. #define S5K83A_BRIGHTNESS 0x0a
  25. #define S5K83A_EXPOSURE 0x18
  26. #define S5K83A_GAIN 0x1b
  27. #define S5K83A_PAGE_MAP 0xec
  28. #define S5K83A_DEFAULT_GAIN 0x71
  29. #define S5K83A_DEFAULT_BRIGHTNESS 0x7e
  30. #define S5K83A_DEFAULT_EXPOSURE 0x00
  31. #define S5K83A_MAXIMUM_EXPOSURE 0x3c
  32. #define S5K83A_FLIP_MASK 0x10
  33. #define S5K83A_GPIO_LED_MASK 0x10
  34. #define S5K83A_GPIO_ROTATION_MASK 0x40
  35. /*****************************************************************************/
  36. /* Kernel module parameters */
  37. extern int force_sensor;
  38. extern bool dump_sensor;
  39. int s5k83a_probe(struct sd *sd);
  40. int s5k83a_init(struct sd *sd);
  41. int s5k83a_init_controls(struct sd *sd);
  42. int s5k83a_start(struct sd *sd);
  43. int s5k83a_stop(struct sd *sd);
  44. void s5k83a_disconnect(struct sd *sd);
  45. static const struct m5602_sensor s5k83a = {
  46. .name = "S5K83A",
  47. .probe = s5k83a_probe,
  48. .init = s5k83a_init,
  49. .init_controls = s5k83a_init_controls,
  50. .start = s5k83a_start,
  51. .stop = s5k83a_stop,
  52. .disconnect = s5k83a_disconnect,
  53. .i2c_slave_id = 0x5a,
  54. .i2c_regW = 2,
  55. };
  56. #endif