From patchwork Tue Jun 11 09:36:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amna Waseem X-Patchwork-Id: 13693362 Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-db3eur04on2060.outbound.protection.outlook.com [40.107.6.60]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B221D178CCF; Tue, 11 Jun 2024 09:36:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.6.60 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718098603; cv=fail; b=VkYJ2cEk0Ti+Rg+tOrfgQ1DaWZQ+AkukZPVmhbanbyB69GQZvS7ruxUoroPHpwI/DZWcVHg6rZYTIHtz7vk+HDYUrqEyifz/p94nWcApFzqTE53yySe6Nj9W5MiV7QUGFZysf2lgDo5ImrTdmB7/vKCzEl8TTmgZJfXRIgox5ys= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718098603; c=relaxed/simple; bh=D52XoW+saOgGhGOkmenEkpqbXGlWZn5LbATvdSjlatA=; h=From:Subject:Date:Message-ID:MIME-Version:Content-Type:To:CC; b=o30mqFtGo72zb3nwaDJ57RU2KoXTNGOeV7YV+JiInEq20tMrRzVXV0CBPS93+veRGIKEHtj3+kfgtwLJn+LxGj81M9+9QJIdtZhdEzFcjNJWoZ2bED1Lt94AyuRTLGpR+U3YMVtohuzGAgmfgzaoMfbizyStXytsVdaGDwzl9J4= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=axis.com; spf=pass smtp.mailfrom=axis.com; dkim=pass (1024-bit key) header.d=axis.com header.i=@axis.com header.b=R767LD11; arc=fail smtp.client-ip=40.107.6.60 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=axis.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=axis.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=axis.com header.i=@axis.com header.b="R767LD11" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bQspR9AI34TPolaxNpzGIXs4XQGtEht+AdVQLWBTneOgu8ohRyfSreONxElRNgSRWY7SsZC+aHUh2ugP7q8caetnHagUS6icazv5+k8FrXR1ySATOBUbWSBRcSTtgx5vbMXvRSFOoCSou7RNv6OSx/B9UquzNWC5op0iEaF99Q99zSytu0dwFgg1gcfBQowxfHVjXMcCd79BpnKCAIq/R5Z0ltDRPHbJnQKuBU5Za3mp5yLKH3NaQ+8BaVsxbwHH4u8QkrBcU928Ix2uTgNzgqkK95RdN9MrBXb4e70a131KByoRtcc51L/BAinLAjm0IXMIjV4sIya7gzaiUh9zaw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=sSQpQesB4/wae/5o3oqujPQk9IM2ahfa4m9o8EsZ9YY=; b=gQPlcDjAlnSxGwSUErcVgatbebqRnRT5b2NQq0/8WqH7I3zN/QNtmc+IjqDszkmXHOdrORhyCvTl6zf3vg2Dtlrw+0kG99x5uuJcM98+2soX32OeP6f54ogp5KTwX4gIrQ3MJ+SMWiRj+d/A1lr2craissLklDpPgx9GRYSDgjzrGd6otDcIzTIHQWFJWXM84bZDMRlTX3uZVBjh1Ezo5+0+tkqhuTa2m4jvfP996NVZPIb8BW2Y7eOuloxkYVyx65fYKSjcbvm/78C1JVey/X68OrKst3iMlOS6K444u6rIk9Qm1RekjhcCgCcj7yHGVFNhsEuPCrsg0F7AejKJSA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 195.60.68.100) smtp.rcpttodomain=kernel.org smtp.mailfrom=axis.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=axis.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=axis.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=sSQpQesB4/wae/5o3oqujPQk9IM2ahfa4m9o8EsZ9YY=; b=R767LD11Um3J/nvtdqEnru4yS1cWrWIFP4jWvzTe29bszTNBIrrLc+BAt0vhHOQ4UxVZxTqPIiyjoADQzo7pCeFmXY0GTC+3PjZ8IhIZHC/9JoBbPp1wSxt1CFLyPTnIlcmhTexP7R8bkxQRlbqMCqt0QI+5CuXC1945d3FIq+A= Received: from DU7P195CA0023.EURP195.PROD.OUTLOOK.COM (2603:10a6:10:54d::7) by GVXPR02MB11111.eurprd02.prod.outlook.com (2603:10a6:150:217::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7633.36; Tue, 11 Jun 2024 09:36:27 +0000 Received: from DU6PEPF0000952A.eurprd02.prod.outlook.com (2603:10a6:10:54d:cafe::bc) by DU7P195CA0023.outlook.office365.com (2603:10a6:10:54d::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7677.17 via Frontend Transport; Tue, 11 Jun 2024 09:36:26 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 195.60.68.100) smtp.mailfrom=axis.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=axis.com; Received-SPF: Pass (protection.outlook.com: domain of axis.com designates 195.60.68.100 as permitted sender) receiver=protection.outlook.com; client-ip=195.60.68.100; helo=mail.axis.com; pr=C Received: from mail.axis.com (195.60.68.100) by DU6PEPF0000952A.mail.protection.outlook.com (10.167.8.11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7677.15 via Frontend Transport; Tue, 11 Jun 2024 09:36:28 +0000 Received: from se-mail02w.axis.com (10.20.40.8) by se-mail02w.axis.com (10.20.40.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Tue, 11 Jun 2024 11:36:28 +0200 Received: from se-intmail01x.se.axis.com (10.0.5.60) by se-mail02w.axis.com (10.20.40.8) with Microsoft SMTP Server id 15.1.2507.39 via Frontend Transport; Tue, 11 Jun 2024 11:36:28 +0200 Received: from lnxamnaw.se.axis.com (unknown [10.92.129.190]) by se-intmail01x.se.axis.com (Postfix) with ESMTP id 453C7E2; Tue, 11 Jun 2024 11:36:28 +0200 (CEST) Received: by lnxamnaw.se.axis.com (Postfix, from userid 12778) id 3FC8B206ACE; Tue, 11 Jun 2024 11:36:28 +0200 (CEST) From: Amna Waseem Subject: [PATCH v4 0/2] hwmon: (ina2xx):Add Suppor for passing alert polarity from device tree to driver Date: Tue, 11 Jun 2024 11:36:24 +0200 Message-ID: <20240611-apol-ina2xx-fix-v4-0-8df1d2282fc5@axis.com> Precedence: bulk X-Mailing-List: linux-hwmon@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-B4-Tracking: v=1; b=H4sIAJkaaGYC/4XN0QrCIBTG8VcJrzP06HTrqveILnQ7NqG2MUOMs XfPDaJoF11+B37/M5GAo8dAjruJjBh98H2Xh9zvSN2a7orUN3kTYCBZAZKaob9R3xlIiTqfqJC olZCqtqBIVsOI+bwWz5e8Wx8e/fhcH0S+XN+tatOKnDKqtZVWlMAr5k4m+XCo+ztZUhH+cMgcE RqtuIQG4YeLD1dMbLnI3FbonOBFiRK/+DzPL93iZnwrAQAA To: Jean Delvare , Guenter Roeck , "Rob Herring" , Krzysztof Kozlowski , "Conor Dooley" CC: Krzysztof Kozlowski , , , , Amna Waseem , X-Mailer: b4 0.13.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU6PEPF0000952A:EE_|GVXPR02MB11111:EE_ X-MS-Office365-Filtering-Correlation-Id: d6346247-3818-469e-db51-08dc89f9f897 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|82310400017|36860700004|376005|1800799015; X-Microsoft-Antispam-Message-Info: =?utf-8?q?9IANUUAk6xbaQ7l8neL4Uvm2eZqRcj0?= =?utf-8?q?VJ59M3fF1mjhaGN3yCdpdfIbPHKyoFGnFJmAlllji1YxxsHy9O/P3yL+GabJrsiP6?= =?utf-8?q?/HrXHYkUhDtu/6eC8sS99LySrLMMiKOMoLvFzLSD8CsREkFsMrzgBZEQkt/7V1rq/?= =?utf-8?q?rhIWgAaO9+35qnX8ONWPDDra2XeYVG6eFQ2iGEXC1gmmD5KtWeHYDqNej5hZLpYPN?= =?utf-8?q?7lfTGJLmQ4wBoVs3p516sggEvbDF0PL8Mmjxhy5vcW6UxHDQreAPWPEWBKWCUgjj1?= =?utf-8?q?Vqj4QfcuBgFAZQ/c4YhNurA3Cu+Y23xRjTGaugAXkpHL/UlK+zVLC/K2lC3SGylPP?= =?utf-8?q?azpPVm0mun24ND7AIaAW7t2eQ6RKJI9JFuTtOa0YTNWaT73KzeaIpELkjaQkhcPwY?= =?utf-8?q?OIlD7Cw92OVqSCHJT0/l1TdW8fHaPsrgu712G4h5CzXu99XYUDXJKkAMA0vFiVyGE?= =?utf-8?q?4YAUXhMs1xZSZAX6dnQ7/HEGvq4Awku9TDNCjAYNLA5qESEyTf5aZP4+4JgMI78rf?= =?utf-8?q?NnJHm3O0UR6vF/bQcV9N/VRJCIACldI84iWxjxev/PgHyHxYNRknEfpqPs73Y4pT4?= =?utf-8?q?owO20BVLkY2W7CSSCp1Bgk/GI1p/1Rg4mo/OGpYUTNYvZpO25nQqQTZ4SgK5ACQEX?= =?utf-8?q?4FSSff0J8/hsukWDNythBHi5AZcsZMVFX2P7MLHNuv/Tkm2ztoKe4wNIDLQspiFDE?= =?utf-8?q?a1JAMvBV1J771pYhx7NDjnug6O+EHAKcVk7ynnwRzXdvSyH1g/rM2EgqVXuxUVqbA?= =?utf-8?q?zj8DPMcZVfiItWC81emgBZg7P+5nh26nZXE7m2PrTCoBao/ueIUQxKGQ2LvUv8pVy?= =?utf-8?q?RNQG7oVvvOu+xi+y5agsaX/Rg2e1L9n9fX+bFtmqAhj8YV1SuofKv/O5334gn/dTu?= =?utf-8?q?uLBahBsFiWpiTK4xScduPwBA0iApyDLW/888Fb6P5ldUOCpOQvZH9UmWLB3qHz0EL?= =?utf-8?q?LFfddfQU1ZnKFFS1RIY6d2njQ231RbkGJE5KP4gF4Bi6l26DuHLeJqjnUc0njBNOX?= =?utf-8?q?cEYCRGn0MmilrVtyPMVjPLcJxJG3DrD1RnPVnx5W2qmod9RoHJe9eQ7gDxhfKT8xC?= =?utf-8?q?UVJX2VbscLMvR/diAiYaFaks2FGqAvSJQMWBg/74SzB9jBWkxhcly84XTprQEXmKn?= =?utf-8?q?m9RdVDqpSnD4NI1WHNHd11r1/LBhrJQddqzsCIKEv3Nx5poDpJvrTU+3jZLH77U5i?= =?utf-8?q?QzDbEz/as7VE2jz52DImHL7dxZzzvKwWky/nMi2KJvKj86lg4mPFfpO4ArjT3AesL?= =?utf-8?q?MrUxJ55fJrLWq7j51e0y+cEBtFCQHnqVicOzlUkU88whRlc7VclPgr3l5AIj5rUKO?= =?utf-8?q?0gG9flxGa19iIRkvvosumBoFI0rbJMUo3Q=3D=3D?= X-Forefront-Antispam-Report: CIP:195.60.68.100;CTRY:SE;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.axis.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230031)(82310400017)(36860700004)(376005)(1800799015);DIR:OUT;SFP:1101; X-OriginatorOrg: axis.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Jun 2024 09:36:28.9550 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d6346247-3818-469e-db51-08dc89f9f897 X-MS-Exchange-CrossTenant-Id: 78703d3c-b907-432f-b066-88f7af9ca3af X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=78703d3c-b907-432f-b066-88f7af9ca3af;Ip=[195.60.68.100];Helo=[mail.axis.com] X-MS-Exchange-CrossTenant-AuthSource: DU6PEPF0000952A.eurprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: GVXPR02MB11111 The INA230 has alert polarity bit in Mask/Enable register which can be configured to be active high or active low depending upon the requirements of the hardware using this chip. The patches in this series adds the support for passing alert polarity value from device tree to the driver. Alert polarity property is added device tree bindings and the driver is modified to read this property and set the Alert polarity (APOL) bit value in Mask/Enable register of INA230. Signed-off-by: Amna Waseem --- Changes in v4: - Remove unnecessary checks while setting alert polarity bit - Link to v3: https://lore.kernel.org/r/20240603-apol-ina2xx-fix-v3-0-b9eff3158e4e@axis.com Changes in v3: - Convert the alert polarity property in dt bindings to be a flag - Set alert polarity depending upon on the presence of flag in device tree. Otherwise, default value is set - Make setting of alert polarity to be chip specific since only ina226,ina230 and ina231 supports alert polarity setting. - Link to v2: https://lore.kernel.org/r/20240529-apol-ina2xx-fix-v2-0-ee2d76142de2@axis.com Changes in v2: - Add vendor specific prefix to alert polarity property in binding. - Minor improvement in description of alert polarity binding property - Remove usage of mutex while setting alert polarity in Mask/Enable register - Correct indentation - Link to v1: https://lore.kernel.org/r/20240529-apol-ina2xx-fix-v1-0-77b4b382190f@axis.com --- Amna Waseem (2): dt-bindings: hwmon: ti,ina2xx: Add ti,alert-polarity-active-high property hwmon: (ina2xx) Add device tree support to pass alert polarity .../devicetree/bindings/hwmon/ti,ina2xx.yaml | 9 ++++++ drivers/hwmon/ina2xx.c | 32 ++++++++++++++++++++++ 2 files changed, 41 insertions(+) --- base-commit: a38297e3fb012ddfa7ce0321a7e5a8daeb1872b6 change-id: 20240524-apol-ina2xx-fix-34e76346cb26 Best regards,