There is no need to clear the ISP sink-pad crop and source-pad
compose rectangles on release of the /dev/video# file.
Both will be reset by atomisp_set_fmt() which is guaranteed to
get called by atomisp_queue_setup() (if not called already)
before another stream starts and thus before these selections
are used again.
Also the file injection support the comment talks about has long
been dropped from the driver.
Reviewed-by: Andy Shevchenko <andy@kernel.org>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
struct atomisp_platform_data only has a single subdevs member. Remove
this struct and replace atomisp_get_platform_data() with
atomisp_platform_get_subdevs().
Note atomisp_get_platform_data() and now atomisp_platform_get_subdevs()
always succeed, so while at it also remove unnecessary error checking.
Reviewed-by: Andy Shevchenko <andy@kernel.org>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
VCM support has already been removed from the main atomisp driver
in commit 7473c97dd8d0 ("media: atomisp: Remove custom VCM handling")
remove the left-over dead VCM handling from the gmin platform code.
Reviewed-by: Andy Shevchenko <andy@kernel.org>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
intel_v4l2_subdev_type / atomisp_input_subdev.type now always is
RAW_CAMERA, drop it.
Reviewed-by: Andy Shevchenko <andy@kernel.org>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
After removing the flash support frame_status now always is
ATOMISP_FRAME_STATUS_OK aka 0. Drop frame_status tracking.
This also means one less atomisp custom use for the vb2_buffer->reserved*
fields (all custom use of these fields should be removed).
While at it also remove the no longer used vf_frame pointer from
struct atomisp_sub_device.
Reviewed-by: Andy Shevchenko <andy@kernel.org>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Remove the custom flash handling from the atomisp driver. There are
only few Bay Trail / Cherry Trail devices with flash and if those will
ever get supported then this should be done through the new standard
include/linux/led-class-flash.h APIs instead of with atomisp specific
custom APIs.
Reviewed-by: Andy Shevchenko <andy@kernel.org>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Drop the atomisp custom lm3554 flash driver, support for flash drivers
using the custom atomisp flash interface is going to be removed from
the atomisp driver.
If flash supports for the lm3554 turns out to be necessary on some
atomisp devices in the future then this should be re-implemented
using the new include/linux/led-class-flash.h APIs.
The atomisp specific lm3554 driver could still be usable as a reference
for how to use / driver the lm3554 for a future re-implementation
using standardized APIs, but for that it can be retrieved from
the git history.
Reviewed-by: Andy Shevchenko <andy@kernel.org>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Change the single, unexpected user of CSI_PORT0_ID
for (port = CSI_PORT0_ID; port < N_CSI_PORTS; port++)
to
for (port = 0; port < N_CSI_PORTS; port++) {
matching all the other for-loops iterating over the ports in
the same file.
And remove the now fully unused input_port_ID_t enum type.
Reviewed-by: Andy Shevchenko <andy@kernel.org>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
The TPG support registers a v4l2-subdev for this, but this is not part of
the media-controller graph in any way. After manually selecting the TPG
as input using the s_input ioctl it does not work.
Several supported sensors have their own working TPG and using the sensor's
TPG means that the same data-flow is used as with actual sensors rather
then the quite different data-flow from the ISP's builtin TPG.
Remove the broken TPG support, when a test-pattern is needed for testing
a sensor's TPG can be used. Using a sensor's TPG is actually better for
testing since then the actual normal data-flow is being tested.
Reviewed-by: Andy Shevchenko <andy@kernel.org>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
The atomisp driver now properly ensures s_power(1) is called before calling
the set_fmt() callback, so this workaround is no longer necessary.
Reviewed-by: Andy Shevchenko <andy@kernel.org>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
The media-controller core (__media_entity_setup_link()) already checks
that the pads of the link are not streaming before calling the setup_link()
pad-op so calling atomisp_pipe_check() is not necessary;
and taking isp->mutex inside the setup_link() pad-op leads to a possible
ABBA deadlock vs the media-device graph_mutex which in the case of
the setup_link() pad-op is taken before calling the op, while in other
scenarios the graph_mutex is taken after the isp->mutex.
Reviewed-by: Andy Shevchenko <andy@kernel.org>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Call media_pipeline_alloc_start() from atomisp_start_streaming() to mark
all involved subdevs as busy so that the links cannot be changed through
the media-controller APIs while streaming.
Reviewed-by: Andy Shevchenko <andy@kernel.org>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Most sensor drivers report V4L2_FIELD_NONE as v4l2_mbus_framefmt.field
value. Propagate this to the v4l2_mbus_framefmt for the CSI port to pass
the link validation done by media_pipeline_start().
Keep the v4l2_mbus_framefmt.field for the source pad of the CSI port
as V4L2_FIELD_ANY to match the ISP sink pad.
Reviewed-by: Andy Shevchenko <andy@kernel.org>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
So far the CSI port sink and source pads have not had their fmt set at all,
leaving things at the default of SBGGR8_1X8/0x0.
This means that pipeline validation such as e.g. done when calling
media_pipeline_start() will fail since the links to / from the CSI
ports have different fmts on each end.
Store a pointer to the CSI port v4l2-subdev in struct atomisp_input_subdev,
and use this in atomisp_set_sensor_crop_and_fmt() to propagate the sensors
new fmt after a successful set_fmt to the CSI port it is connected too.
The input->csi_port pointer also allows simplifying atomisp_link_setup().
Reviewed-by: Andy Shevchenko <andy@kernel.org>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Add a new atomisp_setup_input_links() helper which ensures that
the CSI-receiver -> ISP link for input_curr is marked as enabled and
the other CSI-receiver -> ISP links are disabled.
And call this helper from atomisp_register_device_nodes() for the initial
setup and from atomisp_select_input() for runtime input_curr changes.
Reviewed-by: Andy Shevchenko <andy@kernel.org>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Simplify the checking of the input argument to atomisp_s_input():
- Remove the check for input >= ATOM_ISP_MAX_INPUTS, input_cnt
never is > ATOM_ISP_MAX_INPUTS so checking only that is sufficient
- Remove the unnecessary camera local variable
- Move the 2 invalid argument checks to above the atomisp_pipe_check()
which checks if the pipe is busy or not
Reviewed-by: Andy Shevchenko <andy@kernel.org>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
When switching input/sensor the s_power() callback must be called
for old sensor drivers to power on the new sensor and power off
the previous sensor.
atomisp_s_input() already does this but atomisp_link_setup()
did not do this.
Add a new atomisp_select_input() helper which does this and use this
in both atomisp_s_input() and atomisp_link_setup() for consistent
behavior.
Also make atomisp_link_setup() turn the sensor back off when
a link gets disabled.
Reviewed-by: Andy Shevchenko <andy@kernel.org>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
ATM the atomisp driver does not call s_power() at all when no s_input
ioctl() is done by the application. This breaks older sensor drivers
which rely on s_power() for power-management.
Some drivers have worked around this, e.g. commit c5fafbadae ("media:
atomisp: gc0310: Power on sensor from set_fmt() callback") and
commit b3118a942c ("media: atomisp: ov2722: Power on sensor from
set_fmt() callback"), but this really should be fixed in the atomisp
driver itself, so that all old drivers can work.
A logical place to call s_power() would be from atomisp_start_streaming() /
atomisp_stop_streaming(). But some older drivers, e.g. the atomisp-ov2722
driver already write mode related registers on set_fmt() instead of waiting
on stream on. So the s_power(1) needs to happen at the first set_fmt().
Add an atomisp_s_sensor_power(..., 1) call just before calling set_fmt()
for this. If the power was already enabled through e.g. a s_input ioctl
atomisp_s_sensor_power() will skip calling the s_power() v4l2-subdev-op
a second time.
Reviewed-by: Andy Shevchenko <andy@kernel.org>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Since the atomisp driver only supports 1 stream / only has 1 asd now,
there is no longer a need to track which stream owns the sensor.
So the asd owner-pointer of struct atomisp_input_subdev can be dropped,
replace this with a simple camera_on boolean and add a new
atomisp_s_sensor_power() helper which takes care of avoiding unbalanced
s_power() subdev calls as well as takes care of handling the special
-ENOIOCTLCMD return for subdevs which don't implement s_power().
Reviewed-by: Andy Shevchenko <andy@kernel.org>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
gmin_i2c_dev_exists() is using open-coded variant of
i2c_find_device_by_fwnode(). Replace it with a corresponding call.
Link: https://lore.kernel.org/r/20240326202813.1425431-3-andriy.shevchenko@linux.intel.com
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
We don't use the PMIC I²C client device after getting its address.
Drop the reference to it. We do not expect device to disappear
as it should be taken care by the OpRegion drivers.
Link: https://lore.kernel.org/r/20240326202813.1425431-2-andriy.shevchenko@linux.intel.com
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Entire defs.h can be killed, so do that.
Also kill same macro definitions in hive_types.h
Link: https://lore.kernel.org/r/20240326190903.1422069-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
This patch makes the following changes:
* Removes spurious whitespace after the opening parentheses as per code
style guidelines
Link: https://lore.kernel.org/r/20240227163043.112162-2-bergh.jonathan@gmail.com
Signed-off-by: Jonathan Bergh <bergh.jonathan@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
This patch makes the following fixes:
* Reformats a number of multiline block comments to ensure * and */ align
correctly
Link: https://lore.kernel.org/r/20240227163043.112162-1-bergh.jonathan@gmail.com
Signed-off-by: Jonathan Bergh <bergh.jonathan@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
This patch fixes the following minor code and code style issues:
* Removes a block of commented out (unused) code from the src
* Reformats various multiline block comments to meet the kernel code
style guidelines for block comments
Link: https://lore.kernel.org/r/20240226194023.69070-7-bergh.jonathan@gmail.com
Signed-off-by: Jonathan Bergh <bergh.jonathan@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
This patch makes the following change:
* Removes an unnecessary 'return' statement from a void function
implementation
Link: https://lore.kernel.org/r/20240226194023.69070-6-bergh.jonathan@gmail.com
Signed-off-by: Jonathan Bergh <bergh.jonathan@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
This patch makes the following changes:
* Removes additional, unnecessary parentheses from a conditional "if"
statement
Link: https://lore.kernel.org/r/20240226194023.69070-5-bergh.jonathan@gmail.com
Signed-off-by: Jonathan Bergh <bergh.jonathan@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
This patch fixes the following minor code style issues:
* Ensure trailing statements are located on a newline
* Removes an instance of a spurious whitespace following a conditional
statement
Link: https://lore.kernel.org/r/20240226194023.69070-4-bergh.jonathan@gmail.com
Signed-off-by: Jonathan Bergh <bergh.jonathan@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
This code fixes a code style issue where:
* Checkpatch suggests using "unsigned int *" rather than a bare
"unsigned *" declaration in the code
Link: https://lore.kernel.org/r/20240226194023.69070-3-bergh.jonathan@gmail.com
Signed-off-by: Jonathan Bergh <bergh.jonathan@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
This patch does the following things:
* Tidies up code in several places where braces were used in conjunction
with single line conditional statements
Link: https://lore.kernel.org/r/20240226194023.69070-2-bergh.jonathan@gmail.com
Signed-off-by: Jonathan Bergh <bergh.jonathan@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
This patch fixes the following code style and formatting issues:
* Ensure multiline block comments are correctly formatted
* Remove extra braces not required for single line conditional statements
Link: https://lore.kernel.org/r/20240225155359.41435-1-bergh.jonathan@gmail.com
Signed-off-by: Jonathan Bergh <bergh.jonathan@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
This patch fixes the following formatting issues:
* Fix various misaligned * and */ in multiline block comments
* Remove unnecessary braces from single line conditional statements
* Remove repeated word "from" from comment
Link: https://lore.kernel.org/r/20240225120350.31226-1-bergh.jonathan@gmail.com
Signed-off-by: Jonathan Bergh <bergh.jonathan@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
When starting a new stream initialize the sequence counters to 0
instead of -1. This fixes the following libcamera warning:
Zero sequence expected for first frame (got 4294967295)
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Disable V4L2_PIX_FMT_RGBX32 support, because it is broken.
Selecting V4L2_PIX_FMT_RGBX32 output shows vertical columns with random
data. For each 128 pixels in a row the last 28 (32?) or so pixels contain
random data.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
V4L2_PIX_FMT_RGB32 is deprecated because its definition never made
clear if the 4th byte was alpha data or unused. Instead either
V4L2_PIX_FMT_ARGB32 or V4L2_PIX_FMT_RGBX32 should be used.
V4L2_PIX_FMT_RGB32 internally is mapped to IA_CSS_FRAME_FORMAT_RGBA888
and ia_css_frame_format.h says that the alpha bits there are unused,
so replace V4L2_PIX_FMT_RGB32 with V4L2_PIX_FMT_RGBX32.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Some userspace apps (e.g. libcamera) do not like it if the enum_fmts
ioctl returns the same fmt twice. Drop the second "do not use"
V4L2_PIX_FMT_UYVY entry for parallel sensors to fix this.
The current atomisp code does not support anything other then raw bayer
sensors anyways, so dropping this is not an issue.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
The subtract in this condition is reversed. The ->length is the length
of the buffer. The ->bytesused is how many bytes we have copied thus
far. When the condition is reversed that means the result of the
subtraction is always negative but since it's unsigned then the result
is a very high positive value. That means the overflow check is never
true.
Additionally, the ->bytesused doesn't actually work for this purpose
because we're not writing to "buf->mem + buf->bytesused". Instead, the
math to calculate the destination where we are writing is a bit
involved. You calculate the number of full lines already written,
multiply by two, skip a line if necessary so that we start on an odd
numbered line, and add the offset into the line.
To fix this buffer overflow, just take the actual destination where we
are writing, if the offset is already out of bounds print an error and
return. Otherwise, write up to buf->length bytes.
Fixes: 9cb2173e6e ("[media] media: Add stk1160 new driver (easycap replacement)")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Ricardo Ribalda <ribalda@chromium.org>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
The JPEG decoder/encoder present in iMX8QXP and iMX8QM SoCs need
the PER and IPG clocks to be functional, so add the clock entries.
This also fixes the following schema warning:
imx8qm-apalis-eval.dtb: jpegdec@58400000: 'assigned-clock-rates', 'assigned-clocks', 'clock-names', 'clocks' do not match any of the regexes: 'pinctrl-[0-9]+'
from schema $id: http://devicetree.org/schemas/media/nxp,imx8-jpeg.yaml#
Signed-off-by: Fabio Estevam <festevam@denx.de>
Signed-off-by: Mirela Rabulea <mirela.rabulea@nxp.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Ensure that drivers set max_num_buffers to a value >= 32.
For now there is no reason for drivers to request a lower
limit and doing so might potentially cause userspace issues.
Note that the old check of > MAX_BUFFER_INDEX was pointless
since q->max_num_buffers was already limited to MAX_BUFFER_INDEX
or less.
Also add a sanity check in __vb2_init_fileio(), returning
-ENOSPC if a driver returns more than 32 buffers from
VIDIOC_REQBUFS with count = q->min_reqbufs_allocation.
The vb2_fileio_data struct only supports up to 32 buffers,
so we need a check there.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
The error that V4L2 returns when an attempt is made to open an
unregisted device node is ENODEV, no ENXIO. Update the documentation.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
If the CEC device is unregistered, then an attempt to open
the device node should result in an -ENODEV error instead of
-ENXIO.
Document this as well in cec-func-open.rst.
This is consistent with the error code returned by other
file operations such as ioctl.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
After the new V4L2 device node was registered, some additional
initialization was done before the device node was marked as
'registered'. During the time between creating the device node
and marking it as 'registered' it was possible to open the
device node, which would return -ENODEV since the 'registered'
flag was not yet set.
Hold the videodev_lock mutex from just before the device node
is registered until the 'registered' flag is set. Since v4l2_open
will take the same lock, it will wait until this registration
process is finished. This resolves this race condition.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Reviewed-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Cc: <stable@vger.kernel.org> # for vi4.18 and up
-----BEGIN PGP SIGNATURE-----
iJgEABYKAEAWIQTAnvhxs4J7QT+XHKnMPy2AAyfeZAUCZiJiwyIcbGF1cmVudC5w
aW5jaGFydEBpZGVhc29uYm9hcmQuY29tAAoJEMw/LYADJ95kLugBAOcLTOwWAJn7
D4YFSSN/ak9ycnNeD+ixIgjTAttrJrTYAP4s3hitW4k0P6rhGbAjYGlOvKNk4fbx
M4MxokoXVd0gDw==
=fWyC
-----END PGP SIGNATURE-----
Merge tag 'tags/media-next-uvc-20240419' of git://git.kernel.org/pub/scm/linux/kernel/git/pinchartl/linux.git into media_stage
uvcvideo fixes:
Ricardo Ribalda (3):
media: uvcvideo: Add quirk for Logitech Rally Bar
media: uvcvideo: Fix power line control for Shine-Optics Camera
media: uvcvideo: Disable autosuspend for Insta360 Link
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Link: https://patchwork.linuxtv.org/project/linux-media/patch/20240419125149.GA2125@pendragon.ideasonboard.com/
Add description for 'struct regmap *cci' member of struct imx335.
This will fix the following compile-time warning:
warning: Function parameter or struct member 'cci' not described in 'imx335'
Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
On some ACPI platforms, such as Chromebooks the ACPI methods to
change the power-state (_PS0 and _PS3) fully take care of powering
on/off the sensor.
On other ACPI platforms, such as e.g. various HP models with IPU6 +
hi556 sensor, the sensor driver must control the avdd regulator itself.
Add support for having the driver control the sensor's avdd regulator.
Note this relies on the regulator-core providing a dummy regulator
(which it does by default) on platforms where Linux is not aware of
the avdd regulator.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
On some ACPI platforms, such as Chromebooks the ACPI methods to
change the power-state (_PS0 and _PS3) fully take care of powering
on/off the sensor.
On other ACPI platforms, such as e.g. various HP models with IPU6 +
hi556 sensor, the sensor driver must control the sensor's clock itself.
Add support for having the driver control an optional clock.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
On some ACPI platforms, such as Chromebooks the ACPI methods to
change the power-state (_PS0 and _PS3) fully take care of powering
on/off the sensor.
On other ACPI platforms, such as e.g. various HP models with IPU6 +
hi556 sensor, the sensor driver must control the reset GPIO itself.
Add support for having the driver control an optional reset GPIO.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
With ipu bridge, endpoints may only be created when ipu bridge has
initialised. This may happen after the sensor driver has first probed.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Add camera orientation and sensor rotation controls using
the v4l2_fwnode_device_parse() and v4l2_ctrl_new_fwnode_properties()
helpers.
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>