aptina-pll.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /*
  2. * Aptina Sensor PLL Configuration
  3. *
  4. * Copyright (C) 2012 Laurent Pinchart <laurent.pinchart@ideasonboard.com>
  5. *
  6. * This program is free software; you can redistribute it and/or
  7. * modify it under the terms of the GNU General Public License
  8. * version 2 as published by the Free Software Foundation.
  9. *
  10. * This program is distributed in the hope that it will be useful, but
  11. * WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  13. * General Public License for more details.
  14. */
  15. #ifndef __APTINA_PLL_H
  16. #define __APTINA_PLL_H
  17. struct aptina_pll {
  18. unsigned int ext_clock;
  19. unsigned int pix_clock;
  20. unsigned int n;
  21. unsigned int m;
  22. unsigned int p1;
  23. };
  24. struct aptina_pll_limits {
  25. unsigned int ext_clock_min;
  26. unsigned int ext_clock_max;
  27. unsigned int int_clock_min;
  28. unsigned int int_clock_max;
  29. unsigned int out_clock_min;
  30. unsigned int out_clock_max;
  31. unsigned int pix_clock_max;
  32. unsigned int n_min;
  33. unsigned int n_max;
  34. unsigned int m_min;
  35. unsigned int m_max;
  36. unsigned int p1_min;
  37. unsigned int p1_max;
  38. };
  39. struct device;
  40. int aptina_pll_calculate(struct device *dev,
  41. const struct aptina_pll_limits *limits,
  42. struct aptina_pll *pll);
  43. #endif /* __APTINA_PLL_H */