From patchwork Thu Jan 26 19:40:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Armin Wolf X-Patchwork-Id: 4592 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp452479wrn; Thu, 26 Jan 2023 11:42:39 -0800 (PST) X-Google-Smtp-Source: AK7set+th07rCqJ+2HGVr2ZZcy/j0Wkiflyn8joyqeK/h9oW3c5kkBfCGcVzFnGL9Jk2YwWy4OZK X-Received: by 2002:a17:90b:38c5:b0:229:983:f3f9 with SMTP id nn5-20020a17090b38c500b002290983f3f9mr3373317pjb.40.1674762158829; Thu, 26 Jan 2023 11:42:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674762158; cv=none; d=google.com; s=arc-20160816; b=DiGDBfVcxjpNFBdcdV1XKcmaPjFgXPwCa82dgGFqC5qG9u82AQkOsUCD/LTTUZIjjr DW1wzeLV5jrTjGOn5Pp7mabTd9JiJgbnEYrd22ydTy5eBj+BEr50yp3Za23e6RzitO+8 Sge0tfGM86FK6wGoiop6GzGDA8FmGEsJ2nm40NC/hig/u7tKDT25ZulHEWSgg1oRN7qb BwG7NjEvCL5EpqW+yMUGaVHdJnMVoHEJFl0ZCifQcnTRPs5OQIOAzrHM1tV81OIhm6XQ 8HqzaxJDp4A8Vc0VUMvFJjQo4IQEfFwiiueCTqAIiFzRS0p7T3fSo21lm30PRPhZ9WYN PoxA== 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:message-id:date:subject:cc:to:from:dkim-signature; bh=Vkh5XMl3tSiAwAmSi+20IMSAVpBaIubqmAbMS5Z06iw=; b=nGi2dJkbhAqVsQGbGmyAgR7at5CYFMEfzD9K33BxVlk/ZSybFH32n5DFtyCQlc+XH8 hhr2DThZVc9zDVNv8/yvmKoT7vajcoYrqlzk0JRhNdeVE3vq4WYN/6cc0XH1C9fAHw6C bN1VfRMsroAdm+R7eRsrnxar+HS4UHrkxRVp2JFIMa18pK0wD4qabN8cII1CL9sd9nF3 GpDn4S1kkPe8CSJuMG9JZfRhj6C+0+zNmhHv9J4afj4KnikF0RC/HsYwUE3ehBVfACf/ yMP8HrwyznplP0UmxxTyU+RpQijJIvE9eiwehpH4EJQSYb7fu83yyZ0aut2CIbZWLiMX gh7Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmx.de header.s=s31663417 header.b=HBa6NFSj; 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 22-20020a17090a0b9600b00200435da17asi5410395pjr.128.2023.01.26.11.42.15; Thu, 26 Jan 2023 11:42:38 -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=HBa6NFSj; 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 S232494AbjAZTkx (ORCPT + 99 others); Thu, 26 Jan 2023 14:40:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43402 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229781AbjAZTkv (ORCPT ); Thu, 26 Jan 2023 14:40:51 -0500 Received: from mout.gmx.net (mout.gmx.net [212.227.17.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 37ABA10C3; Thu, 26 Jan 2023 11:40:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.de; s=s31663417; t=1674762028; bh=3Cy3fCheTmqrR4p/UHrSVDCpMr75DaSNbA/rdAI8n7U=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date; b=HBa6NFSjxwkVC4icAYKaEvjCReBs6NeoPMh8yzRGk391NN4RwTbYrogm6AfFBTsRb 57LXbqt0MgQYNtotRKkrgjTsnkRK9zn3ZmAmmrtVVj+9ivjH8Y/P+SWxsD3a1RwBQ2 bWPWs0erExlgu1GzfNIhNVSXzRd0SpXGZs/XBkXDawDx0BuiHVfCraWzuqXIkvu1nz Pp/jW79KvDMZmg2TkXp0KCcgyZeM2Bo0TC9JldHcSTEqcppzRpXOEq7687LQRx7mCO 5MVEUQNC+Jxhf58IVuMyLCzlXxmScwNy8NCpGj5QhMHDyFpzj1lcvmwbrJPbjlfHng UIOE27mVRR0CA== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from esprimo-mx.users.agdsn.de ([141.30.226.129]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1M5QFB-1pMV1F2FzJ-001NnE; Thu, 26 Jan 2023 20:40:28 +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 0/5] platform/x86: dell-ddv: Various driver updates Date: Thu, 26 Jan 2023 20:40:16 +0100 Message-Id: <20230126194021.381092-1-W_Armin@gmx.de> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 X-Provags-ID: V03:K1:Xs56crRTDDmuGrLXwfgHDSMS9wth5egEMSFsoUFS0MPo0fgEe6L 1SuiXN15NOPi6kvgvZNICz1u51ZNbkGmeyr+pfGHG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BCRcLFzmfzTXaJIBD0ou2VRQX/fCuN3SKE3P5ZciKeZ6xBlhj8gXSwDAV7wO UtZ4YBLKGRNujdwrHAnWFmi+BfY= 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?1756115405544294795?= X-GMAIL-MSGID: =?utf-8?q?1756115405544294795?= Thanks to bugreport 216655 on bugzilla, the contents of the fan/thermal sensor buffers could be almost completely decoded. It was also found out that newer Dell notebooks support a new DDV WMI interface version, which just adds a additional method. The first patch adds support for this new DDV WMI interface version, while the second patch simplifies error handling then dealing with empty buffers. The fourth patch adds a module param useful for testing the driver on hardware exposing an unsupported DDV WMI interface version. The last patch finally adds support for exposing the sensor values over a standard hwmon interface. The patch series was tested on a Dell Inspiron 3505, with the hwmon patch being tested by multiple people over bugzilla and email. Those who tested the final version of the hwmon patch are credited with Tested-by tags. Armin Wolf (5): platform/x86: dell-ddv: Add support for interface version 3 platform/x86: dell-ddv: Return error if buffer is empty platform/x86: dell-ddv: Replace EIO with ENOMSG platform/x86: dell-ddv: Add "force" module param platform/x86: dell-ddv: Add hwmon support .../admin-guide/kernel-parameters.txt | 3 + drivers/platform/x86/dell/Kconfig | 1 + drivers/platform/x86/dell/dell-wmi-ddv.c | 471 +++++++++++++++++- 3 files changed, 465 insertions(+), 10 deletions(-) --- 2.30.2