From: Andy Shevchenko <andy.shevchenko@gmail.com>
To: "Pali Rohár" <pali.rohar@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: Sun, 28 Jan 2018 17:00:35 +0200 [thread overview]
Message-ID: <CAHp75VdU1OMTqLcDuzhQMHuX9rMhjw6p3CkSWaW5Y4kOy8ggqg@mail.gmail.com> (raw)
In-Reply-To: <20180128144509.pobnj7cayc4psgrj@pali>
On Sun, Jan 28, 2018 at 4:45 PM, Pali Rohár <pali.rohar@gmail.com> wrote:
> On Sunday 28 January 2018 16:39:25 Andy Shevchenko wrote:
>> On Sat, Jan 27, 2018 at 3:32 PM, Pali Rohár <pali.rohar@gmail.com> wrote:
>> > +static bool is_dell_system_with_lis3lv02d(void)
>> > +{
>>
>> > + /*
>> > + * Check that ACPI device SMO88xx exists and is enabled. That ACPI
>> > + * device represent our ST microelectronics lis3lv02d accelerometer but
>> > + * unfortunately without any other information (like i2c address).
>> > + */
>>
>> Isn't it simple
>>
>> return acpi_dev_present("SMO88", NULL, -1);
>>
>> call?
>
> 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? If so, it might make sense to
introduce a generic helper for that which takes a list of HIDs on
input.
(Yes, I do not like matching pattern like "XYZhh*", I prefer explicit
list of HIDs. Rationale to do so: a) any new potential collision is
excluded, b) we can easily grep kernel for a users per HID)
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2018-01-28 15:00 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 [this message]
2018-01-31 12:03 ` Pali Rohár
2018-01-31 12:27 ` Andy Shevchenko
2018-02-12 15:30 ` Pali Rohár
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=CAHp75VdU1OMTqLcDuzhQMHuX9rMhjw6p3CkSWaW5Y4kOy8ggqg@mail.gmail.com \
--to=andy.shevchenko@gmail.com \
--cc=Mario_Limonciello@dell.com \
--cc=Valdis.Kletnieks@vt.edu \
--cc=alex.hung@canonical.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=pali.rohar@gmail.com \
--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).