Skip to content

Commit

Permalink
ARM: nomadik: fix up double inversion in DT
Browse files Browse the repository at this point in the history
The GPIO pin connected to card detect was inverted twice: once by
the argument to the GPIO line itself where it was magically marked
as active low by the flag GPIO_ACTIVE_LOW (0x01) in the third cell,
and also marked active low AGAIN by explicitly stating
"cd-inverted" (a deprecated method).

After commit 78f87df
"mmc: mmci: Use the common mmc DT parser" this results in the
line being inverted twice so it was effectively uninverted, while
the old code would not have this effect, instead disregarding the
flag on the GPIO line altogether, which is a bug. I admit the
semantics may be unclear but inverting twice is as good a
definition as any on how this should work.

So fix up the buggy device tree. Use proper #includes so the DTS
is clear and readable.

Cc: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Olof Johansson <olof@lixom.net>
  • Loading branch information
Linus Walleij authored and Olof Johansson committed Jul 30, 2014
1 parent a1ae5b1 commit 3181788
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion arch/arm/boot/dts/ste-nomadik-s8815.dts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*/

/dts-v1/;
/include/ "ste-nomadik-stn8815.dtsi"
#include "ste-nomadik-stn8815.dtsi"

/ {
model = "Calao Systems USB-S8815";
Expand Down
7 changes: 4 additions & 3 deletions arch/arm/boot/dts/ste-nomadik-stn8815.dtsi
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
/*
* Device Tree for the ST-Ericsson Nomadik 8815 STn8815 SoC
*/
/include/ "skeleton.dtsi"

#include <dt-bindings/gpio/gpio.h>
#include "skeleton.dtsi"

/ {
#address-cells = <1>;
Expand Down Expand Up @@ -842,8 +844,7 @@
bus-width = <4>;
cap-mmc-highspeed;
cap-sd-highspeed;
cd-gpios = <&gpio3 15 0x1>;
cd-inverted;
cd-gpios = <&gpio3 15 GPIO_ACTIVE_LOW>;
pinctrl-names = "default";
pinctrl-0 = <&mmcsd_default_mux>, <&mmcsd_default_mode>;
vmmc-supply = <&vmmc_regulator>;
Expand Down

0 comments on commit 3181788

Please sign in to comment.