All of lore.kernel.org
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: Denis Carikli <denis-fO0SIAKYzcbQT0dZR+AlfA@public.gmane.org>,
	Jean Delvare <jdelvare-IBi9RG/b67k@public.gmane.org>,
	Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	"Eric Bénard" <eric-fO0SIAKYzcbQT0dZR+AlfA@public.gmane.org>,
	lm-sensors-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org
Subject: Re: [lm-sensors] [PATCH 2/3] hwmon: ads7828: Add devicetree support
Date: Wed, 22 Jul 2015 16:37:30 +0000	[thread overview]
Message-ID: <55AFC6CA.7070408@roeck-us.net> (raw)
In-Reply-To: <1437582620-2294-2-git-send-email-denis-fO0SIAKYzcbQT0dZR+AlfA@public.gmane.org>

On 07/22/2015 09:30 AM, Denis Carikli wrote:
> Signed-off-by: Denis Carikli <denis@eukrea.com>
> ---

i2c drivers do not need explicit devicetree support.

Guenter

>   drivers/hwmon/ads7828.c | 11 +++++++++++
>   1 file changed, 11 insertions(+)
>
> diff --git a/drivers/hwmon/ads7828.c b/drivers/hwmon/ads7828.c
> index 6c99ee7..a2d297f 100644
> --- a/drivers/hwmon/ads7828.c
> +++ b/drivers/hwmon/ads7828.c
> @@ -31,6 +31,7 @@
>   #include <linux/i2c.h>
>   #include <linux/init.h>
>   #include <linux/module.h>
> +#include <linux/of.h>
>   #include <linux/platform_data/ads7828.h>
>   #include <linux/regmap.h>
>   #include <linux/slab.h>
> @@ -160,6 +161,15 @@ static int ads7828_probe(struct i2c_client *client,
>   	return PTR_ERR_OR_ZERO(hwmon_dev);
>   }
>
> +#ifdef CONFIG_OF
> +static const struct of_device_id ads7828_of_match[] = {
> +	{ .compatible = "ti,ads7828", .data = (void *) ads7828, },
> +	{ .compatible = "ti,ads7830", .data = (void *) ads7830, },
> +
> +};
> +MODULE_DEVICE_TABLE(of, ads7828_of_match);
> +#endif
> +
>   static const struct i2c_device_id ads7828_device_ids[] = {
>   	{ "ads7828", ads7828 },
>   	{ "ads7830", ads7830 },
> @@ -170,6 +180,7 @@ MODULE_DEVICE_TABLE(i2c, ads7828_device_ids);
>   static struct i2c_driver ads7828_driver = {
>   	.driver = {
>   		.name = "ads7828",
> +		.of_match_table = of_match_ptr(ads7828_of_match),
>   	},
>
>   	.id_table = ads7828_device_ids,
>


_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

WARNING: multiple messages have this Message-ID (diff)
From: Guenter Roeck <linux-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>
To: Denis Carikli <denis-fO0SIAKYzcbQT0dZR+AlfA@public.gmane.org>,
	Jean Delvare <jdelvare-IBi9RG/b67k@public.gmane.org>,
	Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	"Eric Bénard" <eric-fO0SIAKYzcbQT0dZR+AlfA@public.gmane.org>,
	lm-sensors-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org
Subject: Re: [lm-sensors] [PATCH 2/3] hwmon: ads7828: Add devicetree support
Date: Wed, 22 Jul 2015 09:37:30 -0700	[thread overview]
Message-ID: <55AFC6CA.7070408@roeck-us.net> (raw)
In-Reply-To: <1437582620-2294-2-git-send-email-denis-fO0SIAKYzcbQT0dZR+AlfA@public.gmane.org>

On 07/22/2015 09:30 AM, Denis Carikli wrote:
> Signed-off-by: Denis Carikli <denis-fO0SIAKYzcbQT0dZR+AlfA@public.gmane.org>
> ---

i2c drivers do not need explicit devicetree support.

Guenter

>   drivers/hwmon/ads7828.c | 11 +++++++++++
>   1 file changed, 11 insertions(+)
>
> diff --git a/drivers/hwmon/ads7828.c b/drivers/hwmon/ads7828.c
> index 6c99ee7..a2d297f 100644
> --- a/drivers/hwmon/ads7828.c
> +++ b/drivers/hwmon/ads7828.c
> @@ -31,6 +31,7 @@
>   #include <linux/i2c.h>
>   #include <linux/init.h>
>   #include <linux/module.h>
> +#include <linux/of.h>
>   #include <linux/platform_data/ads7828.h>
>   #include <linux/regmap.h>
>   #include <linux/slab.h>
> @@ -160,6 +161,15 @@ static int ads7828_probe(struct i2c_client *client,
>   	return PTR_ERR_OR_ZERO(hwmon_dev);
>   }
>
> +#ifdef CONFIG_OF
> +static const struct of_device_id ads7828_of_match[] = {
> +	{ .compatible = "ti,ads7828", .data = (void *) ads7828, },
> +	{ .compatible = "ti,ads7830", .data = (void *) ads7830, },
> +
> +};
> +MODULE_DEVICE_TABLE(of, ads7828_of_match);
> +#endif
> +
>   static const struct i2c_device_id ads7828_device_ids[] = {
>   	{ "ads7828", ads7828 },
>   	{ "ads7830", ads7830 },
> @@ -170,6 +180,7 @@ MODULE_DEVICE_TABLE(i2c, ads7828_device_ids);
>   static struct i2c_driver ads7828_driver = {
>   	.driver = {
>   		.name = "ads7828",
> +		.of_match_table = of_match_ptr(ads7828_of_match),
>   	},
>
>   	.id_table = ads7828_device_ids,
>

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2015-07-22 16:37 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-22 16:30 [lm-sensors] [PATCH 1/3] hwmon: lm92: Add devicetree support Denis Carikli
2015-07-22 16:30 ` Denis Carikli
     [not found] ` <1437582620-2294-1-git-send-email-denis-fO0SIAKYzcbQT0dZR+AlfA@public.gmane.org>
2015-07-22 16:30   ` [lm-sensors] [PATCH 2/3] hwmon: ads7828: " Denis Carikli
2015-07-22 16:30     ` Denis Carikli
     [not found]     ` <1437582620-2294-2-git-send-email-denis-fO0SIAKYzcbQT0dZR+AlfA@public.gmane.org>
2015-07-22 16:37       ` Guenter Roeck [this message]
2015-07-22 16:37         ` [lm-sensors] " Guenter Roeck
2015-07-22 16:30   ` [lm-sensors] [PATCH 3/3] hwmon: ads7828: Add devicetree documentation Denis Carikli
2015-07-22 16:30     ` Denis Carikli
     [not found]     ` <1437582620-2294-3-git-send-email-denis-fO0SIAKYzcbQT0dZR+AlfA@public.gmane.org>
2015-07-22 16:38       ` [lm-sensors] " Guenter Roeck
2015-07-22 16:38         ` Guenter Roeck
2015-07-22 16:36   ` [lm-sensors] [PATCH 1/3] hwmon: lm92: Add devicetree support Guenter Roeck
2015-07-22 16:36     ` Guenter Roeck

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=55AFC6CA.7070408@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=denis-fO0SIAKYzcbQT0dZR+AlfA@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=eric-fO0SIAKYzcbQT0dZR+AlfA@public.gmane.org \
    --cc=jdelvare-IBi9RG/b67k@public.gmane.org \
    --cc=lm-sensors-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org \
    --cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.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.