Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/gpio On detach, set the pin to low state.



details:   https://anonhg.NetBSD.org/src/rev/375f38d89d95
branches:  trunk
changeset: 771167:375f38d89d95
user:      mbalmer <mbalmer%NetBSD.org@localhost>
date:      Sun Nov 13 13:16:33 2011 +0000

description:
On detach, set the pin to low state.

diffstat:

 sys/dev/gpio/gpiopwm.c |  3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diffs (17 lines):

diff -r e8cd1a79c5e0 -r 375f38d89d95 sys/dev/gpio/gpiopwm.c
--- a/sys/dev/gpio/gpiopwm.c    Sun Nov 13 12:47:54 2011 +0000
+++ b/sys/dev/gpio/gpiopwm.c    Sun Nov 13 13:16:33 2011 +0000
@@ -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 <marc%msys.ch@localhost>
@@ -150,6 +150,7 @@
 
        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);



Home | Main Index | Thread Index | Old Index