ar71xx: rbspi: fix RB wAP AC gpio conflict and LED
e15c63a375introduced code that was trying to register GPIO 1 as both an LED and a button. The OEM source makes it clear that LED1 is not wired to the SoC GPIOs. GPIO 1 is the reset button. Furthermore the (green) power led default state should also be defined, (matching OEM source), and it should be used by diag.sh since it's currently the only software-controllable LED. This patch fixes these issues and renames the corresponding #defines for clarity Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org> (cherry picked from commite99f760235)
This commit is contained in:
		 Thibaut VARÈNE
					Thibaut VARÈNE
				
			
				
					committed by
					
						 Jo-Philipp Wich
						Jo-Philipp Wich
					
				
			
			
				
	
			
			
			 Jo-Philipp Wich
						Jo-Philipp Wich
					
				
			
						parent
						
							bb06f6d3ba
						
					
				
				
					commit
					cb73dd21a3
				
			| @@ -384,7 +384,8 @@ get_status_led() { | |||||||
| 	rb-912uag-2hpnd|\ | 	rb-912uag-2hpnd|\ | ||||||
| 	rb-912uag-5hpnd|\ | 	rb-912uag-5hpnd|\ | ||||||
| 	rb-sxt2n|\ | 	rb-sxt2n|\ | ||||||
| 	rb-sxt5n) | 	rb-sxt5n|\ | ||||||
|  | 	rb-wapg-5hact2hnd) | ||||||
| 		status_led="rb:green:power" | 		status_led="rb:green:power" | ||||||
| 		;; | 		;; | ||||||
| 	re355|\ | 	re355|\ | ||||||
|   | |||||||
| @@ -476,10 +476,10 @@ static struct gpio_led rblhg_leds[] __initdata = { | |||||||
| }; | }; | ||||||
|  |  | ||||||
| /* RB w APG-5HacT2HnD (wAP AC) gpios*/ | /* RB w APG-5HacT2HnD (wAP AC) gpios*/ | ||||||
| #define RBWAPGSC_LED1		1 | #define RBWAPGSC_WIFI_LED_1		1 | ||||||
| #define RBWAPGSC_LED2		8 | #define RBWAPGSC_WIFI_LED_2		8 | ||||||
| #define RBWAPGSC_LED3		9 | #define RBWAPGSC_WIFI_LED_3		9 | ||||||
| #define RBWAPGSC_POWERLED		16 | #define RBWAPGSC_GPIO_LED_POWER		16 | ||||||
| #define RBWAPGSC_GPIO_BTN_RESET		1 | #define RBWAPGSC_GPIO_BTN_RESET		1 | ||||||
| #define RBWAPGSC_GPIO_MDIO_MDC		12 | #define RBWAPGSC_GPIO_MDIO_MDC		12 | ||||||
| #define RBWAPGSC_GPIO_MDIO_DATA		11 | #define RBWAPGSC_GPIO_MDIO_DATA		11 | ||||||
| @@ -487,13 +487,10 @@ static struct gpio_led rblhg_leds[] __initdata = { | |||||||
|  |  | ||||||
| static struct gpio_led rbwapgsc_leds[] __initdata = { | static struct gpio_led rbwapgsc_leds[] __initdata = { | ||||||
| 	{ | 	{ | ||||||
| 		.name = "rb:green:led1", | 		.name = "rb:green:power", | ||||||
| 		.gpio = RBWAPGSC_LED1, | 		.gpio = RBWAPGSC_GPIO_LED_POWER, | ||||||
| 		.active_low = 1, |  | ||||||
| 	},{ |  | ||||||
| 		.name = "rb:blue:power", |  | ||||||
| 		.gpio = RBWAPGSC_POWERLED, |  | ||||||
| 		.active_low = 1, | 		.active_low = 1, | ||||||
|  | 		.default_state = LEDS_GPIO_DEFSTATE_ON, | ||||||
| 	}, | 	}, | ||||||
| }; | }; | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user