spi: efm32: correct namespacing of location property
Olof Johansson pointed out that usually the company name is picked as namespace prefix to specific properties. So expect "energymicro,location" but fall back to the previously introduced name "efm32,location". Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Mark Brown <broonie@linaro.org>
This commit is contained in:
parent
7171511eae
commit
10ed7e9847
@ -10,11 +10,12 @@ Required properties:
|
|||||||
- cs-gpios: see spi-bus.txt
|
- cs-gpios: see spi-bus.txt
|
||||||
|
|
||||||
Recommended properties :
|
Recommended properties :
|
||||||
- efm32,location: Value to write to the ROUTE register's LOCATION bitfield to
|
- energymicro,location: Value to write to the ROUTE register's LOCATION
|
||||||
configure the pinmux for the device, see datasheet for values.
|
bitfield to configure the pinmux for the device, see
|
||||||
If "efm32,location" property is not provided, keeping what is
|
datasheet for values.
|
||||||
already configured in the hardware, so its either the reset
|
If this property is not provided, keeping what is
|
||||||
default 0 or whatever the bootloader did.
|
already configured in the hardware, so its either the
|
||||||
|
reset default 0 or whatever the bootloader did.
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
|
|
||||||
@ -26,7 +27,7 @@ spi1: spi@0x4000c400 { /* USART1 */
|
|||||||
interrupts = <15 16>;
|
interrupts = <15 16>;
|
||||||
clocks = <&cmu 20>;
|
clocks = <&cmu 20>;
|
||||||
cs-gpios = <&gpio 51 1>; // D3
|
cs-gpios = <&gpio 51 1>; // D3
|
||||||
efm32,location = <1>;
|
energymicro,location = <1>;
|
||||||
status = "ok";
|
status = "ok";
|
||||||
|
|
||||||
ks8851@0 {
|
ks8851@0 {
|
||||||
|
@ -294,10 +294,16 @@ static void efm32_spi_probe_dt(struct platform_device *pdev,
|
|||||||
u32 location;
|
u32 location;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
|
ret = of_property_read_u32(np, "energymicro,location", &location);
|
||||||
|
|
||||||
|
if (ret)
|
||||||
|
/* fall back to wrongly namespaced property */
|
||||||
ret = of_property_read_u32(np, "efm32,location", &location);
|
ret = of_property_read_u32(np, "efm32,location", &location);
|
||||||
|
|
||||||
if (ret)
|
if (ret)
|
||||||
/* fall back to old and (wrongly) generic property "location" */
|
/* fall back to old and (wrongly) generic property "location" */
|
||||||
ret = of_property_read_u32(np, "location", &location);
|
ret = of_property_read_u32(np, "location", &location);
|
||||||
|
|
||||||
if (!ret) {
|
if (!ret) {
|
||||||
dev_dbg(&pdev->dev, "using location %u\n", location);
|
dev_dbg(&pdev->dev, "using location %u\n", location);
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user