leds-lm355x.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. /*
  2. * Copyright (C) 2012 Texas Instruments
  3. *
  4. * License Terms: GNU General Public License v2
  5. *
  6. * Simple driver for Texas Instruments LM355x LED driver chip
  7. *
  8. * Author: G.Shark Jeong <gshark.jeong@gmail.com>
  9. * Daniel Jeong <daniel.jeong@ti.com>
  10. */
  11. #define LM355x_NAME "leds-lm355x"
  12. #define LM3554_NAME "leds-lm3554"
  13. #define LM3556_NAME "leds-lm3556"
  14. /* lm3554 : strobe def. on */
  15. enum lm355x_strobe {
  16. LM355x_PIN_STROBE_DISABLE = 0x00,
  17. LM355x_PIN_STROBE_ENABLE = 0x01,
  18. };
  19. enum lm355x_torch {
  20. LM355x_PIN_TORCH_DISABLE = 0,
  21. LM3554_PIN_TORCH_ENABLE = 0x80,
  22. LM3556_PIN_TORCH_ENABLE = 0x10,
  23. };
  24. enum lm355x_tx2 {
  25. LM355x_PIN_TX_DISABLE = 0,
  26. LM3554_PIN_TX_ENABLE = 0x20,
  27. LM3556_PIN_TX_ENABLE = 0x40,
  28. };
  29. enum lm355x_ntc {
  30. LM355x_PIN_NTC_DISABLE = 0,
  31. LM3554_PIN_NTC_ENABLE = 0x08,
  32. LM3556_PIN_NTC_ENABLE = 0x80,
  33. };
  34. enum lm355x_pmode {
  35. LM355x_PMODE_DISABLE = 0,
  36. LM355x_PMODE_ENABLE = 0x04,
  37. };
  38. /*
  39. * struct lm3554_platform_data
  40. * @pin_strobe: strobe input
  41. * @pin_torch : input pin
  42. * lm3554-tx1/torch/gpio1
  43. * lm3556-torch
  44. * @pin_tx2 : input pin
  45. * lm3554-envm/tx2/gpio2
  46. * lm3556-tx pin
  47. * @ntc_pin : output pin
  48. * lm3554-ledi/ntc
  49. * lm3556-temp pin
  50. * @pass_mode : pass mode
  51. */
  52. struct lm355x_platform_data {
  53. enum lm355x_strobe pin_strobe;
  54. enum lm355x_torch pin_tx1;
  55. enum lm355x_tx2 pin_tx2;
  56. enum lm355x_ntc ntc_pin;
  57. enum lm355x_pmode pass_mode;
  58. };