diff options
| author | Hans de Goede <johannes.goede@oss.qualcomm.com> | 2025-12-30 18:03:03 +0100 |
|---|---|---|
| committer | Hans Verkuil <hverkuil+cisco@kernel.org> | 2026-01-14 23:33:04 +0100 |
| commit | 84359d0a5e3afce5e3e3b6562efadff690614d5b (patch) | |
| tree | fe574ad9483b64ba829ab9ba5629d0f955e34795 /tools/lib/python/kdoc | |
| parent | 432d109333afd674a416a061b98264bfcd5f0515 (diff) | |
| download | linux-84359d0a5e3afce5e3e3b6562efadff690614d5b.tar.gz linux-84359d0a5e3afce5e3e3b6562efadff690614d5b.zip | |
media: mt9m114: Avoid a reset low spike during probe()
mt9m114_probe() requests the reset GPIO in output low state:
sensor->reset = devm_gpiod_get_optional(dev, "reset", GPIOD_OUT_LOW);
and then almost immediately afterwards calls mt9m114_power_on() which does:
gpiod_set_value(sensor->reset, 1);
fsleep(duration);
gpiod_set_value(sensor->reset, 0);
which means that if the reset pin was high before this code runs that
it will very briefly be driven low because of passing GPIOD_OUT_LOW when
requesting the GPIO only to be driven high again possibly directly after
that. Such a very brief driving low of the reset pin may put the chip in
a confused state.
Request the GPIO in high (reset the chip) state instead to avoid this,
turning the initial gpiod_set_value() in mt9m114_power_on() into a no-op.
and the fsleep() ensures that it will stay high long enough to properly
reset the chip.
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Hans de Goede <johannes.goede@oss.qualcomm.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
Diffstat (limited to 'tools/lib/python/kdoc')
0 files changed, 0 insertions, 0 deletions
