From patchwork Thu Feb 9 21:15:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Armin Wolf X-Patchwork-Id: 55095 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp582335wrn; Thu, 9 Feb 2023 13:25:24 -0800 (PST) X-Google-Smtp-Source: AK7set/YwcRaTVz+cCIa5i30qOMHUiEGzlqK4dkMx6hj2ehodUA7fST+oH4t3MIAUPVnjqJDjCex X-Received: by 2002:a05:6a20:8e06:b0:be:a3e4:8426 with SMTP id y6-20020a056a208e0600b000bea3e48426mr17249012pzj.40.1675977924314; Thu, 09 Feb 2023 13:25:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675977924; cv=none; d=google.com; s=arc-20160816; b=jXPZStY7mZN/G2ltUbCO036/I2nej6DKmzLeD4xhlCQ/eTyuEA7YQbchQuAK2i2vnP AW5SsuXNENFMTHKJ1Myf/lyAfkllxZK8oiUev0hP8jNmci3krbkHh0HE8P/bg3zQ4Ya8 qNP1uf/kQxpxnScvzr3RUNTqVs0sfFZaqClYEeL6MwUfZVgr9lkV+Uq61O4XYXtxPIKO WlLNmbrsfKT7Yfg4yFCJEHAzV3ZJtPiCqDFVtFJQC/vkto99FH+DqvIAYG9mP4iABrk2 qzCN9Pch4qTfUqM6ON6/nEQopVt4wJRs6xWLK5QRiyrKVPr2f9auVqo5lQnEaXWem/GS 5ZDA== 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 :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=a6i7yHNl1GaT9xYUaonLTtje8dBxC2/IE8IfZfyAwz0=; b=B+Ud4qHnCb7cLPIFxZk7xPc8DQi1lNecvu9VTBixMdHVl95kAoysID7TnswdjPlTyy n+1lTPEXQzbvPyuFpn6xo2/+Hux4Y09MYiGrks6bhjq63CJrmXjTyA5/G+IXMZOJiaQk aLkgL7KbVLge6j5jj8JiBpyFLCLzppMeFxodSSu+5ubFO0YCFl6KFhP2F+lMptprgX8A 1/3nlCbfq35ipo6JIia8WwJ7uYORgPK2C5W4ZCUflegqI7xiqaqR2ILVv7wqPng5w7tV t0nn3z/huMYigjIxkqg07yaxWDSimSDzN5pTo+GlDxe9ZUuw7eyuMxStS0A9E44kJCAk NSZw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmx.de header.s=s31663417 header.b=My54Ye3S; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmx.de Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q24-20020a637518000000b004fad0c51858si3049094pgc.532.2023.02.09.13.25.10; Thu, 09 Feb 2023 13:25:24 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmx.de header.s=s31663417 header.b=My54Ye3S; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmx.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230291AbjBIVPs (ORCPT + 99 others); Thu, 9 Feb 2023 16:15:48 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57332 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230264AbjBIVPo (ORCPT ); Thu, 9 Feb 2023 16:15:44 -0500 Received: from mout.gmx.net (mout.gmx.net [212.227.15.19]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9D2A55777E; Thu, 9 Feb 2023 13:15:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.de; s=s31663417; t=1675977320; bh=Uh5RIMNU60mWcaditU9sALzJk63hb5rbJhhp4Sndz7E=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=My54Ye3S6lZwzlGKqHvfN78JsrV4+iDjsgNaxF1PVUhBQYfrMIbIgGFU1FJv3wXJ7 x6HRcf9hwNh+00X+fihbB/RPyIz9yT/WWoRRtdunfHIL4EISpI1eMszk0vvJi3hvl4 GyJHPHaLVWlBjo6qQ3OkAJOoz/4ZdscZxssRBrHYj3KhWh7dI7ACawkqMMdI7LsO1M 5oAcybRRCkMjV+js7wlf79egJaLcVjyJQa8QnDlBlvYBzQT4n0KXInbqaUp2Kll5ir ZvxaT7WGZuoBV9qD1JGIbTNcoKtz0QLUvtqNlc5qDh2D1cdCurcBsXurkvHTIQc9gC RlQzsH16HWcJA== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from esprimo-mx.users.agdsn.de ([141.30.226.129]) by mail.gmx.net (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1N33Ed-1oRVSU3L2r-013Jgd; Thu, 09 Feb 2023 22:15:19 +0100 From: Armin Wolf To: hdegoede@redhat.com, markgross@kernel.org Cc: jdelvare@suse.com, linux@roeck-us.net, platform-driver-x86@vger.kernel.org, linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 2/2] platform/x86: dell-ddv: Prefer asynchronous probing Date: Thu, 9 Feb 2023 22:15:03 +0100 Message-Id: <20230209211503.2739-3-W_Armin@gmx.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230209211503.2739-1-W_Armin@gmx.de> References: <20230209211503.2739-1-W_Armin@gmx.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:qL+iwF8GTblNMRbnwYaDj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255Wo3zMXb7e8ORNkFakF77MdcSeSd2U2XinYJ06SApiNQ/KXLwTg5AG QEZ6L8shuJJP4I6NHoMuMcgxuXn+HJ193xoO6PB6sYSUxpZGdlz5hjwbuoHsmNRKNqoufDZ4B WBwiXBehlCuNOhYFO0KRkIlSumA= X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1757390228131214118?= X-GMAIL-MSGID: =?utf-8?q?1757390228131214118?= During probe, both sensor buffers need to be queried to initialize the hwmon channels. This might be slow on some machines, causing a unnecessary delay during boot. Mark the driver with PROBE_PREFER_ASYNCHRONOUS so that it can be probed asynchronously. Signed-off-by: Armin Wolf --- drivers/platform/x86/dell/dell-wmi-ddv.c | 2 ++ 1 file changed, 2 insertions(+) -- 2.30.2 diff --git a/drivers/platform/x86/dell/dell-wmi-ddv.c b/drivers/platform/x86/dell/dell-wmi-ddv.c index d81dc4dd93e3..d547c9d09725 100644 --- a/drivers/platform/x86/dell/dell-wmi-ddv.c +++ b/drivers/platform/x86/dell/dell-wmi-ddv.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include @@ -869,6 +870,7 @@ MODULE_DEVICE_TABLE(wmi, dell_wmi_ddv_id_table); static struct wmi_driver dell_wmi_ddv_driver = { .driver = { .name = DRIVER_NAME, + .probe_type = PROBE_PREFER_ASYNCHRONOUS, .pm = pm_sleep_ptr(&dell_wmi_ddv_dev_pm_ops), }, .id_table = dell_wmi_ddv_id_table,