atmel-pwm-bl.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /*
  2. * Copyright (C) 2007 Atmel Corporation
  3. *
  4. * Driver for the AT32AP700X PS/2 controller (PSIF).
  5. *
  6. * This program is free software; you can redistribute it and/or modify it
  7. * under the terms of the GNU General Public License version 2 as published
  8. * by the Free Software Foundation.
  9. */
  10. #ifndef __INCLUDE_ATMEL_PWM_BL_H
  11. #define __INCLUDE_ATMEL_PWM_BL_H
  12. /**
  13. * struct atmel_pwm_bl_platform_data
  14. * @pwm_channel: which PWM channel in the PWM module to use.
  15. * @pwm_frequency: PWM frequency to generate, the driver will try to be as
  16. * close as the prescaler allows.
  17. * @pwm_compare_max: value to use in the PWM channel compare register.
  18. * @pwm_duty_max: maximum duty cycle value, must be less than or equal to
  19. * pwm_compare_max.
  20. * @pwm_duty_min: minimum duty cycle value, must be less than pwm_duty_max.
  21. * @pwm_active_low: set to one if the low part of the PWM signal increases the
  22. * brightness of the backlight.
  23. * @gpio_on: GPIO line to control the backlight on/off, set to -1 if not used.
  24. * @on_active_low: set to one if the on/off signal is on when GPIO is low.
  25. *
  26. * This struct must be added to the platform device in the board code. It is
  27. * used by the atmel-pwm-bl driver to setup the GPIO to control on/off and the
  28. * PWM device.
  29. */
  30. struct atmel_pwm_bl_platform_data {
  31. unsigned int pwm_channel;
  32. unsigned int pwm_frequency;
  33. unsigned int pwm_compare_max;
  34. unsigned int pwm_duty_max;
  35. unsigned int pwm_duty_min;
  36. unsigned int pwm_active_low;
  37. int gpio_on;
  38. unsigned int on_active_low;
  39. };
  40. #endif /* __INCLUDE_ATMEL_PWM_BL_H */