mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: Sebastian Kuzminsky <seb@highlab.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: getting configuration info into a driver at load-time
Date: Tue, 28 Oct 2008 09:21:08 +0000	[thread overview]
Message-ID: <20081028092108.5d517d30@lxorguk.ukuu.org.uk> (raw)
In-Reply-To: <4906499C.8090308@highlab.com>

> I thought about exposing this config structure in /sys or /proc (in a 
> per-board directory), and let the user poke in the config values after 
> the driver has loaded, but I'd really prefer to make the information 
> available at load-time.

Various drivers do load it after load time (and for one that allows you
to change the configuration without a restart which is usually a good
thing). In some cases driver that need a configuration to do sane things
fails other I/O with an error like EIO until a configuration is
established via ioctl or sysfs or similar.
 
> Currently the driver has a module param array of char*, with each 
> board's configuration encoded into an ascii string which gets decoded 
> "by hand" in the driver.  Pretty grotty.
> 
> Is there some easier/cleaner way to do this?

You can always request_firmware() the tables... bit hackish but works

Alan

  reply	other threads:[~2008-10-28  9:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-27 23:07 Sebastian Kuzminsky
2008-10-28  9:21 ` Alan Cox [this message]
2008-10-28 22:14 ` Kay Sievers

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20081028092108.5d517d30@lxorguk.ukuu.org.uk \
    --to=alan@lxorguk.ukuu.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=seb@highlab.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome