From patchwork Fri Nov 24 09:41:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SungHwan Jung X-Patchwork-Id: 17046 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:ce62:0:b0:403:3b70:6f57 with SMTP id o2csp1037851vqx; Fri, 24 Nov 2023 01:43:08 -0800 (PST) X-Google-Smtp-Source: AGHT+IHR5E7i5gxKViUrXmNG8bJ2tATRJiCTG7RGpjqmbbR+rcMVye46NVxGuiCUyf1zF3bwtxbZ X-Received: by 2002:a05:6a20:7352:b0:18c:2d7:c4b0 with SMTP id v18-20020a056a20735200b0018c02d7c4b0mr647635pzc.4.1700818988291; Fri, 24 Nov 2023 01:43:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700818988; cv=none; d=google.com; s=arc-20160816; b=VSgukBnxhaY2Csd4mN7sMjN5VVY1Kc40oFU470zVinCDiTEsb9zcZSRc/yshYe4zEy dyki+M8VVcBIsziccNqQdj/PzXtlIaQKpXSSOMA3srZaWiK/mNkS4c3m0haL7ZOEtSK9 QKnAroY6WiVDKe4mNDuzYW38x18ot0dJzgmFo/czH3LVx+9NUVIdLc4CKzWjacsrcUTn yREk6/XGb34Y6KBGfNpMRERpGQ8HLsMSwoIq4tzPV68CKKT4cZSievWRuu2KcWnpI4MR /WmJT4xyp1W/KDiRjSJo3PJgAqDIVZLzIrO29CYxi99YkiY5rlxYTPQwhPpgCEVtWPRt as6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=Q75oNcuLFNnfSIrXcmUAYp+ENVQig3VLLjgl9QtpDcc=; fh=xHl243xDiT23q9hyTiKsftvq+8y9UCpwfKZetSycd/s=; b=SBzONa2o8lkCRSNLu1YGUav6MT3ni8Lg0/Rhvo0dRTDmimps+YjhVV7JySOV/CjsM8 11CiQrwDmpaoFrLmE5jONL+7XHxD7NgcAjUGpY3mvadM/VsPSLGSp/+AR7qBug+/OnDg ZAhZE6LIjiSMMQGN3VvM5QQGALea0AFMrEYPVqEO5KqQkMn161v4+mfL47+ekQgmgt23 ubwyhmo99qj/aIrPX5tIVlwJHP4QeU507DUxQRq9kvdV9LGSdRDJddwgYnYw5Auy5rSI H0pSdmcGNOKfDCjNPj8wkPtcEpnGQhzoyqStpCFES3rYHj1dvqF81rMk/WuyiEwj5Wih a2oQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=P357l5yn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id j9-20020a056a00174900b0069014d63f21si3244984pfc.148.2023.11.24.01.43.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Nov 2023 01:43:08 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=P357l5yn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 5E5F8837353D; Fri, 24 Nov 2023 01:42:24 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345148AbjKXJmM (ORCPT + 99 others); Fri, 24 Nov 2023 04:42:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42166 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235193AbjKXJmE (ORCPT ); Fri, 24 Nov 2023 04:42:04 -0500 Received: from mail-pf1-x42a.google.com (mail-pf1-x42a.google.com [IPv6:2607:f8b0:4864:20::42a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DAD051712; Fri, 24 Nov 2023 01:42:08 -0800 (PST) Received: by mail-pf1-x42a.google.com with SMTP id d2e1a72fcca58-6be1bc5aa1cso1663138b3a.3; Fri, 24 Nov 2023 01:42:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700818928; x=1701423728; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=Q75oNcuLFNnfSIrXcmUAYp+ENVQig3VLLjgl9QtpDcc=; b=P357l5ynX0XJHJUlZKh5o/MVWE9WOjVKs5s/3ho91wqg0Tl/Hn9qB4igEOg9aSOOLr CArpTXU/vekDsgFJW8tFKqzDMfC6WoZEQwuHisiTPCxRN4XNLowq5/grHQenXxa7kFIK Fw9oFH1EFv24Es8Ph1EJXG70d1vvW3hSX/Hgd/inY97cfUaTvowemJSanSQ5Y2fQbNQt YoeapW/HeJPTd3Oz4Q+GQuoiAwNPoyrvqw4PKhAz+dpMNSj+wgYc8jIjlvcsSDGS2eNq XDXfkYaBqu51JADJmX6TAcvfGHFxtbdjfJ0wdpj+WSFdeo/C66myUN5B11GPLBIVORfS Oqvw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700818928; x=1701423728; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Q75oNcuLFNnfSIrXcmUAYp+ENVQig3VLLjgl9QtpDcc=; b=GAO/VVHCOlcxk9/cYZP76l/+RS2VND8pXybT5egQ5KHtVcK9b4yRT8Lo16pMFqaEiw FDNKMBShJPK7RtV0p8EbVMdo3W5/KHEVwvWZt53tasn7tygbjqR3WiiGh2HvdhR23gI8 IDE81gsps0f5u896Gb2gJYtAiWTfNGaO+NZcuG7JjnW6Plkzpy+w/zDk41fIL4T0vJzT yQiGH7xfgGjyzNNBuPlPQoT6dL83NBngw/Lcob2wpeJyIKXYJ7vd9IhdybgtguH1FBMu jGiZ1KwiyGL7/HtwrPoYQ7vS9PdtjEUEkzSXhqxlue+zd133tuLdT2R5hDbLGD1J6Cut YDvg== X-Gm-Message-State: AOJu0YzRDt+EM1mcNOoartRdPDEc5JInkIF/nYQln1zHQ37ofLxUrSNF R2T+C5T4M5rgfrNNOYzzS98= X-Received: by 2002:a05:6a00:3909:b0:6be:130a:22a0 with SMTP id fh9-20020a056a00390900b006be130a22a0mr2194245pfb.14.1700818928237; Fri, 24 Nov 2023 01:42:08 -0800 (PST) Received: from localhost.localdomain ([110.46.146.116]) by smtp.gmail.com with ESMTPSA id d10-20020aa7868a000000b006cb8c92a8acsm2489956pfo.113.2023.11.24.01.42.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Nov 2023 01:42:07 -0800 (PST) From: SungHwan Jung To: Hans de Goede , =?utf-8?q?Ilpo_J=C3=A4rvinen?= , "Lee, Chun-Yi" , Jean Delvare , Guenter Roeck Cc: SungHwan Jung , platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org, linux-hwmon@vger.kernel.org Subject: [PATCH v4 0/3] Add support for Acer Predator PHN16-71 Date: Fri, 24 Nov 2023 18:41:17 +0900 Message-ID: <20231124094122.100707-1-onenowy@gmail.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 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 groat.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 (groat.vger.email [0.0.0.0]); Fri, 24 Nov 2023 01:42:24 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783437971314338918 X-GMAIL-MSGID: 1783437971314338918 This series of patches adds support for Acer Predator PHN16-71 in acer-wmi including platform profile, (thermal) mode key and fan speed monitoring. The acer-wmi driver already includes fan control and turbo mode support for gaming laptops that use predator sense app (version 3), but PHN16-71 operates in different way with new predator sense (version 4). To distinguish from implementation for previous model, new implementation for this device is marked with "v4". Changes in v4: - add new patch for "ACPI_VIDEO" in Kconfig - use GENMASK and FIELD_GET to read fan speed - clean up code Changes in v3: - change dependencies in Kconfig Changes in v2: - fix typo - remove redundant "if" statement SungHwan Jung (3): platform/x86: acer-wmi: Add platform profile and mode key support for Predator PHN16-71 platform/x86: acer-wmi: add fan speed monitoring for Predator PHN16-71 platform/x86: acer-wmi: Fix recursive dependency for acer-wmi drivers/platform/x86/Kconfig | 3 +- drivers/platform/x86/acer-wmi.c | 368 +++++++++++++++++++++++++++++++- 2 files changed, 369 insertions(+), 2 deletions(-)