Received: by 2002:a89:d88:0:b0:1fa:5c73:8e2d with SMTP id eb8csp1141795lqb; Sat, 25 May 2024 07:32:18 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV2Bp8tf7jUULERP5BZe8OKnuyd0+f5eVi3fd3mDnq2ksXVecYwF8xGHLd0SGgzlJUrxmZZS5KuAJYXjbtWGXXVNcyr5nx8dcNR0DjK3w== X-Google-Smtp-Source: AGHT+IFSEJ96hhLCzSkBP26XicG2142LzblyQ+c8ppedVWh1+YiH/6EKorw3ASSTw10ST3p4/PFv X-Received: by 2002:a17:906:bca:b0:a5a:1562:518c with SMTP id a640c23a62f3a-a626511492fmr346592366b.48.1716647538168; Sat, 25 May 2024 07:32:18 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716647538; cv=pass; d=google.com; s=arc-20160816; b=xb/TwBYZtkXPsMnuAzREZ1y0ZMu0G3VxThzCrRtISiJzCe+hXRmnRQ9fXQnmJPiesJ ZSQAOptqMhCaPMbe67FQsA6pYJt1pwafjuHof4zjaE/3+Ut/k2bSEKJOyXNTsT8z9nih PpJSKOgXc3qXYnkNoIPF4PVijwTip8GTMGBIFf1MCcDZW4A+sX5qnwwFtTNddlimSPmr 5oqnX+/whNc38U8IhHmv32UpK7tVShztgsOgpqbN9lmO0mI0giEtShZmtJ3dNV7FBJGt 9vAIoNmXRIPuJh4Y76Hg2jQj+5n+lX49+WS8v4QM8OPaZi81gV9USZn03dhY802Sctk2 kbdg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:autocrypt:from :content-language:references:to:subject:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id :sender:dkim-signature; bh=Gq7yFXM/W/9NmcYfhRe0JIbRD9gBWcU3pncAQ5w2rUc=; fh=SPcspiVh/CGEX8e1ekvpje3vybW7JPLeNb3w6iKFYas=; b=hHZPaIXvNuQQj7sihotQjms2Ds/gzHMijWRAJoqU4MaKeIo8gDd0+xenTy8zaX7MeJ sFCtnxJTO6nidGNABXpA+TPbCd9F8r11ZuzU/kgJuIx8OqrITJVqBwJUd4sl1+BL5uoD R/VNuY6wDkU8VLjjHi2L0o/+lCtcHc1P3ITgYs+QDq+ZOyhYF95ID4BEF+ms+vtxQ6Hk gMcXv4r3NsvGLe8QKDh0l+IbE2o3L+a9L8So2HpjEhOxUod0drtmsyapYEmyvxO6xUS0 yeyld5d3qmYP0F7tMErP1vnePb9BGZ+UfAAv2aDzDF+byXe8LC9qkf+LzVx2nAKnBNU7 aYTg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=f0OO4be3; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-189381-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-189381-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id a640c23a62f3a-a626c8016c2si182475466b.43.2024.05.25.07.32.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 25 May 2024 07:32:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-189381-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=f0OO4be3; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-189381-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-189381-linux.lists.archive=gmail.com@vger.kernel.org" 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 am.mirrors.kernel.org (Postfix) with ESMTPS id B9F4B1F21549 for ; Sat, 25 May 2024 14:32:17 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3B15D4F213; Sat, 25 May 2024 14:32:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="f0OO4be3" Received: from mail-pf1-f180.google.com (mail-pf1-f180.google.com [209.85.210.180]) (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 9DB7C1C6B9; Sat, 25 May 2024 14:32:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.180 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716647528; cv=none; b=S2CLCZdfaiHQT4qrXVrPutJXbx+90NXNwui3GvtILwmL0Eh39sJoXRpLRqTCppQWcSSf0GmGprIkxZcesKv2JkLsdj8msSj9muoB19eBEdmgwdKTWJ0eB/+/Hm4fWs7Ol8Wfpi7f9o9K/xafYpE/HprFDuN7TkYZuRqulyR8alk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716647528; c=relaxed/simple; bh=FpozTE8iUcCi8Uh96wsQB0CK5b034+ilyxckkYTG0tQ=; h=Message-ID:Date:MIME-Version:Subject:To:References:From: In-Reply-To:Content-Type; b=nvPmD26DxijMnS51FTtBUTctXLHtcOkMjmV5+GwK0sN1xB0Vydsw75kVd7tBQFok0sqxUndjs1/YUleoZvdN6yXFYFXWVsVL2W+SpEeI87/2Rs02RTaBwkcTNll1PQeFXXsCDFvg5R+IstBFOdpJTAmvDjyDkhNMiBXmP9aNv5A= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=roeck-us.net; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=f0OO4be3; arc=none smtp.client-ip=209.85.210.180 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=roeck-us.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pf1-f180.google.com with SMTP id d2e1a72fcca58-6f5053dc057so5258903b3a.2; Sat, 25 May 2024 07:32:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1716647526; x=1717252326; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:autocrypt:from :content-language:references:to:subject:user-agent:mime-version:date :message-id:sender:from:to:cc:subject:date:message-id:reply-to; bh=Gq7yFXM/W/9NmcYfhRe0JIbRD9gBWcU3pncAQ5w2rUc=; b=f0OO4be3X+A9PEemvJ5tfZ7+mKo1JvzJIsVOdWRM8V2SC+sYNpzfN1DDEJmNfd3XuI 7YpA9ZSaN7hpd6t1jDpWLD0dC2ZQnBx5DRvRMWnnQcija8LoWdwI7+UlRmrn406HrwC0 mH/6hqLKRjCS7rbW6G3oRZk+O4M20rQFQel9E+tOOI5ZUnC+WVD8Jx+6UtN+3DlivkXc 9ZiMB7+kkgYITcBQpdI5MF4JWzqpKR8ueono/hXdy/Vj7SFeUbXwlsPbqalXpMjLNCj3 /2jFFkTsyQM5afod4Q6OwDikNc5fiwaRGALBFnaAiDClI0kfMUh0I7xpvO+FM4RnTZHf RVfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716647526; x=1717252326; h=content-transfer-encoding:in-reply-to:autocrypt:from :content-language:references:to:subject:user-agent:mime-version:date :message-id:sender:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=Gq7yFXM/W/9NmcYfhRe0JIbRD9gBWcU3pncAQ5w2rUc=; b=YVSkkh14YlzMetCHeTKXZOjdZT34hQtpS9drOTYJjwI3TtJuD4CsF06XWK9qTMFZ0G RiEIcwdgtU8ssrduV6Q7lMj9tQSdKjS7evJHLoOWnJS3tSYmrFPZb9addmY/f9D+WmWY p5WRBsfo0+2wOXTPe7JxW3pp/ZasZHJoaeRSgvl5YOVAzAKhpkEC0+wbDJRiErxgA4AY tcSmi5qaI7qI5zXG/RWDuc9wenmNFwoQVRVLluZBMFtIUQuL+Wy4M1lZpPiE5cMmvNo9 zFZobYQ9vEbV6h6z35wdWHHTsNCtJuj+TJ7sXnXMVRHwdrrew2OnFyEuY3PNkfE4yIbh pRqQ== X-Forwarded-Encrypted: i=1; AJvYcCXNGWYlBAVo/JHflGSiFXruSpKUBNrlTtfFettaOQXxfRCZ52P+OUrmvk2r85Db8QHCZHFoSq/x5jZwokrPLAM5GYI7cFnZ8Xw7yLC1gj1zGXAh/UuA4vQiwarCmS/h2EKvHvwmoniwELDUF+1JbPLPAtFObZOKoihroJDl3gL0Jhrpwv0y X-Gm-Message-State: AOJu0YyCGqLwQBl7cgS/47CXCr2g0PusSeoV3+d3BmGgkCQC4GVvmK0O sTWlY9v8bJKt8qygbG3pM2MKYvutx6fQ0SR8hJzClutbsIedztJh X-Received: by 2002:a05:6a21:778c:b0:1af:b0d0:281 with SMTP id adf61e73a8af0-1b212ccf907mr6354474637.6.1716647525751; Sat, 25 May 2024 07:32:05 -0700 (PDT) Received: from ?IPV6:2600:1700:e321:62f0:329c:23ff:fee3:9d7c? ([2600:1700:e321:62f0:329c:23ff:fee3:9d7c]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-6f8fd4d4f9esm2516878b3a.185.2024.05.25.07.32.04 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 25 May 2024 07:32:05 -0700 (PDT) Sender: Guenter Roeck Message-ID: <22e1daf4-ffce-4fac-be4c-0e7bebd91c88@roeck-us.net> Date: Sat, 25 May 2024 07:32:04 -0700 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 2/3] dt-bindings: hwmon: g76x: Add support for g761 To: Christian Marangi , Jean Delvare , Rob Herring , Krzysztof Kozlowski , Conor Dooley , linux-hwmon@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org References: <20240525102914.22634-1-ansuelsmth@gmail.com> <20240525102914.22634-2-ansuelsmth@gmail.com> Content-Language: en-US From: Guenter Roeck Autocrypt: addr=linux@roeck-us.net; keydata= xsFNBE6H1WcBEACu6jIcw5kZ5dGeJ7E7B2uweQR/4FGxH10/H1O1+ApmcQ9i87XdZQiB9cpN RYHA7RCEK2dh6dDccykQk3bC90xXMPg+O3R+C/SkwcnUak1UZaeK/SwQbq/t0tkMzYDRxfJ7 nyFiKxUehbNF3r9qlJgPqONwX5vJy4/GvDHdddSCxV41P/ejsZ8PykxyJs98UWhF54tGRWFl 7i1xvaDB9lN5WTLRKSO7wICuLiSz5WZHXMkyF4d+/O5ll7yz/o/JxK5vO/sduYDIlFTvBZDh gzaEtNf5tQjsjG4io8E0Yq0ViobLkS2RTNZT8ICq/Jmvl0SpbHRvYwa2DhNsK0YjHFQBB0FX IdhdUEzNefcNcYvqigJpdICoP2e4yJSyflHFO4dr0OrdnGLe1Zi/8Xo/2+M1dSSEt196rXaC kwu2KgIgmkRBb3cp2vIBBIIowU8W3qC1+w+RdMUrZxKGWJ3juwcgveJlzMpMZNyM1jobSXZ0 VHGMNJ3MwXlrEFPXaYJgibcg6brM6wGfX/LBvc/haWw4yO24lT5eitm4UBdIy9pKkKmHHh7s jfZJkB5fWKVdoCv/omy6UyH6ykLOPFugl+hVL2Prf8xrXuZe1CMS7ID9Lc8FaL1ROIN/W8Vk BIsJMaWOhks//7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YMg5DRnBk WkRwrSuCn7UG+qVWZeKEsFKFOkynOs3pVbcbq1pxbhk3TRWCGRU5JolI4ohy/7JV1TVbjiDI HP/aVnm6NC8of26P40Pg8EdAhajZnHHjA7FrJXsy3cyIGqvg9os4rNkUWmrCfLLsZDHD8FnU mDW4+i+XlNFUPUYMrIKi9joBhu18ssf5i5Q= In-Reply-To: <20240525102914.22634-2-ansuelsmth@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 5/25/24 03:29, Christian Marangi wrote: > Add support for g761 PWM Fan controller. This is an exact copy of g763 > with the difference that it does also support an internal clock > oscillators. > > Add required logic to support this additional feature with the property > gmt,internal-clock and reject invalid schema that define both > internal-clock property and external clocks. > > Signed-off-by: Christian Marangi > --- > .../devicetree/bindings/hwmon/gmt,g76x.yaml | 43 +++++++++++++++++-- > 1 file changed, 40 insertions(+), 3 deletions(-) > > diff --git a/Documentation/devicetree/bindings/hwmon/gmt,g76x.yaml b/Documentation/devicetree/bindings/hwmon/gmt,g76x.yaml > index bfefe49f54bf..d6e80392d045 100644 > --- a/Documentation/devicetree/bindings/hwmon/gmt,g76x.yaml > +++ b/Documentation/devicetree/bindings/hwmon/gmt,g76x.yaml > @@ -4,13 +4,13 @@ > $id: http://devicetree.org/schemas/hwmon/gmt,g76x.yaml# > $schema: http://devicetree.org/meta-schemas/core.yaml# > > -title: GMT G762/G763 PWM Fan controller > +title: GMT G761/G762/G763 PWM Fan controller > > maintainers: > - Christian Marangi > > description: | > - GMT G762/G763 PWM Fan controller. > + GMT G761/G762/G763 PWM Fan controller. > > If an optional property is not set in DT, then current value is kept > unmodified (e.g. bootloader installed value). > @@ -22,6 +22,7 @@ description: | > properties: > compatible: > enum: > + - gmt,g761 > - gmt,g762 > - gmt,g763 > > @@ -48,10 +49,37 @@ properties: > $ref: /schemas/types.yaml#/definitions/uint32 > enum: [0, 1, 2] > > + gmt,internal-clock: > + description: Use the Internal clock instead of externally attached one > + via the CLK pin. > + type: boolean > + > required: > - compatible > - reg > - - clocks > + > +allOf: > + - if: > + properties: > + compatible: > + contains: > + enum: > + - gmt,g762 > + - gmt,g763 > + then: > + properties: > + gmt,internal-clock: false > + > + required: > + - clocks Is the new property even necessary ? The absence of an external clock on G761 could be used to imply that the internal clock is used. Guenter > + > + - if: > + required: > + - gmt,internal-clock > + > + then: > + properties: > + clocks: false > > additionalProperties: false > > @@ -80,4 +108,13 @@ examples: > fan_startv = <1>; > pwm_polarity = <0>; > }; > + > + g761@1e { > + compatible = "gmt,g761"; > + reg = <0x1e>; > + gmt,internal-clock; > + fan_gear_mode = <0>; > + fan_startv = <1>; > + pwm_polarity = <0>; > + }; > };