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