leds-pmic8058.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /* Copyright (c) 2010, The Linux Foundation. All rights reserved.
  2. *
  3. * This program is free software; you can redistribute it and/or modify
  4. * it under the terms of the GNU General Public License version 2 and
  5. * only version 2 as published by the Free Software Foundation.
  6. *
  7. * This program is distributed in the hope that it will be useful,
  8. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. * GNU General Public License for more details.
  11. *
  12. */
  13. #ifndef __LEDS_PMIC8058_H__
  14. #define __LEDS_PMIC8058_H__
  15. enum pmic8058_leds {
  16. PMIC8058_ID_LED_KB_LIGHT = 1,
  17. PMIC8058_ID_LED_0,
  18. PMIC8058_ID_LED_1,
  19. PMIC8058_ID_LED_2,
  20. PMIC8058_ID_FLASH_LED_0,
  21. PMIC8058_ID_FLASH_LED_1,
  22. };
  23. struct pmic8058_led {
  24. const char *name;
  25. const char *default_trigger;
  26. unsigned max_brightness;
  27. int id;
  28. };
  29. struct pmic8058_leds_platform_data {
  30. int num_leds;
  31. struct pmic8058_led *leds;
  32. };
  33. int pm8058_set_flash_led_current(enum pmic8058_leds id, unsigned mA);
  34. int pm8058_set_led_current(enum pmic8058_leds id, unsigned mA);
  35. #endif /* __LEDS_PMIC8058_H__ */