mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/3] media: ak7375: Add AK7377 support
@ 2026-08-29  5:25 Jan-Michael Brummer
  2026-08-29  5:25 ` [PATCH] media: dt-bindings: ak7375: Add AK7377 Jan-Michael Brummer
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Jan-Michael Brummer @ 2026-08-29  5:25 UTC (permalink / raw)
  To: linux-media
  Cc: sakari.ailus, mchehab, robh, krzk+dt, conor+dt, tian.shu.qiu,
	devicetree, linux-kernel, Jan-Michael Brummer

The AK7377 drives the focus actuator of the main camera on the Fairphone
5, and is register compatible with the AK7375 already supported by this
driver: a 12 bit position in registers 0x00/0x01 shifted left by four,
and standby control in 0x02.  Patches 1 and 2 add the binding and the
compatible.

Patch 3 is a fix that is independent of the above and applies to every
user of this driver.  probe() calls pm_runtime_set_active() while the
regulators are still off, so the first runtime transition is a suspend
against an unpowered chip; it fails its I2C writes and then disables
regulators that were never enabled.  On the Fairphone 5 that showed up
as an -ENXIO from the first resume, after which focus control stayed
dead for the whole session even though the actuator answered fine on the
bus, and as a WARN from regulator_bulk_free() on unbind.

I can send patch 3 on its own if that is easier to route - it does not
depend on the other two.

Testing: the AK7377 on a Fairphone 5, driving the lens across its range
and checking that the image comes into focus, with an out-of-tree IMX800
sensor driver.  I have no AK7345 or AK7375 hardware, so patch 3 is
untested on those; the change moves the first runtime resume from probe
to the first focus request, and confirmation that this does not regress
them would be welcome.

Jan-Michael Brummer (3):
  media: dt-bindings: ak7375: Add AK7377
  media: i2c: ak7375: Add support for the AK7377
  media: i2c: ak7375: Do not mark the VCM active before powering it

 .../bindings/media/i2c/asahi-kasei,ak7375.yaml |  1 +
 drivers/media/i2c/ak7375.c                     | 45 ++++++++++++++++---
 2 files changed, 41 insertions(+), 5 deletions(-)

-- 
2.51.0

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-08-29  5:35 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-29  5:25 [PATCH 0/3] media: ak7375: Add AK7377 support Jan-Michael Brummer
2026-08-29  5:25 ` [PATCH] media: dt-bindings: ak7375: Add AK7377 Jan-Michael Brummer
2026-08-29  5:25 ` [PATCH 1/2] media: i2c: ak7375: Add support for the AK7377 Jan-Michael Brummer
2026-08-29  5:25 ` [PATCH 2/2] media: i2c: ak7375: Do not mark the VCM active before powering it Jan-Michael Brummer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®