From patchwork Thu Jan 26 16:59:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacopo Mondi X-Patchwork-Id: 647437 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2FB81C54E94 for ; Thu, 26 Jan 2023 16:59:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231618AbjAZQ7c (ORCPT ); Thu, 26 Jan 2023 11:59:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37432 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229849AbjAZQ7b (ORCPT ); Thu, 26 Jan 2023 11:59:31 -0500 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3388727981 for ; Thu, 26 Jan 2023 08:59:30 -0800 (PST) Received: from uno.LocalDomain (93-61-96-190.ip145.fastwebnet.it [93.61.96.190]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id A73712B3; Thu, 26 Jan 2023 17:59:26 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1674752367; bh=4gMgkVpuTwZx/7TWies+0O4+JNsHmWgMyCkHHim8mlQ=; h=From:To:Cc:Subject:Date:From; b=q2pE4xF4a4nB8uRl1+oQXVcHB80K4HGjApeS+apsGXiv2V2gsQRV7AmWXkDmLfcLz d+oGHjJDp+VxMSZikRMctda9qDwehKyTqBsjwMCK2pTjX9nidXOjbv27nUhpgole3C m6U61KKk5gA5cAbtEkKV0VaGlkYzY+ozB2gqwv7g= From: Jacopo Mondi To: Chiranjeevi Rapolu , Luca Weiss Cc: Jacopo Mondi , laurent.pinchart@ideasonboard.com, sakari.ailus@iki.fi, Mauro Carvalho Chehab , linux-media@vger.kernel.org Subject: [PATCH v6 0/9] media: i2c: ov5670: OF support, runtime_pm, regulators Date: Thu, 26 Jan 2023 17:59:00 +0100 Message-Id: <20230126165909.121302-1-jacopo.mondi@ideasonboard.com> X-Mailer: git-send-email 2.39.0 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Hello this small series introduces OF support for the ov5670 sensor and adds support for regulators clocks and GPIOs. Last year I dropped the ball as I didn't have access to HW anymore. Luca (in cc) has reported he has a sensor and might give this new version a spin, thanks! Cheers j v5->v6: - Rework clock parsing as suggested by Sakari - Move runtime_pm enablement after async subdev registration - Use DIV_ROUND_UP to round clock freq v4->v5: - Enable clock in ov5670_runtime_resume() as suggested by Luca - Add a patch to handle HBLANK, PIXEL_RATE and LINK_FREQ in .set_ctrl() to fix a warning again reported by Luca v3->v4: - Rework power enablement in power up sequence to support !CONFIG_OF - Minor changes as per Sakari's review v2->v3: - bindings: - Drop assigned-clock properties from schema (moved to example) - s/pwdn-gpios/powerdown-gpios/ - driver - Use is_of_node() to decide how to parse clocks - Fix: drivers/media/i2c/ov5670.c:1787:18: error: initializer element is not a compile-time constant .analog_crop = ov5670_analog_crop, ^~~~~~~~~~~~~~~~~~ reported by kernel test robot and Nathan Chancellor with clang15 and gcc < 8 v1->v2: - Address Krzysztof comments on bindings - 2/8: new patch to use the common clock framework - Address Lauren's comment on runtime_pm function names - 7/8: new patch to implement init_cfg as suggested by Laurent - Rework 8/8 which was incorrect as reported by Laurent Thanks j Jacopo Mondi (8): media: dt-bindings: Add OV5670 media: i2c: ov5670: Allow probing with OF media: i2c: ov5670: Use common clock framework media: i2c: ov5670: Probe regulators media: i2c: ov5670: Probe GPIOs media: i2c: ov5670: Add runtime_pm operations media: i2c: ov5670: Implement init_cfg media: i2c: ov5670: Handle RO controls in set_ctrl Jean-Michel Hautbois (1): media: i2c: ov5670: Add .get_selection() support .../bindings/media/i2c/ovti,ov5670.yaml | 92 ++++++ MAINTAINERS | 1 + drivers/media/i2c/ov5670.c | 312 +++++++++++++++--- 3 files changed, 360 insertions(+), 45 deletions(-) create mode 100644 Documentation/devicetree/bindings/media/i2c/ovti,ov5670.yaml Tested-by: Luca Weiss --- 2.39.0