lkml.org 
[lkml]   [2009]   [Apr]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFD] voltage/current regulator consumer interface
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


\
 
 \ /
  Last update: 2009-04-25 10:23    [W:0.055 / U:0.796 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site