From: Lukas Wunner <lukas at wunner.de>
To: devel@acpica.org
Subject: [Devel] [PATCH 0/5] Add acpi_dev_present
Date: Mon, 23 Nov 2015 14:35:08 +0000 [thread overview]
Message-ID: <cover.1448282995.git.lukas@wunner.de> (raw)
[-- Attachment #1: Type: text/plain, Size: 2229 bytes --]
Hi everyone,
I need to detect the presence of apple-gmux (ACPI HID "APP000B")
in several DRM drivers to handle backlight, runtime pm and
deferred probing properly.
There's an idiom in use by 7 other drivers to detect presence of
a particular ACPI HID which involves calling acpi_get_devices()
and passing it a minimal callback that does no further filtering.
However this approach results in lots of duplicate code.
This series adds acpi_dev_present(), the ACPI equivalent to
pci_dev_present(). It takes a HID string and returns a bool,
allowing us to simplify the drivers considerably by removing
all the duplicate callbacks and other boilerplate.
I've pushed these patches to GitHub to ease reviewing:
https://github.com/l1k/linux/commits/acpi_dev_present
Should this series find acceptance, it would probably be best if
we could agree to merge everything through a single repository,
e.g. acpi (git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm).
or alternatively alsa (which contains 5 of the 7 drivers involved).
Consequently I would like to invite the driver maintainers to
kindly provide acks (or raise objections, if any).
The series should not result in any functional changes, however
I lack the hardware to actually verify this for every driver
involved. I did test it with apple-gmux though.
Thanks,
Lukas
Lukas Wunner (5):
ACPICA: Add acpi_dev_present
eeepc-wmi: Use acpi_dev_present
acer-wmi: Use acpi_dev_present
ALSA: hda - Use acpi_dev_present
ASoC: Intel: Use acpi_dev_present
drivers/acpi/acpica/nsxfeval.c | 46 ++++++++++++++++++++++++++++
drivers/platform/x86/acer-wmi.c | 16 +++-------
drivers/platform/x86/eeepc-wmi.c | 24 ++-------------
include/acpi/acpixf.h | 7 +++++
sound/pci/hda/thinkpad_helper.c | 17 ++--------
sound/soc/intel/atom/sst/sst_acpi.c | 12 +-------
sound/soc/intel/boards/cht_bsw_max98090_ti.c | 17 ++--------
sound/soc/intel/boards/cht_bsw_rt5645.c | 13 +-------
sound/soc/intel/common/sst-acpi.c | 12 +-------
9 files changed, 66 insertions(+), 98 deletions(-)
--
1.8.5.2 (Apple Git-48)
WARNING: multiple messages have this Message-ID (diff)
From: Lukas Wunner <lukas@wunner.de>
To: linux-acpi@vger.kernel.org, devel@acpica.org
Cc: Hui Wang <hui.wang@canonical.com>,
alsa-devel@alsa-project.org, Takashi Iwai <tiwai@suse.de>,
platform-driver-x86@vger.kernel.org, "Lee,
Chun-Yi" <jlee@suse.com>, Mark Brown <broonie@kernel.org>,
Corentin Chary <corentin.chary@gmail.com>,
Darren Hart <dvhart@infradead.org>
Subject: [PATCH 0/5] Add acpi_dev_present
Date: Mon, 23 Nov 2015 15:34:55 +0100 [thread overview]
Message-ID: <cover.1448282995.git.lukas@wunner.de> (raw)
Hi everyone,
I need to detect the presence of apple-gmux (ACPI HID "APP000B")
in several DRM drivers to handle backlight, runtime pm and
deferred probing properly.
There's an idiom in use by 7 other drivers to detect presence of
a particular ACPI HID which involves calling acpi_get_devices()
and passing it a minimal callback that does no further filtering.
However this approach results in lots of duplicate code.
This series adds acpi_dev_present(), the ACPI equivalent to
pci_dev_present(). It takes a HID string and returns a bool,
allowing us to simplify the drivers considerably by removing
all the duplicate callbacks and other boilerplate.
I've pushed these patches to GitHub to ease reviewing:
https://github.com/l1k/linux/commits/acpi_dev_present
Should this series find acceptance, it would probably be best if
we could agree to merge everything through a single repository,
e.g. acpi (git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm).
or alternatively alsa (which contains 5 of the 7 drivers involved).
Consequently I would like to invite the driver maintainers to
kindly provide acks (or raise objections, if any).
The series should not result in any functional changes, however
I lack the hardware to actually verify this for every driver
involved. I did test it with apple-gmux though.
Thanks,
Lukas
Lukas Wunner (5):
ACPICA: Add acpi_dev_present
eeepc-wmi: Use acpi_dev_present
acer-wmi: Use acpi_dev_present
ALSA: hda - Use acpi_dev_present
ASoC: Intel: Use acpi_dev_present
drivers/acpi/acpica/nsxfeval.c | 46 ++++++++++++++++++++++++++++
drivers/platform/x86/acer-wmi.c | 16 +++-------
drivers/platform/x86/eeepc-wmi.c | 24 ++-------------
include/acpi/acpixf.h | 7 +++++
sound/pci/hda/thinkpad_helper.c | 17 ++--------
sound/soc/intel/atom/sst/sst_acpi.c | 12 +-------
sound/soc/intel/boards/cht_bsw_max98090_ti.c | 17 ++--------
sound/soc/intel/boards/cht_bsw_rt5645.c | 13 +-------
sound/soc/intel/common/sst-acpi.c | 12 +-------
9 files changed, 66 insertions(+), 98 deletions(-)
--
1.8.5.2 (Apple Git-48)
next reply other threads:[~2015-11-23 14:35 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-23 14:34 Lukas Wunner [this message]
2015-11-23 14:35 ` [Devel] [PATCH 0/5] Add acpi_dev_present Lukas Wunner
2015-11-23 14:34 ` [Devel] [PATCH 4/5] ALSA: hda - Use acpi_dev_present Lukas Wunner
2015-11-23 14:34 ` Lukas Wunner
2015-11-24 1:51 ` [alsa-devel] " Hui Wang
2015-11-23 14:34 ` [Devel] [PATCH 2/5] eeepc-wmi: " Lukas Wunner
2015-11-23 14:34 ` Lukas Wunner
2015-11-23 19:04 ` Darren Hart
2015-11-23 19:55 ` [Devel] " Lukas Wunner
2015-11-23 19:55 ` Lukas Wunner
2015-11-23 21:00 ` Darren Hart
2015-11-23 22:35 ` Rafael J. Wysocki
2015-11-24 17:08 ` Darren Hart
2015-11-23 14:34 ` [Devel] [PATCH 3/5] acer-wmi: " Lukas Wunner
2015-11-23 14:34 ` Lukas Wunner
2015-11-23 19:06 ` Darren Hart
2015-11-23 14:34 ` [Devel] [PATCH 5/5] ASoC: Intel: " Lukas Wunner
2015-11-23 14:34 ` Lukas Wunner
2015-11-23 14:48 ` Mark Brown
2015-11-23 22:37 ` Rafael J. Wysocki
2015-11-23 14:34 ` [PATCH 1/5] ACPICA: Add acpi_dev_present Lukas Wunner
2015-11-23 14:35 ` [Devel] " Lukas Wunner
2015-11-23 22:34 ` Rafael J. Wysocki
2015-11-23 22:22 ` Moore, Robert
2015-11-23 22:22 ` [Devel] " Moore, Robert
2015-11-23 23:32 ` Lukas Wunner
2015-11-23 23:32 ` [Devel] " Lukas Wunner
2015-11-24 4:40 ` Hanjun Guo
2015-11-24 14:15 ` Moore, Robert
2015-11-24 14:15 ` [Devel] " Moore, Robert
2015-11-24 14:22 ` Rafael J. Wysocki
2015-11-24 14:54 ` Hanjun Guo
2015-11-24 14:54 ` [Devel] " Hanjun Guo
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=cover.1448282995.git.lukas@wunner.de \
--to=devel@acpica.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.