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, From patchwork Thu Sep 5 10:20:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Emil Gedenryd X-Patchwork-Id: 13792115 Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2083.outbound.protection.outlook.com [40.107.22.83]) (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 496E8199FC5; Thu, 5 Sep 2024 10:22:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.22.83 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725531735; cv=fail; b=ajuL1et+XCCR92DiJO9/2Hi5+mkj8dA1yS3Yk4k50ShtsSGpA4aFOPH950pDg1rKVgeXdn+/MMTTg8zxOpBCyM2GlGO9EvgPXnXllwIa7HNEuQ7idRP6sVhw6vnrhutdm8KYXdynZF29lBhhewo4/g0JSbuLTUxphFNnvEbqgdY= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725531735; c=relaxed/simple; bh=BIB8ZDciXXFymqc4yOQh/xte7qV/DQy/ClOcA0+kCuo=; h=From:Date:Subject:MIME-Version:Content-Type:Message-ID:References: In-Reply-To:To:CC; b=mhaG+G7AuBzGWbrs6U/iHiJFjXt6M55CFqoAJ1oqKyZEaNgKTONEMI620udG74vF8XdSyY+/NFbCAZuILFOX8N6i6X5I8fqIkXEWJnUcTD3ASqDgbEw4o8UC9JpOoAbKv+mTlYz1LEbcnKL6LXzIY6hAy/1EsaVH+V01E3fWjXE= 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=bDlL+Fqo; arc=fail smtp.client-ip=40.107.22.83 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="bDlL+Fqo" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Zi32GbwE87u1U9YWC2ydQpNuIz975JezgJI9I30QMWRYiugskwnYlJVDpfndAmy65fPWGrV/FXRhU4jHBtYK3sF1xNw+u5TrrDdIemZMIZKS51419SyPpEJkwHmbyO4ZuQU6iqkDUuqawTe1jqz2Oc5jCVDnE4vBESCs4Yg9T5iFSQUZsWTqTQwcf2VJfkviyjsNU3Mx5lvjt9wC0nlP1zGMeUZk4eA/sGghyvLegHMWENN35+76GHpgYfz5rti2MG+wxyW3w9Hi4Ld4zHE6cQVSVQ5bux/CvKhsyU7Fct6o2kaz0UQv7iqoIXQYLQuNW91eTdw1t7fH+stboKwN5A== 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=YSQpsVZ17hEH1jUgCp/f/aHUqt+MVyXFjSldi3Ehgn8=; b=jJO+8tzrV8ilDQ7O+H/leYidgxihHG1E7czFCbhIumdBXC5lil3ndHBFI3BoQJZ9TZQkrKlqqLV2RFieVKX7wt4qADD9e228FsZgqGHL0GCFfmdU2u/KpjqG2xYwUJ4BmRalMZZk3md5z0YHGJkplPib8SW4r6pcAn5CII9N9qKcCdrm90IuTv+0Net80FYo6KxL5NS99F9zUbKJDWZI7mCnLVUs6kF3SjUUnaTriAmt1dEnDz7RIP4gqXbQCXwVcVU6ilqqx/mUY31ra0L/pbOKLIaYpyOcMCTXcSEiXLd65qi6Wf/Oc/cfYkvzL3089VoJeXYw/RamLZKHd7SEUA== 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=YSQpsVZ17hEH1jUgCp/f/aHUqt+MVyXFjSldi3Ehgn8=; b=bDlL+FqodMSVseRZkPZ/f5RaOyPCVBvyJGGI14tz6azrnybodUzznh3lbNY1q4q/d8Wc5wqoBzVDnNm8b7JaIRYH0dC+KfJ+/OqX5odWjj6Cggvr4bJpDaznEe8H5O339wOMiN+tcwxNiuZeowSdhvk1oaL2Bx3n8uUIULI/2Mg= Received: from DU2PR04CA0044.eurprd04.prod.outlook.com (2603:10a6:10:234::19) by PAWPR02MB9856.eurprd02.prod.outlook.com (2603:10a6:102:2e4::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7918.25; Thu, 5 Sep 2024 10:22:06 +0000 Received: from DU2PEPF0001E9C3.eurprd03.prod.outlook.com (2603:10a6:10:234:cafe::9) by DU2PR04CA0044.outlook.office365.com (2603:10a6:10:234::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7918.26 via Frontend Transport; Thu, 5 Sep 2024 10:22:06 +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:06 +0000 Received: from SE-MAIL21W.axis.com (10.20.40.16) 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-MAIL21W.axis.com (10.20.40.16) 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 5971649B; Thu, 5 Sep 2024 12:22:00 +0200 (CEST) Received: by pc55303-2334.se.axis.com (Postfix, from userid 18269) id 576EC22F8D75; Thu, 5 Sep 2024 12:22:00 +0200 (CEST) From: Emil Gedenryd Date: Thu, 5 Sep 2024 12:20:46 +0200 Subject: [PATCH 2/3] iio: light: opt3001: add support for TI's opt3002 light sensor 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-2-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_|PAWPR02MB9856:EE_ X-MS-Office365-Filtering-Correlation-Id: 5a572cd8-c761-4252-f55b-08dccd9497bf X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|36860700013|82310400026|376014; X-Microsoft-Antispam-Message-Info: =?utf-8?q?ki1zp1zbQi/5+FEyE6Miq04dEIIFotu?= =?utf-8?q?pHE6G8EFDbEXZc38wwP0r0V51hhJUJEzd7GlZqfSR3W6DXjP9ZunVeMbqONF42vad?= =?utf-8?q?ANaS533Zs5Mg9sspMhYFp8C+dDgNASE1ase6azSZXDgXhD6xN2MTDm1wW+8C9bb8A?= =?utf-8?q?Y2v0zbRzzGccgJZYHYLAgRyXCjzN4YHqXX27I6mUNOMBO9U6Iz7Y16eyEtR3n+BkD?= =?utf-8?q?JUPXf5ZOGfHWxExnBKzLxuOZPSc2KbvOb7tXlP7lQotxGFpwkPT+CJOKd4sdbTTew?= =?utf-8?q?7ANIyBhGDyVQSYUA7mBxFih+1Obn/wcMkfP+fYxNn0D/e7Y9RtC5pMv73w3wnsUDE?= =?utf-8?q?41nqPSyWYChRsXT2HPAMeeTgnBeigB/L6mbB/V8F/wlTjR184cRfs4Yo/0bZhUFZG?= =?utf-8?q?BDjr4GEHZjymOxFFjQbX9brANIo0wRG/BBHKTB+TjeltcizSXgOdK34FwSiQjRKGx?= =?utf-8?q?/1lQi9cYUXZupe87mBuurjVm4bVCVNMTSBtfwVKATAX59p0R8pEJm+ARZNGZqQQGy?= =?utf-8?q?krHWNz9sydn0wMkBrag+CuBsvllZ1Il6YPmg09leb5yiGe8Qo6uuY5W0NH5kC/RIs?= =?utf-8?q?MuyvFSQXubiLy7Td7bdZH5hB19LFjkyEzxO8I3idphHdcwbcdLSKCDKwBzA1M5F2j?= =?utf-8?q?40vcZrEAqvoNaBuMaNhR7nEwNSHQr2F4hOAys3ZYb6xmzQasXFoZjHTjkdVEQrdRu?= =?utf-8?q?jwPicKlvGhAqcmZPvcgAwnrQPoGMJZm/ds4sGj72XG5TsaaONXP7SpWxQslY75+m/?= =?utf-8?q?CL4za34hrldvcaGSADahiRqCYH1rXN8ou7IYUM43cD7pQMqLZUnX1Yxt+a/uyaoF2?= =?utf-8?q?lLQEz2MJRusIXZpb7Kx33XFaPDXgU750thppruVPjUPjQJITmnOmy+9ZePD3aAii7?= =?utf-8?q?0XXldUFnpuag3nbE9v5iCIeflTgnszWKolbLfprM9TfZ3IXsuk1jDfWiNNyPEvh0z?= =?utf-8?q?6ILRy0T4W9aZZejfUjjysTrYL41e2d8wkGp2hjlIHOOG7tKrln1hjLLXUMeIYHTZS?= =?utf-8?q?QQtu8V8zLt351ate9+Go2/Rgfyxn6kn0iuS/sqdwySST+MON7KnVNe5ZWLiNvUFyB?= =?utf-8?q?BmLJ4Z98wSkYoG9wxuxrGpAQfjzv5H/5j66U58LQ4imGBB7QIVzeoshzQKzAd9F3c?= =?utf-8?q?6r9ZL0bjDuTFulR+pokjF6D3sgXUWIcJyyTHPg8YYK02WDrm33XN4LLv9UneQ2Q0o?= =?utf-8?q?MzTNN8auW4emvCrHD/G+4LfEiXzEl0vsaZQ7x3F72Mn/tp5SOsH5/gq7kjwiiV1Hm?= =?utf-8?q?t18VhRbcpBdv7soA23IfGBspwRdpgjF4DYAnJAhz9Ix0yNLfL7VZWSVnQba5N8ovP?= =?utf-8?q?VVKrCjex3H7REQLVH/X3IYHY+cE5RIohSY0JM4CvJfHEIM88N5Vc7KVilygtfblCg?= =?utf-8?q?/PkA9xP0epd?= 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)(1800799024)(36860700013)(82310400026)(376014);DIR:OUT;SFP:1101; X-OriginatorOrg: axis.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Sep 2024 10:22:06.3936 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 5a572cd8-c761-4252-f55b-08dccd9497bf 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: PAWPR02MB9856 TI's opt3002 light sensor shares most properties with the opt3001 model, with the exception of supporting a wider spectrum range. Add support for TI's opt3002 by extending the TI opt3001 driver. See https://www.ti.com/product/OPT3002 for more information. Signed-off-by: Emil Gedenryd --- drivers/iio/light/Kconfig | 2 +- drivers/iio/light/opt3001.c | 199 ++++++++++++++++++++++++++++++++++++-------- 2 files changed, 167 insertions(+), 34 deletions(-) diff --git a/drivers/iio/light/Kconfig b/drivers/iio/light/Kconfig index b68dcc1fbaca..c35bf962dae6 100644 --- a/drivers/iio/light/Kconfig +++ b/drivers/iio/light/Kconfig @@ -461,7 +461,7 @@ config OPT3001 depends on I2C help If you say Y or M here, you get support for Texas Instruments - OPT3001 Ambient Light Sensor. + OPT3001 Ambient Light Sensor, OPT3002 Light-to-Digital Sensor. If built as a dynamically linked module, it will be called opt3001. diff --git a/drivers/iio/light/opt3001.c b/drivers/iio/light/opt3001.c index 176e54bb48c3..e6098f88dd04 100644 --- a/drivers/iio/light/opt3001.c +++ b/drivers/iio/light/opt3001.c @@ -70,6 +70,19 @@ #define OPT3001_RESULT_READY_SHORT 150 #define OPT3001_RESULT_READY_LONG 1000 +/* The opt3002 doesn't have a device id register, predefine value instead */ +#define OPT3002_DEVICE_ID_VALUE 3002 + +enum chip_model { + OPT3001, + OPT3002, +}; + +struct opt300x_chip_info { + enum chip_model model; + enum iio_chan_type chan_type; +}; + struct opt3001 { struct i2c_client *client; struct device *dev; @@ -79,6 +92,7 @@ struct opt3001 { bool result_ready; wait_queue_head_t result_ready_queue; u16 result; + const struct opt300x_chip_info *chip_info; u32 int_time; u32 mode; @@ -97,6 +111,16 @@ struct opt3001_scale { int val2; }; +static const struct opt300x_chip_info opt3001_chip_info = { + .model = OPT3001, + .chan_type = IIO_LIGHT, +}; + +static const struct opt300x_chip_info opt3002_chip_info = { + .model = OPT3002, + .chan_type = IIO_INTENSITY, +}; + static const struct opt3001_scale opt3001_scales[] = { { .val = 40, @@ -148,21 +172,82 @@ static const struct opt3001_scale opt3001_scales[] = { }, }; +static const struct opt3001_scale opt3002_scales[] = { + { + .val = 4914, + .val2 = 0, + }, + { + .val = 9828, + .val2 = 0, + }, + { + .val = 19656, + .val2 = 0, + }, + { + .val = 39312, + .val2 = 0, + }, + { + .val = 78624, + .val2 = 0, + }, + { + .val = 157248, + .val2 = 0, + }, + { + .val = 314496, + .val2 = 0, + }, + { + .val = 628992, + .val2 = 0, + }, + { + .val = 1257984, + .val2 = 0, + }, + { + .val = 2515968, + .val2 = 0, + }, + { + .val = 5031936, + .val2 = 0, + }, + { + .val = 10063872, + .val2 = 0, + }, +}; + static int opt3001_find_scale(const struct opt3001 *opt, int val, int val2, u8 *exponent) { int i; + const struct opt3001_scale (*scale_arr)[12]; - for (i = 0; i < ARRAY_SIZE(opt3001_scales); i++) { - const struct opt3001_scale *scale = &opt3001_scales[i]; + switch (opt->chip_info->model) { + case OPT3001: + scale_arr = &opt3001_scales; + break; + case OPT3002: + scale_arr = &opt3002_scales; + break; + default: + dev_err(opt->dev, "scale not configured for chip model\n"); + return -EINVAL; + } + for (i = 0; i < ARRAY_SIZE(*scale_arr); i++) { + const struct opt3001_scale *scale = &(*scale_arr)[i]; /* - * Combine the integer and micro parts for comparison - * purposes. Use milli lux precision to avoid 32-bit integer - * overflows. + * Compare the integer and micro parts to determine value scale. */ - if ((val * 1000 + val2 / 1000) <= - (scale->val * 1000 + scale->val2 / 1000)) { + if (val < scale->val || + (val == scale->val && val2 <= scale->val2)) { *exponent = i; return 0; } @@ -174,11 +259,20 @@ static int opt3001_find_scale(const struct opt3001 *opt, int val, static void opt3001_to_iio_ret(struct opt3001 *opt, u8 exponent, u16 mantissa, int *val, int *val2) { - int lux; + int ret; - lux = 10 * (mantissa << exponent); - *val = lux / 1000; - *val2 = (lux - (*val * 1000)) * 1000; + switch (opt->chip_info->model) { + case OPT3001: + ret = 10 * (mantissa << exponent); + *val = ret / 1000; + *val2 = (ret - (*val * 1000)) * 1000; + break; + case OPT3002: + ret = 12 * (mantissa << exponent); + *val = ret / 10; + *val2 = (ret - (*val * 10)) * 100000; + break; + } } static void opt3001_set_mode(struct opt3001 *opt, u16 *reg, u16 mode) @@ -216,7 +310,18 @@ static const struct iio_event_spec opt3001_event_spec[] = { static const struct iio_chan_spec opt3001_channels[] = { { - .type = IIO_LIGHT, + .type = opt3001_chip_info.chan_type, + .info_mask_separate = BIT(IIO_CHAN_INFO_PROCESSED) | + BIT(IIO_CHAN_INFO_INT_TIME), + .event_spec = opt3001_event_spec, + .num_event_specs = ARRAY_SIZE(opt3001_event_spec), + }, + IIO_CHAN_SOFT_TIMESTAMP(1), +}; + +static const struct iio_chan_spec opt3002_channels[] = { + { + .type = opt3002_chip_info.chan_type, .info_mask_separate = BIT(IIO_CHAN_INFO_PROCESSED) | BIT(IIO_CHAN_INFO_INT_TIME), .event_spec = opt3001_event_spec, @@ -225,7 +330,7 @@ static const struct iio_chan_spec opt3001_channels[] = { IIO_CHAN_SOFT_TIMESTAMP(1), }; -static int opt3001_get_lux(struct opt3001 *opt, int *val, int *val2) +static int opt3001_get_processed(struct opt3001 *opt, int *val, int *val2) { int ret; u16 mantissa; @@ -397,14 +502,14 @@ static int opt3001_read_raw(struct iio_dev *iio, if (opt->mode == OPT3001_CONFIGURATION_M_CONTINUOUS) return -EBUSY; - if (chan->type != IIO_LIGHT) + if (chan->type != opt->chip_info->chan_type) return -EINVAL; mutex_lock(&opt->lock); switch (mask) { case IIO_CHAN_INFO_PROCESSED: - ret = opt3001_get_lux(opt, val, val2); + ret = opt3001_get_processed(opt, val, val2); break; case IIO_CHAN_INFO_INT_TIME: ret = opt3001_get_int_time(opt, val, val2); @@ -428,7 +533,7 @@ static int opt3001_write_raw(struct iio_dev *iio, if (opt->mode == OPT3001_CONFIGURATION_M_CONTINUOUS) return -EBUSY; - if (chan->type != IIO_LIGHT) + if (chan->type != opt->chip_info->chan_type) return -EINVAL; if (mask != IIO_CHAN_INFO_INT_TIME) @@ -497,7 +602,15 @@ static int opt3001_write_event_value(struct iio_dev *iio, goto err; } - mantissa = (((val * 1000) + (val2 / 1000)) / 10) >> exponent; + switch (opt->chip_info->model) { + case OPT3001: + mantissa = (((val * 1000) + (val2 / 1000)) / 10) >> exponent; + break; + case OPT3002: + mantissa = (((val * 10) + (val2 / 100000)) / 12) >> exponent; + break; + } + value = (exponent << 12) | mantissa; switch (dir) { @@ -607,15 +720,22 @@ static int opt3001_read_id(struct opt3001 *opt) manufacturer[0] = ret >> 8; manufacturer[1] = ret & 0xff; - ret = i2c_smbus_read_word_swapped(opt->client, OPT3001_DEVICE_ID); - if (ret < 0) { - dev_err(opt->dev, "failed to read register %02x\n", + switch (opt->chip_info->model) { + case OPT3001: + ret = i2c_smbus_read_word_swapped(opt->client, + OPT3001_DEVICE_ID); + if (ret == 0) { + dev_err(opt->dev, "failed to read register %02x\n", OPT3001_DEVICE_ID); - return ret; + return ret; + } + device_id = ret; + break; + case OPT3002: + device_id = OPT3002_DEVICE_ID_VALUE; + break; } - device_id = ret; - dev_info(opt->dev, "Found %c%c OPT%04x\n", manufacturer[0], manufacturer[1], device_id); @@ -707,15 +827,17 @@ static irqreturn_t opt3001_irq(int irq, void *_iio) OPT3001_CONFIGURATION_M_CONTINUOUS) { if (ret & OPT3001_CONFIGURATION_FH) iio_push_event(iio, - IIO_UNMOD_EVENT_CODE(IIO_LIGHT, 0, - IIO_EV_TYPE_THRESH, - IIO_EV_DIR_RISING), + IIO_UNMOD_EVENT_CODE( + opt->chip_info->chan_type, + 0, IIO_EV_TYPE_THRESH, + IIO_EV_DIR_RISING), iio_get_time_ns(iio)); if (ret & OPT3001_CONFIGURATION_FL) iio_push_event(iio, - IIO_UNMOD_EVENT_CODE(IIO_LIGHT, 0, - IIO_EV_TYPE_THRESH, - IIO_EV_DIR_FALLING), + IIO_UNMOD_EVENT_CODE( + opt->chip_info->chan_type, + 0, IIO_EV_TYPE_THRESH, + IIO_EV_DIR_FALLING), iio_get_time_ns(iio)); } else if (ret & OPT3001_CONFIGURATION_CRF) { ret = i2c_smbus_read_word_swapped(opt->client, OPT3001_RESULT); @@ -755,6 +877,7 @@ static int opt3001_probe(struct i2c_client *client) opt = iio_priv(iio); opt->client = client; opt->dev = dev; + opt->chip_info = device_get_match_data(&client->dev); mutex_init(&opt->lock); init_waitqueue_head(&opt->result_ready_queue); @@ -769,10 +892,18 @@ static int opt3001_probe(struct i2c_client *client) return ret; iio->name = client->name; - iio->channels = opt3001_channels; - iio->num_channels = ARRAY_SIZE(opt3001_channels); iio->modes = INDIO_DIRECT_MODE; iio->info = &opt3001_info; + switch (opt->chip_info->model) { + case OPT3001: + iio->channels = opt3001_channels; + iio->num_channels = ARRAY_SIZE(opt3001_channels); + break; + case OPT3002: + iio->channels = opt3002_channels; + iio->num_channels = ARRAY_SIZE(opt3002_channels); + break; + } ret = devm_iio_device_register(dev, iio); if (ret) { @@ -826,13 +957,15 @@ static void opt3001_remove(struct i2c_client *client) } static const struct i2c_device_id opt3001_id[] = { - { "opt3001" }, + { "opt3001", 0 }, + { "opt3002", 1 }, { } /* Terminating Entry */ }; MODULE_DEVICE_TABLE(i2c, opt3001_id); static const struct of_device_id opt3001_of_match[] = { - { .compatible = "ti,opt3001" }, + { .compatible = "ti,opt3001", .data = &opt3001_chip_info }, + { .compatible = "ti,opt3002", .data = &opt3002_chip_info }, { } }; MODULE_DEVICE_TABLE(of, opt3001_of_match); From patchwork Thu Sep 5 10:20:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Emil Gedenryd X-Patchwork-Id: 13792114 Received: from DU2PR03CU002.outbound.protection.outlook.com (mail-northeuropeazon11012038.outbound.protection.outlook.com [52.101.66.38]) (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 15F71198E84; Thu, 5 Sep 2024 10:22:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.66.38 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725531732; cv=fail; b=skZFvEexANQjgRU4kLtacuWD/O1jcjnYEyHVRRhjdrQLZ6GqhrSa6E0kOqbmxe1i+juSlZdwVp6mAwa7u0FBr4aRNqIpG8ITvBw8J5LaIo3/jXspEYZnLlvWj65I2RP0FEWmxJQT8dbhZmlvqyrUTLZpP7ovlkf6YgU6ZIQK9DA= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725531732; c=relaxed/simple; bh=PqYmVbvOJjIxE/mAg1WOvj/StJBFjkky58zhTw68axo=; h=From:Date:Subject:MIME-Version:Content-Type:Message-ID:References: In-Reply-To:To:CC; b=DIVFdHzY7/ENCr2oLHswU62nq9lNxGAm/CerjyPAAgPSmbu7FIVWLQY9bKFbUzjUPbgYnbY1dhNzFR2GZcTtvCsPAcqgUEznjtQhoGbEmThQgbyGb2Ps3NtPQnxP3Q4flg5bfHEeaOd51Ro3vqioPzgjN7z9cYSqLiEh0PKseD8= 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=dsu9ug5D; arc=fail smtp.client-ip=52.101.66.38 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="dsu9ug5D" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=sUuLgsWF0RH0l60LxiGEhTN1R8sHH7nlm6rv6ini4/M0nyMyZyQZSXLClorTv53/ym+yEHnzCY9NKUUtw3lwBfNfUnkoTQUOSF32WsxVI/Xv40L2QTIHyj5gFZzr7kM3UabqZ3nMt4twPpWhBP0UZ201Og1QceYr8PpqUk0scAt/Qz/H7CDfPS5IRhLasUZuZGbpu7Cp8YwuZdvEBTfpphGdw8rzI49yKN1pNDl8DWiN/rNwqHqy0Bhb7Bh+LdtBCAHoTlYdmrHmjONTUz24yijwirsvRTkFmO3qDumO59LESO3YZ739SDmATq7Wo6JfibayJPzZ7NXlEzZ8V80/gg== 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=sg6/CdlXmuw8dHFGDmiG/XCQx3ATVLvzpe8lXIcpsww=; b=Sd2XaDEsqg+g5TqogccPAmnVtHSMiF+B2MkTC9KyIzDf8ei/tIuIdfPjCNrf8t/zAgFid6B53g/bUmHu2QqpAW4jrBreycuvhyjeoo7IZev8VY6z4U3jGSApB4R5zqkX0ePyUldT+vGjC+EAkLQmd01hurRzI6/w7k3Q1jmpt3XuCCWZFQWCXfLRim9AMF5EXAhWpPNVf4KP9du1xOHs0N3GayKw4SLJLiwZbSBEUCzpGzWItS8P5pmZwM4VmaA+WPUr3b2Hn2vDuTaGxFSG1AJycy6zCQTZb+5+0nTOGtbiqfk9dREI/SK5barbmqWfjta7KzXvj8n71vx/vMVnUA== 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=sg6/CdlXmuw8dHFGDmiG/XCQx3ATVLvzpe8lXIcpsww=; b=dsu9ug5Da2phMyQi13UasZHn3z46ZStZu8sVqIxiOoVlyBGL3L9IsM85/DaeAWCzZ/8mvKKUdtuHoO0/RB9aJPbNqvhVCMAdys1v3C0MgtfV1Hj/7ot0rREAHumCxviBK/s3Rt65z4cOsm2sAiNxwtTLHkptJd3CR+QApf3x6II= Received: from DU2PR04CA0048.eurprd04.prod.outlook.com (2603:10a6:10:234::23) by GV1PR02MB8561.eurprd02.prod.outlook.com (2603:10a6:150:97::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7918.25; Thu, 5 Sep 2024 10:22:04 +0000 Received: from DU2PEPF0001E9C3.eurprd03.prod.outlook.com (2603:10a6:10:234:cafe::23) by DU2PR04CA0048.outlook.office365.com (2603:10a6:10:234::23) 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:03 +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:02 +0000 Received: from SE-MAIL21W.axis.com (10.20.40.16) 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-MAIL21W.axis.com (10.20.40.16) 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 5BC3C49C; Thu, 5 Sep 2024 12:22:00 +0200 (CEST) Received: by pc55303-2334.se.axis.com (Postfix, from userid 18269) id 59BC82312A73; Thu, 5 Sep 2024 12:22:00 +0200 (CEST) From: Emil Gedenryd Date: Thu, 5 Sep 2024 12:20:47 +0200 Subject: [PATCH 3/3] dt-bindings: iio: light: opt3001: add compatible for opt3002 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-3-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_|GV1PR02MB8561:EE_ X-MS-Office365-Filtering-Correlation-Id: b2b951a5-1794-4254-d225-08dccd9495b5 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|36860700013|82310400026|376014|1800799024; X-Microsoft-Antispam-Message-Info: =?utf-8?q?uz+NyJk6cAAZuIWoxlb7Cwo03hS/aI3?= =?utf-8?q?t818swEyTw7Fuyw+8QMdmMy0w950WB8SCXLjqLjqU/wAcHTx0LvqZjLVQMsySKGlB?= =?utf-8?q?GGZ+D1l7NhNjLAv93GatH9xvVDLiusbEXH5TiwUhRX0kJuNI+5I6uzBNkBNJNJyFM?= =?utf-8?q?uftY4STDcECFBpZsaxa3uDD7EpJaMGWYPcvisP8IcigShbHCiBZjJ8EAQdRSfSIt/?= =?utf-8?q?u0zsazFiVQu2mJjQ0nvN5yAPCoOmG6CPVadS9raPrzUIGmHVH9yKKKQqXkZKMZc2j?= =?utf-8?q?XOGgJmHJNFXaLRXuIZL9VJq4zOcqV/qiz1zNsmhlZG7KsFmXlm2mVdmSVard8JGyO?= =?utf-8?q?gFUDujZhh2Thy6ogLIvPuJTqxLJzQboqs+2pfalw4e9QOIIGj7ES330S+nK9vrtQy?= =?utf-8?q?9G0AB9SJ4Po2T2MC6bubVcp3dZC5K3yoDzuozcytmjqd1Tup2EWqZGX0I3esS2QQG?= =?utf-8?q?iajESl18hZ4yDRU03S3vpSJrUk3rt3ZkLh152tAP932wfBEsSFDs1fKzHjVg5b5B5?= =?utf-8?q?N9zPNX/L0B/RCnRS2kZ6rShVeKkFGCnwC7GzWeozqYb9rw5h4uVHvdSr0DpIsoBDn?= =?utf-8?q?ZnXuG04pvdTn/LPBOSDYp4EPZfv10A48uknzMrWobbhPkCQmTJY3A4/NL0+8FMftW?= =?utf-8?q?141/+CyUUm7ozT7UaEZyp25XBTXpl3PuA30SKyMFQ2pEcVdOuOhF4DLrNi8SL4QRE?= =?utf-8?q?IGpKNeyMcd+r0P+O3BJ6xZr4ciPoXlejO9FVBsQ3QWSwT+eNl9Wryy46+BJQuCayb?= =?utf-8?q?O9H7cj14fKeVgZrvVIGhjvhKuQf6udwvhO4JIAooswSmMLRYH/CR9CgMmIOMTU4ym?= =?utf-8?q?70dZSvC47npFmtNeFiSXeu+lDioq7kIAdrKqYLs8LGWCwNscnSZVEaM6DIvQ5CAx9?= =?utf-8?q?JBMnqY1pARoeZPHl/MpC44ZLews6+9lgNUE5tu5hVcpVZjBvp1jbtQW5ehmK8Z+Zb?= =?utf-8?q?0yC5eTtJAQNr+NsWqYoch6tmShG0vHD3K3QQaBkqpuZ0t/C+X/RlXtl22k1ipAfbW?= =?utf-8?q?1toSc1tzz/1mbSsFe+2t5ow8K8JUTCsI1ESZs9G3aCXD88bS663zgeTNIU4SdjN6/?= =?utf-8?q?/yvEOfoMmq4r5/JQYNoVzCCulJqegJQ0hgO3B/gboJ9acFfo3fQf4SGHoGRn4QTTv?= =?utf-8?q?e08567V+Ix2HhUek2zTAz9stojiKjV0+uE5Kmm3L1ZfRcXtkJ35hEa4LYyu3MlqNo?= =?utf-8?q?Bv+7js70JzxQ1+jhzmFRsfWNluQbWVY21TPCt4HODNE7vZ4VNdsBdGnTzmxO5IE67?= =?utf-8?q?LYuExn+S+75/dm+JZg6yMLKXjb5yIGsdHbn6Ijw3llMqfRwSqwa7sRVrBhpWPVplg?= =?utf-8?q?SMIhde7G4avBgpdJxustFANAynNNMWPjyJUxQtO/lA7eVyHlh7XJBdH21Yze6fyHX?= =?utf-8?q?bjHO9A6J1s3?= 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)(82310400026)(376014)(1800799024);DIR:OUT;SFP:1101; X-OriginatorOrg: axis.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Sep 2024 10:22:02.9717 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b2b951a5-1794-4254-d225-08dccd9495b5 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: GV1PR02MB8561 OPT3002 is a Light-to-Digital Sensor by TI with support for wide-range spectrum light. Add the compatible string of opt3002 to the existing list. Signed-off-by: Emil Gedenryd --- Documentation/devicetree/bindings/iio/light/ti,opt3001.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/iio/light/ti,opt3001.yaml b/Documentation/devicetree/bindings/iio/light/ti,opt3001.yaml index 441e9343fc97..7a48a06968ca 100644 --- a/Documentation/devicetree/bindings/iio/light/ti,opt3001.yaml +++ b/Documentation/devicetree/bindings/iio/light/ti,opt3001.yaml @@ -16,6 +16,7 @@ description: | properties: compatible: const: ti,opt3001 + const: ti,opt3002 reg: maxItems: 1