On Mon, Sep 7, 2015 at 7:18 PM, Ian Lepore wrote: > On Mon, 2015-09-07 at 21:59 +0000, Luiz Otavio O Souza wrote: >> Author: loos >> Date: Mon Sep 7 21:59:11 2015 >> New Revision: 287542 >> URL: https://svnweb.freebsd.org/changeset/base/287542 >> >> Log: >> Fix off-by-one bugs. >> >> While here, only set the GPIO pin state for output pins. >> > > It's not a good idea to forbid setting output state on an input pin, > because it's a technique that's often used to preset the drive state of > a pin before changing it to be an output pin. That way a pin that > powers on to a default state of input-pulled-high can be set to drive > high before making it output, and you avoid any transitions on the pin > (which might be important if the pin is connected to, say, the > power-control input of a PMIC). > > Most hardware allows setting the output-state register bits for a pin > even if the pin is currently assigned as input. I guess if the hardware > has no way to do that, then returning EINVAL might make sense. > > -- Ian
This driver is 'special', it only give access to 4 user LEDs and a reset switch. All the pins are locked in they intended setting (one input and four outputs) _______________________________________________ [email protected] mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "[email protected]"
