From patchwork Fri Oct 29 15:28:56 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Patchwork-Id: 12592997 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 86B34C4321E for ; Fri, 29 Oct 2021 15:29:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 730FF611C4 for ; Fri, 29 Oct 2021 15:29:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230064AbhJ2Pbs (ORCPT ); Fri, 29 Oct 2021 11:31:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59464 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229807AbhJ2Pbr (ORCPT ); Fri, 29 Oct 2021 11:31:47 -0400 Received: from todd.t-8ch.de (todd.t-8ch.de [IPv6:2a01:4f8:c010:41de::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3E1AFC061766; Fri, 29 Oct 2021 08:29:19 -0700 (PDT) From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=weissschuh.net; s=mail; t=1635521356; bh=47S71ww0oeAgpF1M5AvPvZs+YgAcY4mGa2+Jg6+IVus=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dqjLxADx+7gG42MpSHV41hdPF7oE8VC2gn3Nd0mYq09l+Dj13qehsu/zATD1RkiQK 2Dp1ooRYK6APQr06sfhYosRfRoK2IamEmruabbCz2J0wW9SSVdqnHrFBhi1rWHKbCa rNenwe7bWPfHWgHFozSeXyTrMtYa91+Yt5F4UhqI= To: linux-input@vger.kernel.org Cc: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= , linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org, Srinivas Pandruvada , Jiri Kosina , Benjamin Tissoires , Hans de Goede , Masahiro Yamada , Michal Marek , Nick Desaulniers Subject: [PATCH 1/6] HID: intel-ish-hid: add support for MODULE_DEVICE_TABLE() Date: Fri, 29 Oct 2021 17:28:56 +0200 Message-Id: <20211029152901.297939-2-linux@weissschuh.net> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211029152901.297939-1-linux@weissschuh.net> References: <20211029152901.297939-1-linux@weissschuh.net> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org 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 --- Cc: linux-kbuild@vger.kernel.org Cc: linux-input@vger.kernel.org Cc: Srinivas Pandruvada Cc: Jiri Kosina Cc: Benjamin Tissoires Cc: Hans de Goede Cc: Masahiro Yamada Cc: Michal Marek Cc: Nick Desaulniers --- 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; +}; + #endif /* LINUX_MOD_DEVICETABLE_H */ diff --git a/scripts/mod/devicetable-offsets.c b/scripts/mod/devicetable-offsets.c index cc3625617a0e..c0d3bcb99138 100644 --- a/scripts/mod/devicetable-offsets.c +++ b/scripts/mod/devicetable-offsets.c @@ -259,5 +259,8 @@ int main(void) DEVID_FIELD(dfl_device_id, type); DEVID_FIELD(dfl_device_id, feature_id); + DEVID(ishtp_device_id); + DEVID_FIELD(ishtp_device_id, guid); + return 0; } diff --git a/scripts/mod/file2alias.c b/scripts/mod/file2alias.c index 49aba862073e..5258247d78ac 100644 --- a/scripts/mod/file2alias.c +++ b/scripts/mod/file2alias.c @@ -115,6 +115,17 @@ static inline void add_uuid(char *str, uuid_le uuid) uuid.b[12], uuid.b[13], uuid.b[14], uuid.b[15]); } +static inline void add_guid(char *str, guid_t guid) +{ + int len = strlen(str); + + sprintf(str + len, "%02X%02X%02X%02X-%02X%02X-%02X%02X-%02X%02X-%02X%02X%02X%02X%02X%02X", + guid.b[3], guid.b[2], guid.b[1], guid.b[0], + guid.b[5], guid.b[4], guid.b[7], guid.b[6], + guid.b[8], guid.b[9], guid.b[10], guid.b[11], + guid.b[12], guid.b[13], guid.b[14], guid.b[15]); +} + /** * Check that sizeof(device_id type) are consistent with size of section * in .o file. If in-consistent then userspace and kernel does not agree @@ -1380,6 +1391,18 @@ static int do_mhi_entry(const char *filename, void *symval, char *alias) return 1; } +/* Looks like: ishtp:{guid} */ +static int do_ishtp_entry(const char *filename, void *symval, char *alias) +{ + DEF_FIELD(symval, ishtp_device_id, guid); + + strcpy(alias, ISHTP_MODULE_PREFIX "{"); + add_guid(alias, guid); + strcat(alias, "}"); + + return 1; +} + static int do_auxiliary_entry(const char *filename, void *symval, char *alias) { DEF_FIELD_ADDR(symval, auxiliary_device_id, name); @@ -1499,6 +1522,7 @@ static const struct devtable devtable[] = { {"auxiliary", SIZE_auxiliary_device_id, do_auxiliary_entry}, {"ssam", SIZE_ssam_device_id, do_ssam_entry}, {"dfl", SIZE_dfl_device_id, do_dfl_entry}, + {"ishtp", SIZE_ishtp_device_id, do_ishtp_entry}, }; /* Create MODULE_ALIAS() statements. From patchwork Fri Oct 29 15:28:57 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Patchwork-Id: 12592995 X-Patchwork-Delegate: jikos@jikos.cz Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 17124C4332F for ; Fri, 29 Oct 2021 15:29:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id EE685611C7 for ; Fri, 29 Oct 2021 15:29:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230022AbhJ2Pbs (ORCPT ); Fri, 29 Oct 2021 11:31:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59462 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229527AbhJ2Pbr (ORCPT ); Fri, 29 Oct 2021 11:31:47 -0400 Received: from todd.t-8ch.de (todd.t-8ch.de [IPv6:2a01:4f8:c010:41de::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E9126C061714; Fri, 29 Oct 2021 08:29:18 -0700 (PDT) From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=weissschuh.net; s=mail; t=1635521356; bh=XxyRlnq+8Zc9pSgLZiODQgMlckpzCuye+ovfYvG2PuA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HkYi4Lv4nTe7azOKDX6LqRgCI6kwsbcdj53Oi32uJql2r9PrVa6MKVHABoD0jsKji JqKG9ycRY388aRsGrCqmdxTlHtbd04lMjrWaCVF9y2gcoIdb//FmZrbcBrn0c6hj46 p/V4T+ffUXSKr8VIoM0f3a1PA6lZ26a7/StqDPLs= To: linux-input@vger.kernel.org Cc: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= , linux-kernel@vger.kernel.org, Srinivas Pandruvada , Jiri Kosina , Benjamin Tissoires Subject: [PATCH 2/6] HID: intel-ish-hid: use constants for modaliases Date: Fri, 29 Oct 2021 17:28:57 +0200 Message-Id: <20211029152901.297939-3-linux@weissschuh.net> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211029152901.297939-2-linux@weissschuh.net> References: <20211029152901.297939-1-linux@weissschuh.net> <20211029152901.297939-2-linux@weissschuh.net> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org Signed-off-by: Thomas Weißschuh --- Cc: Srinivas Pandruvada Cc: Jiri Kosina Cc: Benjamin Tissoires Cc: linux-input@vger.kernel.org --- drivers/hid/intel-ish-hid/ishtp/bus.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/hid/intel-ish-hid/ishtp/bus.c b/drivers/hid/intel-ish-hid/ishtp/bus.c index 334eac611774..e159cd1c5f37 100644 --- a/drivers/hid/intel-ish-hid/ishtp/bus.c +++ b/drivers/hid/intel-ish-hid/ishtp/bus.c @@ -350,7 +350,7 @@ static ssize_t modalias_show(struct device *dev, struct device_attribute *a, { int len; - len = snprintf(buf, PAGE_SIZE, "ishtp:%s\n", dev_name(dev)); + len = snprintf(buf, PAGE_SIZE, ISHTP_MODULE_PREFIX "%s\n", dev_name(dev)); return (len >= PAGE_SIZE) ? (PAGE_SIZE - 1) : len; } static DEVICE_ATTR_RO(modalias); @@ -363,7 +363,7 @@ ATTRIBUTE_GROUPS(ishtp_cl_dev); static int ishtp_cl_uevent(struct device *dev, struct kobj_uevent_env *env) { - if (add_uevent_var(env, "MODALIAS=ishtp:%s", dev_name(dev))) + if (add_uevent_var(env, "MODALIAS=" ISHTP_MODULE_PREFIX "%s", dev_name(dev))) return -ENOMEM; return 0; } From patchwork Fri Oct 29 15:28:58 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Patchwork-Id: 12592999 X-Patchwork-Delegate: jikos@jikos.cz Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 74289C4167E for ; Fri, 29 Oct 2021 15:29:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 63E5D60E76 for ; Fri, 29 Oct 2021 15:29:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230108AbhJ2Pbt (ORCPT ); Fri, 29 Oct 2021 11:31:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59466 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229712AbhJ2Pbr (ORCPT ); Fri, 29 Oct 2021 11:31:47 -0400 Received: from todd.t-8ch.de (todd.t-8ch.de [IPv6:2a01:4f8:c010:41de::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4FA1FC061767; Fri, 29 Oct 2021 08:29:19 -0700 (PDT) From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=weissschuh.net; s=mail; t=1635521356; bh=1Vm+F5pQrRkCe+lCoWHHxZapkTVugC5Vo5k00o6uSQs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pTw43ohd3ZM+6WiTbXobzwlT84ZzVSewRGv1oJdM/4IkkFjii+2FaFVAU4bFVrGTJ qwcFiz+LyHrH9SJTIJJ08DlUToeVAXHnr/itYKYnAMscNWqpNoY+HR198JlaEuoMle LCPnra29Fh7vMXfqm9Ne0kQFA6WohYMU7eb0QRa4= To: linux-input@vger.kernel.org Cc: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= , linux-kernel@vger.kernel.org, Srinivas Pandruvada , Rushikesh S Kadam , Jiri Kosina , Benjamin Tissoires Subject: [PATCH 3/6] HID: intel-ish-hid: fw-loader: only load for matching devices Date: Fri, 29 Oct 2021 17:28:58 +0200 Message-Id: <20211029152901.297939-4-linux@weissschuh.net> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211029152901.297939-3-linux@weissschuh.net> References: <20211029152901.297939-1-linux@weissschuh.net> <20211029152901.297939-2-linux@weissschuh.net> <20211029152901.297939-3-linux@weissschuh.net> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org Previously it was loaded for all ISHTP devices. Signed-off-by: Thomas Weißschuh --- Cc: Srinivas Pandruvada Cc: Rushikesh S Kadam Cc: Jiri Kosina Cc: Benjamin Tissoires Cc: linux-input@vger.kernel.org --- drivers/hid/intel-ish-hid/ishtp-fw-loader.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/hid/intel-ish-hid/ishtp-fw-loader.c b/drivers/hid/intel-ish-hid/ishtp-fw-loader.c index 1b486f262747..945a9d0b68cd 100644 --- a/drivers/hid/intel-ish-hid/ishtp-fw-loader.c +++ b/drivers/hid/intel-ish-hid/ishtp-fw-loader.c @@ -1063,6 +1063,12 @@ static struct ishtp_cl_driver loader_ishtp_cl_driver = { .reset = loader_ishtp_cl_reset, }; +static const struct ishtp_device_id loader_ishtp_id_table[] = { + { loader_ishtp_guid }, + { } +}; +MODULE_DEVICE_TABLE(ishtp, loader_ishtp_id_table); + static int __init ish_loader_init(void) { return ishtp_cl_driver_register(&loader_ishtp_cl_driver, THIS_MODULE); @@ -1083,4 +1089,3 @@ MODULE_DESCRIPTION("ISH ISH-TP Host firmware Loader Client Driver"); MODULE_AUTHOR("Rushikesh S Kadam "); MODULE_LICENSE("GPL v2"); -MODULE_ALIAS("ishtp:*"); From patchwork Fri Oct 29 15:28:59 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Patchwork-Id: 12593001 X-Patchwork-Delegate: jikos@jikos.cz Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id ADEC2C433EF for ; Fri, 29 Oct 2021 15:29:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 977B46117A for ; Fri, 29 Oct 2021 15:29:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230163AbhJ2Pbw (ORCPT ); Fri, 29 Oct 2021 11:31:52 -0400 Received: from todd.t-8ch.de ([159.69.126.157]:49145 "EHLO todd.t-8ch.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230078AbhJ2Pbu (ORCPT ); Fri, 29 Oct 2021 11:31:50 -0400 From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=weissschuh.net; s=mail; t=1635521356; bh=Ce5DxgP/kBEplR9HOobeUaGFgTryud+39iLlnv3yVjk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=p6yb5Qn1+y6Uhgwh9Hhn1G9OCMjxFp9herrBAvpgp6+56qp+GHNrVRhh3a5ryzf8Q 2NPLOzeM0ilzyzfX3h0+uiO9kwKs4+QWXU/IA9OOR61n3jVAH2n5odeNFs0ykTdx4B 9e2jQkDjZwW/xzfJsKDL+z9p6AgGtV92v66UjIXs= To: linux-input@vger.kernel.org Cc: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= , linux-kernel@vger.kernel.org, Srinivas Pandruvada , Jiri Kosina , Benjamin Tissoires Subject: [PATCH 4/6] HID: intel-ish-hid: hid-client: only load for matching devices Date: Fri, 29 Oct 2021 17:28:59 +0200 Message-Id: <20211029152901.297939-5-linux@weissschuh.net> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211029152901.297939-4-linux@weissschuh.net> References: <20211029152901.297939-1-linux@weissschuh.net> <20211029152901.297939-2-linux@weissschuh.net> <20211029152901.297939-3-linux@weissschuh.net> <20211029152901.297939-4-linux@weissschuh.net> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org Previously it was loaded for all ISHTP devices. Signed-off-by: Thomas Weißschuh --- Cc: Srinivas Pandruvada Cc: Jiri Kosina Cc: Benjamin Tissoires Cc: linux-input@vger.kernel.org --- drivers/hid/intel-ish-hid/ishtp-hid-client.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/hid/intel-ish-hid/ishtp-hid-client.c b/drivers/hid/intel-ish-hid/ishtp-hid-client.c index 91bf4d01e91a..fb47d38d1e87 100644 --- a/drivers/hid/intel-ish-hid/ishtp-hid-client.c +++ b/drivers/hid/intel-ish-hid/ishtp-hid-client.c @@ -952,6 +952,12 @@ static struct ishtp_cl_driver hid_ishtp_cl_driver = { .driver.pm = &hid_ishtp_pm_ops, }; +static const struct ishtp_device_id hid_ishtp_id_table[] = { + { hid_ishtp_guid }, + { } +}; +MODULE_DEVICE_TABLE(ishtp, hid_ishtp_id_table); + static int __init ish_hid_init(void) { int rv; @@ -981,4 +987,3 @@ MODULE_AUTHOR("Daniel Drubin "); MODULE_AUTHOR("Srinivas Pandruvada "); MODULE_LICENSE("GPL"); -MODULE_ALIAS("ishtp:*"); From patchwork Fri Oct 29 15:29:00 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Patchwork-Id: 12593003 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2EA0FC4321E for ; Fri, 29 Oct 2021 15:29:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 11C066120E for ; Fri, 29 Oct 2021 15:29:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230202AbhJ2Pby (ORCPT ); Fri, 29 Oct 2021 11:31:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59474 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230126AbhJ2Pbu (ORCPT ); Fri, 29 Oct 2021 11:31:50 -0400 Received: from todd.t-8ch.de (todd.t-8ch.de [IPv6:2a01:4f8:c010:41de::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8D0B9C061766; Fri, 29 Oct 2021 08:29:20 -0700 (PDT) From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=weissschuh.net; s=mail; t=1635521357; bh=FKf8tXgSnIqBNyFmoaiDFzhK1fONHzMDls7JdRNe8as=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WSVP9NNHNBNe8yH1yGfOzFjDYa4H8n6qfLAhKXwoh4TKYLwimEIzA7uAvAnmKEe47 roOnSmJ+MJ1JfKSqTU8Ob5DuvjelIPE5LfsfivZx/PVHdyQo/lUiLeXDXyzbrfOS5U +zcqdHZqiMpRIJ1KZ+lLYzmEiL7vNFmdJGZeksgs= To: linux-input@vger.kernel.org Cc: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= , linux-kernel@vger.kernel.org, Srinivas Pandruvada , Rushikesh S Kadam , Jiri Kosina , Benjamin Tissoires , Benson Leung , Enric Balletbo i Serra , Guenter Roeck Subject: [PATCH 5/6] platform/chrome: chros_ec_ishtp: only load for matching devices Date: Fri, 29 Oct 2021 17:29:00 +0200 Message-Id: <20211029152901.297939-6-linux@weissschuh.net> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211029152901.297939-5-linux@weissschuh.net> References: <20211029152901.297939-1-linux@weissschuh.net> <20211029152901.297939-2-linux@weissschuh.net> <20211029152901.297939-3-linux@weissschuh.net> <20211029152901.297939-4-linux@weissschuh.net> <20211029152901.297939-5-linux@weissschuh.net> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org Previously it was loaded for all ISHTP devices. Signed-off-by: Thomas Weißschuh --- Cc: Srinivas Pandruvada Cc: Rushikesh S Kadam Cc: Jiri Kosina Cc: Benjamin Tissoires Cc: linux-input@vger.kernel.org Cc: Benson Leung Cc: Enric Balletbo i Serra Cc: Guenter Roeck --- drivers/platform/chrome/cros_ec_ishtp.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/platform/chrome/cros_ec_ishtp.c b/drivers/platform/chrome/cros_ec_ishtp.c index 9d1e7e03628e..8c17358e84c1 100644 --- a/drivers/platform/chrome/cros_ec_ishtp.c +++ b/drivers/platform/chrome/cros_ec_ishtp.c @@ -774,6 +774,12 @@ static struct ishtp_cl_driver cros_ec_ishtp_driver = { }, }; +static const struct ishtp_device_id cros_ec_ishtp_id_table[] = { + { cros_ish_guid }, + { } +}; +MODULE_DEVICE_TABLE(ishtp, cros_ec_ishtp_id_table); + static int __init cros_ec_ishtp_mod_init(void) { return ishtp_cl_driver_register(&cros_ec_ishtp_driver, THIS_MODULE); @@ -791,4 +797,3 @@ MODULE_DESCRIPTION("ChromeOS EC ISHTP Client Driver"); MODULE_AUTHOR("Rushikesh S Kadam "); MODULE_LICENSE("GPL v2"); -MODULE_ALIAS("ishtp:*"); From patchwork Fri Oct 29 15:29:01 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Patchwork-Id: 12593005 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AC5C2C4332F for ; Fri, 29 Oct 2021 15:29:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 90F0D6117A for ; Fri, 29 Oct 2021 15:29:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230196AbhJ2Pbx (ORCPT ); Fri, 29 Oct 2021 11:31:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59472 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230121AbhJ2Pbu (ORCPT ); Fri, 29 Oct 2021 11:31:50 -0400 Received: from todd.t-8ch.de (todd.t-8ch.de [IPv6:2a01:4f8:c010:41de::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 89B09C061714; Fri, 29 Oct 2021 08:29:20 -0700 (PDT) From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=weissschuh.net; s=mail; t=1635521357; bh=NNgWRHviHUxTdEHra5hNjg8D6E5Lz7MJlnaX9y6/l30=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Ro9xYb+Gtov7XIo/j4KhWyyer/srnVwqN7rPER3mtRYtmgkXEGtf9Dy0Zhf5BQI00 1OrH98h00BDJXljCEnZzLTzrNWBuuCUy4B8QYkdcVstpHKirVdy9gBS2dSQk8KnxkU sB6TJcwBpMFxVPA9Bo1vYhH0TOi8+nC1u7Skgv+A= To: linux-input@vger.kernel.org Cc: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= , linux-kernel@vger.kernel.org, Srinivas Pandruvada , K@troy.t-8ch.de, Naduvalath@troy.t-8ch.de, Sumesh , Jiri Kosina , Benjamin Tissoires , Hans de Goede , Mark Gross , platform-driver-x86@vger.kernel.org Subject: [PATCH 6/6] platform/x86: isthp_eclite: only load for matching devices Date: Fri, 29 Oct 2021 17:29:01 +0200 Message-Id: <20211029152901.297939-7-linux@weissschuh.net> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211029152901.297939-6-linux@weissschuh.net> References: <20211029152901.297939-1-linux@weissschuh.net> <20211029152901.297939-2-linux@weissschuh.net> <20211029152901.297939-3-linux@weissschuh.net> <20211029152901.297939-4-linux@weissschuh.net> <20211029152901.297939-5-linux@weissschuh.net> <20211029152901.297939-6-linux@weissschuh.net> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org Previously it was loaded for all ISHTP devices. Signed-off-by: Thomas Weißschuh Reviewed-by: Hans de Goede --- Cc: Srinivas Pandruvada Cc: K Naduvalath, Sumesh Cc: Jiri Kosina Cc: Benjamin Tissoires Cc: Hans de Goede Cc: Mark Gross Cc: linux-input@vger.kernel.org Cc: platform-driver-x86@vger.kernel.org --- drivers/platform/x86/intel/ishtp_eclite.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/platform/x86/intel/ishtp_eclite.c b/drivers/platform/x86/intel/ishtp_eclite.c index 12fc98a48657..b9fb8f28fd63 100644 --- a/drivers/platform/x86/intel/ishtp_eclite.c +++ b/drivers/platform/x86/intel/ishtp_eclite.c @@ -681,6 +681,12 @@ static struct ishtp_cl_driver ecl_ishtp_cl_driver = { .driver.pm = &ecl_ishtp_pm_ops, }; +static const struct ishtp_device_id ecl_ishtp_id_table[] = { + { ecl_ishtp_guid }, + { } +}; +MODULE_DEVICE_TABLE(ishtp, ecl_ishtp_id_table); + static int __init ecl_ishtp_init(void) { return ishtp_cl_driver_register(&ecl_ishtp_cl_driver, THIS_MODULE); @@ -698,4 +704,3 @@ MODULE_DESCRIPTION("ISH ISHTP eclite client opregion driver"); MODULE_AUTHOR("K Naduvalath, Sumesh "); MODULE_LICENSE("GPL v2"); -MODULE_ALIAS("ishtp:*");