public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Alan Cox <alan@linux.intel.com>
To: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: linux-kernel@vger.kernel.org, x86@kernel.org
Subject: Re: [PATCH] x86/mrst: add SFI platform device parsing code
Date: Mon, 20 Sep 2010 15:27:26 +0100	[thread overview]
Message-ID: <20100920152726.68ac2d84@linux.intel.com> (raw)
In-Reply-To: <20100920150431.GD31167@sirena.org.uk>

> > +static void *lis331dl_platform_data(void *info)
> > +{
> > +	static short intr2nd_pdata;
> > +	struct i2c_board_info *i2c_info = (struct i2c_board_info
> > *)info;
> 
> It's rather concerning that the parser here needs to have all this
> knowledge about the specific chips that will be on the boards.  Is
> there a plan for how this will be managed once system integrators
> begin putting other chips onto Moorestown boards?

It depends on the device. The information for the platform device has
to come from somewhere and the kernel has no formal standard structure
for private data passed from platform devices - so in a lot of cases
its really just the needed glue so the platform device code in
drivers/i2c etc stays independent.

For a device that doesn't need any private structure passing it's just
a case of knowing the Linux name that matches the firmware description.
For a chip that already has a Linux driver that expects private data
(or a new driver that needs to) the info has to come from somewhere and
Linux packages it in per device fashion.

The parser has the knowledge precisely because we don't want to put the
knowledge in the driver.

Alan


  reply	other threads:[~2010-09-20 15:13 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-20 14:01 [PATCH] x86/mrst: add SFI platform device parsing code Alan Cox
2010-09-20 15:04 ` Mark Brown
2010-09-20 14:27   ` Alan Cox [this message]
2010-09-20 15:27     ` Mark Brown
2010-09-22  4:03       ` Grant Likely
2010-09-22 15:22         ` David Woodhouse
2010-09-22 15:33           ` Mark Brown
2010-09-22 15:35             ` David Woodhouse
2010-09-22 15:39               ` Mark Brown
2010-09-22 22:04           ` Alan Cox
2010-09-22 22:15         ` Alan Cox
2010-09-23  6:07           ` Grant Likely
2010-09-23  9:54             ` Mark Brown
2010-09-23 10:27               ` Alan Cox
2010-09-23 10:27                 ` Mark Brown
2010-09-23 10:58                   ` Alan Cox
2010-09-23 10:52                     ` Mark Brown
2010-09-23 10:13                       ` Alan Cox
2010-09-23 14:11                         ` Mark Brown
2010-09-23 13:27                           ` Alan Cox
2010-09-23 14:46                             ` Mark Brown
2010-09-23 15:55                               ` Alan Cox
2010-09-23 10:48             ` Alan Cox
2010-09-23 10:54               ` Mark Brown

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=20100920152726.68ac2d84@linux.intel.com \
    --to=alan@linux.intel.com \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=x86@kernel.org \
    /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