mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andreas Kemnade <andreas@kemnade.info>
To: jdelvare@suse.com, linux@roeck-us.net,
	linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Andreas Kemnade <andreas@kemnade.info>
Subject: [PATCH] hwmon: sy7636a: add aliases
Date: Sat,  6 Sep 2025 11:43:08 +0200	[thread overview]
Message-ID: <20250906094308.11129-1-andreas@kemnade.info> (raw)

Add module aliases via module devicetable to have it autoloaded.

Signed-off-by: Andreas Kemnade <andreas@kemnade.info>
---
 drivers/hwmon/sy7636a-hwmon.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/hwmon/sy7636a-hwmon.c b/drivers/hwmon/sy7636a-hwmon.c
index ed110884786b4..74ee0e756ffdc 100644
--- a/drivers/hwmon/sy7636a-hwmon.c
+++ b/drivers/hwmon/sy7636a-hwmon.c
@@ -12,6 +12,7 @@
 #include <linux/hwmon.h>
 #include <linux/init.h>
 #include <linux/module.h>
+#include <linux/mod_devicetable.h>
 #include <linux/platform_device.h>
 #include <linux/regmap.h>
 #include <linux/regulator/machine.h>
@@ -94,11 +95,18 @@ static int sy7636a_sensor_probe(struct platform_device *pdev)
 	return 0;
 }
 
+static const struct platform_device_id sy7636a_sensor_idtable[] = {
+	{ "sy7636a-temperature" },
+	{ },
+};
+MODULE_DEVICE_TABLE(platform, sy7636a_sensor_idtable);
+
 static struct platform_driver sy7636a_sensor_driver = {
 	.probe = sy7636a_sensor_probe,
 	.driver = {
 		.name = "sy7636a-temperature",
 	},
+	.id_table = sy7636a_sensor_idtable,
 };
 module_platform_driver(sy7636a_sensor_driver);
 
-- 
2.39.5


             reply	other threads:[~2025-09-06  9:43 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-06  9:43 Andreas Kemnade [this message]
2025-09-06 13:28 ` 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=20250906094308.11129-1-andreas@kemnade.info \
    --to=andreas@kemnade.info \
    --cc=jdelvare@suse.com \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@roeck-us.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

all inboxes | Powered by JetHome®