Received: by 2002:ab2:620c:0:b0:1ef:ffd0:ce49 with SMTP id o12csp304037lqt; Mon, 18 Mar 2024 08:18:19 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXMAnJn5Bq4omVdkMfvTBtdYAjScosEK1rBjqunX+J51dYHz1HsIadFJy/+1GVLpjSUNxa0cW6P62EQUqX6I7/FjckOZXmEBVr7HUbGjA== X-Google-Smtp-Source: AGHT+IHgmwECv569kh8/v1bGtq3E7hWhZbDkvXtdGeejxD8tS9s4MrePieYhpOhJuH2l0tmU/W1w X-Received: by 2002:a2e:311:0:b0:2d4:9647:a01d with SMTP id 17-20020a2e0311000000b002d49647a01dmr5966049ljd.0.1710775098608; Mon, 18 Mar 2024 08:18:18 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710775098; cv=pass; d=google.com; s=arc-20160816; b=qbQ0ArUrYGnkFdYGIYDSMqdv3fgMqL1LjhvH60Er27wRnziQ6pahmyPtWoLpCAnhq0 MmwUToSKvm0hj+luzDLvY1RrMEPNw0j3b/GQ4urU9CncP/8b+jWUugPmWA0J/zE5keG2 J7ru2xk6pruvBEwO8O18MbMj2g7Pub26BoPNN/SCotoIvtGjlC54xyuA0zcjgU8XdKHL ESaiClqxA/33Vxo0+uc22ayPBXleYJ9K1Fcv5M612TPcB0NOqMYvm+rzicrAFqFij7+L iB1CKnyB0CG+h6BTJfTAwhnSae6tGJKaqiT6CDxS7zzwlJxPnRRujLiBhvkVj/Ex/9Mt ZK6A== 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:references:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:sender :dkim-signature; bh=tXarof1ra1HlZEvUz3VGJibNa+StHEA4ynuHvFExBmM=; fh=gH9P9mkdAN9PABe14QL0PTyGhjytIAtSbJ6kZJzUN0g=; b=kE+Msh5K+ZpqJFp5dhp38rxK+tJ2Ivna61UgjcP0gtX8Vd8YCayg9w5fK75hbvmLLY tm3jo+jltUmGtYvAMUZdyfxRoGX0Rb0hd7DbjhtjxJZf/Dz9uuXxBZawPyzkVsJn1Ykw Hx2vA/N2tjrP4Slx2aIDALz8jTFYsbXtAcF0XpHo71dNl36kZX1vCdcWmm3bl5Wf5r9Y ohCdzVtb92a9X+KIg/HdtN/GjKcZuCXdDd5cQSbCbRbAVCKR6CP484DDd4vSwtDl9hI8 SKK9EHqdYh0oqirHufZEoWPcBcL8IMPiw8O7DmFDLvvlP60kmVYFi+Wp5H7oDLjiA+yT go2A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=Xrzjuy4H; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-106282-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-106282-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id h12-20020a170906260c00b00a466b7421c9si4330968ejc.267.2024.03.18.08.18.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Mar 2024 08:18:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-106282-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=Xrzjuy4H; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-106282-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-106282-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 296591F217CA for ; Mon, 18 Mar 2024 15:18:18 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6F2B74F8A2; Mon, 18 Mar 2024 15:17:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Xrzjuy4H" Received: from mail-oo1-f43.google.com (mail-oo1-f43.google.com [209.85.161.43]) (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 994114F200; Mon, 18 Mar 2024 15:17:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.161.43 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710775071; cv=none; b=otiYkPuemglyEqUMAy0MWZiB+BIxFBequC2fuHH3CZLVt85U4kiGCAVaBOlRNDHPYBErTD7Bmu0xEuekkxt4mlOs/Nd5sLlpx3kOpHXa2o6SLyhbxMT82Y+GvuRCRrwj6f6mdaumOwiFuNkxrnEf0DLwC5Ux1vJl1JNhlYJUYlg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710775071; c=relaxed/simple; bh=G3yhK96jNFKWxPnTwUrPzmxhcz802a43U06AZLBU7b8=; h=Message-ID:Date:MIME-Version:Subject:To:References:From: In-Reply-To:Content-Type; b=V/AIor023GOedpfFTSxreHPm4hxwnJ9tKBa2IY0sTro+zgru1CBFJ0ZOtGiZ8SHt8NzWSf9f3/YZB0xDFRaAgpAfVDGqM+VfSW3vQnmePwqj3i4wAYifYsvlrs/MJhh+op3STFh0SgOnJjh3ZRY05jAXo3xYZh21v5NPr0Oe6bw= 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=Xrzjuy4H; arc=none smtp.client-ip=209.85.161.43 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-oo1-f43.google.com with SMTP id 006d021491bc7-5a480985625so1904380eaf.0; Mon, 18 Mar 2024 08:17:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1710775068; x=1711379868; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :sender:from:to:cc:subject:date:message-id:reply-to; bh=tXarof1ra1HlZEvUz3VGJibNa+StHEA4ynuHvFExBmM=; b=Xrzjuy4HQkB1mKPvEabbAdw8JHCLh6dac5j23C9Q8NNSTfc/FERLzXR8iU5NAVBPtH N/ys0JM0u8hdK7qlRZnIa0KLPQABiUdPKEkzrmcZ7pohN3nTVmMvRp7npjflCfAAWi1n FrFef9afhwvDLysSceR8D2Bqi4PjwxPjYN8fjirQNx7oExDqxCa5Ez4+e3t6bgA6KDPW J2vQwN3svgf0ZQcaaaMSCkFdaKVoapWPmprOFUh9iSuSlgwlGOAtLBY9pIryJ7w7zOuM AvGGZKQ8A6DAvFZcfDAx8VrorDMesaTxHMTFN5jdVznqxAFQ3Axz8VuuHFPsYqwl7s0E rHhA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710775068; x=1711379868; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :sender:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=tXarof1ra1HlZEvUz3VGJibNa+StHEA4ynuHvFExBmM=; b=jx1CL21jcqdyVjwnmkphvlSoGTDxkbq/X3TruUk3N/a3RHOkW4bYWHvmIdJb3TDr53 LUhz1zkAvzYtapfeONzxevU7hGveBbJbihgaD3R8UVIGW1ViI6c7nG+fpI07kn6VFf46 LghwME9TVQLlrum5iodSb5FaCzHg38gCIBRygDjtg9BeITwFAprtkoucVlBf6vJTGf8A uiYjm5GCN9WNwDU1+uTnKyHNj/iN3OooKKwx1KQJQviNLfAlmyV8yV9T0/mYd/qdNuPb 8MMBJZxHySlaZcGKyu3tHv4sOj6MjpADU3EzbKDBAJudscsMf+/kpOssZLJYOyKRLWvg lT+w== X-Forwarded-Encrypted: i=1; AJvYcCVKWesZnqJ1P5pBGaLJsp0XYgxbmDrqFel0a2WNgsBc8fUwzvWdMRJ3DCE0a1dbNCnOj6Qgq/pu1/5eWSxfG5arz8SbL6y9UTsc49g376r8LLvsGhHBfuCxvUrfm/FeWhU4jbI0jm2i/g0CFa0P73/gOtwT2NN2z2DbYtp0ruI+1eA2JyxJAM0Ujdf9eVvGvTCzAScoLj3hjfxT4yYQjBNs+76P4x8x2t0oxPusAVbbqxkZZhjRsw382rlg X-Gm-Message-State: AOJu0YzUdn3/A+hA531kOMmXm+gDibvwGN8eLdAAstIbdijFAnUXd8v9 utIwA2WZhZ/mfJfOTLx4xoEdOjqYsLz42RQK0CKBNb8oFyvwHi2O X-Received: by 2002:a05:6358:e481:b0:17e:eead:e532 with SMTP id by1-20020a056358e48100b0017eeeade532mr3874970rwb.6.1710775068477; Mon, 18 Mar 2024 08:17:48 -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 jw2-20020a056a00928200b006e703e0e2f7sm4643032pfb.194.2024.03.18.08.17.47 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 18 Mar 2024 08:17:47 -0700 (PDT) Sender: Guenter Roeck Message-ID: Date: Mon, 18 Mar 2024 08:17:46 -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 1/2] dt-bindings: hwmon: pmbus: adp1050 : add bindings Content-Language: en-US To: Radu Sabau , Jean Delvare , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Jonathan Corbet , Delphine CC Chiu , linux-hwmon@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, linux-i2c@vger.kernel.org References: <20240318112140.385244-1-radu.sabau@analog.com> <20240318112140.385244-2-radu.sabau@analog.com> 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/omy6UyH6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7Rj trjv82EZtrhLuLjHRCaG50OOm0hwPSk1J64R8O3HjSLdertmw7eyAYOo4RuWJguYMg5DRnBk WkRwrSuCn7UG+qVWZeKEsFKFOkynOs3pVbcbq1pxbhk3TRWCGRU5JolI4ohy/7JV1TVbjiDI HP/aVnm6NC8of26P40Pg8EdAhajZnHHjA7FrJXsy3cyIGqvg9os4rNkUWmrCfLLsZDHD8FnU mDW4+i+XlNFUPUYMrIKi9joBhu18ssf5i5Q= In-Reply-To: <20240318112140.385244-2-radu.sabau@analog.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 3/18/24 04:21, Radu Sabau wrote: > Add dt-bindings for adp1050 digital controller for isolated power supply > with pmbus interface voltage, current and temperature monitor. > > Signed-off-by: Radu Sabau > --- > .../bindings/hwmon/pmbus/adi,adp1050.yaml | 65 +++++++++++++++++++ > MAINTAINERS | 8 +++ > 2 files changed, 73 insertions(+) > create mode 100644 Documentation/devicetree/bindings/hwmon/pmbus/adi,adp1050.yaml > > diff --git a/Documentation/devicetree/bindings/hwmon/pmbus/adi,adp1050.yaml b/Documentation/devicetree/bindings/hwmon/pmbus/adi,adp1050.yaml > new file mode 100644 > index 000000000000..e3162d0df0e2 > --- /dev/null > +++ b/Documentation/devicetree/bindings/hwmon/pmbus/adi,adp1050.yaml > @@ -0,0 +1,65 @@ > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) > +%YAML 1.2 > +--- > + > +$id: htpps://devicetree.org/schemas/hwmon/pmbus/adi,adp1050.yaml# > +$schema: htpps://devicetree.org/meta-schemes/core.yaml# > + > +title: Analog Devices ADP1050 digital controller with PMBus interface > + > +maintainers: > + - Radu Sabau > + > +description: | > + The ADP1050 is used to monitor system voltages, currents and temperatures. > + Through the PMBus interface, the ADP1050 targets isolated power supplies > + and has four individual monitors for input/output voltage, input current > + and temperature. > + Datasheet: > + https://www.analog.com/en/products/adp1050.html > +properties: > + compatbile: > + const: adi,adp1050 > + > + reg: > + maxItems: 1 > + > + vcc-supply: true > + > + adi,vin-scale-monitor: > + description: > + The value of the input voltage scale used by the internal ADP1050 ADC in > + order to read correct voltage values. > + $ref: /schemas/typees.yaml#/definitions/uint16 > + adi,iin-scale-monitor: > + description: > + The value of the input current scale used by the internal ADP1050 ADC in > + order to read carrect current values. > + $ref: /schemas/typees.yaml#/definitions/uint16 > + I don't see value in "-monitor" in those property names. Also, I don't see why those properties should be mandatory since the chip has the ability to store its configuration in eeprom. The proposed driver code disables vin and iin monitoring if the properties are set to 0 or not provided. I disagree that this should be possible in the first place (I don't see its value), but if disabling vin and iin monitoring is supported it should be documented. Last but not least, I think those values should be abstracted with some scale instead of reflecting raw (and unexplained) register values. Thanks, Guenter