aptina-pll.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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. * You should have received a copy of the GNU General Public License
  16. * along with this program; if not, write to the Free Software
  17. * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
  18. * 02110-1301 USA
  19. */
  20. #ifndef __APTINA_PLL_H
  21. #define __APTINA_PLL_H
  22. struct aptina_pll {
  23. unsigned int ext_clock;
  24. unsigned int pix_clock;
  25. unsigned int n;
  26. unsigned int m;
  27. unsigned int p1;
  28. };
  29. struct aptina_pll_limits {
  30. unsigned int ext_clock_min;
  31. unsigned int ext_clock_max;
  32. unsigned int int_clock_min;
  33. unsigned int int_clock_max;
  34. unsigned int out_clock_min;
  35. unsigned int out_clock_max;
  36. unsigned int pix_clock_max;
  37. unsigned int n_min;
  38. unsigned int n_max;
  39. unsigned int m_min;
  40. unsigned int m_max;
  41. unsigned int p1_min;
  42. unsigned int p1_max;
  43. };
  44. struct device;
  45. int aptina_pll_calculate(struct device *dev,
  46. const struct aptina_pll_limits *limits,
  47. struct aptina_pll *pll);
  48. #endif /* __APTINA_PLL_H */