lkml.org 
[lkml]   [2007]   [Feb]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/1] LinuxPPS: Pulse per Second support for Linux
Rodolfo Giometti wrote:
>
> Please read the following consideratios before sending to /dev/null!
> :)
>
> RFC considerations
> ------------------
>
> While implementing a PPS API as RFC 2783 defines and using an embedded
> CPU GPIO-Pin as physical link to the signal, I encountered a deeper
> problem:
>
> At startup it needs a file descriptor as argument for the function
> time_pps_create().
>
> This implies that the source has a /dev/... entry. This assumption is
> ok for the serial and parallel port, where you can do something
> usefull beside(!) the gathering of timestamps as it is the central
> task for a PPS-API. But this assumption does not work for a single
> purpose GPIO line. In this case even basic file-related functionality
> (like read() and write()) makes no sense at all and should not be a
> precondition for the use of a PPS-API.
>

It's not a precondition for a file descriptor, either. There are plenty
of ioctl-only device drivers in existence.

Furthermore, a file descriptor doesn't imply a device entry. Consider
pipe(2), for example.

As far as the kernel is concerned, a file handle is a nice, uniform
system for providing communication between the kernel and user space.
It doesn't matter if one can read() or write() on it; it's perfectly
normal to support only a subset of the normal operations.

-hpa
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-02-20 03:59    [W:0.132 / U:0.260 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site