--- /src/FreeBSD/head/sys/arm/broadcom/bcm2835/bcm2835_gpio.c.orig 2014-01-23 17:12:52.000000000 +0400 +++ /src/FreeBSD/head/sys/arm/broadcom/bcm2835/bcm2835_gpio.c 2014-01-28 14:33:46.000000000 +0400 @@ -295,6 +295,8 @@ } /* Manage Pull-up/pull-down. */ + if ( (flags & (GPIO_PIN_PULLUP|GPIO_PIN_PULLDOWN) ) != ( pin->gp_flags & (GPIO_PIN_PULLUP|GPIO_PIN_PULLDOWN) ) ) + { pin->gp_flags &= ~(GPIO_PIN_PULLUP|GPIO_PIN_PULLDOWN); if (flags & (GPIO_PIN_PULLUP|GPIO_PIN_PULLDOWN)) { if (flags & GPIO_PIN_PULLUP) { @@ -306,7 +308,7 @@ } } else bcm_gpio_set_pud(sc, pin->gp_pin, BCM_GPIO_NONE); - + } ; BCM_GPIO_UNLOCK(sc); }