leds.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. /*
  2. * Definitions for RTL8187 leds
  3. *
  4. * Copyright 2009 Larry Finger <Larry.Finger@lwfinger.net>
  5. *
  6. * Based on the LED handling in the r8187 driver, which is:
  7. * Copyright (c) Realtek Semiconductor Corp. All rights reserved.
  8. *
  9. * This program is free software; you can redistribute it and/or modify
  10. * it under the terms of the GNU General Public License version 2 as
  11. * published by the Free Software Foundation.
  12. */
  13. #ifndef RTL8187_LED_H
  14. #define RTL8187_LED_H
  15. #ifdef CONFIG_RTL8187_LEDS
  16. #define RTL8187_LED_MAX_NAME_LEN 21
  17. #include <linux/leds.h>
  18. #include <linux/types.h>
  19. enum {
  20. LED_PIN_LED0,
  21. LED_PIN_LED1,
  22. LED_PIN_GPIO0,
  23. LED_PIN_HW
  24. };
  25. enum {
  26. EEPROM_CID_RSVD0 = 0x00,
  27. EEPROM_CID_RSVD1 = 0xFF,
  28. EEPROM_CID_ALPHA0 = 0x01,
  29. EEPROM_CID_SERCOMM_PS = 0x02,
  30. EEPROM_CID_HW = 0x03,
  31. EEPROM_CID_TOSHIBA = 0x04,
  32. EEPROM_CID_QMI = 0x07,
  33. EEPROM_CID_DELL = 0x08
  34. };
  35. struct rtl8187_led {
  36. struct ieee80211_hw *dev;
  37. /* The LED class device */
  38. struct led_classdev led_dev;
  39. /* The pin/method used to control the led */
  40. u8 ledpin;
  41. /* The unique name string for this LED device. */
  42. char name[RTL8187_LED_MAX_NAME_LEN + 1];
  43. /* If the LED is radio or tx/rx */
  44. bool is_radio;
  45. };
  46. void rtl8187_leds_init(struct ieee80211_hw *dev, u16 code);
  47. void rtl8187_leds_exit(struct ieee80211_hw *dev);
  48. #endif /* def CONFIG_RTL8187_LEDS */
  49. #endif /* RTL8187_LED_H */