All of lore.kernel.org
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: Linus Walleij <linus.walleij@linaro.org>,
	Jean Delvare <jdelvare@suse.com>
Cc: linux-hwmon@vger.kernel.org
Subject: Re: [PATCH 2/2] hwmon: (w83781d) Match on device tree compatibles
Date: Fri, 30 Jul 2021 10:10:53 -0700	[thread overview]
Message-ID: <f7d474a5-a196-97dc-3043-74465bead290@roeck-us.net> (raw)
In-Reply-To: <20210729230543.2853485-2-linus.walleij@linaro.org>

On 7/29/21 4:05 PM, Linus Walleij wrote:
> I2C devices should match on the proper compatible string.
> This is already used in one device tree in the kernel (MIPS)
> so let's add the matches.
> 
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

For my reference:

Reviewed-by: Guenter Roeck <linux@roeck-us.net>

Waiting for Rob's approval of the devicetree patch.

Thanks,
Guenter

> ---
>   drivers/hwmon/w83781d.c | 11 +++++++++++
>   1 file changed, 11 insertions(+)
> 
> diff --git a/drivers/hwmon/w83781d.c b/drivers/hwmon/w83781d.c
> index e84aa5604e64..ce8e2c10e854 100644
> --- a/drivers/hwmon/w83781d.c
> +++ b/drivers/hwmon/w83781d.c
> @@ -1571,10 +1571,21 @@ static const struct i2c_device_id w83781d_ids[] = {
>   };
>   MODULE_DEVICE_TABLE(i2c, w83781d_ids);
>   
> +static const struct of_device_id w83781d_of_match[] = {
> +	{ .compatible = "winbond,w83781d" },
> +	{ .compatible = "winbond,w83781g" },
> +	{ .compatible = "winbond,w83782d" },
> +	{ .compatible = "winbond,w83783s" },
> +	{ .compatible = "asus,as99127f" },
> +	{ },
> +};
> +MODULE_DEVICE_TABLE(of, w83781d_of_match);
> +
>   static struct i2c_driver w83781d_driver = {
>   	.class		= I2C_CLASS_HWMON,
>   	.driver = {
>   		.name = "w83781d",
> +		.of_match_table = w83781d_of_match,
>   	},
>   	.probe_new	= w83781d_probe,
>   	.remove		= w83781d_remove,
> 


  reply	other threads:[~2021-07-30 17:10 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-29 23:05 [PATCH 1/2] dt-bindings: hwmon: Add bindings for Winbond W83781D Linus Walleij
2021-07-29 23:05 ` [PATCH 2/2] hwmon: (w83781d) Match on device tree compatibles Linus Walleij
2021-07-30 17:10   ` Guenter Roeck [this message]
2021-08-03 19:40   ` Guenter Roeck
2021-08-03 19:25 ` [PATCH 1/2] dt-bindings: hwmon: Add bindings for Winbond W83781D Rob Herring
2021-08-03 19:39 ` 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=f7d474a5-a196-97dc-3043-74465bead290@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=jdelvare@suse.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-hwmon@vger.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 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.