leds-lp5523.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /*
  2. * LP5523 LED Driver
  3. *
  4. * Copyright (C) 2010 Nokia Corporation
  5. *
  6. * Contact: Samu Onkalo <samu.p.onkalo@nokia.com>
  7. *
  8. * This program is free software; you can redistribute it and/or
  9. * modify it under the terms of the GNU General Public License
  10. * version 2 as published by the Free Software Foundation.
  11. *
  12. * This program is distributed in the hope that it will be useful, but
  13. * WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  15. * General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU General Public License
  18. * along with this program; if not, write to the Free Software
  19. * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
  20. * 02110-1301 USA
  21. */
  22. #ifndef __LINUX_LP5523_H
  23. #define __LINUX_LP5523_H
  24. /* See Documentation/leds/leds-lp5523.txt */
  25. struct lp5523_led_config {
  26. u8 chan_nr;
  27. u8 led_current; /* mA x10, 0 if led is not connected */
  28. u8 max_current;
  29. };
  30. #define LP5523_CLOCK_AUTO 0
  31. #define LP5523_CLOCK_INT 1
  32. #define LP5523_CLOCK_EXT 2
  33. struct lp5523_platform_data {
  34. struct lp5523_led_config *led_config;
  35. u8 num_channels;
  36. u8 clock_mode;
  37. int (*setup_resources)(void);
  38. void (*release_resources)(void);
  39. void (*enable)(bool state);
  40. const char *label;
  41. };
  42. #endif /* __LINUX_LP5523_H */