Received: by 2002:ab2:69cc:0:b0:1f4:be93:e15a with SMTP id n12csp949005lqp; Sun, 14 Apr 2024 07:06:42 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW3hKJ80PgPfX7DPwL0Upbyv+w8IVqeber8zWyymQ159VJdG9UHolC6W6tbICltTk8Nl/+CZPgenS1Asr7H3fG5C10nk2ufQc/JzWFCdA== X-Google-Smtp-Source: AGHT+IF5G8UQJVjr4wwQtF/GIHSiLOyh87ISo2XraKjHuqQpEiNPL+kCHwCSBFZ1lQEqUuvT1jX7 X-Received: by 2002:a17:90a:df86:b0:2a5:3f30:f5f6 with SMTP id p6-20020a17090adf8600b002a53f30f5f6mr10178389pjv.20.1713103602671; Sun, 14 Apr 2024 07:06:42 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713103602; cv=pass; d=google.com; s=arc-20160816; b=Lrq509lYSqLAjvE+5BNGdPAEdXPMDSafyCxfzuUqg/fZmYBFLzh0HYMnt77ZRrA8tj Bn+YqnDuY70LkiSWdf0jWObBv5orGc+moHWop4dYeZ/1yn4i6DcIxWV1vmzAU9kG7+/f AfWEzBh61x1QYUsmeJRNsu940a01YFELoFTXEKClfZKooii8eQcbQsLhK6hCA61/wqI4 jWoGz0n9F9pxb5T7UEJVWuLn1ueWcVJVhbHATo3+S7/5IjEi69m+OaiXwjBmMSYQA7UF mFG01H1ihDxcH/VozNwTEPV3SpLjUmNYgoOOcreb0/ZbzTPgDTPrDhyIuukYz/ne2R8U elLg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=B3hCIHmzvgTWe9FTZ/PVZNKp/ekBKXovFff1jongxGg=; fh=ubgSGivyX1a6nEb6mxS2lPUzB/FQ53Lzp2BE7D6lOQ4=; b=Qe+Zx0k20WNegZJpegpkwf4OTP01mx+tARzmYbA7O2Ox0qyPDnL/ZS0JOI8+imZv5t ARiUlzgFMxIhlOY/hbjpedinwRSUayyW+sv8b6IfOFcmNNP+64nzEc5A8u5AGQAQIfGb LdKmdwIVV8gU6lv+8ma0V//dBVI4RF6N2Tw0nKtDsdMJjHye6XdwBzXDE7iuR/VRbKkA K9jLAFwoTWjV9+wRaiyf73wcop1OQ5I6wLjaR1KAoOeKc7+MvYhIi22Ct9LrKkSongbn dBzkZrIvgxLY6+4rs1+Zz6dBF8YUmmqX6iJGzAC0a5HUHd8vpCM8/M/orL055Fhg4afw 990Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=S+2hexO0; arc=pass (i=1 spf=pass spfdomain=ideasonboard.com dkim=pass dkdomain=ideasonboard.com); spf=pass (google.com: domain of linux-kernel+bounces-144173-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-144173-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id e11-20020a631e0b000000b005dc496a3597si6429180pge.417.2024.04.14.07.06.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 14 Apr 2024 07:06:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-144173-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=S+2hexO0; arc=pass (i=1 spf=pass spfdomain=ideasonboard.com dkim=pass dkdomain=ideasonboard.com); spf=pass (google.com: domain of linux-kernel+bounces-144173-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-144173-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 590E42815CE for ; Sun, 14 Apr 2024 14:06:42 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7892353E0D; Sun, 14 Apr 2024 14:06:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="S+2hexO0" Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) (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 B1DF43BB32; Sun, 14 Apr 2024 14:06:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=213.167.242.64 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713103593; cv=none; b=kyl8dSSYVvM2TjOeILYKGLPyDNQel/jP1vyYWZ6a8Ss8mRYiYKk1ivnSIX+ga2xOqDrrJ26PejZRea3cvI365qcWGA8M6JGY5LmuBb8KS4Dsy7JmuWGc2t/jPvR3KJwZ/h85RIXwkrR55xmpWdABJrUsMYWguRHQ5dsf9ZucwQ0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713103593; c=relaxed/simple; bh=97Kfxw2vJLy8VTdAPr/Shlmrhc9IMQ/bCXXl2Bnmxfo=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=kg65VArr6E1ZbXMAQBYwPrQrafjag3sTXWvEF6wyn/JM75nt/EqHeNDLBpgsEgw1VbHKbOcGNKML6gf6tZ1aVOzvzenyHud5L4fljlVCEeRyTsogphdXVdeMhqaGC6E/BX0aTqUX9Ldaz0Rt8RnDwjzHbLTf+w0lFgCU0hDMIcM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ideasonboard.com; spf=pass smtp.mailfrom=ideasonboard.com; dkim=pass (1024-bit key) header.d=ideasonboard.com header.i=@ideasonboard.com header.b=S+2hexO0; arc=none smtp.client-ip=213.167.242.64 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ideasonboard.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ideasonboard.com Received: from umang.jain (unknown [103.86.18.238]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 9F344512; Sun, 14 Apr 2024 16:05:42 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1713103544; bh=97Kfxw2vJLy8VTdAPr/Shlmrhc9IMQ/bCXXl2Bnmxfo=; h=From:To:Cc:Subject:Date:From; b=S+2hexO0BrTlysfPDX9VsBVsXOzWhoggaZ38DCENA05Gjj3jsODyiPrVZs2pW+82e tp6n58sPhn7+4HuWhRQjUUGf9i+42DTIRNrjc1oIwpEa7N83KCGGQ14x5Z8XZRIEYQ d6r1N+WFoRxCcLPC6s/S+xKeWMCCpRMzMJQx92YQ= From: Umang Jain To: linux-media@vger.kernel.org Cc: Alexander Shiyan , Kieran Bingham , Sakari Ailus , open list , Umang Jain Subject: [PATCH v7 0/6] media: imx335: 2/4 lane ops and improvements Date: Sun, 14 Apr 2024 19:36:15 +0530 Message-ID: <20240414140621.167717-1-umang.jain@ideasonboard.com> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Another batch of improvements of the imx335 driver. Patch 1/6 adds support for 2 or 4 lane operation modes. Patch 2/6 call the V4L2 fwnode device parser to handle controls that are standardised by the framework. Patch 3/6 introduces the use of CCI for registers access. Patch 4/6 uses decimal values for sizes registers (instead of hexadecimal). This improves overall readability Patch 5/6 fixes the height value discrepency. Accessible height is 1944, as per the data sheet Patch 6/6 fixes the max analogue gain value. changes in v7: - Shuffle CCI regs #defines for TPG and REG_INCLKSEL* in 3/6 - IMX335_REG_AGAIN -> IMX335_REG_GAIN in 6/6 as single gain register to handle both analogue and digital gain. Changes in v6: - Modify 2/6 to call v4l2_fwnode_device_parse() early in imx335_init_controls() and return early if error. - Treat v4l2_ctrl_new_fwnode_properties() as one of framework functions, hence check ctrl_hdlr->error should be sufficient as requested. Changes in v5: - Simplify error handling in 2/6. Check for ctrl_hdlr->error - Space fix around { } in 3/6. Drop /* undocumented * as well Changes in v4: - Do not change from window cropping mode in patch 4/6. In v3, the sensor was changed to all pixel scan mode to achieve height=1944, but it can be achieved in window cropping mode as well, by fixing the mode registers changes in v3: - fix patch 2/6 where we need to free ctrl handler on error path. changes in v2: - New patch 4/6 - Drop calculating the pixel clock from link freq. - CCI register address sort (incremental) - Fix cci_write for REG_HOLD handling and add a comment. - Remove unused macros as part of 3/6 Kieran Bingham (2): media: imx335: Support 2 or 4 lane operation modes media: imx335: Parse fwnode properties Umang Jain (4): media: imx335: Use V4L2 CCI for accessing sensor registers media: imx335: Use integer values for size registers media: imx335: Fix active area height discrepency media: imx335: Limit analogue gain value drivers/media/i2c/Kconfig | 1 + drivers/media/i2c/imx335.c | 636 ++++++++++++++++++------------------- 2 files changed, 304 insertions(+), 333 deletions(-) -- 2.43.0