From: "mika.westerberg@linux.intel.com" <mika.westerberg@linux.intel.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: linaro-acpi@lists.linaro.org, "Pallala,
Ramakrishna" <ramakrishna.pallala@intel.com>,
"linux-acpi@vger.kernel.org" <linux-acpi@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [Linaro-acpi] How to pass I2C platform_data under ACPI
Date: Thu, 3 Apr 2014 16:58:26 +0300 [thread overview]
Message-ID: <20140403135826.GF19349@intel.com> (raw)
In-Reply-To: <4539649.rsMWK1FkZ6@wuerfel>
On Thu, Apr 03, 2014 at 03:34:30PM +0200, Arnd Bergmann wrote:
> On Thursday 03 April 2014 14:38:33 mika.westerberg@linux.intel.com wrote:
> > On Thu, Apr 03, 2014 at 11:25:34AM +0000, Pallala, Ramakrishna wrote:
> > > >> In non ACPI environment I used to initialize the platform_data under
> > > >> board or platforms files. Under ACPI how do I do that?
> > > >
> > > >If you can't extract that information from ACPI namespace, then one option is to pass platform data along with the device ACPI ID:
> > > >
> > > >static const struct acpi_device_id my_acpi_match[] = {
> > > > { "MYID0001", (kernel_ulong_t)&my_platform_data }
> > > > ...
> > > > { },
> > > >};
> > >
> > > Thanks for the Quick reply.
> > >
> > > So If I want to use different platform_data for different boards can I
> > > do something like below?
> >
> > Exactly.
> >
> > > And initialize the platform data in either driver or in separate module
> > > which gets compiled along with driver?
> >
> > Typically it has been done in the same driver but I don't see any problems
> > having a separate module as well.
> >
> > > static const struct acpi_device_id my_acpi_match[] = {
> > > { "MYID0001", (kernel_ulong_t)&my_platform_data1 }
> > > { "MYID0002", (kernel_ulong_t)&my_platform_data2 }
> > > ...
> > > { },
>
> We definitely don't want per-board match entries, that does not scale.
> The driver should be reasonably generic and get all the necessary data
> out of well-defined tables. You can have different IDs when there
> are only a few cases that are actually relevant, but it has to be
> conceivable that the same driver get used on future hardware without
> changes.
Yes, I meant that when the platform data information is not available in
ACPI namespace, then (and only then) pass the data by means of different
IDs.
Preferably this information is included in the ACPI namespace.
next prev parent reply other threads:[~2014-04-03 13:58 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-03 8:10 How to pass I2C platform_data under ACPI Pallala, Ramakrishna
2014-04-03 11:12 ` mika.westerberg
2014-04-03 11:25 ` Pallala, Ramakrishna
2014-04-03 11:38 ` mika.westerberg
2014-04-03 13:34 ` [Linaro-acpi] " Arnd Bergmann
2014-04-03 13:58 ` mika.westerberg [this message]
2014-04-03 13:59 ` Pallala, Ramakrishna
2014-04-03 15:05 ` Arnd Bergmann
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=20140403135826.GF19349@intel.com \
--to=mika.westerberg@linux.intel.com \
--cc=arnd@arndb.de \
--cc=linaro-acpi@lists.linaro.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ramakrishna.pallala@intel.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;
as well as URLs for NNTP newsgroup(s).