tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: should gpio be moved to sys/dev from sys/sys?




On Aug 17, 2009, at 9:49 AM, Thor Lancelot Simon wrote:

On Mon, Aug 17, 2009 at 06:45:56PM +0200, Marc Balmer wrote:

- device specific C header files should go to /usr/include/dev (thus
sys/dev in the src tree)
- system C header files (kernel data structures) should go to /usr/
include/sys (thus sys/sys in the src tree)

I agree with this -- except that I think few if any device specific
C header files should be exposed to userland at all.

A device which must exports things to userland (ioctls, defines) should only do so from a file which contain those parts only. Only this file may be placed under /usr/include. The driver should include said file to get access to those bits.

This is just following the simple rules of separating interface from implementation.

Having said that, given <sys/gpio.h> is already in netbsd 5, it's too late to move.

Home | Main Index | Thread Index | Old Index