Reading a config file in a driver ....

Olof Johansson olof at
Fri Jan 4 03:30:19 EST 2008

On Wed, Jan 02, 2008 at 09:03:20PM -0800, Misbah khan wrote:
> Hi all ....
> I am writing a LCD driver in which the default configuration for LCD would
> be loded at the Init . This default configuration if keep in the driver then
> for a change in default configuration we need to compile the driver which we
> never want . Hence we want a .config file in /etc/lcd.config dir which could
> be changed and the next boot will take this configuration as the default
> configuration. 
> I need to know How to read from the config file in the driver form the dir
> /etc/lcd.config. The driver would be installed at boot up 

The driver/kernel shouldn't read the file directly, if anything you
should have a userspace tool that reads it and adjusts the driver via
sysfs or similar. That tool can be run from some of the init scripts,
or from the ramdisk in case you want to do it early.


More information about the Linuxppc-embedded mailing list