From nobody Sat Nov 23 02:04:52 2024 Received: from mx-relay67-hz1.antispameurope.com (mx-relay67-hz1.antispameurope.com [94.100.132.234]) (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 D76BA18A6A1 for ; Thu, 14 Nov 2024 13:19:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=94.100.132.234 ARC-Seal: i=3; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731590349; cv=fail; b=rJ3tuMaFk4x3KJGGVeVS4PWBRZmPrvaKe7vzK7b4iS3+hYAc8dhxM/Sbazf0pMpJVbjG+HqS6Wkf1Og6uepA8wgJZaK/UXyOn2tFfvKUJFqZUweCyKnTYBh+FAgRx6fK619JO8dmR8ekIxxBtHWlWRS9jYC2AklZdERdOuFRYeY= ARC-Message-Signature: i=3; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731590349; c=relaxed/simple; bh=7p/L9E2BxFmbDaPJn3Om6p82K/LjTIqN0YNq0StaQHE=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=Pl+UVTMSkkF/+q/nwpC2/QJLxEoUoOg96hqGbZThMkSzFQAzozwXzeDaWG9UA+/wwWtXGtx5QVU/+OuMi7GCy5H5ExswLu8hoEmO37qngBqpFiGZdzBxyC/hKC93XmuZJUW1DPHz9xhPpjA+sIkzIk54gJkXitv4AG1/6jKHLE0= ARC-Authentication-Results: i=3; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=aerq.com; spf=pass smtp.mailfrom=aerq.com; dkim=fail (1024-bit key) header.d=l2task.onmicrosoft.com header.i=@l2task.onmicrosoft.com header.b=TJrGAveB reason="signature verification failed"; dkim=fail (1024-bit key) header.d=l2task.onmicrosoft.com header.i=@l2task.onmicrosoft.com header.b=OUrKydIR reason="signature verification failed"; dkim=pass (2048-bit key) header.d=aerq.com header.i=@aerq.com header.b=Gxx7RPFy; arc=fail smtp.client-ip=94.100.132.234 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=aerq.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=aerq.com Authentication-Results: smtp.subspace.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=l2task.onmicrosoft.com header.i=@l2task.onmicrosoft.com header.b="TJrGAveB"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=l2task.onmicrosoft.com header.i=@l2task.onmicrosoft.com header.b="OUrKydIR"; dkim=pass (2048-bit key) header.d=aerq.com header.i=@aerq.com header.b="Gxx7RPFy" Received: from mail-db8eur05lp2104.outbound.protection.outlook.com ([104.47.17.104]) by mx-relay67-hz1.antispameurope.com; Thu, 14 Nov 2024 14:18:04 +0100 ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=fail; b=NDXNLXfLOfcvAFwAVQQw5qoTcKYDu3mD1TtjoNuBQ3YKaF+sq1UfQsW+HSZwxinwgq7OmO5cw1QKZMQMr2oHf0S9k2Cn6Ub+HoUkUsA2NhijXXdLqDEsirt9ZojYHiUAdrSBqXp9olkEgSFFsVVotP0puuWq/f+E14q2YQ5e6W5TQ0eAfNN33mA4XfkKsjdAXhCIY0hqHseiYOceyQoLF1RIZbhSrVV3rwT3prlcL3yBbwj2smP4Bg5pVs1vXUvb47krmzM3jKFLiuBTE5gPzpdiFtumksFqr6zh25c2GVzok15QTpQnoPzD6O+KOZJgkNqrpQ2rHt+h25HlFvFzBw== ARC-Message-Signature: i=2; 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=O6XOIQqsbUM00Ny1tqxDL+n0jVOIrfKOr3xBsKlp2O4=; b=WNN8oZdZrh8id7HaPQDLNjBwbOUSjiKIlvITHXO3u4vufB3XXbitnVYVoY9dYhVbryLgkIjYPmzaWSBqY2zis3DDuVZlTnJSzqH4/r+PsHi4TEQ/wNEcmkxf4+ueh2EQWWv5msfe1XoddN1HPKSOgmsAiiXrpxdT9mflXi7rqXQjcIMrkbW0j0p+XZph3cBaKmu6oSyWriCZcFL86xTz8f6ElbwMNSWxvrUdJU9KdvoXPFDYfEosEmbeMC6miaIGhQzAezNt7mmr+TKycVvwlpH6cLgE/UT7npRDCXRkKhW6NXUsTjr4lRKCaiWUaJN44guT1V8JmwhsxzMTNc6c1g== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=softfail (sender ip is 52.169.0.179) smtp.rcpttodomain=kernel.org smtp.mailfrom=aerq.com; dmarc=fail (p=quarantine sp=quarantine pct=100) action=quarantine header.from=aerq.com; dkim=fail (body hash did not verify) header.d=l2task.onmicrosoft.com; arc=fail (47) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=l2task.onmicrosoft.com; s=selector1-l2task-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=O6XOIQqsbUM00Ny1tqxDL+n0jVOIrfKOr3xBsKlp2O4=; b=TJrGAveBbTNVruMnz5Ki7R1bWqS8RY01BWbENz7IUGkcksHvSmbMZFLlvRzlgm77YycgYbrWJcpN4NDCujDdS4j5O6WFckBkf+r1KNffEE8q7nEkmt4ueCzV/ehQbhErNjd3xSjhClT9HP5xWp5PTP50CWnDXXmRE8Ir+PDUHIo= Received: from PR1P264CA0104.FRAP264.PROD.OUTLOOK.COM (2603:10a6:102:2cf::15) by DU4PR10MB8322.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:10:566::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8158.17; Thu, 14 Nov 2024 13:17:45 +0000 Received: from AM4PEPF00025F95.EURPRD83.prod.outlook.com (2603:10a6:102:2cf:cafe::47) by PR1P264CA0104.outlook.office365.com (2603:10a6:102:2cf::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8158.18 via Frontend Transport; Thu, 14 Nov 2024 13:17:45 +0000 X-MS-Exchange-Authentication-Results: spf=softfail (sender IP is 52.169.0.179) smtp.mailfrom=aerq.com; dkim=fail (body hash did not verify) header.d=l2task.onmicrosoft.com;dmarc=fail action=quarantine header.from=aerq.com; Received-SPF: SoftFail (protection.outlook.com: domain of transitioning aerq.com discourages use of 52.169.0.179 as permitted sender) Received: from eu2.smtp.exclaimer.net (52.169.0.179) by AM4PEPF00025F95.mail.protection.outlook.com (10.167.16.4) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8182.1 via Frontend Transport; Thu, 14 Nov 2024 13:17:45 +0000 Received: from EUR05-DB8-obe.outbound.protection.outlook.com (::ffff:104.47.17.104) by eu2.smtp.exclaimer.net (52.169.0.179) with Exclaimer Signature Manager ESMTP Proxy eu2.smtp.exclaimer.net (tlsversion=TLS12, tlscipher=TLS_DIFFIEHELLMAN_WITH_AES256_NONE); Thu, 14 Nov 2024 13:17:45 +0000 X-ExclaimerHostedSignatures-MessageProcessed: true X-ExclaimerProxyLatency: 4412768 X-ExclaimerImprintLatency: 1036775 X-ExclaimerImprintAction: ce8892d06b264c34b52c05ba7ef2924f ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=l44GfKMjje0LOdSVH6t8UzKXslvyAesaahIwsSQ/ntgkkUvH1cujCKxpyIomQFt9bKnnaG2O6TTcRarH7OqzJPcaNXHW3MwaiNBA05CVdBH37chXIkK2aHGxAf9CLC6+tLSpq7qfySFXGUgmthYc8GRA2rbZU9NBrWNSC+hzklRV+5e58Suyj75tQ03BZ/iH5vQvQyfOvSef3RfvYE57vO9uduDH8EZfB3m6nBFkT0Dbb8bKPZyGSajYuBREwKFaUpr/ngVrQkPEdWyDIgunB1xPkITMZo1iR8mNdyo+7MbXo2zDkM/15x6rRyn6024+Y70Yc1TQh8HnwR2ZtGS6Jg== 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=O/v12EbgC27xgEy0kTzTgePH2uZ3vBbeSUHBdd0MBA4=; b=rZ+ZmA5B+0n5fg30/wyDYLvpVjqBl173Gc0c0vysT7GhaBMJPPfgr01lFTLIGHqRJ5bTvuiakGXJ/EShMov7OIBnppQhM2RH0mLSioY+iluw55cZYFwfWDP5vJZDcaJFwrq4/iJL6Ry1vzMJR/9AdviEu98ACyFTv+KQYgZgotViKNyp5oE9AwxityW5tZ9kJyH7QirrL6s+pt8DWTPJIGQUFyXuCo3KKlVre9gskAY3SUPvwyIClqwtaosDeBgktRfw2uX1sMfxaMkhED6S49+hZPtHi+SP81hfc00sr3rNp98N/slhFEPUHVXLbJp3hcvSSpOz7y071VjtGbC/ow== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=aerq.com; dmarc=pass action=none header.from=aerq.com; dkim=pass header.d=aerq.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=l2task.onmicrosoft.com; s=selector1-l2task-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=O/v12EbgC27xgEy0kTzTgePH2uZ3vBbeSUHBdd0MBA4=; b=OUrKydIRmAmvrfxECYy2iWlylbbKeom4zmiKstevlCSwtrZE3nDDh5J2y59ftZyFKOyiVJBWj0Yp5oSnK6ZoNzHPTJ1dikb1KUwMOFrMgNOkAHo7YTf7Z7Ij1ieKKNZk4EpXFm0lbgQSYx5XBlxGQF7D+bSx0AUgCdV1IxknSuA= Authentication-Results-Original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=aerq.com; Received: from DB9PR10MB7291.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:10:45d::9) by DU0PR10MB5218.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:10:346::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8158.18; Thu, 14 Nov 2024 13:17:40 +0000 Received: from DB9PR10MB7291.EURPRD10.PROD.OUTLOOK.COM ([fe80::8c9c:7279:978a:f67d]) by DB9PR10MB7291.EURPRD10.PROD.OUTLOOK.COM ([fe80::8c9c:7279:978a:f67d%5]) with mapi id 15.20.8158.013; Thu, 14 Nov 2024 13:17:39 +0000 From: Cibil To: jic23@kernel.org, ktsai@capellamicro.com, lars@metafoo.de CC: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, Cibil Pankiras Subject: [PATCH] iio: light: cm3232: Reset before reading HW ID Date: Thu, 14 Nov 2024 14:16:56 +0100 Message-ID: <20241114131656.1707358-1-cibil.pankiras@aerq.com> X-Mailer: git-send-email 2.34.1 Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: FR3P281CA0094.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:a1::9) To DB9PR10MB7291.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:10:45d::9) X-MS-TrafficTypeDiagnostic: DB9PR10MB7291:EE_|DU0PR10MB5218:EE_|AM4PEPF00025F95:EE_|DU4PR10MB8322:EE_ X-MS-Office365-Filtering-Correlation-Id: 94db491d-d04f-4109-c5fb-08dd04aeba51 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0;ARA:13230040|1800799024|52116014|376014|366016|38350700014; X-Microsoft-Antispam-Message-Info-Original: =?us-ascii?Q?A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ZkH8E5R31Xo12i?= =?us-ascii?Q?oEkwzJut6Od+FDtPUYB+Cc/IptputpRMCb1I86PEY5d+R6xgA47rdCCOPqvX?= =?us-ascii?Q?0AylOkK6FwRcHrqdxd30xItAcTDHt/4tVC6mwZkOiz6FIWeY8xcOnoSjoOjD?= =?us-ascii?Q?5JtZCe0Seay/ZSM6/j/z+YQ7aEXcGAzKUgq83lFvYkO2fXpRsElVNMfTL8W9?= =?us-ascii?Q?fF8q81gH+wTatBu3EwHB2kD6fZKW/7MKo0ZPMIMlEKmYan5awGFoViSZtbNw?= =?us-ascii?Q?zNaVuZI/ESFp9R9at4OptAsOpjvtEUzF21vFFt3nhDh7vDmHnBo7ZG+kB0vd?= =?us-ascii?Q?/cOk2xwSGF6kqLCBXTvwEqzsWLoXdzsvhc9/81HpjqRqcBxWvOddPqbzYlSX?= =?us-ascii?Q?K4Mms1RzzCB7RJc94h1fRmzCMkfrrlhaIalzZyX+t4uHkxFpLhWvgaLpiyZb?= =?us-ascii?Q?mDgXNUN/vndKIwbuyzMEmRAT6imXeA5NcDojiQakS8xmeKTT8UCh6zxT4WYA?= =?us-ascii?Q?QpR3jmY=3D?= X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DB9PR10MB7291.EURPRD10.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(52116014)(376014)(366016)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU0PR10MB5218 X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM4PEPF00025F95.EURPRD83.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 9abd7498-1623-4af5-966d-08dd04aeb6e2 X-Microsoft-Antispam: BCL:0;ARA:13230040|36860700013|376014|82310400026|14060799003|35042699022|1800799024; X-Microsoft-Antispam-Message-Info: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RUct/HT08MImCwVqPWVejm9sqnMjK5kx2o?= =?us-ascii?Q?LN3xVSsk6fIluc3j/GS0+nILyqikyhYcCaq6+h+9rBz7+YJkNda1l2gwdAob?= =?us-ascii?Q?gUIeyemhGl0XWpj5Wz0vrpAFpsiBfqTSw08GJfF25UBquKOSbmGWpcaZscUO?= =?us-ascii?Q?rwM4121aKpz0P37dgiMNI1b3YSz9EScVjKLfYGVSYSezTmBAqfbJ1b3zewoT?= =?us-ascii?Q?k4n3yVARToQr0ZxbmMz1q1D0KA02M9C7Aux7IKJyCdHXxzgb/EIqLd0BqcgU?= =?us-ascii?Q?XZP/z0q/7r/YzzA1OZG5rL1cymi9QXFFZJAqc7YQOPZa9sUtjqXE8UIN1sbD?= =?us-ascii?Q?dRkreWFP3khq0bUaC8khClO/v7d3UUMrXlxsT23XVH2PrQ8hmpgZ5NfsHgUE?= =?us-ascii?Q?prF14t9BIIeUWOtZad82giJw9ZBMsRq9zzckqSTZsMtiI6IbSVqmNoto91Aa?= =?us-ascii?Q?+WZ62IzI6fATsr0ZaAu0pzn+vfiq1EmO8ew3B9M8M5M7W/cufZoy+JjoHrGs?= =?us-ascii?Q?6NxZs0D4f/5R7262mcwF0/V1+/Vv9nFajiUl7yK84IMATbVXZA=3D=3D?= X-Forefront-Antispam-Report: CIP:52.169.0.179;CTRY:IE;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:eu2.smtp.exclaimer.net;PTR:eu2.smtp.exclaimer.net;CAT:NONE;SFS:(13230040)(36860700013)(376014)(82310400026)(14060799003)(35042699022)(1800799024);DIR:OUT;SFP:1101; X-OriginatorOrg: aerq.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Nov 2024 13:17:45.0876 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 94db491d-d04f-4109-c5fb-08dd04aeba51 X-MS-Exchange-CrossTenant-Id: bf24ff3e-ad0a-4c79-a44a-df7092489e22 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=bf24ff3e-ad0a-4c79-a44a-df7092489e22;Ip=[52.169.0.179];Helo=[eu2.smtp.exclaimer.net] X-MS-Exchange-CrossTenant-AuthSource: AM4PEPF00025F95.EURPRD83.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU4PR10MB8322 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/signed; protocol="application/x-pkcs7-signature"; micalg="sha-256"; boundary="----1852AE4FDE1479EB8EF3900BEB95A59E" X-cloud-security-sender: cibil.pankiras@aerq.com X-cloud-security-recipient: linux-kernel@vger.kernel.org X-cloud-security-crypt: load encryption module X-cloud-security-crypt-policy: TRYSMIME X-cloud-security-Mailarchiv: E-Mail archived for: cibil.pankiras@aerq.com X-cloud-security-Mailarchivtype: outbound X-cloud-security-Virusscan: CLEAN X-cloud-security-disclaimer: This E-Mail was scanned by E-Mailservice on mx-relay67-hz1.antispameurope.com with 4Xq10r4S9WzKvfd X-cloud-security-connect: mail-db8eur05lp2104.outbound.protection.outlook.com[104.47.17.104], TLS=1, IP=104.47.17.104 X-cloud-security-Digest: e04e1126f59e9eb9a808d9913bd75888 X-cloud-security-crypt: smime sign status=06 sign_complete X-cloud-security: scantime:2.359 DKIM-Signature: a=rsa-sha256; bh=+BZQkN1N/AaHDw9gCv7d5tSCnymoz7/B8Qp+eYbPgOY=; c=relaxed/relaxed; d=aerq.com; h=content-type:mime-version:subject:from:to:message-id:date; s=hse1; t=1731590283; v=1; b=Gxx7RPFyvwoJrsw2fUFSAVsrippyJPhJJEam1D1F5pH1bDkqsrSxvymx7yQUqM7gHZQZdJcO JlBxoarGBu7J0MJhDf30XINw6GMdG+jo7sMw1oaVgoyat2piJOHsw6w080/iCdLOf3zdkkbgpfL 4BMUttun0I+BsAo1fa24OrVn0VeWWyKtRwJvPV3rDbIIev5BIjtSIS3Iexa9Ru7jgqocdhElqtw 6EryrWs7HN1vTqu19PTwGweuCqp8DQZxUaB97hsY/4Y+WERJkc+QBJ98yxsM2LjFknLFh+2c4f/ pC9lkxBI2KbwdPyTq7MOCPiTM0Iix9czvix3tjdTly4ww== This is an S/MIME signed message ------1852AE4FDE1479EB8EF3900BEB95A59E To: jic23@kernel.org, ktsai@capellamicro.com, lars@metafoo.de CC: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, Cibil Pankiras Subject: [PATCH] iio: light: cm3232: Reset before reading HW ID Date: Thu, 14 Nov 2024 14:16:56 +0100 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Cibil Pankiras According to the datasheet, the chip requires a reset before any data can be read. This commit moves the device identification logic to occur after the reset to ensure proper initialization. Cc: Kevin Tsai Signed-off-by: Cibil Pankiras --- drivers/iio/light/cm3232.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/iio/light/cm3232.c b/drivers/iio/light/cm3232.c index 2c80a0535d2c..db33671c448c 100644 --- a/drivers/iio/light/cm3232.c +++ b/drivers/iio/light/cm3232.c @@ -89,6 +89,15 @@ static int cm3232_reg_init(struct cm3232_chip *chip) =20 chip->als_info =3D &cm3232_als_info_default; =20 + /* Disable and reset device */ + chip->regs_cmd =3D CM3232_CMD_ALS_DISABLE | CM3232_CMD_ALS_RESET; + ret =3D i2c_smbus_write_byte_data(client, CM3232_REG_ADDR_CMD, + chip->regs_cmd); + if (ret < 0) { + dev_err(&chip->client->dev, "Error writing reg_cmd\n"); + return ret; + } + /* Identify device */ ret =3D i2c_smbus_read_word_data(client, CM3232_REG_ADDR_ID); if (ret < 0) { @@ -99,15 +108,6 @@ static int cm3232_reg_init(struct cm3232_chip *chip) if ((ret & 0xFF) !=3D chip->als_info->hw_id) return -ENODEV; =20 - /* Disable and reset device */ - chip->regs_cmd =3D CM3232_CMD_ALS_DISABLE | CM3232_CMD_ALS_RESET; - ret =3D i2c_smbus_write_byte_data(client, CM3232_REG_ADDR_CMD, - chip->regs_cmd); - if (ret < 0) { - dev_err(&chip->client->dev, "Error writing reg_cmd\n"); - return ret; - } - /* Register default value */ chip->regs_cmd =3D chip->als_info->regs_cmd_default; =20 --=20 2.34.1 ------1852AE4FDE1479EB8EF3900BEB95A59E Content-Type: application/x-pkcs7-signature; name="smime.p7s" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="smime.p7s" MIIQLwYJKoZIhvcNAQcCoIIQIDCCEBwCAQExDzANBglghkgBZQMEAgEFADALBgkq hkiG9w0BBwGgggw0MIIGEDCCA/igAwIBAgIQTZQsENQ74JQJxYEtOisGTzANBgkq hkiG9w0BAQwFADCBiDELMAkGA1UEBhMCVVMxEzARBgNVBAgTCk5ldyBKZXJzZXkx FDASBgNVBAcTC0plcnNleSBDaXR5MR4wHAYDVQQKExVUaGUgVVNFUlRSVVNUIE5l dHdvcmsxLjAsBgNVBAMTJVVTRVJUcnVzdCBSU0EgQ2VydGlmaWNhdGlvbiBBdXRo b3JpdHkwHhcNMTgxMTAyMDAwMDAwWhcNMzAxMjMxMjM1OTU5WjCBljELMAkGA1UE BhMCR0IxGzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UEBxMHU2Fs Zm9yZDEYMBYGA1UEChMPU2VjdGlnbyBMaW1pdGVkMT4wPAYDVQQDEzVTZWN0aWdv IFJTQSBDbGllbnQgQXV0aGVudGljYXRpb24gYW5kIFNlY3VyZSBFbWFpbCBDQTCC ASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMo87ZQKQf/e+Ua56NY75tqS vysQTqoavIK9viYcKSoq0s2cUIE/bZQu85eoZ9X140qOTKl1HyLTJbazGl6nBEib ivHbSuejQkq6uIgymiqvTcTlxZql19szfBxxo0Nm9l79L9S+TZNTEDygNfcXlkHK RhBhVFHdJDfqB6Mfi/Wlda43zY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