From: Jonathan Cameron <jic23@kernel.org>
To: Olof Johansson <olof@lixom.net>
Cc: Jonathan Cameron <jic23@cam.ac.uk>,
Greg Kroah-Hartman <gregkh@suse.de>,
devicetree-discuss@lists.ozlabs.org, linux-iio@vger.kernel.org
Subject: Re: [PATCH] staging:iio: ak8975: add of_match table for device-tree probing
Date: Sat, 31 Dec 2011 18:43:33 +0000 [thread overview]
Message-ID: <4EFF57D5.8010904@kernel.org> (raw)
In-Reply-To: <1324608402-3241-1-git-send-email-olof@lixom.net>
On 12/23/2011 02:46 AM, Olof Johansson wrote:
> Just like isl29018; trivial addition. Using both asahi-kasei,ak8975 and
> the non-prefixed version (I couldn't figure out if Asahi Kasei had a
> stock symbol to use, I only found numerical indexes for their stock info).
Again, fine by me but a confirmation from someone more device tree
oriented would be great as well.
>
> Signed-off-by: Olof Johansson <olof@lixom.net>
Acked-by: Jonathan Cameron <jic23@kernel.org>
> ---
> drivers/staging/iio/magnetometer/ak8975.c | 8 ++++++++
> 1 files changed, 8 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/staging/iio/magnetometer/ak8975.c b/drivers/staging/iio/magnetometer/ak8975.c
> index 3158f12..d5ddac3 100644
> --- a/drivers/staging/iio/magnetometer/ak8975.c
> +++ b/drivers/staging/iio/magnetometer/ak8975.c
> @@ -564,9 +564,17 @@ static const struct i2c_device_id ak8975_id[] = {
>
> MODULE_DEVICE_TABLE(i2c, ak8975_id);
>
> +static const struct of_device_id ak8975_of_match[] = {
> + { .compatible = "asahi-kasei,ak8975", },
> + { .compatible = "ak8975", },
> + { }
> +};
> +MODULE_DEVICE_TABLE(of, ak8975_of_match);
> +
> static struct i2c_driver ak8975_driver = {
> .driver = {
> .name = "ak8975",
> + .of_match_table = ak8975_of_match,
> },
> .probe = ak8975_probe,
> .remove = __devexit_p(ak8975_remove),
WARNING: multiple messages have this Message-ID (diff)
From: Jonathan Cameron <jic23-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
To: Olof Johansson <olof-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org>
Cc: Jonathan Cameron <jic23-KWPb1pKIrIJaa/9Udqfwiw@public.gmane.org>,
Greg Kroah-Hartman <gregkh-l3A5Bk7waGM@public.gmane.org>,
devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org,
linux-iio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH] staging:iio: ak8975: add of_match table for device-tree probing
Date: Sat, 31 Dec 2011 18:43:33 +0000 [thread overview]
Message-ID: <4EFF57D5.8010904@kernel.org> (raw)
In-Reply-To: <1324608402-3241-1-git-send-email-olof-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org>
On 12/23/2011 02:46 AM, Olof Johansson wrote:
> Just like isl29018; trivial addition. Using both asahi-kasei,ak8975 and
> the non-prefixed version (I couldn't figure out if Asahi Kasei had a
> stock symbol to use, I only found numerical indexes for their stock info).
Again, fine by me but a confirmation from someone more device tree
oriented would be great as well.
>
> Signed-off-by: Olof Johansson <olof-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org>
Acked-by: Jonathan Cameron <jic23-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
> ---
> drivers/staging/iio/magnetometer/ak8975.c | 8 ++++++++
> 1 files changed, 8 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/staging/iio/magnetometer/ak8975.c b/drivers/staging/iio/magnetometer/ak8975.c
> index 3158f12..d5ddac3 100644
> --- a/drivers/staging/iio/magnetometer/ak8975.c
> +++ b/drivers/staging/iio/magnetometer/ak8975.c
> @@ -564,9 +564,17 @@ static const struct i2c_device_id ak8975_id[] = {
>
> MODULE_DEVICE_TABLE(i2c, ak8975_id);
>
> +static const struct of_device_id ak8975_of_match[] = {
> + { .compatible = "asahi-kasei,ak8975", },
> + { .compatible = "ak8975", },
> + { }
> +};
> +MODULE_DEVICE_TABLE(of, ak8975_of_match);
> +
> static struct i2c_driver ak8975_driver = {
> .driver = {
> .name = "ak8975",
> + .of_match_table = ak8975_of_match,
> },
> .probe = ak8975_probe,
> .remove = __devexit_p(ak8975_remove),
next prev parent reply other threads:[~2011-12-31 18:43 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-23 2:46 [PATCH] staging:iio: ak8975: add of_match table for device-tree probing Olof Johansson
2011-12-23 2:46 ` Olof Johansson
2011-12-31 18:43 ` Jonathan Cameron [this message]
2011-12-31 18:43 ` Jonathan Cameron
2012-01-02 8:58 ` Grant Likely
2012-01-02 8:58 ` Grant Likely
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=4EFF57D5.8010904@kernel.org \
--to=jic23@kernel.org \
--cc=devicetree-discuss@lists.ozlabs.org \
--cc=gregkh@suse.de \
--cc=jic23@cam.ac.uk \
--cc=linux-iio@vger.kernel.org \
--cc=olof@lixom.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 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.