From: Daniel Baluta <daniel.baluta@intel.com>
To: jic23@kernel.org, pmeerw@pmeerw.net
Cc: knaack.h@gmx.de, lars@metafoo.de, linux-kernel@vger.kernel.org,
linux-iio@vger.kernel.org, daniel.baluta@intel.com
Subject: [PATCH v2 3/3] iio: magnetometer: Add ACPI support for MMC35240
Date: Fri, 24 Apr 2015 18:58:32 +0300 [thread overview]
Message-ID: <1429891112-11888-4-git-send-email-daniel.baluta@intel.com> (raw)
In-Reply-To: <1429891112-11888-1-git-send-email-daniel.baluta@intel.com>
We assume that ACPI device tables use MMC35240 to
identify MEMSIC's 3 axis magnetic sensor.
Signed-off-by: Daniel Baluta <daniel.baluta@intel.com>
---
drivers/iio/magnetometer/mmc35240.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/iio/magnetometer/mmc35240.c b/drivers/iio/magnetometer/mmc35240.c
index 7a52c3e..3282862 100644
--- a/drivers/iio/magnetometer/mmc35240.c
+++ b/drivers/iio/magnetometer/mmc35240.c
@@ -17,6 +17,7 @@
#include <linux/i2c.h>
#include <linux/delay.h>
#include <linux/regmap.h>
+#include <linux/acpi.h>
#include <linux/pm.h>
#include <linux/iio/iio.h>
@@ -481,6 +482,12 @@ static const struct dev_pm_ops mmc35240_pm_ops = {
SET_SYSTEM_SLEEP_PM_OPS(mmc35240_suspend, mmc35240_resume)
};
+static const struct acpi_device_id mmc35240_acpi_match[] = {
+ {"MMC35240", 0},
+ { },
+};
+MODULE_DEVICE_TABLE(acpi, mmc35240_acpi_match);
+
static const struct i2c_device_id mmc35240_id[] = {
{"MMC35240", 0},
{}
@@ -491,6 +498,7 @@ static struct i2c_driver mmc35240_driver = {
.driver = {
.name = MMC35240_DRV_NAME,
.pm = &mmc35240_pm_ops,
+ .acpi_match_table = ACPI_PTR(mmc35240_acpi_match),
},
.probe = mmc35240_probe,
.id_table = mmc35240_id,
--
1.9.1
next prev parent reply other threads:[~2015-04-24 15:58 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-24 15:58 [PATCH v2 0/3] Introduce support for MMC35240 magnetic sensor Daniel Baluta
2015-04-24 15:58 ` [PATCH v2 1/3] iio: magnetometer: Add support for MEMSIC MMC35240 sensor Daniel Baluta
2015-05-08 14:08 ` Jonathan Cameron
2015-06-28 23:07 ` Hartmut Knaack
2015-06-29 7:52 ` Daniel Baluta
2015-06-29 19:17 ` Hartmut Knaack
2015-06-30 9:35 ` Daniel Baluta
2015-04-24 15:58 ` [PATCH v2 2/3] iio: magnetometer: mmc35240: Add PM sleep support Daniel Baluta
2015-05-08 14:08 ` Jonathan Cameron
2015-04-24 15:58 ` Daniel Baluta [this message]
2015-05-08 14:09 ` [PATCH v2 3/3] iio: magnetometer: Add ACPI support for MMC35240 Jonathan Cameron
2015-04-26 17:00 ` [PATCH v2 0/3] Introduce support for MMC35240 magnetic sensor Jonathan Cameron
2015-05-08 11:29 ` Daniel Baluta
2015-05-08 14:04 ` jic23
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=1429891112-11888-4-git-send-email-daniel.baluta@intel.com \
--to=daniel.baluta@intel.com \
--cc=jic23@kernel.org \
--cc=knaack.h@gmx.de \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pmeerw@pmeerw.net \
/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).