From 2b978a7b0a5cba13fd8e174cfe38a7493097b1e3 Mon Sep 17 00:00:00 2001 From: Alexander Yurchenko Date: Thu, 5 Jan 2006 15:32:47 +0000 Subject: Don't change pins state on attach. --- sys/arch/i386/pci/gscpcib.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'sys/arch/i386') diff --git a/sys/arch/i386/pci/gscpcib.c b/sys/arch/i386/pci/gscpcib.c index 2d33423c6f2..23816855dd5 100644 --- a/sys/arch/i386/pci/gscpcib.c +++ b/sys/arch/i386/pci/gscpcib.c @@ -1,4 +1,4 @@ -/* $OpenBSD: gscpcib.c,v 1.3 2004/10/05 19:02:33 grange Exp $ */ +/* $OpenBSD: gscpcib.c,v 1.4 2006/01/05 15:32:46 grange Exp $ */ /* * Copyright (c) 2004 Alexander Yurchenko * @@ -111,11 +111,9 @@ gscpcib_attach(struct device *parent, struct device *self, void *aux) GPIO_PIN_PUSHPULL | GPIO_PIN_TRISTATE | GPIO_PIN_PULLUP; - /* safe defaults */ - sc->sc_gpio_pins[i].pin_flags = GPIO_PIN_TRISTATE; - sc->sc_gpio_pins[i].pin_state = GPIO_PIN_LOW; - gscpcib_gpio_pin_ctl(sc, i, sc->sc_gpio_pins[i].pin_flags); - gscpcib_gpio_pin_write(sc, i, sc->sc_gpio_pins[i].pin_state); + /* Read initial state */ + sc->sc_gpio_pins[i].pin_state = gscpcib_gpio_pin_read(sc, i) ? + GPIO_PIN_HIGH : GPIO_PIN_LOW; } /* Create controller tag */ -- cgit v1.2.3