From patchwork Fri Feb 9 09:01:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Kranz X-Patchwork-Id: 198793 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:50ea:b0:106:860b:bbdd with SMTP id r10csp724382dyd; Fri, 9 Feb 2024 01:14:21 -0800 (PST) X-Google-Smtp-Source: AGHT+IGd0A0M76+8O6LwwM3eQXyZaVsy/EvRiCOd837fzS66pEnAlMysY9FfwhIfltmppBCRiRds X-Received: by 2002:a17:903:2344:b0:1d8:e4b8:95e5 with SMTP id c4-20020a170903234400b001d8e4b895e5mr995434plh.32.1707470061153; Fri, 09 Feb 2024 01:14:21 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707470061; cv=pass; d=google.com; s=arc-20160816; b=OaA6ttUo7kf8v78Cws+qOv0s4BQD/6s/VNN9opP1p8/mNqiopQFZ8tXfVionqZD4GC mibxA4VmFnFsGRcfclKrhFgdZmeru2SJ5KoZoM3poDhjxL76Goc7sWlk7R1qk5jiNuny 5W9Tf9P0sg24m7DCzRmzcefM7GWcr6q18TCeB1mhV0qNC97b5OrHwypBTbw+YDrTMh/s UVkMw/KjMli1vlgvTm2pf7c9+NVxcUFi9gwAUaThYWUvEsmXtf9H7P8is5L7vdUijs3K uCXgC9gAqgDF22jCIy/82Tczc4NxniujJA7EHnP+6aUOWvG3uvXqoyKx3zG81itm+AzE sP2Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=neBOUcNFScKRdgExDbRdoIzZzeQ/kJIcwYZHML2NDYg=; fh=q7+YrHoY9mjprZfXbotdleUDpW5imoerEpB6TqoIvIM=; b=Oe/IWGHzfi2/grU44Yq72IfuFIXok9+xzbHmPyJR/E5rpfkRVc16FG3QZKXuUCYLRz OX5bLV1vM3Rtb7GxaZqwMGuHkg1q6/SGdkzTmOlk23ieMUFMh5iKLvrEQbK48MjeTTYy 1fvTxsGVhr1JW0GeJZn9TyxXuWWLmnYtAPOECnK5pXW4d3Od2kl8K42rFlTWgNhnWhi5 9Ebpp1qXujK4cqnG/Rec2MEqJWNxHrEmZicNwNUjXmZaFnYGMYj9bFyUnvB50fHBoTn5 E3w5OS2ENbAmQRowQgGJl2kR2XKCc+3xNUtDPgzL7qtmIK17B0WR+2/Myy/e8Y8rYUoK xBOg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@googlemail.com header.s=20230601 header.b=BThMWH+S; arc=pass (i=1 spf=pass spfdomain=googlemail.com dkim=pass dkdomain=googlemail.com dmarc=pass fromdomain=googlemail.com); spf=pass (google.com: domain of linux-kernel+bounces-59141-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-59141-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=googlemail.com X-Forwarded-Encrypted: i=2; AJvYcCUx//rjF+tkZp4jU3r2BOo7LCobwkygHl94ngOGOMBV4goOEGFOZGHINU48cGvcj0Y7SKUREo2HQt4fWguOpuRbGZcxNg== Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id o2-20020a170902d4c200b001d94e75cd40si1345948plg.442.2024.02.09.01.14.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Feb 2024 01:14:21 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-59141-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@googlemail.com header.s=20230601 header.b=BThMWH+S; arc=pass (i=1 spf=pass spfdomain=googlemail.com dkim=pass dkdomain=googlemail.com dmarc=pass fromdomain=googlemail.com); spf=pass (google.com: domain of linux-kernel+bounces-59141-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-59141-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=googlemail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 177D6B22E37 for ; Fri, 9 Feb 2024 09:03:24 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 44E44664DE; Fri, 9 Feb 2024 09:03:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=googlemail.com header.i=@googlemail.com header.b="BThMWH+S" Received: from mail-wm1-f46.google.com (mail-wm1-f46.google.com [209.85.128.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DA7021103; Fri, 9 Feb 2024 09:03:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.46 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707469385; cv=none; b=D7cd9fXA6ccQtSB6sFb7qYxnaQB/ri5mgGHsDwyHfkDVNDwVLBW5jMqYE/8y6IVKnFN4Wqi6OVQNLBR5Y+spZKbRkXH7mnk3NIZO5GiZcRfrXzOx+Df4n5d1hjWB+9NWtihkJIR6chsTTSvAhNH9e4SGDy70lPAuFJWIJQJsq/8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707469385; c=relaxed/simple; bh=wa9bhmzOX6NTL6/0vCdL+vxvuRUW/j5gFq4FNTMI9mg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=fxY0U/nGzsxD6Eo/+Y796Eov/v7wVxH96dQqyWvgVMVnD3UT/QXWilF9XPG1QBAdyYwWtSWg7TwGUHBru+Dij7ev5fmVCfDPlF0n1b/r1kX+e1yaAfXnoVLJHD/gdIjgiYC2qPiPvntnpCd07jyZ0//FuqSHR6aNNYPjXFPkGBY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=googlemail.com; spf=pass smtp.mailfrom=googlemail.com; dkim=pass (2048-bit key) header.d=googlemail.com header.i=@googlemail.com header.b=BThMWH+S; arc=none smtp.client-ip=209.85.128.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=googlemail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=googlemail.com Received: by mail-wm1-f46.google.com with SMTP id 5b1f17b1804b1-41047386d18so6076835e9.0; Fri, 09 Feb 2024 01:03:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20230601; t=1707469382; x=1708074182; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=neBOUcNFScKRdgExDbRdoIzZzeQ/kJIcwYZHML2NDYg=; b=BThMWH+Sr6MhR/ni/cd8uCA6G5abnoCHuY4AbpJFF2jsA4mqAhdWnppey8NNkhyPz3 ZhbK1D1pFXlwlTgiD42ERa/ZJIBnTmtUCFLazq0PzXGI9LZCvVauCiOQ0vH8pfmewlw9 /8vGsCkhndZ2MxqsXwCL8EdoNN+65lNpDeJiBINeZaMF10m5D4iYeO+niivtGWR8FySg 9CmfheOavWpq6Rt3Zt2lzfdMmq6rXV95Ulpr+rTXioqKdfoCxzeYt0uFRSv1hwJVPOwo bL7lIitOb48s5+JBzAObZn7SgIGeHyZyViU2o4eeNfQeEcybErVFJn70WopcfjTqAX7X fhXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707469382; x=1708074182; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=neBOUcNFScKRdgExDbRdoIzZzeQ/kJIcwYZHML2NDYg=; b=ktgGTMbMTCWIRwPL1r/jUM5CWLcsrAsKpWeFS5GxjphZICew3TBjO4zoKV6ZTdctqJ G/7jKDlhzyi+Sbd7xdlO3ToSWu/jwUDl/znURRdFBHGdVp7TMCGxizjkeSIFcL6/8JW6 sPH678+qCENbkU5Bm8/iG/ngrntycxn69RNB9cTH5Y3Oko66YooeJzeRYhSGY85fcy2O gsACLYftKOVW6EilpUuleUK33C9KVKGe6/WKPTpxEmos7HVDoYz71sLvmjGKRDOwB93Q ioAR6mMT0QWAAwh9XDt3nphF/e0CMKwDyCHhVxA/9xaXnfVHsnrA/9uHbht1n3/NtGaC KBDg== X-Gm-Message-State: AOJu0YyM/PNtcufyhLANKoDeSylIHabkaURrMOKsO8zbRx83N6UVu32K EH6w/8i73QrgXko86GMetUd0J0qkGuTDRQfZykBEMXg= X-Received: by 2002:a05:600c:510b:b0:40f:ddb8:c854 with SMTP id o11-20020a05600c510b00b0040fddb8c854mr747559wms.28.1707469381781; Fri, 09 Feb 2024 01:03:01 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCWMNNyGidvL/baPQzyxrn6Opp+D1MlhQ0Ut3yiVV44g3nxb1fg8HSmy/Xg2ph3fJb/12LRgBw0rkCroJnHV2C7vyLo+T0hxgHau/81U+2wEOG+gkAok5sxxRnVr7abVSwTrc8h8X/Ym1Oca8EsAAcUFuE3AhqlVPv3DxEzsBHA0ODVd9t4Y0Hw8ZYU08fTRc9ati81oov3AMTwbvHrzp6wA/v0FHIQP0Gjoq1scRpWBF6x8pOs= Received: from lightwarsArch.fritz.box (p5b067f78.dip0.t-ipconnect.de. [91.6.127.120]) by smtp.gmail.com with ESMTPSA id bi19-20020a05600c3d9300b004107219c664sm738486wmb.32.2024.02.09.01.03.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Feb 2024 01:03:01 -0800 (PST) From: Sebastian Kranz To: linux@roeck-us.net Cc: samsagax@gmail.com, derekjohn.clark@gmail.com, jdelvare@suse.com, linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org, Sebastian Kranz Subject: [PATCH V2] hwmon: (oxp-sensors) Add support for Ayaneo Air Plus 7320u. Date: Fri, 9 Feb 2024 10:01:23 +0100 Message-ID: <20240209090157.3232-1-tklightforce@googlemail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <2a6ab115-9775-447b-adf5-d63043548c74@roeck-us.net> References: <2a6ab115-9775-447b-adf5-d63043548c74@roeck-us.net> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790412126936129020 X-GMAIL-MSGID: 1790412126936129020 Add support for handheld AYANEO AIR Plus with the same EC registers to add proper fan control. Functionality was tested successfully. Signed-off-by: Sebastian Kranz --- Documentation/hwmon/oxp-sensors.rst | 1 + drivers/hwmon/oxp-sensors.c | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/Documentation/hwmon/oxp-sensors.rst b/Documentation/hwmon/oxp-sensors.rst index 3adeb7406243..55b1ef61625e 100644 --- a/Documentation/hwmon/oxp-sensors.rst +++ b/Documentation/hwmon/oxp-sensors.rst @@ -33,6 +33,7 @@ Currently the driver supports the following handhelds: - AOK ZOE A1 PRO - Aya Neo 2 - Aya Neo AIR + - Aya Neo AIR Plus (Mendocino) - Aya Neo AIR Pro - Aya Neo Geek - OneXPlayer AMD diff --git a/drivers/hwmon/oxp-sensors.c b/drivers/hwmon/oxp-sensors.c index ea9602063eab..8d3b0f86cc57 100644 --- a/drivers/hwmon/oxp-sensors.c +++ b/drivers/hwmon/oxp-sensors.c @@ -43,6 +43,7 @@ enum oxp_board { aok_zoe_a1 = 1, aya_neo_2, aya_neo_air, + aya_neo_air_plus_mendo, aya_neo_air_pro, aya_neo_geek, oxp_mini_amd, @@ -98,6 +99,13 @@ static const struct dmi_system_id dmi_table[] = { }, .driver_data = (void *)aya_neo_air, }, + { + .matches = { + DMI_MATCH(DMI_BOARD_VENDOR, "AYANEO"), + DMI_EXACT_MATCH(DMI_BOARD_NAME, "AB05-Mendocino"), + }, + .driver_data = (void *)aya_neo_air_plus_mendo, + }, { .matches = { DMI_MATCH(DMI_BOARD_VENDOR, "AYANEO"), @@ -332,6 +340,7 @@ static int oxp_platform_read(struct device *dev, enum hwmon_sensor_types type, switch (board) { case aya_neo_2: case aya_neo_air: + case aya_neo_air_plus_mendo: case aya_neo_air_pro: case aya_neo_geek: case oxp_mini_amd: @@ -374,6 +383,7 @@ static int oxp_platform_write(struct device *dev, enum hwmon_sensor_types type, switch (board) { case aya_neo_2: case aya_neo_air: + case aya_neo_air_plus_mendo: case aya_neo_air_pro: case aya_neo_geek: case oxp_mini_amd: