From patchwork Sat Mar 29 05:43:22 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tarang Raval X-Patchwork-Id: 14032573 Received: from PNZPR01CU001.outbound.protection.outlook.com (mail-centralindiaazon11021076.outbound.protection.outlook.com [40.107.51.76]) (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 B813B635; Sat, 29 Mar 2025 05:45:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.51.76 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1743227113; cv=fail; b=Po0VOdSf1Qi+hEZG+zfiSxzsEY6a+U1r/kOl9AAXDNX020EKzQ9WSRNBt+5wGM0D7dKvwG71ak7nC7mXK3Ge0X4onspf4F97l6UoaJx4QlUaTB0ykARvu/eRG2Hcj+U4QoqX28EFjc1HmzLRCLzHTeRbqMKuSI8iMNJ+j+mS1Bc= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1743227113; c=relaxed/simple; bh=qQdArGgCGz9qNQuFAQJziaxvX+P9/ZOof8l5juubiCw=; h=From:To:Cc:Subject:Date:Message-Id:Content-Type:MIME-Version; b=WhgcEVCDAdGxEbvTK1X3hvKFAyNU90RytDC7/ocikgw+GKV657/Kz+yFliwuzl0zfBLNQW7A+8JGobMIWyZgmQrG55f3k0rz05KDWSF5VCliQSe4X2bnHoxQ6XaWbjCliL/nX0ZFtJlwAWWvL5BMGucVBh+r9+1czWuPxzLRwns= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=siliconsignals.io; spf=pass smtp.mailfrom=siliconsignals.io; arc=fail smtp.client-ip=40.107.51.76 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=siliconsignals.io Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=siliconsignals.io ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=SwHMhyKAEUTOG897DHdGGGW3zpZ2XIin00sPTqfdOj59iKy7qpP0GdWk4emc5lV6OOWzAABg5DbFRIBUZr0foMr6UB0aNuG3YM541eovdQMxZ+/zJ68D2CtT2nIt4Pg1ITbW+4407onwXDtS6f597/yJACq8AzcTmEdFZAMf1BtN2GG3872vt+/VmANWVhh2nq9ucftmqZ6lwf5IAX/Rp0a3tpMfkn3TV/B6v0Gv6Dczg7HXHu+CSdJVMcx9wLsYhd9a39KXSSINlWyISxCT0bvCgZaVWo6RIAgqVVhANzAissGllUkiz8CFm7IvJ1LCQWUT/LqpGrJlmv7qiZbqcg== 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=AFg5I6UVDOm1lyhpCs+XxKvQ9WCNGqcaRSZH4CzijM0=; b=v45IXwPWB/qxHTRl0P02SCg/ftGN0YPmsZWh1psaHoA89+0d1stZn22S91UqfLK6wwvSuPa6Iiizc8uf74pibHjNTBRON/HVX9O79XjhDsaaBiSpuxrm9aiNnpRXZZ7DqmM+Eu3Oa5ihbFBrZJhk+anXcrhf+URmzvZjBpNTYRjPAylvcY0eNDd9B1x9tpUBg/FbdysZcjf5IK1DdFeXk3s9+TJo66SbWsbsOtPhNWbGxwyOhu45fEWMGIllZt6sKRFC1AiebZHf01BMdLVwMeN1wwyEsq5IV+NzM5uigbH4HzPdIIGipiWwpPhfg8U3euX7fLKAyEtUTFvXDZvXKw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=siliconsignals.io; dmarc=pass action=none header.from=siliconsignals.io; dkim=pass header.d=siliconsignals.io; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=siliconsignals.io; Received: from PN3P287MB1829.INDP287.PROD.OUTLOOK.COM (2603:1096:c01:199::7) by PN0P287MB1842.INDP287.PROD.OUTLOOK.COM (2603:1096:c01:18f::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8534.46; Sat, 29 Mar 2025 05:45:07 +0000 Received: from PN3P287MB1829.INDP287.PROD.OUTLOOK.COM ([fe80::58ec:81a0:9454:689f]) by PN3P287MB1829.INDP287.PROD.OUTLOOK.COM ([fe80::58ec:81a0:9454:689f%4]) with mapi id 15.20.8534.048; Sat, 29 Mar 2025 05:45:07 +0000 From: Tarang Raval To: sakari.ailus@linux.intel.com, kieran.bingham@ideasonboard.com Cc: Shravan.Chippa@microchip.com, Tarang Raval , Mauro Carvalho Chehab , Hans Verkuil , Laurent Pinchart , Julien Massot , Zhi Mao , Mikhail Rudenko , Kory Maincent , Benjamin Mugnier , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 0/9] media: i2c: imx334: Miscellaneous cleanups and improvements Date: Sat, 29 Mar 2025 11:13:22 +0530 Message-Id: <20250329054335.19931-1-tarang.raval@siliconsignals.io> X-Mailer: git-send-email 2.34.1 X-ClientProxiedBy: BMXPR01CA0096.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00:54::36) To PN3P287MB1829.INDP287.PROD.OUTLOOK.COM (2603:1096:c01:199::7) Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PN3P287MB1829:EE_|PN0P287MB1842:EE_ X-MS-Office365-Filtering-Correlation-Id: c7045549-0ceb-44da-c17c-08dd6e84dca4 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|7416014|52116014|366016|1800799024|38350700014; X-Microsoft-Antispam-Message-Info: cKrQWgAILQQni8xwaY150g/hotF+Yzc1TkA97YpepARRLIf47eIRE8mPUnIYjHy550JHx2/xHiSOjK5IL0/8FKSPeM6sAxaOBann0YF2acxbFsCzeKuo1M17iR3RVAXJwHv7o+kzZ6sOvF2xNcv/wIvPoa19y07KGCPrbMLBFpQsGYhVJgHL7NVnmNSZM1FWdbRavI7uhuEwbBZU7eCgFw9BDRu01Qm0uCzrKplIR01gDyPCIMItbtklu/VeQs2todJC9KQlp5I60uvwTNbUyxk3hi9uf+YfIpsTZYSCLjdNUEuHGfHBusJiiVQSMjo0pt5HShZfVZCG2WBcULqFjAD3gvu+gnI+jpqf4Xoog69b3ItOed509FA662MYSE9feoVPebIaCTZjE4ROvoKyqDEb+/nfZHFfJt61TYtvWrYXZD5wFSB5o7HHgmv3nBZF2l25C4qxdo/Lrq7MNWphbZDXvSE+6yG1iqQDtMdP/GYc4P06DF3zY0FHuzU75OXWQOLzHZHUV4/B9WZ11x8uxz88SxJIV2fS0UqkVm8+q0s3VQTQiwwjyT7FgDfVAmkZJo+0nBjjFfJfSy7V0o6K4AIyLvGwmjWZHxhf1Du9eD0v/6K7dR0HPG2WRA+8bFWAE1JzEJxjC0WyJgK+dhsOdfSGc6Uju63tow+E3+1di/HmNcacoIWOH3g5EdzyarbFbOEYntweLxSaqW+EIAZz69uC7dgFMWTY52usYmBTCCuqoAfyLKYaZVs6xRnnvlXR2BCiGtT8NPEYUqXBnDuFt/BzzWm7Sj4aZn8L81keUXOJ4KFjfPVkLw2RrPG3yP+L04/j0btpIwiDbonhxD+SCBbaV1+dMkFx8ETBDq+9Vf0sh55/zZI33MY/OiHb85YVW4SZ3sZdPszVutb7nwpc7aOrl3KijSFiip2Uu+FYWEUERzFfE7KFCkwjvOgXhSiuodt8CEFEGT/OQX85yWgVRUh9ntwyV3HShYuCT0jCarJtV6B3lQkvvQ5wki3As4SIGdj4bXoBYmmBvbSGjDl00zImmdju59X41uWI2bAfknWZCbDaExrqD481uS3jtoPLt+h3Q3vNl/52SNAXAuf292AsPsreD78vh9QsYY3N9fsxeFzvVd4JIjxg5XSXaL3liXV4A6gRv9n/g+0GCp/Kfq4lfR6IWLVEGb/xO9Bb2s2Kwd/wGJ7Xs3SFoQbdugmlJHQ/ZP4vLfm2y/KKdrMJ0lDk4zc4wwbRovaHXSOIWUOt0lwfDKo9loqDiq4WpCG/2FqWn4gXZw29uAK/r8whFKiEBjmTdRTIJCECb7kn8Y7mmH6Q/G48Xg7wdyN/k3rP3vBLN1RRWQI7OqCp6Dkjl9quqEfJgSNC3q7UBVM3Z6GGjL43StWld3/9J/yKIGrAFS28GzWF7Q9kjcva/zTuIprg9epVqjv5YmAX7mOUnZU= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PN3P287MB1829.INDP287.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(13230040)(376014)(7416014)(52116014)(366016)(1800799024)(38350700014);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: rSmQ07/xzXhBun3NO5FzYgyf00nIREG6VXmCoudJLfqIc/l1xwUsQ9NCouXJ1cceivVJT7p2RAkyauJzZsI2ZIr9vqIgkSMGx8JZ4mfsnk3vlzVXXO6aSLFtWo8IWn61nB/Ud4trFcPESB6+gCBlGYKoBkj7a8WWzob4lTCmWdE+rx3a4gQGWB1kSwwujJlGCCwVykz+HpasGHOCXHHsDiY05lFrxF7Gru2vPJxqjd3KTjje2n2NfD+9SGrictETsKXixtBElmzfhUy+cynHVKuiIAY9YFD0U7fRC6fZnceK6/8GKq2qD9gjaIvCJA+Q2c1aangPtJEwUKhY5eD191jCq7KJRDVV045arxwgXctB113L+vWCoSb5X8e3/KvmR1Ayd35/JlXHclmYiyjlQKnm30WAc3Ti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jkCT7reRcLgluiBBWXmt0ggKXmnqW1apErr3jKQjf9IrIDVjCyNO/r0UmRcohx/oyf1WQVDZpP8TWExCQtlFtYto7LptpcuGcd/ukIR/U/jw4sabpl7+2Q== X-OriginatorOrg: siliconsignals.io X-MS-Exchange-CrossTenant-Network-Message-Id: c7045549-0ceb-44da-c17c-08dd6e84dca4 X-MS-Exchange-CrossTenant-AuthSource: PN3P287MB1829.INDP287.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Mar 2025 05:45:07.4444 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 7ec5089e-a433-4bd1-a638-82ee62e21d37 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: oYSwL4okUroSAuil8IZF8eY4yUg5k3afbCYaXoYs+lmZN1Qi/o246t7AI7wh21QVZ2QLwhYfr8eBnMeYc7ewqSrgK6eC+kXbeBZXlUz6fMY= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PN0P287MB1842 This patch series is a collection of miscellaneous cleanups and improvements to the imx334 driver. The changes simplify error handling, optimize register access, enhance power management, and add support for different lane configurations. This series is on top of Shravan's patches [1] (media: i2c: imx334: Add support for 1280x720 & 640x480 resolutions) Link [1]: https://lore.kernel.org/linux-media/20250305051442.3716817-1-shravan.chippa@microchip.com/T/#t Changelog: v1 -> v2: - In patch 2/9: Added space before braces. - In patch 4/9: Corrected the commit message. - Added new patches (6/9, 8/9, 9/9): Fixed PM handling, used subdev state lock for synchronization, and switched to {enable, disable}_streams. Tarang Raval (9): media: i2c: imx334: Simplify with dev_err_probe() media: i2c: imx334: Convert to CCI register access helpers media: i2c: imx334: Remove redundant register entries media: i2c: imx334: Configure lane mode Dynamically media: i2c: imx334: Fix power management and control handling media: i2c: imx334: Fix runtime PM handling in remove function media: i2c: imx334: Enable runtime PM before sub-device registration media: i2c: imx334: Use subdev state lock for synchronization media: i2c: imx334: switch to {enable,disable}_streams drivers/media/i2c/Kconfig | 1 + drivers/media/i2c/imx334.c | 959 ++++++++++++++++--------------------- 2 files changed, 421 insertions(+), 539 deletions(-)