Re: [RFD] voltage/current regulator consumer interface

From: Pavel Machek
Date: Sat Apr 25 2009 - 04:20:37 EST


Hi!


> > Then the GPS drivers should be made aware and let the drivers handle the
> > on/off interface. If a user is allowed to turn interfaces on/off at
> > will with this then drivers could suffer from (shock)... ie: you could
> > turn off your hard-drive in a middle of a write by the driver corrupting
> > data, if handled in the driver it could finish the write before turning
> > off the drive. I know this is a far stretch from a GPS were the device
> > is only READ only.
>
> The point is there's no GPS driver... GPS transceivers are usually connected to
> a serial line and the applications access the GPS data through ttySX. The case
> when there is a kernel driver for device connected to a regulator is completely
> different. It is then the driver responsibility to decide when to power on/off
> the device.

Well, then you should teach serial driver to power the (GPS) device up on
open() and power it off on close()...

Giving it better name then ttyS2 would help, too. ttyGPS?

IOW write a trivial driver even through you could get away w/o that...
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/