Skip to contentSkip to conversation

ARM: da850: Fix LEGO EV3 battery voltage gpio

PATCH Applied David Lechner 2 participants 3 messages Dec 3, 2017 – Dec 7, 2017 Device tree bindings

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 ARM: da850: Fix LEGO EV3 battery voltage gpio

This fixes the battery voltage monitoring gpio-hog settings.

When the gpio is low, it turns off the battery voltage to the ADC chip. However, this needs to be on all of the time so that we can monitor battery voltage.

Also, there was a typo that prevented pinmuxing from working correctly.

---

v3 changes:
* Rebased patch so that it applies cleanly to mainline

v2 changes:
* Fixed pinctrl typo

 arch/arm/boot/dts/da850-lego-ev3.dts | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm/boot/dts/da850-lego-ev3.dts +2 -2
index 413dbd5..81942ae 100644
@@ -178,7 +178,7 @@
 	 */
 	battery {
 		pinctrl-names = "default";
-		pintctrl-0 = <&battery_pins>;
+		pinctrl-0 = <&battery_pins>;
 		compatible = "lego,ev3-battery";
 		io-channels = <&adc 4>, <&adc 3>;
 		io-channel-names = "voltage", "current";
@@ -392,7 +392,7 @@
 	batt_volt_en {
 		gpio-hog;
 		gpios = <6 GPIO_ACTIVE_HIGH>;
-		output-low;
+		output-high;
 	};
 };
 
Signature · 1 line
2.7.4
Applied
#1 lore raw
Quoted 9 lines · David Lechner

This fixes the battery voltage monitoring gpio-hog settings.

When the gpio is low, it turns off the battery voltage to the ADC chip. However, this needs to be on all of the time so that we can monitor battery voltage.

Also, there was a typo that prevented pinmuxing from working correctly.

Applied to fixes with subject line changed to:

ARM: dts: da850-lego-ev3: Fix battery voltage gpio

Please follow this style for future patches.

Thanks,
Sekhar

#2 lore raw
Quoted 9 lines · Sekhar Nori
Quoted 8 lines · David Lechner

This fixes the battery voltage monitoring gpio-hog settings.

When the gpio is low, it turns off the battery voltage to the ADC chip. However, this needs to be on all of the time so that we can monitor battery voltage.

Also, there was a typo that prevented pinmuxing from working correctly.

Quoted 7 lines
Quoted 1 line

Applied to fixes with subject line changed to:

ARM: dts: da850-lego-ev3: Fix battery voltage gpio

Please follow this style for future patches.

Ack