From: "Pali Rohár" <pali.rohar@gmail.com>
To: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: "Jean Delvare" <jdelvare@suse.com>,
"Wolfram Sang" <wsa@the-dreams.de>,
"Michał Kępień" <kernel@kempniu.pl>,
"Steven Honeyman" <stevenhoneyman@gmail.com>,
"Valdis Kletnieks" <Valdis.Kletnieks@vt.edu>,
"Jochen Eisinger" <jochen@penguin-breeder.org>,
"Gabriele Mazzotta" <gabriele.mzt@gmail.com>,
"Andy Lutomirski" <luto@kernel.org>,
"Mario Limonciello" <Mario_Limonciello@dell.com>,
"Alex Hung" <alex.hung@canonical.com>,
"Takashi Iwai" <tiwai@suse.de>,
linux-i2c <linux-i2c@vger.kernel.org>,
"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>,
"Platform Driver" <platform-driver-x86@vger.kernel.org>
Subject: Re: [PATCH v2] i2c: i801: Register optional lis3lv02d i2c device on Dell machines
Date: Mon, 12 Feb 2018 16:30:12 +0100 [thread overview]
Message-ID: <20180212153012.vffvjmz26ifyxbj5@pali> (raw)
In-Reply-To: <CAHp75Vf=-RQvCtS684Q5+X=YKmZXgP_1kr0to8BGZX0jQAsuZw@mail.gmail.com>
On Wednesday 31 January 2018 14:27:51 Andy Shevchenko wrote:
> On Wed, Jan 31, 2018 at 2:03 PM, Pali Rohár <pali.rohar@gmail.com> wrote:
> > On Sunday 28 January 2018 17:00:35 Andy Shevchenko wrote:
> >> On Sun, Jan 28, 2018 at 4:45 PM, Pali Rohár <pali.rohar@gmail.com> wrote:
>
> >> > ACPI device name is SMO8800, SMO8810, ... Will that acpi_dev_present
> >> > function match only prefix and not exact string?
> >>
> >> OK, fair enough.
> >>
> >> Do we have more users of such pattern?
> >
> > I have not seen this ACPI pattern yet, so probably not.
>
> I see. So, my one concern is the implicit names of the devices. I
> would like rather to see
>
> ... acpi_device_id ... []= {
> {"SMO8800"},
> {"SMO8810"},
> ...
> {}
> };
Following table already exists in dell-smo8800.c file:
static const struct acpi_device_id smo8800_ids[] = {
{ "SMO8800", 0 },
{ "SMO8801", 0 },
{ "SMO8810", 0 },
{ "SMO8811", 0 },
{ "SMO8820", 0 },
{ "SMO8821", 0 },
{ "SMO8830", 0 },
{ "SMO8831", 0 },
{ "", 0 },
};
MODULE_DEVICE_TABLE(acpi, smo8800_ids);
Can we reuse it? Maybe moving array smo8800_ids[] into some header file
(which one?) and statically inline it? Or having it only in
dell-smo8800.c file and exporting its symbol? Or is there better idea?
For sure I do not want to copy paste this table into another module and
maintaining two copies of this list.
--
Pali Rohár
pali.rohar@gmail.com
next prev parent reply other threads:[~2018-02-12 15:30 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-27 13:32 [PATCH v2] i2c: i801: Register optional lis3lv02d i2c device on Dell machines Pali Rohár
2018-01-28 14:39 ` Andy Shevchenko
2018-01-28 14:45 ` Pali Rohár
2018-01-28 15:00 ` Andy Shevchenko
2018-01-31 12:03 ` Pali Rohár
2018-01-31 12:27 ` Andy Shevchenko
2018-02-12 15:30 ` Pali Rohár [this message]
2018-02-13 14:55 ` Andy Shevchenko
2018-02-13 15:00 ` Pali Rohár
2018-02-13 15:06 ` Andy Shevchenko
2018-02-13 16:50 ` Pali Rohár
2018-02-13 17:01 ` Andy Shevchenko
2018-02-13 17:05 ` Andy Shevchenko
2018-02-26 20:32 ` Wolfram Sang
2018-03-08 22:53 ` Pali Rohár
2018-04-18 11:46 ` Pali Rohár
2019-04-27 6:48 ` Pali Rohár
2019-05-28 9:19 ` Jean Delvare
2019-05-28 9:41 ` Pali Rohár
2019-05-28 9:50 ` Jean Delvare
2019-05-28 9:54 ` Pali Rohár
2019-05-28 10:00 ` Jean Delvare
2018-02-11 22:03 ` Michał Kępień
2018-02-12 15:25 ` Andy Shevchenko
2019-06-02 13:20 ` [PATCH v3] " Pali Rohár
2019-06-04 14:57 ` Jean Delvare
2019-06-04 22:30 ` Pali Rohár
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=20180212153012.vffvjmz26ifyxbj5@pali \
--to=pali.rohar@gmail.com \
--cc=Mario_Limonciello@dell.com \
--cc=Valdis.Kletnieks@vt.edu \
--cc=alex.hung@canonical.com \
--cc=andy.shevchenko@gmail.com \
--cc=gabriele.mzt@gmail.com \
--cc=jdelvare@suse.com \
--cc=jochen@penguin-breeder.org \
--cc=kernel@kempniu.pl \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@kernel.org \
--cc=platform-driver-x86@vger.kernel.org \
--cc=stevenhoneyman@gmail.com \
--cc=tiwai@suse.de \
--cc=wsa@the-dreams.de \
/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).