From patchwork Thu Sep 5 10:20:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Emil Gedenryd X-Patchwork-Id: 13792112 Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2043.outbound.protection.outlook.com [40.107.21.43]) (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 7624D1990A3; Thu, 5 Sep 2024 10:22:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.21.43 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725531731; cv=fail; b=IxXArhTi3kzFtIIpLdWOTIQWoHgHk8EYvxoOaqhva7wVl/DgVXkEpwQkFCYzCNFfVTop4+yKa+nNVtGU7y/qkA+seEaupJy1AyRO5bjrsBAoQmEwwtDeTyw201MniltXUwoj7hN0EeyE58HA5JpexaPqtK4Ax2+RAqgSxuLcPbc= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725531731; c=relaxed/simple; bh=h9AGyacNViuYeSRBH4DVLVuDVPj7WZh/2IOqdCiPKe8=; h=From:Date:Subject:MIME-Version:Content-Type:Message-ID:References: In-Reply-To:To:CC; b=HtKHipP/Nk74aj6wqFZVrMIucz/7IIaKtwwToEESLMZxMKR3wOhy+fYFlHeUc77UlC7qMP5wyNDNYKC2LJ8SZAVOfcRlZeJldbaOwWlgdCWuG2wCzw+w+/awzvocAiedTZws7+eagJ/6FjOmHzCbFAMk9q8/Q4gO/9/5fv+nr68= 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=CJZedo4s; arc=fail smtp.client-ip=40.107.21.43 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="CJZedo4s" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=mVtEyKtTN2f/QHIaYSBWqxxNYxxSMtbEZsUTOgoVN9UMGp2vmcedkEze6hozaHBZFzGd1N4N+lg/ECdiTn78Y7qflkQRRohhLx2wCEESofYGJpxH9D7ct0dppdQ+KlfugbhW1fT2dD4b0DuSfocgfx97U+okpvGqbwF+DsvC/RsqQ2UkSWogC51lS00nXizxc81ebb/ozvhEZer46QBobAd0L9mlTAO/LZcIgTn5ODzfjzamC6lt6FUfwc4OEtNJtnTuLJM3bHfCUs5achKwDc22CV7Q8AcKgryfqbwKCGgFgCRPwdQxq0f0DL0afS88ECnUemAEjE1nYelVbm3NxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=RPM3B7DQxKm1DSW0hUGsbJzXm3ajFLNl9LM5KWClqzE=; b=s6G9Ax4WwfxAbnN1GiauOFjnZw08FAlnVSNbtCjhbWHhE0kTN2xUWGW4OvTK56cPY4yawoFvUSLk9StecPdOaeOjvWoCb/ssO54zfv6yXD8m1PdhXOCLOv3S1CeGy9behItcmEvbYMv4KXCUFnuNaRhvggSrOcMoRAkqlI0uwmuM2PRKMMBsHSPL7ecuPvPVWmIQH++U9GYFPQHnDP60qv6Z/mlYtxkB5Ox4+l6JFs1qR2nlHIiImgxUG2ewXxHFvLdni3sRerBI/wkT6fZuQ564uhqgFyYLJEqAaagW6kV+kYn2He/TzKCuxasGO5bLrkHEOUI5MMP0EQ6EC+HOMA== 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=RPM3B7DQxKm1DSW0hUGsbJzXm3ajFLNl9LM5KWClqzE=; b=CJZedo4spA896iquehrBRKSsPzyXk6bB1fskNXHe60J24/9lVnCw0hJMbqXamylVuuX0IWFfaqwU0QHxRaZT308Ttn434b7RoF9bkEL66gGAiuEG7/9xYNeibh90ktUj867mUcWpcTNlRGl0fqxDIJ6JHY/hB35DT0OJcn9W41U= Received: from DU2PR04CA0031.eurprd04.prod.outlook.com (2603:10a6:10:234::6) by AM9PR02MB7298.eurprd02.prod.outlook.com (2603:10a6:20b:3ea::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7918.28; Thu, 5 Sep 2024 10:22:04 +0000 Received: from DU2PEPF0001E9C3.eurprd03.prod.outlook.com (2603:10a6:10:234:cafe::80) by DU2PR04CA0031.outlook.office365.com (2603:10a6:10:234::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7918.27 via Frontend Transport; Thu, 5 Sep 2024 10:22:04 +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 DU2PEPF0001E9C3.mail.protection.outlook.com (10.167.8.72) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7918.13 via Frontend Transport; Thu, 5 Sep 2024 10:22:04 +0000 Received: from SE-MAILARCH01W.axis.com (10.20.40.15) 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; Thu, 5 Sep 2024 12:22:00 +0200 Received: from se-mail01w.axis.com (10.20.40.7) by SE-MAILARCH01W.axis.com (10.20.40.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Thu, 5 Sep 2024 12:22:00 +0200 Received: from se-intmail01x.se.axis.com (10.0.5.60) by se-mail01w.axis.com (10.20.40.7) with Microsoft SMTP Server id 15.1.2507.39 via Frontend Transport; Thu, 5 Sep 2024 12:22:00 +0200 Received: from pc55303-2334.se.axis.com (pc55303-2334.se.axis.com [10.94.180.8]) by se-intmail01x.se.axis.com (Postfix) with ESMTP id 58E053F0; Thu, 5 Sep 2024 12:22:00 +0200 (CEST) Received: by pc55303-2334.se.axis.com (Postfix, from userid 18269) id 55D82230ECAA; Thu, 5 Sep 2024 12:22:00 +0200 (CEST) From: Emil Gedenryd Date: Thu, 5 Sep 2024 12:20:45 +0200 Subject: [PATCH 1/3] iio: light: opt3001: add missing full-scale range value Precedence: bulk X-Mailing-List: linux-iio@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <20240905-add_opt3002-v1-1-a5ae21b924fb@axis.com> References: <20240905-add_opt3002-v1-0-a5ae21b924fb@axis.com> In-Reply-To: <20240905-add_opt3002-v1-0-a5ae21b924fb@axis.com> To: Jonathan Cameron , Lars-Peter Clausen , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Andreas Dannenberg CC: , , , Emil Gedenryd , X-Mailer: b4 0.14.1 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU2PEPF0001E9C3:EE_|AM9PR02MB7298:EE_ X-MS-Office365-Filtering-Correlation-Id: 0d8e448b-e326-4b1e-7743-08dccd9496be X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|36860700013|376014|1800799024|82310400026; X-Microsoft-Antispam-Message-Info: =?utf-8?q?gEtl5QVsu0RkSo470YTM1T7oiPx21qg?= =?utf-8?q?J4T3sQJ2C9Wvbg/13qECXd9yc9Ky48+/zCga3qj9ePXtHKEELbBAkhQYbAtg55F0q?= =?utf-8?q?GmzAALsHzXZsBEnIc5G17+aNlvEv4im+7CDb6DGXb6isfxk7EjRddTwfBPifn18ij?= =?utf-8?q?kVF3k9nJczMlVTstDrBsVKBHMkjxU2NSkDTXg18bNlB7dVYVbPUgH2+rfhvQlZELG?= =?utf-8?q?hnfhOlq9RTgYDI2eFNQ9pYY5KCl9O3G/+2/Kk5KTXP4DrXE1LQI3jeg4jNBMYjNip?= =?utf-8?q?+1hoCrDihsSA0Ih6XGrYpRNb2tDLkE3mhFCdCjIJNC0sizNgNrHL25/byWG5loHj1?= =?utf-8?q?DUnTT7bvESZYXIegOm1lzABXRXopZfVvT3gMSVCww2BT2I1GVczcuWH1ORQy67pP5?= =?utf-8?q?1MIA0LoWNFEn0ZPyqFraEeYRVGkKMkHq+PWsB9vnz873RPg6NRVr1vk4B2bHVCYc5?= =?utf-8?q?GmRlHXtqk41qSpEUdFm+coqTXTikzzkcJKax8+BvUDvtTzi9vu5fDvmaUCzNu1j4u?= =?utf-8?q?5w6Y7KVAGICFKy0ZhaBqffEDsAvb1c+0sm2jdxiwckRNaWzzr6b45r3tWUcSy8QxF?= =?utf-8?q?K/+91M61B15UTJ/GVaAByx5nyXTWM1esW8IjDsDCs/YGhLcYin/sUd1qMNz1QNLiw?= =?utf-8?q?dL76bWSd9V9axfX4iROuHxjE73mYAxY2FQFobgj+fH40Yef70pTlP+TdD8iKSnlcq?= =?utf-8?q?DqwkM3bRpSklZusWshKS+WoDf9vpc8rwuNFj2zIREzI2vOPuS/7QWsyIGlP9c9md2?= =?utf-8?q?nKvvOCQ9zgsDK92DAisEpUrnuFUxXzFOS9VXw3qpYMzbMfaF9BGGRTg3wMWtM41BM?= =?utf-8?q?NN/2QH2Q6/rUogd9S79LivEI1wKBCSJJfQGd1at0cyp/mrnXuLyonUlxKNugY8+zW?= =?utf-8?q?/AMLU6UaRxAznpzVOKWQ138ZCRH7gvLzOTXiIyTjO83Bf+7gdYLZ842l35A+PY3hQ?= =?utf-8?q?DEDHzolgEzSj8nDrphNhK/4G2C6ya8PAYWxsUzQ5xMUcA5c49lq5jW5wEE8l3o+r7?= =?utf-8?q?2PaCdboL/6SJeUT/kY6B3b1mZfh2a3sVWVWVkmsEI5YAEtvWg7SPgxKWRdCHiQ1ik?= =?utf-8?q?gDHrsxyISYJpZvS4/afgeHQeKd+XdZY43WNxij0M/KGUe0ahNfVZajgJsaL9Dcr+5?= =?utf-8?q?Ce7KGZ9FoFy3McrceFs4PYgYSHVCAuJJwdthtlrMRYDZhj1/vF72hPOsBg2Fu+LL6?= =?utf-8?q?wdsW1M9YwqW46W3KpZ3xTjatfAx+9GfA4F2w0UmHBxXJQHCpD2p+KMAsdpagGEjz0?= =?utf-8?q?wD3X8TanvGTw3j/ue/7HjbVPKXq+Z/M1ix10W5ZoCj15Ldx8Aw/axEvw/iA8rnxib?= =?utf-8?q?3UCuEBIoG/f7MH0QftOhkJuU07ZATHIi6HfK32GQNFo8Ohe0qI7WtnasdIimr9iZY?= =?utf-8?q?GgW1hVVIJZ5?= 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:(13230040)(36860700013)(376014)(1800799024)(82310400026);DIR:OUT;SFP:1101; X-OriginatorOrg: axis.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Sep 2024 10:22:04.7061 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 0d8e448b-e326-4b1e-7743-08dccd9496be 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: DU2PEPF0001E9C3.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM9PR02MB7298 The opt3001 driver uses predetermined full-scale range values to determine what exponent to use for event trigger threshold values. The problem is that one of the values specified in the datasheet is missing from the implementation, causing a big gap in settable values. Add missing full-scale range array value. Signed-off-by: Emil Gedenryd --- drivers/iio/light/opt3001.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/iio/light/opt3001.c b/drivers/iio/light/opt3001.c index 887c4b776a86..176e54bb48c3 100644 --- a/drivers/iio/light/opt3001.c +++ b/drivers/iio/light/opt3001.c @@ -138,6 +138,10 @@ static const struct opt3001_scale opt3001_scales[] = { .val = 20966, .val2 = 400000, }, + { + .val = 41932, + .val2 = 800000, + }, { .val = 83865, .val2 = 600000,