Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp5050593ybi; Sat, 20 Jul 2019 11:46:58 -0700 (PDT) X-Google-Smtp-Source: APXvYqwMKH9dQo40c8lmi9l/9ViJDXhz9grUPpdZfYSR/rYOjpGTd3LQUBKyDUQnHXa0CzkXHne4 X-Received: by 2002:a17:90a:8a91:: with SMTP id x17mr65816114pjn.95.1563648418889; Sat, 20 Jul 2019 11:46:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563648418; cv=none; d=google.com; s=arc-20160816; b=H4IEsFsMglOhBAi4jkEcmpYiOMimNcQ+WxijPJWgcVGNx7vl7sg8e1RACU7Ar0YUzL ga+VBLbyr9BZTDuMf5RxR7UA0JIQJRIInOwPM3Mza+b5tkKsWBdMzk0NxLLAE6kdNrUe m7MpuUOXNJyXpkO19fpST4HUPToAf9cdoLmqet7Zv8+zJEpJIWDXd8+UafAtcvjAHqji 655gTgpHLXaCNnoFgdbftvsZDK7dfhph8//YuXeSYu8bJCQYAcT4ubepXBcMOCPjp59b xh9o3F7Pppw33J9gb2pQyOPVvQKEvbpWT56jE+Zb54e+z2UCpvEciYJTompP1rsUZjsI Ek+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Kjz29uaXOViEkvbQC/EqeL5ZlYftQJTWsTVkUNrscrY=; b=uU4Hmj8awXUWsJQHJJm/hs6dt+pTB6QmPpgWTaMUeJxO2wxB2zl5Kq2rjO3qlKHnk2 y8/Sh9f7Jw5OuBRC1J58GvGE2u9XJMjJ2zOtrlgBKpijtn2OEbI6sSJpZtl8L1B9StuO UtDgdaagtqZj3G8jtBVz4lQTQMAySsI9TWTStCf8hcNnJ8rEXqHvTqPvsejaDTDk4yl4 JwXtfnUeaH1WbYHlWJqcfBhZ7Rp8L4YvlgYFFvgeKgXvBx/eIG+CRUfmKI9aeqH6+BwB uQqIRmNhk7nFa1GVPKrINmrlR9dCpSMDuBiDHOS8ZLvdQwTBF7jxepemR86EFa2biV+4 k8Ug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=lvpnV0tJ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s8si3560948pfh.276.2019.07.20.11.46.43; Sat, 20 Jul 2019 11:46:58 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=lvpnV0tJ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726343AbfGTPWF (ORCPT + 99 others); Sat, 20 Jul 2019 11:22:05 -0400 Received: from mail-wm1-f66.google.com ([209.85.128.66]:39383 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726020AbfGTPWE (ORCPT ); Sat, 20 Jul 2019 11:22:04 -0400 Received: by mail-wm1-f66.google.com with SMTP id u25so21155043wmc.4; Sat, 20 Jul 2019 08:22:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Kjz29uaXOViEkvbQC/EqeL5ZlYftQJTWsTVkUNrscrY=; b=lvpnV0tJbpJ+ncTDvyQ7KQnJODNiS5oUHZczyaB97uMibBAXQBQZQoQmKgFVy013lV tzA3kv4VaVy50YdjTn8P21iZ3L/Uv/cVzzBOAvOMIRU+PGNbIpfT4wunxavXrKjDtEkt XX5ehG0lkzQEj9HvdXxr/upsVxXn6K8ORqzxKaCicZzrtxcVSnlRQKFlyxDwqNIwHsX3 kN2nOSFatkfCPYnrw5Lq0g5ySxfw6jW4hascxKjF856+WE5I1fuPPN/Ks7bBtWgrFjru LsTEDzrsSLHLYAjvV215a7TKnKv2FNCO5vMQsr79Er/E4dtOkW9VtnQjsNinMhG0AgMN 5VSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Kjz29uaXOViEkvbQC/EqeL5ZlYftQJTWsTVkUNrscrY=; b=V9J01K+0Qx9CDO67JLRw7frXiVh65VMd0j27izsZ9OC0eGp7AvL9Y91sbtkXv6OmTP 0RPOSxhYuiw+xQC7clr2DWeeqAE42UKtPZPYpS7GbmCZCfca1/XbiierC0lzRFwUKSs7 LrDsxffEGt4GMwdo2Dme88rRVfYSbPNfHfDsJkTZLHFr6aE6zDYXg4aGRCFB2lumRdRB 3QHyQn4Z/kc0YMUBMXMwBQgY6nakOMQyMPuO+ERVkKQiCdm/NKlp7nO6KUKbRDcM2moR FLuI3kyeRPsDC60mgc4epxqxao3xPNrfOtnyrhiohWUGxkxfHqjmjC13uKvBkSw2cVhs TZcg== X-Gm-Message-State: APjAAAUJEh+jURIyCzwe+b7TO8clzqPVtDvKyNOWV7k1abpj/iohKhG7 YFe0o/kU//gSRM630J6zENs= X-Received: by 2002:a1c:7fc3:: with SMTP id a186mr2125211wmd.151.1563636122435; Sat, 20 Jul 2019 08:22:02 -0700 (PDT) Received: from lenovodario.localnet ([151.52.237.69]) by smtp.gmail.com with ESMTPSA id y16sm68550429wrg.85.2019.07.20.08.22.00 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Sat, 20 Jul 2019 08:22:01 -0700 (PDT) From: Dario Messina To: Stefan Assmann Cc: Alexander Kappner , ibm-acpi@hmh.eng.br, dvhart@infradead.org, andy@infradead.org, ibm-acpi-devel@lists.sourceforge.net, platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] Add Second Fan Support for Thinkpad P50 Date: Sat, 20 Jul 2019 17:22:00 +0200 Message-ID: <5490267.oBufKZg01J@lenovodario> In-Reply-To: <20180926143449.bnqliemloqw7fuyv@t530.fritz.box> References: <1522693621-3124-1-git-send-email-agk@godking.net> <20180926143449.bnqliemloqw7fuyv@t530.fritz.box> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org I have a Thinkpad P51 (BIOS version: N1UET74W, EC version: N1UHT26W). This patch works on my computer and I can read both fan speeds through sysfs interface. On 2018-09-26 16:34:19 CEST, Stefan Assmann wrote: > Is there a way to actually control the second fan? There's pwm1, but no > pwm2. And pwm1 only affects fan1. I have played with the driver code and I noticed that it is possible to control both fans independently (unlike what the "Fan subdriver" comment in the code says). You can do that simply by calling fan_select_fan1 or fan_select_fan2, to select a fan to be controlled, before calling fan_set_level. All control parameters (disengaged, manual speeds, auto) are fully independent. What is not smooth is reading back current control parameters from register 0x2f (like fan_pwm1_show or fan_pwm1_enable_show actually do), because the EC ignores which fan is currently selected and it always returns the last written value. Distinti Saluti/Best Regards, Dario Messina