From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ed1-f51.google.com (mail-ed1-f51.google.com [209.85.208.51]) (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 EC65921D00B for ; Fri, 20 Dec 2024 18:24:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.51 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734719068; cv=none; b=QAs+4DuyKhPJqwF42+IasAIEeKkOFrGc3CfBPPRVzeadBNPJbuaTdawhGGaA4BUmJ3sat9moCOAj5Nd5xzJWd5lbW6hGTT8k3n3Muw3WNjSE8zlPyzwYpPdK/etniyrIErn2UZBHX+P0+CIdUp3DqUVpmRCqO6OmFllM3RHEkfY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734719068; c=relaxed/simple; bh=ujvByBIf+SIpGxd1kcUbVbVrtbm1//MuEyOkgZt99Qo=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=R9Ix1oCDnt1G3zoh+fQtYi9HUoqB9sGpwBik+mj/MHIvuTV/6avsBn8qXf2qESpp3mopDEOdkLmUsHSeG5nvFSJ+OuVwcgCi5jf9wcaePxsCO6lIALhjl6bvqVMuY9RPfbJFpkyEJFF4E3xR6czU6OaOcSk5VG/BVcpARvP8gYk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=fn6nDAXn; arc=none smtp.client-ip=209.85.208.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="fn6nDAXn" Received: by mail-ed1-f51.google.com with SMTP id 4fb4d7f45d1cf-5d3f65844deso3323705a12.0 for ; Fri, 20 Dec 2024 10:24:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1734719064; x=1735323864; darn=vger.kernel.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=aus59Gxg2/yMBvmOvs1IHzky98/DpuWtdpoS4UfXRYk=; b=fn6nDAXnAPjEiDsNFzOrOIiV0xYd9ju15/BhgykS2WzI/6dwlOef1t3cRgfBuFvR+f XI/CPpE2ulIkxlxnRh6x0810mg54ag9zatZoVcDNKSpWnWh3ehnqeCTdlO6y7c33OJDw kAq8NNdjpG0dCh03tpg0ViUJnw9s4EkdbVN70fxTaQitwQDqK3S+v/V0/lkBI+UyPqHF Eate8j1RJ8bAsS3SU9Jfo1u8cwh6kLneCdQg3TdBvlDjPWcyldjMZsjdE3CqanfPWc1K pxZ8SdPOmUk7w4J4bAYBIg+XToEUYXYZlfklI15h7Es2a8Yj6/XuXrsSgWDS/ZwC4/0L sx9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734719064; x=1735323864; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=aus59Gxg2/yMBvmOvs1IHzky98/DpuWtdpoS4UfXRYk=; b=b88L8v7/pqlBNKo3vjOTtZPww/MwdMd/kemewYw9mSIHUZGXNOAaVIjYDHBcYU4Zdk t9A3CY8g8Ik36CMtYUKkY428gklT0rFMj7X5fWhP0se5TSurnGJ4rO3QmCm1IN/5ZKgB OzkcY7XIPl1rTv0A8e0v24Dk3vg/MWg4EoeXCaV1jAfbjp3btor9DkrSGE+GAQ15lIeF gwd4LnRZfFy9lfT1ykDyR+3PkPCZDpK8x0Qvi1rDHx01Eb8XD+7r12njzuvmjOoA0xOo 39O9KDayddQdAs7IF1KqqXC7VkJjvUaOfv3U+Z+RrBuuOz29Jj1M1r56etFhrSd6Raaa GlBg== X-Forwarded-Encrypted: i=1; AJvYcCUIBTyGYpduFScE6vsA+jnPAVoOsDrAthgG0Wlul/HhRIcLcfpHu3Iq7NhXWOlQR8Hb0+yCrGKCvoE/HdQ=@vger.kernel.org X-Gm-Message-State: AOJu0YzSkt5f9p8XHFertS+sk/Ijlo9ntzm0VxtuROqboZwat8wak+Rt 2I1HuDCMw99jfi9/eHlwXdU/TpSxUHauPR6rrAYs7tN5YZUIVudTrkjvpmHsNKk= X-Gm-Gg: ASbGnctaxGNp1pFuSsNk6KBX7Iel04Zj1QJHwcqmqqDaoYlYy9ipOCJNOdN2iumwVF3 BuZCnIiu1X1ZGfYW4W3KVGJsivqpvc8e5MLahDDPOOQrQJjOb0aV/XbcpHGF4moI1XysmlyDkX3 6/G8iqxrLoKXMfovuwLN8s2pxs75VjekqQYqPVhCyfXh0kSuXfg5AIyFH6EHnhA8+Ps+csmHgr0 Cqt4wTfsA/Ya80O/WKTPJ8GwnBO8wgkdwS0SRIuxJR/XwL/wpbfYSw6xlBh2qB/fJfw X-Google-Smtp-Source: AGHT+IHKvNvtCKuu1gx89ORFlt8GPNF0Ymh5ZK83WS1KOIcTDXyXw95yzBQFAq1SjDWRfMXY+mc31A== X-Received: by 2002:a17:907:78b:b0:aa6:7cf3:c6f5 with SMTP id a640c23a62f3a-aac2d447172mr324419066b.9.1734719064110; Fri, 20 Dec 2024 10:24:24 -0800 (PST) Received: from linaro.org ([2a02:2454:ff21:ef80:6d2c:6f87:64ef:2237]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-aac0f015b0fsm200488666b.156.2024.12.20.10.24.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Dec 2024 10:24:23 -0800 (PST) Date: Fri, 20 Dec 2024 19:24:18 +0100 From: Stephan Gerhold To: Maya Matuszczyk Cc: Rob Herring , Krzysztof Kozlowski , Conor Dooley , linux-arm-msm@vger.kernel.org, devicetree , linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 1/3] dt-bindings: platform: Add bindings for Qcom's EC on IT8987 Message-ID: References: <20241219200821.8328-1-maccraft123mc@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: On Fri, Dec 20, 2024 at 07:16:34PM +0100, Maya Matuszczyk wrote: > Excuse the formatting, I've typed this reply from my phone > > pt., 20 gru 2024, 19:05 użytkownik Stephan Gerhold < > stephan.gerhold@linaro.org> napisał: > > > On Thu, Dec 19, 2024 at 09:08:18PM +0100, Maya Matuszczyk wrote: > > > This patch adds bindings for the EC firmware running on IT8987 present > > > on most of X1E80100 devices > > > > > > Signed-off-by: Maya Matuszczyk > > > --- > > > .../bindings/platform/qcom,x1e-it8987-ec.yaml | 52 +++++++++++++++++++ > > > 1 file changed, 52 insertions(+) > > > create mode 100644 > > Documentation/devicetree/bindings/platform/qcom,x1e-it8987-ec.yaml > > > > > > diff --git > > a/Documentation/devicetree/bindings/platform/qcom,x1e-it8987-ec.yaml > > b/Documentation/devicetree/bindings/platform/qcom,x1e-it8987-ec.yaml > > > new file mode 100644 > > > index 000000000000..4a4f6eb63072 > > > --- /dev/null > > > +++ b/Documentation/devicetree/bindings/platform/qcom,x1e-it8987-ec.yaml > > > @@ -0,0 +1,52 @@ > > > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > > > +%YAML 1.2 > > > +--- > > > +$id: http://devicetree.org/schemas/platform/qcom,x1e-it8987-ec.yaml# > > > +$schema: http://devicetree.org/meta-schemas/core.yaml# > > > + > > > +title: Qualcomm Embedded Controller on IT8987 chip. > > > + > > > +maintainers: > > > + - Maya Matuszczyk > > > + > > > +description: > > > + Most x1e80100 laptops have an EC running on IT8987 MCU chip. The EC > > controls > > > + minor functions, like fans, power LED, and on some laptops it also > > handles > > > + keyboard hotkeys. > > > + > > > +properties: > > > + compatible: > > > + oneOf: > > > + - const: qcom,x1e-it8987-ec > > > > Given that ECs tend to be somewhat device-specific and many vendors > > might have slightly customized the EC firmware(?), I think it would be > > better to disallow using this generic compatible without a more specific > > one. In other words, I would drop this line and just keep the case > > below: > > > I've looked at DSDT of other devices and they look to be compatible with > what's on the devkit, with differences being extra features on magicbook > art 14 and yoga slim 7x. Though this isn't a hill I'm willing to die on. > I think it's fine to keep qcom,x1e-it8987-ec as second compatible. However, without a more specific compatible, there is a risk we have nothing to match on in case device-specific handling becomes necessary in the driver at some point. It's certainly subjective, but it might be better to play it safe here and have a specific compatible that one can match, even if the behavior is 99% the same. There will often be subtly different behavior across devices, you mentioned the "keyboard backlight turning off and the power LED slowly blinking", who knows what else exists. I suppose worst case we could also use of_machine_is_compatible() to just match the device the EC is running on, but I'm not sure if that would be frowned upon. Thanks, Stephan