[ECOS] Device driver open & close

Andrew Lunn andrew@lunn.ch
Tue Aug 26 15:28:00 GMT 2008


On Mon, Aug 25, 2008 at 07:31:09PM -0400, Frank Pagliughi wrote:
> Hey All,
>
> Is there a mechanism by which a device driver can be notified when the  
> application opens or closes the device. For example, I have an LCD in my  
> system, and I would like to turn it on when the application opens the  
> device and turn it off when it gets closed. Then turn it back on again  
> if it gets re-opened, etc.

open() should result in the lookup function being called on the
device.

Close is a problem, since there is no device close function.

You might be better using cyg_io_set_config() mechanism to turn it on
and off.

    Andrew


-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss



More information about the Ecos-discuss mailing list