Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp1930107rdb; Thu, 7 Dec 2023 12:49:21 -0800 (PST) X-Google-Smtp-Source: AGHT+IE5fNBisoYcu69BDuPFRZ8x1cC8G6R8TGcBPhs2szkOfZVmSnJX5nrKIZgKHhqKxHTTSinm X-Received: by 2002:a17:90a:4f0f:b0:286:6cc0:885b with SMTP id p15-20020a17090a4f0f00b002866cc0885bmr2833546pjh.72.1701982161508; Thu, 07 Dec 2023 12:49:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701982161; cv=none; d=google.com; s=arc-20160816; b=C6ZkDjHZLaTYaM0YsSpZypU2RPcj2duoj7tTx5qbjgKCapnOcjA0afgSFJ0MjI4Gy3 rQLiNnH9G9GULHEqeY78GbjpT5n5kci6UuFC1CwTVXZGt29/dyJQHvi41h2TQlknSCOj d4CP04/3H1yTiUaud1zG7Sez62VxSOU99MQzZriAuCwKFdGtkrkIAc7gA1dJpzonxCu6 hnyJNFkdcDhYlnVjmxlFHGRBod9mRsIBm4b/t6VY1MppWbuNpUHRuCdcF+Ze4bTRzWLP vSufdrWIhfNnqYYWQpvgQxNURWK/DQXs2Fu2crm4jrZm4DlM1mYVu5VR50mJ6jeR7SGX jHhQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:ui-outboundreport:content-transfer-encoding :in-reply-to:from:references:cc:to:content-language:subject :user-agent:mime-version:date:message-id:dkim-signature; bh=j1KQyy5uZSILlZqSsSLS4MPgyN7jRnDBrPne253w/98=; fh=DM7BM/M1hihOc60a4Tcan6+BSzmfzylyybf8rZgzoDo=; b=Qd3+DGkVRqBTpupwm0ElxdyOc62Ci4/LbtjojLjhgAIzjHpWZusT4tTxBxmbrPfnCt B2YwTwcs7Hs34eyvncCgn2WHLq2dmGAOGTIQBnqlUieNe979lrqX+WsAB1/l5nbZy6Pi SjGhXj2epM381VCkwwVDLHS34wST3B1oAqpQoh/qanlHsDrD3ckzGpi6KnR0/Ej7qLzV ES5rSHC8vEpHhywQ+qhff5PK/kJBWwUE0Hfek7ASpU2LDdzzYU9awm8xV3X6CXrdS6Im 1k0J4HnuZq2AxVZMxcYewKhR0HlXRetm2yV1pPLu25MYaOBzBt0o3TzlmWEKjhmrBDHv ZWHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmx.de header.s=s31663417 header.b=Wobu4kRe; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=gmx.de Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id a18-20020a17090acb9200b00288272f936csi1673512pju.32.2023.12.07.12.49.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Dec 2023 12:49:21 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@gmx.de header.s=s31663417 header.b=Wobu4kRe; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=gmx.de Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 2DC18814C699; Thu, 7 Dec 2023 12:49:19 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229541AbjLGUtA (ORCPT + 99 others); Thu, 7 Dec 2023 15:49:00 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50076 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231301AbjLGUs5 (ORCPT ); Thu, 7 Dec 2023 15:48:57 -0500 Received: from mout.gmx.net (mout.gmx.net [212.227.17.21]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B40F01718; Thu, 7 Dec 2023 12:49:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.de; s=s31663417; t=1701982124; x=1702586924; i=w_armin@gmx.de; bh=j1KQyy5uZSILlZqSsSLS4MPgyN7jRnDBrPne253w/98=; h=X-UI-Sender-Class:Date:Subject:To:Cc:References:From: In-Reply-To; b=Wobu4kRet4gqvrIHkX2jrUrdBFggYsB+Y9RFiRqdlYxkj+JSKg7L5EBuTWoLGN9F Hj9Sl24cl4STDiyMfRStquQ8xXqhufPDx4zrzIArgoOwAC6HswGZkTFBB6cubMR7L VdRv+EBHvOk3yvcnxzDpgoZu8noOUSwOLUNza3xdDXcaX3G56Wrbw0LIA6qwdtZeE yd4Gj5CyP/vgcYcFol0psU85fKG8G95y0rzfSj35jd1TRy6O7fC0D1G7mQ/0k2TVR SeYZdR5W0eB3zpWkhJPjLewIwbdACPkwwTF9wUKotIEV7dX6wFfEJoEo96EAatjov 7wxkUcn5Vysi5r2Miw== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from [141.30.226.129] ([141.30.226.129]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1Mf0BG-1rhvxm0Vbe-00gWKN; Thu, 07 Dec 2023 21:48:44 +0100 Message-ID: <67069bf0-58d9-44d3-94ac-4cbc2647d447@gmx.de> Date: Thu, 7 Dec 2023 21:48:43 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3] hwmon: Add driver for Gigabyte AORUS Waterforce AIO coolers Content-Language: en-US To: Aleksa Savic , linux-hwmon@vger.kernel.org Cc: Jean Delvare , Guenter Roeck , Jonathan Corbet , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org References: <20231207122402.107032-1-savicaleksa83@gmail.com> From: Armin Wolf In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:81m6qr5n2wi/45vDrfvBrgtzddgoNeb23aZ/edWnNoRvayYIdEg OF5OdaVYEROH4WrDLXDDTbbJkrhgKPZxCY84OjWP/tDkMgmG6i8tlE82PlwayJLtGe2MWhY H0OPp98u1xb3CxuG8KkEY07O3o03K2u54hs8Qe4TgkmaoGXaOagErmpD54deKDtgdAFox+g B755s4uYQfPfJX+8cQpyw== UI-OutboundReport: notjunk:1;M01:P0:riQAvS79JTc=;WUYCzJoA3zXDwlHjK6hopcaQDOE TCHTIL8gu/0fQzWbxWL3jwTj6xX3S+7y4UvfUxoyaoKCzFCzElsvA3wxibUUrI9R4dvSzR1/3 Mle85oLrI9p/Y3KRHtMKOfp1k7oibA1iuyVbSu9UB9IbitPhoO3UeCNFGBHgnattAmifRJ4J5 28A8l+m/J+sfBSVGOh9Ri1MRGmcx9ECk0+RDAm6znPZ2sMoeGjW767ytA+gxLpVlqCjjj4ArF DRLROB2mKgPrPZ8TsmfeVWhFpEI4ycdzmvEPsEuOUbmrMLGzOJqPEaxewHbR0xqtL2EPq64RY HuCK09WOj2onJdC3KdGFfvrZa0xHKhvyNS47+Y/+sG+D7eNpYdyj1ObzkhTUWqewCAsxe4EB8 1mb1ZFqiQ4X8c5tvwiJgP3HVc8MREmDso7U7JXtAhJ0EpJHwZlfWmBCTYyftxdoBYQSBSZ0MB u6bFU1js22Dk+QFdpbboJ4nA82pgofvT0dlwfS15c8O9vxkm16g+bIuwUWqHVDxv8IbHlxei7 qLXtXY3I08BHw22RDqpE/+IArIbFZ7v36EPrxBYbUp4ZFLj4aJUPHoLTBjJIRNRnvxJ/YvgxX Lk8BuDJpKyhsWYxQ9kTKnJPgfYT3rU2ET/1oT1ivYLZihraRXJtWvcEOKA5QpF10kMFpfUW80 MKh3oLhzYcaPQIqBSC47slE2exUr65/qAgGorpGDDOwek4TCdbcx3t8f157rRG6IyAHbIFi+P tgquCz9B6C/x67PNRqEjDF//9S997W0hjFv4IJnrHUklmywDucEE4Kk2g4P14AbKvqZEyqBFY xUAPrsGDeQQ3yz6VQVz25Gp6+I4+Puv+Km1hh7yd+0TocSvvy+hfydhFG7YTYCh3JFyAs3POe bIeTQnHwcmmCkmui6HGdbg11VHuyoMtp5FQexAFj/W6ewL0Cc2xJems1CZXP405hZHiKm7HVp j+s0UWZpoddTkRzmWhChxuCkcsQ= X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Thu, 07 Dec 2023 12:49:19 -0800 (PST) Am 07.12.23 um 21:04 schrieb Aleksa Savic: > On 2023-12-07 20:39:23 GMT+01:00, Armin Wolf wrote: >> Am 07.12.23 um 13:23 schrieb Aleksa Savic: >> > ... > >>> + >>> +static struct hid_driver waterforce_driver =3D { >>> +=C2=A0=C2=A0=C2=A0 .name =3D "waterforce", >>> +=C2=A0=C2=A0=C2=A0 .id_table =3D waterforce_table, >>> +=C2=A0=C2=A0=C2=A0 .probe =3D waterforce_probe, >>> +=C2=A0=C2=A0=C2=A0 .remove =3D waterforce_remove, >>> +=C2=A0=C2=A0=C2=A0 .raw_event =3D waterforce_raw_event, >>> +}; >>> + >>> +static int __init waterforce_init(void) >>> +{ >>> +=C2=A0=C2=A0=C2=A0 return hid_register_driver(&waterforce_driver); >>> +} >>> + >>> +static void __exit waterforce_exit(void) >>> +{ >>> +=C2=A0=C2=A0=C2=A0 hid_unregister_driver(&waterforce_driver); >>> +} >>> + >>> +/* When compiled into the kernel, initialize after the HID bus */ >>> +late_initcall(waterforce_init); >>> +module_exit(waterforce_exit); >> Hi, >> >> I think you could use the module_hid_driver() macro here. > As far as I'm aware, hwmon will get built before hid, so a late_initcall= () > is necessary for this to function when compiled as a built-in driver. Ot= her > HID drivers in hwmon also do this (see nzxt-smart2 for an example). > > Aleksa > Interesting, in this case forget about my suggestion above. Armin Wolf >>> + >>> +MODULE_LICENSE("GPL"); >>> +MODULE_AUTHOR("Aleksa Savic "); >>> +MODULE_DESCRIPTION("Hwmon driver for Gigabyte AORUS Waterforce AIO co= olers"); >