Message ID | 20240220-aspire1-ec-v3-1-02cb139a4931@trvn.ru |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-72960-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:693c:2685:b0:108:e6aa:91d0 with SMTP id mn5csp350608dyc; Tue, 20 Feb 2024 04:08:57 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWRtP7KorktNxj8J+5kz6/6i8QFXpsJlnyXYsOogfUI/31Iye4l2MRdImEgX8hwL4NUSRSZ4U2wKod7ihBjZgXJEcnreA== X-Google-Smtp-Source: AGHT+IHnhuCEGYx51e2gPTSYdzKj/U+2MlYoYnSsZwEn1tbxBSKqV/3HhLnVxEDD914/FyRwBeVM X-Received: by 2002:a05:6a21:3a41:b0:19e:cf1a:5372 with SMTP id zu1-20020a056a213a4100b0019ecf1a5372mr19043335pzb.34.1708430937394; Tue, 20 Feb 2024 04:08:57 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708430937; cv=pass; d=google.com; s=arc-20160816; b=dUlUSAeAFnntRpkJCW7bLcqIFsRMMSOMf3kANAJbQ3B4h8jfAkdUXq0UvaeUvfVNpF damL6Oc/fDxGPG9WoyLVRq3h8xbZ+lC525AiIO67ygO+E1zWX0TMPtBzGK/SycaMuEIg B0bXI5cknHPYjP+IIPNWrfn6orPoisgHoBIVNuLgPbgz17rF/d6doDK7aa0nnc9EHKEG GVCf2zlHlz92S9dDrffyuKJnKOoCizFsi806wwlzyyoONLU/5MmYVCh0pzI3AQKmxe9u rbACNEqPccgFQJ3OdFfu2KGXjf9v/E4NWO3woXON8i26wnHY/MM5sbu4Osr8mXxo0QJe kLoA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from:dkim-signature; bh=xM2sBR2cgDLBQ9xoFw7kvOogviR3lWvCfcec1d0zLg8=; fh=w5+et6I02R6RS25/zgNUZL4qY0wwQC0zDXUWXObphmo=; b=BUDK3gf6DyjiRneiJv3CR9S28kgNKZ+9PZIVitCVCoWIF70qssgCmy3nnuCP+7mQ+h 0kBjfPUTx0vE2a9onLl6RahSbb70o2LdKVmkbM0vRegDPdBNbjx9YPekh0pTG8rbFMj1 Rt87VUmgv5FKhiJqDpnI2cLwwJDADGA64pfKFVgS6oRb9dYWbpw68a4Auz1fiXP3JlY+ tGwyJ0t9Ix2aQec7gVJn4oG3lMvGQxJt4na14dATFwl64Z+CKpdm/DLdAhbPQJWzIGTF Al3zTNPLKLPKqlninJdLtnrkgFmdAr4IX05Vs/hJP0RfXidp8mLcTgi9rVVBiNb5VRc7 Zzeg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@trvn.ru header.s=mail header.b=ETV3Vi0W; arc=pass (i=1 spf=pass spfdomain=trvn.ru dkim=pass dkdomain=trvn.ru dmarc=pass fromdomain=trvn.ru); spf=pass (google.com: domain of linux-kernel+bounces-72960-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-72960-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=trvn.ru Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id fa13-20020a056a002d0d00b006e46189a572si3501031pfb.18.2024.02.20.04.08.56 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Feb 2024 04:08:57 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-72960-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@trvn.ru header.s=mail header.b=ETV3Vi0W; arc=pass (i=1 spf=pass spfdomain=trvn.ru dkim=pass dkdomain=trvn.ru dmarc=pass fromdomain=trvn.ru); spf=pass (google.com: domain of linux-kernel+bounces-72960-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-72960-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=trvn.ru 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 4AB31B276BB for <ouuuleilei@gmail.com>; Tue, 20 Feb 2024 11:58:35 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C9A5D6930B; Tue, 20 Feb 2024 11:57:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=trvn.ru header.i=@trvn.ru header.b="ETV3Vi0W" Received: from box.trvn.ru (box.trvn.ru [194.87.146.52]) (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 DF98667C58; Tue, 20 Feb 2024 11:57:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=194.87.146.52 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708430250; cv=none; b=Q3gmWfnmApHnSAosybR3OTY9e9+9C7S1638PumDlMTo7cYWysSL8CGyNdBvYGOkwfIcv2Jgouvat8DSFj5/g488aDfYYSicASJtCtAozzuvuF1JeDDKr7LYC/9bw+DWP72poemmmn/t1UqIWwjFG4bW9kgI6tIBxmLTpo0eLdeM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708430250; c=relaxed/simple; bh=ApiJ2S6pQ5GF5WwxHPrCGVwKlXhmPymVtb/IUGLJWjE=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=JnZ0XD7h5UapiN5rHWjFX37CtoTBMT5nhKylQSVJUKY2UuG5U+1pcVrHISP9ZcHaP2e8sSgubvMXZgOZg+ds+plynCi1TDqcZlzR6br5BmlDTGFljWioyuPbjEq0Z8eLDagdLCuPFTG8+BVBn4owY4cRwCbUJDj14wc4GJNx/kw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=trvn.ru; spf=pass smtp.mailfrom=trvn.ru; dkim=pass (2048-bit key) header.d=trvn.ru header.i=@trvn.ru header.b=ETV3Vi0W; arc=none smtp.client-ip=194.87.146.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=trvn.ru Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=trvn.ru Received: from authenticated-user (box.trvn.ru [194.87.146.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by box.trvn.ru (Postfix) with ESMTPSA id 6A0B5408D8; Tue, 20 Feb 2024 16:57:18 +0500 (+05) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=trvn.ru; s=mail; t=1708430239; bh=ApiJ2S6pQ5GF5WwxHPrCGVwKlXhmPymVtb/IUGLJWjE=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=ETV3Vi0Wg/WdSJIdxSWyrXFPpGTj+kbeIUT0LPS2Se4slN8Uo1c8DY7ijfuEQaYx9 CXNqk6vdiDucjrSMelc7ZmUf8BJnpyKP+ghldMskHHyp02WlWglpfNAceG5tZceo4E DBFKN3RKudfj+il+xfeX325CnOVLFBn08Kryqqulos+TYdGbc2d9Rln/x0EYl2a8Kf Ao7QY1hKPQmFQCJ3moCltr9JTy2ninrR56xYIqhprX7vtkSKH0HlsKQwatpfVhh2NL qoK0yHwVoPKofceuY9JkC0WoHdudmcKHuKidI8anxgmQM9YykUPvo/5Pwxc+9lA3pi 9EHrlQ2UjORiw== From: Nikita Travkin <nikita@trvn.ru> Date: Tue, 20 Feb 2024 16:57:12 +0500 Subject: [PATCH v3 1/3] dt-bindings: power: supply: Add Acer Aspire 1 EC Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20240220-aspire1-ec-v3-1-02cb139a4931@trvn.ru> References: <20240220-aspire1-ec-v3-0-02cb139a4931@trvn.ru> In-Reply-To: <20240220-aspire1-ec-v3-0-02cb139a4931@trvn.ru> To: Sebastian Reichel <sre@kernel.org>, Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Conor Dooley <conor+dt@kernel.org>, cros-qcom-dts-watchers@chromium.org, Andy Gross <agross@kernel.org>, Bjorn Andersson <andersson@kernel.org>, Konrad Dybcio <konrad.dybcio@linaro.org>, Rob Herring <robh@kernel.org> Cc: linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, Nikita Travkin <nikita@trvn.ru> X-Developer-Signature: v=1; a=openpgp-sha256; l=2488; i=nikita@trvn.ru; h=from:subject:message-id; bh=ApiJ2S6pQ5GF5WwxHPrCGVwKlXhmPymVtb/IUGLJWjE=; b=owEBbQKS/ZANAwAIAUMc7O4oGb91AcsmYgBl1JOc8rE2dI3hqLX96DfSRo6+tgB8i2jz80e1Q l3EkWcWQ2WJAjMEAAEIAB0WIQTAhK9UUj+qg34uxUdDHOzuKBm/dQUCZdSTnAAKCRBDHOzuKBm/ dSAQD/0ckzoCZibBFoqGPVJzVznMl1JdV84XTv6BkcN6/EDTnSujDmRlVfrUVITT/UrLVS3RXU1 X/kl5Wbkt6RsEvuiiXc0pslwwgv/rJAT/ocKbKp23kjxRDNUgdwkVXDx1iE7x2fk3ZWK+40Z89i lbIOYjTdIjrlXMEjd6G3xReaZ/G6+/zAWDHQ//0ymuORfcuWC7F6sUxhI8+kAdlGPHTP6is5GzF rncCpIUylx01nJxRrym5kkZiODUruhWY4ZY6pGuMXReNsAkyF4Vs8TrtFv/blyH97gjHxOp4Qnd CBnIcZprHooBWnut1aAZu4ZFkfdHWevSFhxmeagghAiT6p+gLZkm93nPu0Kb/urOAUL5FG1ewMf 3Di85jAnYH6ADvX2xe9htgayVtPjkIeR5ulMYoGjxexh0kyT4eBVx9DuQ6MXlb+jVeTu30y0/d4 2VODlrf4V2pB4yYM0yKmPNIMEo/ZmoOBxJF2xyw0JqIl0J1hcXRIZxycDGMKxIrFXJ7KBy53DMo 4JlLO3h+IU63CcMGcSAu144b0qoZCKwIZi7ETjgrvBGThx8VahRo/3bJSziCoxNJ1fhjqRLHqfN lvVJIv79jphmg5zUYD5gO4kvf656BCu2Gv2sWxO7KA5YcbRDP8/7FgkRi+YNUd++9Ly40EmMW0L +IRNaA/7XMSR0Gg== X-Developer-Key: i=nikita@trvn.ru; a=openpgp; fpr=C084AF54523FAA837E2EC547431CECEE2819BF75 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791419678720210144 X-GMAIL-MSGID: 1791419678720210144 |
Series |
power: supply: Acer Aspire 1 embedded controller
|
|
Commit Message
Nikita Travkin
Feb. 20, 2024, 11:57 a.m. UTC
Add binding for the EC found in the Acer Aspire 1 laptop.
Signed-off-by: Nikita Travkin <nikita@trvn.ru>
---
.../bindings/power/supply/acer,aspire1-ec.yaml | 69 ++++++++++++++++++++++
1 file changed, 69 insertions(+)
Comments
Rob, On Tue, Feb 20, 2024 at 04:57:12PM +0500, Nikita Travkin wrote: > Add binding for the EC found in the Acer Aspire 1 laptop. > > Signed-off-by: Nikita Travkin <nikita@trvn.ru> > --- > .../bindings/power/supply/acer,aspire1-ec.yaml | 69 ++++++++++++++++++++++ > 1 file changed, 69 insertions(+) > > diff --git a/Documentation/devicetree/bindings/power/supply/acer,aspire1-ec.yaml b/Documentation/devicetree/bindings/power/supply/acer,aspire1-ec.yaml > new file mode 100644 > index 000000000000..984cf19cf806 > --- /dev/null > +++ b/Documentation/devicetree/bindings/power/supply/acer,aspire1-ec.yaml > @@ -0,0 +1,69 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/power/supply/acer,aspire1-ec.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Acer Aspire 1 Embedded Controller > + > +maintainers: > + - Nikita Travkin <nikita@trvn.ru> > + > +description: > + The Acer Aspire 1 laptop uses an embedded controller to control battery > + and charging as well as to provide a set of misc features such as the > + laptop lid status and HPD events for the USB Type-C DP alt mode. > + > +properties: > + compatible: > + const: acer,aspire1-ec > + > + reg: > + const: 0x76 > + > + interrupts: > + maxItems: 1 > + > + acer,fn-selects-media-keys: > + description: Configure the keyboard layout to invert the Fn key. > + By default the function row of the keyboard inputs media keys > + (i.e Vol-Up) when Fn is not pressed. With this option set, pressing > + the key without Fn would input function keys (i.e. F11). The > + firmware may choose to add this property when user selects the fn > + mode in the firmware setup utility. > + type: boolean We both had some comments on this property, and Nikita tried to follow up on yours (which was much more substantive than mine) but got no response: https://lore.kernel.org/all/20231214220210.GA988134-robh@kernel.org/ Reading what you said, I'm not entirely sure what you were looking for, my guess is that you were wanted something controllable from userspace, but I'm not sure how you figured that should work where the firmware alone is able to control this. Cheers, Conor. > + > + connector: > + $ref: /schemas/connector/usb-connector.yaml# > + > +required: > + - compatible > + - reg > + - interrupts > + > +additionalProperties: false > + > +examples: > + - |+ > + #include <dt-bindings/interrupt-controller/irq.h> > + i2c { > + #address-cells = <1>; > + #size-cells = <0>; > + > + embedded-controller@76 { > + compatible = "acer,aspire1-ec"; > + reg = <0x76>; > + > + interrupts-extended = <&tlmm 30 IRQ_TYPE_LEVEL_LOW>; > + > + connector { > + compatible = "usb-c-connector"; > + > + port { > + ec_dp_in: endpoint { > + remote-endpoint = <&mdss_dp_out>; > + }; > + }; > + }; > + }; > + }; > > -- > 2.43.0 >
On 20/02/2024 12:57, Nikita Travkin wrote: > Add binding for the EC found in the Acer Aspire 1 laptop. > > Signed-off-by: Nikita Travkin <nikita@trvn.ru> .. > + > + connector: > + $ref: /schemas/connector/usb-connector.yaml# > + > +required: > + - compatible > + - reg > + - interrupts > + > +additionalProperties: false > + > +examples: > + - |+ If there is going to be new posting: drop "+" Best regards, Krzysztof
On Tue, Feb 20, 2024 at 06:41:06PM +0000, Conor Dooley wrote: > Rob, > > On Tue, Feb 20, 2024 at 04:57:12PM +0500, Nikita Travkin wrote: > > Add binding for the EC found in the Acer Aspire 1 laptop. > > > > Signed-off-by: Nikita Travkin <nikita@trvn.ru> > > --- > > .../bindings/power/supply/acer,aspire1-ec.yaml | 69 ++++++++++++++++++++++ > > 1 file changed, 69 insertions(+) > > > > diff --git a/Documentation/devicetree/bindings/power/supply/acer,aspire1-ec.yaml b/Documentation/devicetree/bindings/power/supply/acer,aspire1-ec.yaml > > new file mode 100644 > > index 000000000000..984cf19cf806 > > --- /dev/null > > +++ b/Documentation/devicetree/bindings/power/supply/acer,aspire1-ec.yaml > > @@ -0,0 +1,69 @@ > > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > > +%YAML 1.2 > > +--- > > +$id: http://devicetree.org/schemas/power/supply/acer,aspire1-ec.yaml# > > +$schema: http://devicetree.org/meta-schemas/core.yaml# > > + > > +title: Acer Aspire 1 Embedded Controller > > + > > +maintainers: > > + - Nikita Travkin <nikita@trvn.ru> > > + > > +description: > > + The Acer Aspire 1 laptop uses an embedded controller to control battery > > + and charging as well as to provide a set of misc features such as the > > + laptop lid status and HPD events for the USB Type-C DP alt mode. > > + > > +properties: > > + compatible: > > + const: acer,aspire1-ec > > + > > + reg: > > + const: 0x76 > > + > > + interrupts: > > + maxItems: 1 > > + > > + acer,fn-selects-media-keys: > > + description: Configure the keyboard layout to invert the Fn key. > > + By default the function row of the keyboard inputs media keys > > + (i.e Vol-Up) when Fn is not pressed. With this option set, pressing > > + the key without Fn would input function keys (i.e. F11). The > > + firmware may choose to add this property when user selects the fn > > + mode in the firmware setup utility. > > + type: boolean > > We both had some comments on this property, and Nikita tried to follow > up on yours (which was much more substantive than mine) but got no > response: > https://lore.kernel.org/all/20231214220210.GA988134-robh@kernel.org/ > > Reading what you said, I'm not entirely sure what you were looking for, > my guess is that you were wanted something controllable from userspace, > but I'm not sure how you figured that should work where the firmware > alone is able to control this. I replied there, but what I want is whatever the solution is to work on any laptop, not just this Acer device. Rob
diff --git a/Documentation/devicetree/bindings/power/supply/acer,aspire1-ec.yaml b/Documentation/devicetree/bindings/power/supply/acer,aspire1-ec.yaml new file mode 100644 index 000000000000..984cf19cf806 --- /dev/null +++ b/Documentation/devicetree/bindings/power/supply/acer,aspire1-ec.yaml @@ -0,0 +1,69 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/power/supply/acer,aspire1-ec.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Acer Aspire 1 Embedded Controller + +maintainers: + - Nikita Travkin <nikita@trvn.ru> + +description: + The Acer Aspire 1 laptop uses an embedded controller to control battery + and charging as well as to provide a set of misc features such as the + laptop lid status and HPD events for the USB Type-C DP alt mode. + +properties: + compatible: + const: acer,aspire1-ec + + reg: + const: 0x76 + + interrupts: + maxItems: 1 + + acer,fn-selects-media-keys: + description: Configure the keyboard layout to invert the Fn key. + By default the function row of the keyboard inputs media keys + (i.e Vol-Up) when Fn is not pressed. With this option set, pressing + the key without Fn would input function keys (i.e. F11). The + firmware may choose to add this property when user selects the fn + mode in the firmware setup utility. + type: boolean + + connector: + $ref: /schemas/connector/usb-connector.yaml# + +required: + - compatible + - reg + - interrupts + +additionalProperties: false + +examples: + - |+ + #include <dt-bindings/interrupt-controller/irq.h> + i2c { + #address-cells = <1>; + #size-cells = <0>; + + embedded-controller@76 { + compatible = "acer,aspire1-ec"; + reg = <0x76>; + + interrupts-extended = <&tlmm 30 IRQ_TYPE_LEVEL_LOW>; + + connector { + compatible = "usb-c-connector"; + + port { + ec_dp_in: endpoint { + remote-endpoint = <&mdss_dp_out>; + }; + }; + }; + }; + };