mbox series

[v4,0/6] media: i2c: og01a1b: Add OF support to OmniVision OG01A1B

Message ID 20240830063459.3088895-1-vladimir.zapolskiy@linaro.org
Headers show
Series media: i2c: og01a1b: Add OF support to OmniVision OG01A1B | expand

Message

Vladimir Zapolskiy Aug. 30, 2024, 6:34 a.m. UTC
The change adds basic support of OmniVision OG01A1B image sensor on OF
platforms, and a few follow-up changes from the series extend runtime
power management support.

Previous version of the change is found as a shorter patchset:
v3 https://lore.kernel.org/all/20240823102731.2240857-1-vladimir.zapolskiy@linaro.org/
v2 https://lore.kernel.org/all/20240813102035.1763559-1-vladimir.zapolskiy@linaro.org/
v1 https://lore.kernel.org/all/20240620124745.1265011-1-vladimir.zapolskiy@linaro.org/

Changes from v3 to v4:
* inserted correct delays in power up/down sequences, thanks to Sakari.

Changes from v2 to v3 (no code changes):
* fix of a typo in a commit message found by Kieran,
* updated a commit subject per ask from Rob Herring,
* added a review tag given by Conor Dooley.

Changes from v1 to v2:
* updated device tree documentation according to review comments received
  from Krzysztof and Sakari,
* extended runtime power management support, added functional support of
  optional XSHUTDOWN GPIO, XVCLK supply clock and 3 supply regulators.

Vladimir Zapolskiy (6):
  media: dt-bindings: Add OmniVision OG01A1B image sensor
  media: i2c: og01a1b: Add OF support to the image sensor driver
  media: i2c: og01a1b: Add stubs of runtime power management functions
  media: i2c: og01a1b: Add support of xvclk supply clock in power
    management
  media: i2c: og01a1b: Add management of optional reset GPIO
  media: i2c: og01a1b: Add management of optional sensor supply lines

 .../bindings/media/i2c/ovti,og01a1b.yaml      | 107 ++++++++++
 MAINTAINERS                                   |   1 +
 drivers/media/i2c/og01a1b.c                   | 187 ++++++++++++++++--
 3 files changed, 281 insertions(+), 14 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/media/i2c/ovti,og01a1b.yaml

Comments

Sakari Ailus Aug. 30, 2024, 9:18 a.m. UTC | #1
Hi Vladimir,

On Fri, Aug 30, 2024 at 09:34:57AM +0300, Vladimir Zapolskiy wrote:
> @@ -970,13 +978,32 @@ static int og01a1b_check_hwcfg(struct device *dev)
>  /* Power/clock management functions */
>  static int og01a1b_power_on(struct device *dev)
>  {
> -	/* Device is already turned on by i2c-core with ACPI domain PM. */
> +	unsigned long delay = DIV_ROUND_UP(8192 * USEC_PER_SEC, OG01A1B_MCLK);

This is a problem, the first argument overflows. I'll just add UL specifier
to the value to fix it if that's ok.