diff options
-rw-r--r-- | Documentation/devicetree/bindings/serial/efm32-uart.txt | 4 | ||||
-rw-r--r-- | drivers/tty/serial/efm32-uart.c | 8 |
2 files changed, 9 insertions, 3 deletions
diff --git a/Documentation/devicetree/bindings/serial/efm32-uart.txt b/Documentation/devicetree/bindings/serial/efm32-uart.txt index 3ca01336b837..8adbab268ca3 100644 --- a/Documentation/devicetree/bindings/serial/efm32-uart.txt +++ b/Documentation/devicetree/bindings/serial/efm32-uart.txt | |||
@@ -6,7 +6,7 @@ Required properties: | |||
6 | - interrupts : Should contain uart interrupt | 6 | - interrupts : Should contain uart interrupt |
7 | 7 | ||
8 | Optional properties: | 8 | Optional properties: |
9 | - efm32,location : Decides the location of the USART I/O pins. | 9 | - energymicro,location : Decides the location of the USART I/O pins. |
10 | Allowed range : [0 .. 5] | 10 | Allowed range : [0 .. 5] |
11 | Default: 0 | 11 | Default: 0 |
12 | 12 | ||
@@ -16,5 +16,5 @@ uart@0x4000c400 { | |||
16 | compatible = "energymicro,efm32-uart"; | 16 | compatible = "energymicro,efm32-uart"; |
17 | reg = <0x4000c400 0x400>; | 17 | reg = <0x4000c400 0x400>; |
18 | interrupts = <15>; | 18 | interrupts = <15>; |
19 | efm32,location = <0>; | 19 | energymicro,location = <0>; |
20 | }; | 20 | }; |
diff --git a/drivers/tty/serial/efm32-uart.c b/drivers/tty/serial/efm32-uart.c index 7baa34920dbf..55d9c00112cc 100644 --- a/drivers/tty/serial/efm32-uart.c +++ b/drivers/tty/serial/efm32-uart.c | |||
@@ -665,10 +665,16 @@ static int efm32_uart_probe_dt(struct platform_device *pdev, | |||
665 | if (!np) | 665 | if (!np) |
666 | return 1; | 666 | return 1; |
667 | 667 | ||
668 | ret = of_property_read_u32(np, "efm32,location", &location); | 668 | ret = of_property_read_u32(np, "energymicro,location", &location); |
669 | |||
670 | if (ret) | ||
671 | /* fall back to wrongly namespaced property */ | ||
672 | ret = of_property_read_u32(np, "efm32,location", &location); | ||
673 | |||
669 | if (ret) | 674 | if (ret) |
670 | /* fall back to old and (wrongly) generic property "location" */ | 675 | /* fall back to old and (wrongly) generic property "location" */ |
671 | ret = of_property_read_u32(np, "location", &location); | 676 | ret = of_property_read_u32(np, "location", &location); |
677 | |||
672 | if (!ret) { | 678 | if (!ret) { |
673 | if (location > 5) { | 679 | if (location > 5) { |
674 | dev_err(&pdev->dev, "invalid location\n"); | 680 | dev_err(&pdev->dev, "invalid location\n"); |