On Tue, Sep 22, 2015 at 6:54 AM, Chris Read <chrisrfq@xxxxxxxxx> wrote: > 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 am usually conservative with this because all too often, people do not know about all the stuff listed in Documentation/gpio/drivers-on-gpio.txt and their usual reasoning is "just lemme do this in userspace real quick now because I have this project". And that doesn't sit well with our long-term view of kernel ABIs. For proper userspace ABI the sysfs has been deemed unusable and does not scale. What is needed is a chardev rewrite as has been discussed several times. Yours, Linus Walleij -- 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