From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Mika Westerberg <mika.westerberg@linux.intel.com>,
"Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: Hans de Goede <hdegoede@redhat.com>, Len Brown <lenb@kernel.org>,
Sebastian Reichel <sre@kernel.org>, Chen-Yu Tsai <wens@csie.org>,
linux-acpi@vger.kernel.org, linux-pm@vger.kernel.org
Subject: Re: [PATCH 1/2] acpi: utils: Add new acpi_dev_present helper
Date: Wed, 29 Mar 2017 19:50:52 +0300 [thread overview]
Message-ID: <1490806252.708.53.camel@linux.intel.com> (raw)
In-Reply-To: <20170329092638.GU2957@lahna.fi.intel.com>
On Wed, 2017-03-29 at 12:26 +0300, Mika Westerberg wrote:
> On Tue, Mar 28, 2017 at 11:42:29PM +0200, Rafael J. Wysocki wrote:
> > On Thursday, March 16, 2017 05:17:35 PM Hans de Goede wrote:
> > > acpi_dev_found just iterates over all acpi-ids and sees if one
> > > matches.
> > > This means that it will return true for devices which are in the
> > > dsdt
> > > but disabled (their _STA method returns 0).
> > >
> > > For some drivers it is useful to be able to check if a certain hid
> > > is not only present in the namespace, but also actually present as
> > > in
> > > acpi_device_is_present() will return true for the device. For
> > > example
> > > because if a certain device is present then the driver will want
> > > to use
> > > an extcon or IIO adc channel provided by that device.
> > >
> > > This commit adds a new acpi_dev_present helper which drivers can
> > > use
> > > to this end.
> > >
> > > Arguably acpi_dev_present is what acpi_dev_found should have been,
> > > but
> > > there are too many users to just change acpi_dev_found without the
> > > risk
> > > of breaking something.
> > >
> > > Signed-off-by: Hans de Goede <hdegoede@redhat.com>
> >
> > Andy, Mika, any concerns about this patch, please?
>
> No concerns from my side.
>
> Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Neither from me.
I briefly looked in the code and indeed we have no existing helper as a
such, so, if you think this is the best way to go, I would agree.
--
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Intel Finland Oy
next prev parent reply other threads:[~2017-03-29 16:50 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-16 16:17 [PATCH 0/2] Only wait for INT3394 extcon to show ip if enabled Hans de Goede
2017-03-16 16:17 ` [PATCH 1/2] acpi: utils: Add new acpi_dev_present helper Hans de Goede
2017-03-28 21:42 ` Rafael J. Wysocki
2017-03-29 9:26 ` Mika Westerberg
2017-03-29 16:50 ` Andy Shevchenko [this message]
2017-03-30 8:33 ` Lukas Wunner
2017-03-30 20:04 ` Rafael J. Wysocki
2017-04-07 10:39 ` Hans de Goede
2017-03-16 16:17 ` [PATCH 2/2] power: supply: axp288_charger: Only wait for INT3496 device if present Hans de Goede
2017-03-20 1:30 ` Sebastian Reichel
2017-03-20 8:56 ` Chen-Yu Tsai
2017-03-20 9:19 ` Sebastian Reichel
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=1490806252.708.53.camel@linux.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=hdegoede@redhat.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=mika.westerberg@linux.intel.com \
--cc=rjw@rjwysocki.net \
--cc=sre@kernel.org \
--cc=wens@csie.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;
as well as URLs for NNTP newsgroup(s).