diff options
author | Bo Shen <voice.shen@atmel.com> | 2015-01-20 15:31:25 +0800 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2015-01-21 10:40:36 +0100 |
commit | ea1f2061bd5f7205d512747919fc8ab2515285ba (patch) | |
tree | 21ba778f0b62fe2c395c9cd564249a1591b1554d /arch/arm/boards/sama5d3xek | |
parent | 124e3d3ce2588460560c76879fbec01f6331a46f (diff) | |
download | barebox-ea1f2061bd5f7205d512747919fc8ab2515285ba.tar.gz barebox-ea1f2061bd5f7205d512747919fc8ab2515285ba.tar.xz |
ARM: atmel: sama5d3xek: fix conflict between w1 and led
As the 1-wire and LED d2 use the same pin (PE25) on the EK board.
So, make LED enable only when the 1-wire is disabled.
Signed-off-by: Bo Shen <voice.shen@atmel.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/boards/sama5d3xek')
-rw-r--r-- | arch/arm/boards/sama5d3xek/init.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/arm/boards/sama5d3xek/init.c b/arch/arm/boards/sama5d3xek/init.c index 57dc7b0667..bf7c68dc36 100644 --- a/arch/arm/boards/sama5d3xek/init.c +++ b/arch/arm/boards/sama5d3xek/init.c @@ -49,11 +49,13 @@ #include "hw_version.h" +#ifdef CONFIG_W1_MASTER_GPIO struct w1_gpio_platform_data w1_pdata = { .pin = AT91_PIN_PE25, .ext_pullup_enable_pin = -EINVAL, .is_open_drain = 0, }; +#endif #if defined(CONFIG_NAND_ATMEL) static struct atmel_nand_data nand_pdata = { @@ -323,11 +325,13 @@ struct gpio_led leds[] = { .name = "d1", }, }, { +#ifndef CONFIG_W1_MASTER_GPIO .gpio = AT91_PIN_PE25, .active_low = 1, .led = { .name = "d2", }, +#endif }, }; @@ -353,6 +357,7 @@ static int at91sama5d3xek_mem_init(void) } mem_initcall(at91sama5d3xek_mem_init); +#ifdef CONFIG_W1_MASTER_GPIO static void ek_add_device_w1(void) { at91_set_gpio_input(w1_pdata.pin, 0); @@ -361,6 +366,9 @@ static void ek_add_device_w1(void) at91sama5d3xek_devices_detect_hw(); } +#else +static void ek_add_device_w1(void) {} +#endif #ifdef CONFIG_POLLER /* |