From: Alan <alan@linux.intel.com>
To: dbaryshkov@gmail.com, dwmw2@infradead.org, sre@kernel.org,
linux-pm@vger.kernel.org
Subject: [PATCH 2/2] goldfish: Enable ACPI-based enumeration for goldfish battery
Date: Fri, 26 Feb 2016 18:45:50 +0000 [thread overview]
Message-ID: <20160226184541.2962.40016.stgit@localhost.localdomain> (raw)
In-Reply-To: <20160226184455.2962.92705.stgit@localhost.localdomain>
From: Yu Ning <yu.ning@intel.com>
Besides adding ACPI bindings to the goldfish battery driver, modify the
ACPI driver to inform it that goldfish battery is a platform device.
The latter step is necessary with kernel 3.16 or newer.
Signed-off-by: Yu Ning <yu.ning@intel.com>
Signed-off-by: Jin Qian <jinqian@android.com>
Signed-off-by: Alan <alan@linux.intel.com>
---
drivers/power/goldfish_battery.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/power/goldfish_battery.c b/drivers/power/goldfish_battery.c
index 7510796..f5c525e 100644
--- a/drivers/power/goldfish_battery.c
+++ b/drivers/power/goldfish_battery.c
@@ -24,6 +24,7 @@
#include <linux/pci.h>
#include <linux/interrupt.h>
#include <linux/io.h>
+#include <linux/acpi.h>
struct goldfish_battery_data {
void __iomem *reg_base;
@@ -233,12 +234,19 @@ static const struct of_device_id goldfish_battery_of_match[] = {
};
MODULE_DEVICE_TABLE(of, goldfish_battery_of_match);
+static const struct acpi_device_id goldfish_battery_acpi_match[] = {
+ { "GFSH0001", 0 },
+ { },
+};
+MODULE_DEVICE_TABLE(acpi, goldfish_battery_acpi_match);
+
static struct platform_driver goldfish_battery_device = {
.probe = goldfish_battery_probe,
.remove = goldfish_battery_remove,
.driver = {
.name = "goldfish-battery",
.of_match_table = goldfish_battery_of_match,
+ .acpi_match_table = ACPI_PTR(goldfish_battery_acpi_match),
}
};
module_platform_driver(goldfish_battery_device);
next prev parent reply other threads:[~2016-02-26 18:46 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-26 18:45 [PATCH 1/2] power: goldfish_battery: add devicetree bindings Alan
2016-02-26 18:45 ` Alan [this message]
2016-02-26 20:03 ` [PATCH 2/2] goldfish: Enable ACPI-based enumeration for goldfish battery Sebastian Reichel
2016-03-01 23:27 ` Alan Cox
2016-03-03 14:19 ` [PATCH 1/2] power: goldfish_battery: add devicetree bindings 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=20160226184541.2962.40016.stgit@localhost.localdomain \
--to=alan@linux.intel.com \
--cc=dbaryshkov@gmail.com \
--cc=dwmw2@infradead.org \
--cc=linux-pm@vger.kernel.org \
--cc=sre@kernel.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).