Received: by 2002:ab2:7903:0:b0:1fb:b500:807b with SMTP id a3csp1256839lqj; Mon, 3 Jun 2024 15:45:28 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVE7ACNC8U/HcBWUHPmM3MpzImD4AfJ3HnCM6/mso9hLsq22UM9g6oktHcWmG9SQ5O8fNaurSuuZy/gkRMr3tNyxH14S9U/xZehbi/GJA== X-Google-Smtp-Source: AGHT+IETBC6JuXeiwA8IFzn4eJwww1Bc9Hi7uWgKWLkiLTl2/g4gyLPay2A0u33sjW6N9PoXtqoX X-Received: by 2002:a17:902:6509:b0:1f6:62aa:e0e with SMTP id d9443c01a7336-1f6937c40b8mr12132745ad.15.1717454728159; Mon, 03 Jun 2024 15:45:28 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717454728; cv=pass; d=google.com; s=arc-20160816; b=ygrB+ztf/iLI16DhJ4cFYHa/aMk6BTmS8ShMmGaO/rxJg67QCC70hRxpsuxEwp8Vvb Nns+yBnlos0EKzCmLcw/+ikmqNjz7ueVV8TX0wKEUCwGaoNcwB/jprOTfWDOjLlj+c00 y9ditJnh8bIRUmmU7zr9TljYF146EJLwMxA9QjMS+/oQepo8iTk8j4LaexHKd8NIXM7n JDnr8C0QCFMbxlaN+j6VBdAfFEtpp2DXMH1pYEDRFAtStwyu/RT35UCgAIQTLQMAbI3t uR0bCCkxK61ZBnEFS3QGyJL1nyzqSIL6z4L91L+Wj01YgsiyLKaafKSqSUqmdVd5A/jn pv7A== 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:cc:to:subject:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id :sender:dkim-signature; bh=b6MFsrdOqti0fLHOpjLFRquYHGOzZCKkTJvH51/EUg8=; fh=L5TkvBaPUR+jr75eXCsNNDxxKTFWzK2vZfLHXiKLIh0=; b=eK6c2d4f1loWslIrnolIRKbgW4fg+EY8RgCnBz+1AeUd+VoYW9qJNeIql3ir/GuEUK UylzxW0qrorudQQV/2mVVbTJXuzuuepxy8IrUCVBdB078JILo55Ohjbwo5bPfn+/8xeh WP1bSRfFhMFPGKktzHpve569gtOYsqlpUyzCywJDZBgpV7NaJrK5bzrZ/GmD/FWBHJ+Z l0GjytTnSKsa9ZKnvfeZSTBAQyeqxJG4K6GOr8DC8JdfXv0GKNqhK4TGZkitAvO4uypn 1LZjECljUJ2tB/Mdrwf5qMXE6ZvUHYf25YUJzSiPLHOuxnuyx9RJ0xhHXR57dlosqvWW wltw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=At6Gh0lz; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-199792-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-199792-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id d9443c01a7336-1f632ef3fd8si1965935ad.627.2024.06.03.15.45.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Jun 2024 15:45:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-199792-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=At6Gh0lz; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-199792-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-199792-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id B4BE6281DBD for ; Mon, 3 Jun 2024 22:45:27 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B3CA713CF9F; Mon, 3 Jun 2024 22:44:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="At6Gh0lz" Received: from mail-pf1-f169.google.com (mail-pf1-f169.google.com [209.85.210.169]) (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 C6AC013D62B; Mon, 3 Jun 2024 22:44:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.169 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717454678; cv=none; b=YW5AWozDOPc7EzK7GJ/1WcvO5U55OFi80x3cTon7Bgs7aXpW3EyHw8kZ7Om3WTLevVRqs+zwKaM7kiiYF6+7KEqB2xMehyg8b9JiiaS1oLRs498kCbz3MYNfhw6fz9vfvTpHk6M6CgR4yK/FC+K0MHK63hTGipVBMnjGRYhagyE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717454678; c=relaxed/simple; bh=K/fF6I8MZdCib446ViiMP2IBrSRBDtB529m5Q/j4YFU=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=nR8hpvLxn8gPVRhANnNFiFSOTUfXz5vXdb36PpWOexpuvMEoqNeVbaLJnIlf+tUc9jhQwA4ySFJxZsnE8lCM+FK+tIdZvZm4foPgj5HMQXjcexYimGQNJ8+YlEg/SXIpIOjJ02XT8HIeY+NFZcfsaZ27WvPJ5BPfDWp2uExUeOw= 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=At6Gh0lz; arc=none smtp.client-ip=209.85.210.169 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-f169.google.com with SMTP id d2e1a72fcca58-6f4603237e0so3202931b3a.0; Mon, 03 Jun 2024 15:44:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1717454676; x=1718059476; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:autocrypt:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:sender:from:to:cc:subject:date:message-id:reply-to; bh=b6MFsrdOqti0fLHOpjLFRquYHGOzZCKkTJvH51/EUg8=; b=At6Gh0lzQobV9jtbxy2uavJkNRc4STe2Lt7Q/x7chdtFH40584Gn9xnOpPQB1vz1Nx YG10vfrBIoCTUrj45ZZmpZ4X/+bLi7+ioGVeIqaPXBKpIarfmDc4pi8E8+6cqtfNLXpN QgGtMBUcv4j4ImCJhhOFyfih1URMKa2RZNxKou9sQGWIVIa4JftnlCgWERswYLqEFQcz +3sJsxe9UJ8Bwf+P6Q3XqeX+d4MChIDh0x4bXFJj1mm8I5iNFMg0y9y//RJ6dUM2ENiP ksfugvTZdsyB2sg7viBV/YOO3XUmuOM3h4W8ZRMLMAirtD9Dx+Nck2dJc5kh0LAeRXjw e3ag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717454676; x=1718059476; h=content-transfer-encoding:in-reply-to:autocrypt:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:sender:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=b6MFsrdOqti0fLHOpjLFRquYHGOzZCKkTJvH51/EUg8=; b=M2lmjj3XPlUysutisur5yTjzquf1qj8WpW4z5NvwxPeLA5jnvJQEF9MELf86LxXX4b 9mWNUG7b3ztWPAlYM/aO3ZLks0KIUhNmF8N7AFsXZ1bca+t/xUSOVFjanLlT/34zEpeY OaUCDvyRwKLn26Jnd5n7gjktJEIiplA1pfAmFgrvhAtvUYcgbgME9GrU64z8n4H02YlJ aNmdcCGJarDkWiky0lUBvuB5E3XrJtaPe0YHR2qCj8sceJ4sTmKyWHIayrj8RAV9+XLv th4Ok2/kY0heRCH0yXzjqMlYvkaB8mSikQZYnKPqrZ5r0YuCYMNtup5555w+EO2KbbJs nabw== X-Forwarded-Encrypted: i=1; AJvYcCUYU2i9mPAWca5OvMtSG42WFHNIfpzKFZbpsvuvXH+7WtRnt2dCsOk6npeT11LNdl/qHR8banZLu1E2/T2wbJDrcIlgkPGq1bblR2qQUTYKWTXbdLXVEMM8IJvBoDX4zKFSSNf2z9tYpoumA1TQ/vFOgwAShgGSYlA5Bx4j+Y+Wq/zYIjh7 X-Gm-Message-State: AOJu0Yz7+kt+2kDh+xS/KpIncsXy9iAGXLLlyL0zMNH1OqX3pVv8anPw vIFTuT562IdlkzFt5AaJzVmocta9qmkSy2i1FrT08fpEfSIBRFweUgUPdw== X-Received: by 2002:a05:6a00:b44:b0:6ea:c7bd:90e3 with SMTP id d2e1a72fcca58-7027fc4308amr1276552b3a.14.1717454675830; Mon, 03 Jun 2024 15:44:35 -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-70242b2c262sm5991741b3a.190.2024.06.03.15.44.33 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 03 Jun 2024 15:44:34 -0700 (PDT) Sender: Guenter Roeck Message-ID: <588c68da-1129-43e2-89a9-4edbabfd018b@roeck-us.net> Date: Mon, 3 Jun 2024 15:44:32 -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: ti,ina2xx: Add alert-polarity property To: Rob Herring , Amna Waseem Cc: Jean Delvare , Krzysztof Kozlowski , Conor Dooley , Krzysztof Kozlowski , linux-hwmon@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, kernel@axis.com References: <20240529-apol-ina2xx-fix-v1-0-77b4b382190f@axis.com> <20240529-apol-ina2xx-fix-v1-1-77b4b382190f@axis.com> <20240603154728.GA480397-robh@kernel.org> 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/haWw4yO24lT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OMv8lSRdjva++GT0VLXtHULdlzg8VjDnFZ3lfz5PWEOeIMk7Rj trjv82EZtrhLuLjHRCaG50OOm0hwPSk1J64R8O3HjSLdertmw7eyAYOo4RuWJguYMg5DRnBk WkRwrSuCn7UG+qVWZeKEsFKFOkynOs3pVbcbq1pxbhk3TRWCGRU5JolI4ohy/7JV1TVbjiDI HP/aVnm6NC8of26P40Pg8EdAhajZnHHjA7FrJXsy3cyIGqvg9os4rNkUWmrCfLLsZDHD8FnU mDW4+i+XlNFUPUYMrIKi9joBhu18ssf5i5Q= In-Reply-To: <20240603154728.GA480397-robh@kernel.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 6/3/24 08:47, Rob Herring wrote: > On Wed, May 29, 2024 at 08:07:14AM +0200, Amna Waseem wrote: >> Add a property to the binding to configure the Alert Polarity. >> Alert pin is asserted based on the value of Alert Polarity bit of >> Mask/Enable register. It is by default 0 which means Alert pin is >> configured to be active low. To configure it to active high, set >> alert-polarity property value to 1. >> >> Signed-off-by: Amna Waseem >> --- >> Documentation/devicetree/bindings/hwmon/ti,ina2xx.yaml | 9 +++++++++ >> 1 file changed, 9 insertions(+) >> >> diff --git a/Documentation/devicetree/bindings/hwmon/ti,ina2xx.yaml b/Documentation/devicetree/bindings/hwmon/ti,ina2xx.yaml >> index df86c2c92037..a3f0fd71fcc6 100644 >> --- a/Documentation/devicetree/bindings/hwmon/ti,ina2xx.yaml >> +++ b/Documentation/devicetree/bindings/hwmon/ti,ina2xx.yaml >> @@ -66,6 +66,14 @@ properties: >> description: phandle to the regulator that provides the VS supply typically >> in range from 2.7 V to 5.5 V. >> >> + alert-polarity: >> + description: | >> + Alert polarity bit value of Mask/Enable register. Alert pin is asserted >> + based on the value of Alert polarity Bit. Default value is active low. >> + 0 selects active low, 1 selects active high. >> + $ref: /schemas/types.yaml#/definitions/uint32 >> + enum: [0, 1] > > This is alert as in SMBus Alert? That's handled as an interrupt, but > this binding has no interrupt property. And the interrupt binding > provides a way already to specify active trigger state. Why do we need a > second way to do this? > SMBus alert is a single interrupt/alert line for all chips in a single I2C/SMBus. it is handled by drivers/i2c/i2c-smbus.c. It can not be handled by an individual driver since it affects all chips on a single bus. A driver supporting it is supposed to implement an alert callback in struct i2c_driver. The signal is supposed to be active-low open collector. Some chips, such as this series, make it configurable; in this case the alternative is active-high open collector. Presumably there is some wiring to attach it to the active-low open collector SMBus interrupt signal. Having said this, I don't really know what the use case is for this driver. It doesn't implement an alert callback, and it doesn't implement an interrupt handler either (after all, it might be conceivable that the alert signal _is_ connected to a dedicated interrupt line). So your question is fair - with neither SMBus alert nor interrupt support by the driver, the alert signal polarity should not really matter. Thanks, Guenter