All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Uwe Kleine-König" <u.kleine-koenig@baylibre.com>
To: Svyatoslav Ryhel <clamor95@gmail.com>
Cc: Jean Delvare <jdelvare@suse.com>,
	Guenter Roeck <linux@roeck-us.net>,
	 Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	 Conor Dooley <conor+dt@kernel.org>,
	linux-hwmon@vger.kernel.org, devicetree@vger.kernel.org,
	 linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 2/3] hwmon: (emc1403) Convert to use OF bindings
Date: Thu, 23 Jul 2026 08:28:03 +0200	[thread overview]
Message-ID: <amGz2YZogakb5XAv@monoceros> (raw)
In-Reply-To: <20260721095935.439174-3-clamor95@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1718 bytes --]

Hello,

On Tue, Jul 21, 2026 at 12:59:34PM +0300, Svyatoslav Ryhel wrote:
> From: Jonas Schwöbel <jonasschwoebel@yahoo.de>
> 
> Add OF match compatible table to be able to use this driver with Device
> Trees.
> 
> Signed-off-by: Jonas Schwöbel <jonasschwoebel@yahoo.de>
> Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
> Reviewed-by: Guenter Roeck <linux@roeck-us.net>

Please put your S-o-b line last.

> ---
>  drivers/hwmon/emc1403.c | 16 ++++++++++++++--
>  1 file changed, 14 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/hwmon/emc1403.c b/drivers/hwmon/emc1403.c
> index cd753b38709f2..b7ab6069ec7b1 100644
> --- a/drivers/hwmon/emc1403.c
> +++ b/drivers/hwmon/emc1403.c
> @@ -16,6 +16,7 @@
>  #include <linux/hwmon.h>
>  #include <linux/hwmon-sysfs.h>
>  #include <linux/err.h>
> +#include <linux/mod_devicetable.h>

Don't add <linux/mod_devicetable.h> please. struct of_device_id is also
provided by <linux/i2c.h> so adding <linux/mod_devicetable.h> isn't
needed.

>  #include <linux/sysfs.h>
>  #include <linux/regmap.h>
>  #include <linux/util_macros.h>
> [...]
> @@ -682,10 +683,21 @@ static const unsigned short emc1403_address_list[] = {
>  	0x18, 0x1c, 0x29, 0x3c, 0x4c, 0x4d, 0x5c, I2C_CLIENT_END
>  };
>  
> +static const struct of_device_id emc1403_of_match[] = {
> +	{ .compatible = "smsc,emc1402", .data = (void *)emc1402 },
> +	{ .compatible = "smsc,emc1403", .data = (void *)emc1403 },
> +	{ .compatible = "smsc,emc1404", .data = (void *)emc1404 },
> +	{ .compatible = "smsc,emc1428", .data = (void *)emc1428 },
> +	{ }
> +

Unusual empty line here.

> +};
> +MODULE_DEVICE_TABLE(of, emc1403_of_match);
> +

Best regards
Uwe

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  parent reply	other threads:[~2026-07-23  6:28 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-21  9:59 [PATCH v3 0/3] hwmon: emc1403: Convert to use OF bindings and add regulator support Svyatoslav Ryhel
2026-07-21  9:59 ` [PATCH v3 1/3] dt-bindings: hwmon: Document SMSC EMC1402/1403/1404/1428 Svyatoslav Ryhel
2026-07-21 10:05   ` sashiko-bot
2026-07-21  9:59 ` [PATCH v3 2/3] hwmon: (emc1403) Convert to use OF bindings Svyatoslav Ryhel
2026-07-21 10:05   ` sashiko-bot
2026-07-23  6:28   ` Uwe Kleine-König [this message]
2026-07-25 13:24     ` Svyatoslav Ryhel
2026-07-25 14:23       ` Guenter Roeck
2026-07-27  8:14         ` Svyatoslav Ryhel
2026-07-27 15:26           ` Guenter Roeck
2026-07-28 21:44         ` Uwe Kleine-König
2026-07-28 22:15           ` Guenter Roeck
2026-07-21  9:59 ` [PATCH v3 3/3] hwmon: (emc1403) Add regulator support Svyatoslav Ryhel
2026-07-21 10:07   ` sashiko-bot

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=amGz2YZogakb5XAv@monoceros \
    --to=u.kleine-koenig@baylibre.com \
    --cc=clamor95@gmail.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=jdelvare@suse.com \
    --cc=krzk+dt@kernel.org \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=robh@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.