[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20111003110601.127f3043@lxorguk.ukuu.org.uk>
Date: Mon, 3 Oct 2011 11:06:01 +0100
From: Alan Cox <alan@...rguk.ukuu.org.uk>
To: "Doron Cohen" <doronc@...no-ms.com>
Cc: <linux-kernel@...r.kernel.org>
Subject: Re: How can LKM store persistent data?
> Our device has some configuration data like DVB standard and operation
> mode which is not changes frequently. Currently it can be changed using
> module parameters and by ioctl calls. But when the driver is down and up
> again (meaning - every restart, sleep, reboot etc.) the module is back
Shouldn't be every sleep - you can reload across a suspend/resume
yourself simply by remembering the module settings in the driver.
> Our users asked us to keep this data persistent, if someone is using
> ISDBT he would probably use it forever unless traveling to another
> region. So the request is once a mode was set, do not change it on the
> next reload just work at that mode until instructed otherwise. Therefore
> the driver needs to save this data somehow, and read it when it loads
> and work according to it.
The usual way is to load the settings when the driver is loaded. udev has
rules for what to do on driver loads (create things, configure stuff etc)
so you can use a udev rule to run a program on driver load which loads
the settings.
Saving them in userspace so the udev app can reload them is then up to
your configuration tool/apps.
Alan
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists