Re: [RFD] voltage/current regulator consumer interface

From: James Kosin
Date: Mon Apr 27 2009 - 09:49:51 EST


Mark Brown wrote:
> On Sat, Apr 25, 2009 at 10:19:33AM +0200, Pavel Machek wrote:
>
>> Well, then you should teach serial driver to power the (GPS) device up on
>> open() and power it off on close()...
>
> This all started because this approach was nacked for serial drivers.
> In any case, I'm not sure that'll scale - it may not be desirable or
> reasonable to do something like that for all devices. For example, the
> devices may be connected via a technology that's not suitable (I've
> worked on systems which used ethernet here).
>
Ethernet can be treated as a serial interface as well down to the
simplest level. I'm leaving out a lot is making this assumption; but,
it is true to a fault.

Scalability has more to do with the generic interface you use... If you
tie things to ttySxx and don't allow configuration parameters you are
also restricting the usage and scalability as well.

The GPS should be configurable so the interface is generic and allows
getting from Ethernet/PCI/IDE/serial/parallel/etc. The transport layer
should not matter to the GPS driver. The trick will be to allow the
user to ultimately choose, if that is what you want.

The same applies to disk devices, now we have IDE/SATA/etc. the disk
device itself doesn't depend on the interface physically, the kernel
treats all these as suitable interfaces for disk/CDROM/tape devices and
the world is not turned on its ear just because there is a different
physical interface.

James

Attachment: signature.asc
Description: OpenPGP digital signature