From patchwork Fri Nov 30 15:44:08 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Michele Sorcinelli X-Patchwork-Id: 10706661 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4A9D613AD for ; Fri, 30 Nov 2018 15:44:20 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 378B92E09B for ; Fri, 30 Nov 2018 15:44:20 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 28ADF2E528; Fri, 30 Nov 2018 15:44:20 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 89DD92E09B for ; Fri, 30 Nov 2018 15:44:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726127AbeLACyD (ORCPT ); Fri, 30 Nov 2018 21:54:03 -0500 Received: from perdizione.investici.org ([94.23.50.208]:62544 "EHLO perdizione.investici.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726564AbeLACyC (ORCPT ); Fri, 30 Nov 2018 21:54:02 -0500 Received: from [94.23.50.208] (perdizione [94.23.50.208]) (Authenticated sender: mikefender@cryptolab.net) by localhost (Postfix) with ESMTPSA id 110A21401A6; Fri, 30 Nov 2018 15:44:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=autistici.org; s=stigmate; t=1543592656; bh=hFU5AqSSSnJ/vgdnroa+YKYjZpqaEB+MjeP7R68k5Ng=; h=From:To:Cc:Subject:Date; b=CHAMLxiB436vaJpfUx1GUvW8iBxM6axg3a1I60Bn0fMjC1GXYOEmg2En0cRTtLf1A vOEBG//9qwQbxNGDIPbgbCo6NryBwRY3kP0BFdvnxjF8t3fWaHhrsu5w63BJxXQXq7 c3n6+doTCJrmZNcfAcj/BEZUUEyuMwr3ZjLumjQQ= From: Michele Sorcinelli To: =?utf-8?q?Pali_Roh=C3=A1r?= Cc: Jean Delvare , Guenter Roeck , linux-hwmon@vger.kernel.org, Michele Sorcinelli Subject: [PATCH] dell-smm-hwmon.c: Add XPS 9570 to supported devices list Date: Fri, 30 Nov 2018 15:44:08 +0000 Message-Id: <20181130154408.6525-1-michelesr@autistici.org> X-Mailer: git-send-email 2.19.2 MIME-Version: 1.0 Sender: linux-hwmon-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Reviewed by: Pali Rohár Allow the module to be loaded on Dell XPS 9570, without having to use the "force=1" option. The module loads without problems, and reports correct values: $ time cat /proc/i8k 1.0 1.5 -1 35 0 0 0 0 -1 -22 cat /proc/i8k 0.00s user 0.00s system 7% cpu 0.033 total However, the call may freeze the kernel for a very small time due to code running in the SSM layer. This is a known issue with the driver, and can be reproduced with other supported models. Average execution time is 33 ms. The command line tools from i8kutils can properly set the fan speed, although the firmware will override it, unless automatic fan control is disabled with the proper SSM call. Average fans speed (when firwmare automatic control is off): STATE -> RPM 0 0 -> 0 0 1 1 -> 2500 2500 2 2 -> 5100 5100 3 3 -> same as 2 2 The SSM procedures I8K_SMM_GET_FAN_TYPE and I8K_SMM_GET_TEMP_TYPE are failing to return valid values to the module, that can't label the fans and initialize the temperature sensors in the hwmon interface. This is a problem in the firmware code, and may be eventually addressed by a new firmware version. $ sensors dell_smm-virtual-0 dell_smm-virtual-0 Adapter: Virtual device fan1: 2531 RPM fan2: 2496 RPM However, the procedures I8K_SMM_GET_FAN and I8K_SMM_GET_TEMP are working properly, as they return correct values. This means that the module could be modified to initialize the sensors without labels and report correct temperatures. --- drivers/hwmon/dell-smm-hwmon.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/hwmon/dell-smm-hwmon.c b/drivers/hwmon/dell-smm-hwmon.c index 9d3ef879d..367a8a617 100644 --- a/drivers/hwmon/dell-smm-hwmon.c +++ b/drivers/hwmon/dell-smm-hwmon.c @@ -1017,6 +1017,13 @@ static const struct dmi_system_id i8k_dmi_table[] __initconst = { DMI_MATCH(DMI_PRODUCT_NAME, "XPS 15 9560"), }, }, + { + .ident = "Dell XPS 15 9570", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), + DMI_MATCH(DMI_PRODUCT_NAME, "XPS 15 9570"), + }, + }, { } };