Module Name:    src
Committed By:   mbalmer
Date:           Sun Nov 13 13:16:33 UTC 2011

Modified Files:
        src/sys/dev/gpio: gpiopwm.c

Log Message:
On detach, set the pin to low state.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/dev/gpio/gpiopwm.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/gpio/gpiopwm.c
diff -u src/sys/dev/gpio/gpiopwm.c:1.1 src/sys/dev/gpio/gpiopwm.c:1.2
--- src/sys/dev/gpio/gpiopwm.c:1.1	Sun Nov 13 12:33:01 2011
+++ src/sys/dev/gpio/gpiopwm.c	Sun Nov 13 13:16:33 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: gpiopwm.c,v 1.1 2011/11/13 12:33:01 mbalmer Exp $ */
+/* $NetBSD: gpiopwm.c,v 1.2 2011/11/13 13:16:33 mbalmer Exp $ */
 
 /*
  * Copyright (c) 2011 Marc Balmer <m...@msys.ch>
@@ -150,6 +150,7 @@ gpiopwm_detach(device_t self, int flags)
 
 	callout_halt(&sc->sc_pulse, NULL);
 	callout_destroy(&sc->sc_pulse);
+	gpio_pin_write(sc->sc_gpio, &sc->sc_map, 0, GPIO_PIN_LOW);
 
 	pmf_device_deregister(self);
 	gpio_pin_unmap(sc->sc_gpio, &sc->sc_map);

Reply via email to