whatever mechanism is created for toggling LEDs should be able to toggle
arbitrary GPIO pins, and there is a problem with the speed of the standard
access mechanisms in /sysfs. see this post on hackaday for an example
http://hackaday.com/2013/12/07/speeding-up-beaglebone-black-gpio-a-thousand-times/
The usage described is short human speed flashing patterns for things like
"my brain fell out" from devices, not trying to do 1KHz PWM dimming.
Dimming might actually be one case you want the kernel interface,
although it'll kill your power management.
Also, since there are a number of cases where this is hardware accelerated, it
seems like there should be an abstration that userspace can use that doesn't
care if or how it's accelerated, setup the output and tell the system to do it
without worrying about the specific hardware details. Isn't that a large part of
what the kernel is supposed to be doing?
Not usually. The kernel is supposed to be providing a consistent interface
to hardware, not emulating bits you don't have. Now and then it does (Eg
FPU emulation) but in general the job it does is "make all the network
cards look the same" not "make pretend network cards out of string and
cups". It's not a hard and fast rule in either direction. There are cases
the kernel doesn't try and create a common interface for the hardware
because the abstraction that can be done at kernel level would be
nonsensical.