On Mon, Sep 21, 2015 at 4:55 PM, Linus Walleij <linus.walleij@xxxxxxxxxx> wrote: > On Wed, Sep 2, 2015 at 6:35 AM, Chris Read <chrisrfq@xxxxxxxxx> wrote: >> There are some hardware aspects/parameters >> of exporting that aren't controllable from userspace, such as whether or not >> reversing the direction of a GPIO is safe. > > The original argument as to why kernel should handle hardware > is to keep things safe and under control. > > I don't understand this argument really, should the kernel give you > a gun but stop you from shooting yourself in the foot with it or > what do you mean? Then the stance of kernel not to give out guns > is better. >From my embedded perspective a board designer wants to keep hardware safe and under control too. He may want or need to expose controls or status to userspace applications, though, and what he wants to have exposed may vary from board to board. I just feel that exposing them via the DT could be OK, whereas others do not. I personally think it make sense to allow a board designer to somehow specify in the DT (not doable now) that an otherwise unattached GPIO should be exposed to userspace and whether or not to expose the "direction" pseudo-file in sysfs that allows changing of the direction. If the board designer thinks it's safe or necessary to change the direction of the GPIO, then why not allow him to specify it as such. - Chris -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html