Thread (23 messages) 23 messages, 5 authors, 2021-11-11

Re: [PATCH 1/6] HID: intel-ish-hid: add support for MODULE_DEVICE_TABLE()

From: Hans de Goede <hidden>
Date: 2021-11-01 10:16:04
Also in: linux-kbuild, lkml

Hi,

On 11/1/21 11:09, Thomas Weißschuh wrote:
On 2021-11-01 10:58+0100, Hans de Goede wrote:
quoted
On 10/29/21 17:28, Thomas Weißschuh wrote:
quoted
This allows to selectively autoload drivers for ISH devices.
Currently all ISH drivers are loaded for all systems having any ISH
device.

Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>

---

Cc: linux-kbuild@vger.kernel.org
Cc: linux-input@vger.kernel.org
Cc: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Cc: Jiri Kosina <redacted>
Cc: Benjamin Tissoires <redacted>
Cc: Hans de Goede <redacted>
Cc: Masahiro Yamada <masahiroy@kernel.org>
Cc: Michal Marek <redacted>
Cc: Nick Desaulniers <redacted>
---
 include/linux/mod_devicetable.h   | 13 +++++++++++++
 scripts/mod/devicetable-offsets.c |  3 +++
 scripts/mod/file2alias.c          | 24 ++++++++++++++++++++++++
 3 files changed, 40 insertions(+)
diff --git a/include/linux/mod_devicetable.h b/include/linux/mod_devicetable.h
index ae2e75d15b21..befbf53c4b7c 100644
--- a/include/linux/mod_devicetable.h
+++ b/include/linux/mod_devicetable.h
@@ -895,4 +895,17 @@ struct dfl_device_id {
 	kernel_ulong_t driver_data;
 };
 
+/* ISHTP (Integrated Sensor Hub Transport Protocol) */
+
+#define ISHTP_MODULE_PREFIX	"ishtp:"
+
+/**
+ * struct ishtp_device_id - ISHTP device identifier
+ * @guid_string: 36 char string of the form fa50ff2b-f2e8-45de-83fa-65417f2f49ba
+ * @context: pointer to driver specific data
+ */
+struct ishtp_device_id {
+	guid_t guid;
The kdoc comment documents a context pointer, but this is missing from the
actual struct. Having some sort of driver_data (1) field here would be good IMHO.
Fine for me.

I left it out because nothing would be using it at the moment and
it would have been easy to add when needed.
IMHO having a device_id without a context/driver_data field would be
weird and is likely asking for needless churn in the future, but see
below.
Do you want me to send a v2 for that or would you add it when merging?
(Or remove the spurious comment)
As I indicated in my reply to the cover-letter, I believe this series
should be merged through the HID tree, so this is up to the HID maintainers
to decide.

Regards,

Hans


p.s.

Thank you for doing this series I did not realize that the eclite driver
would end up being loaded on all systems where the ISH is used, thank you
for fixing this.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help