summaryrefslogtreecommitdiff
path: root/drivers/media/i2c
AgeCommit message (Collapse)Author
3 daysMerge branch 'next' of git://linuxtv.org/media-ci/media-pending.gitMark Brown
11 daysmedia: video-i2c: fix kthread error pointer left in kthread_vid_cap on failureUday Khare
kthread_run() returns an ERR_PTR on failure, not NULL. When start_streaming() fails, data->kthread_vid_cap is left holding this error pointer instead of being cleared. This causes two subsequent bugs: 1. A future call to start_streaming() sees a non-NULL kthread_vid_cap and returns 0 (success) immediately, without actually starting the capture thread. 2. A call to stop_streaming() checks 'kthread_vid_cap == NULL' which is false for an error pointer, and proceeds to call kthread_stop() on the error pointer, leading to a kernel crash. Fix this by resetting kthread_vid_cap to NULL on failure before jumping to the error path. Fixes: 5cebaac60974 ("media: video-i2c: add video-i2c driver") Cc: stable@vger.kernel.org Signed-off-by: Uday Khare <udaykhare77@gmail.com> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
11 daysmedia: imx355: Remove storing cur_mode in the stateDave Stevenson
All the information for the mode is now stored within the subdev state, so configure the sensor based on that. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
11 daysmedia: imx355: Switch to using the subdev stateDave Stevenson
The subdev state is now preferred rather than handling crop and format within the driver state, so switch the driver to using it. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
11 daysmedia: imx355: Support 2 lane readoutDave Stevenson
The sensor supports 2 or 4 lane readout, but the driver only allowed for 4 lanes. Add 2 lane support. The clock tree only supports single PLL mode to feed both IOP (MIPI) and IVT (Pixel array). 2 lane mode supports a MIPI link frequency of up to 445MHz (890Mbit/s) cf 360MHz (720Mbit/s) for 4lane. Update clock setup and pixel rates to match. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
11 daysmedia: imx355: Compute link frequency from PLL setupDave Stevenson
In preparation for additional options in the PLL setup, compute the link frequency rather than using a hardcoded value. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
11 daysmedia: imx355: Use NULL ctrl_ops for HBLANK as it is a read-only controlDave Stevenson
This avoids the set_ctrl handler being called under any circumstances, as it will return an error for the unhandled ctrl. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
11 daysmedia: imx355: Define the exposure offset, and use that defineDave Stevenson
The difference between frame length and max exposure time in lines is 10. That had been used as a bare value in calculations. Move it to a define, and use that define. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
11 daysmedia: imx355: Set the colorspace in the formatDave Stevenson
The colorspace fields were left set to 0 when they should be set appropriately for a raw image sensor. Add those values. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
11 daysmedia: imx355: Convert to new CCI register access helpersDave Stevenson
Use the new comon CCI register access helpers to replace the private register access helpers in the imx355 driver. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
11 daysmedia: imx355: Use pm_runtime autosuspend_delayDave Stevenson
Avoid powering the sensor up and down unnecessarily by using pm_runtime's autosuspend_delay feature. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
11 daysmedia: imx355: Add support for get_selectionDave Stevenson
Provide all the cropping information via get_selection. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
11 daysmedia: imx355: Remove redundant fll_min, and implement fixed offsetDave Stevenson
fll_min (Frame Length Lines) is set to the same value as fll_def for all modes, which makes it redundant. The actual value is also erroneous as the sensor works in all the defined modes with FLL set at the mode height + 20 lines, so set the vblank control minimum to 20 rather than varying it. This also improves the maximum frame rate achievable. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
11 daysmedia: imx355: pixel_rate never changes, so don't recomputeDave Stevenson
The pixel rate is always the same, so there is no need to try and recompute it in imx355_set_pad_format, and then no need to have the pointer to it stored. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
11 daysmedia: imx355: Remove link_freq_index from each mode as ununsedDave Stevenson
The link_freq_index value in imx355_mode is unused, so remove it. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
11 daysmedia: imx355: Set binning mode registers programmaticallyDave Stevenson
Compute the binning registers based on the difference between the mode width/height vs the crop width/height. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
11 daysmedia: imx355: Set register LINE_LENGTH_PCK programmaticallyDave Stevenson
The driver already has the LLP value stored in the mode structure, but also had the same value set via register writes in the mode's register list. Remove this duplication. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
11 daysmedia: imx355: Programmatically set the crop parameters for each modeDave Stevenson
Currently the cropping is set via register entries in the per mode register lists. Add the crop information to the mode structure as a v4l2_rect, and set the registers programmatically. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
11 daysmedia: imx355: Remove setting FRM_LENGTH_LINES in the mode regsDave Stevenson
Registers 0x0340 and 0x0341 (FRM_LENGTH_LINES) are already written from the set_ctrl(V4L2_CID_VBLANK) handler, so don't write them from the mode register list. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
11 daysmedia: imx355: Remove duplicated registers from the mode tablesDave Stevenson
A large number of registers are identical within all the modes. Move those to imx355_global_regs. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
11 daysmedia: imx355: Add support for 24 MHz external clockDavid Heidelberg
The IMX355 sensor supports multiple external clock frequencies, including 19.2 MHz and 24 MHz. The driver currently supports only fixed 19.2 MHz input clock. Refactor the clock handling to make the PLL configuration dependent on the external clock frequency and add support for 24 MHz. Introduce a table of clock parameter sets and program the corresponding EXTCLK frequency and PLL multipliers to maintain consistent internal VCO frequencies across supported inputs. The PLL settings are adjusted so that OP VCO remains at 720 MHz This preserves existing timing characteristics while allowing systems using a 24 MHz clock to operate correctly. No functional change for existing 19.2 MHz users. Assisted-by: Claude:claude-opus-4-6 Signed-off-by: David Heidelberg <david@ixit.cz> Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
11 daysmedia: imx355: Avoid calling imx355_power_off twice in error pathDave Stevenson
If v4l2_async_register_subdev_sensor failed, then the sensor had already been powered down by pm_runtime_idle, but the error path then also explicitly called imx355_power_off as well. That left an imbalance in the regulator and clock calls. Call pm_runtime_idle only after v4l2_async_register_subdev_sensor succeeds to avoid this. Fixes: efa5fe19c0a9 ("media: imx355: Enable runtime PM before registering async sub-device") Cc: stable@vger.kernel.org Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
11 daysmedia: i2c: vd55g1: Add support for vd55g4Benjamin Mugnier
vd55g4 is the same device as vd65g4 but outputs in monochrome instead of RGB. Adapt the driver structure according to this new variant, and add its support. Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com> Signed-off-by: Benjamin Mugnier <benjamin.mugnier@foss.st.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
11 daysmedia: i2c: vd55g1: Fix manual digital gain on color variantBenjamin Mugnier
Apply digital gain to all channels, each channel representing a color. Cc: stable@vger.kernel.org Fixes: e138e7f00042 ("media: i2c: vd55g1: Add support for vd65g4 RGB variant") Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com> Signed-off-by: Benjamin Mugnier <benjamin.mugnier@foss.st.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
11 daysmedia: i2c: vd55g1: Remove spurious pad format update on init_state()Benjamin Mugnier
vd55g1_update_pad_fmt() is called in vd55g1_init_state(). But vd55g1_set_pad_fmt(), called at the end of vd55g1_init_state(), also calls vd55g1_update_pad_fmt() itself. Enhance readability and clear confusion by only preparing the format in vd55g1_init_state() and let vd55g1_set_pad_fmt() update it instead, effectively calling it only 1 time instead of 2. Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com> Signed-off-by: Benjamin Mugnier <benjamin.mugnier@foss.st.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
11 daysmedia: i2c: vd55g1: Fix media bus code initializationBenjamin Mugnier
In the driver initialization, the index of the default media bus code from the supported media bus code array is passed directly to the vd55g1_get_fmt_code() function instead of the proper media bus code. This works correctly as a proper media bus code is set after initialization but could not have been the case. This also resulted in mutliple "Unsupported mbus format" error messages. Retrieve the media bus code from the media bus code array, and pass this media bus code to vd55g1_get_fmt_code() instead of the code index. Rename VD55G1_MBUS_CODE_DEF to VD55G1_MBUS_CODE_IDX_DEF and VD55G1_MODE_DEF to VD55G1_MODE_IDX_DEF while at it to avoid future confusions. Display the guilty error code in warning message. Cc: stable@vger.kernel.org Fixes: e138e7f00042 ("media: i2c: vd55g1: Add support for vd65g4 RGB variant") Signed-off-by: Benjamin Mugnier <benjamin.mugnier@foss.st.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
11 daysmedia: i2c: ov8865: Program the sensor on stream startJurison Murati
The sensor registers are only written in the runtime PM resume handler; ov8865_set_fmt() merely stores the requested mode, relying on the sensor being runtime suspended between uses so that the next resume applies it. That assumption breaks when something keeps the sensor powered. On IPU3 platforms, ipu_bridge instantiates the VCM device with a DL_FLAG_PM_RUNTIME device link to the sensor, so a userspace process holding the VCM subdev open (e.g. wireplumber's camera monitor) pins the sensor runtime-active. A subsequent set_fmt() then never reaches the hardware: the sensor keeps streaming the mode programmed on the last resume while the CSI-2 receiver expects the newly negotiated format. On a Surface Book 2 (IPU3, ov8865 + dw9719 VCM), requesting the 3264x2448 mode while the hardware was left programmed for the 1632x1224 binned mode makes ipu3-cio2 report "frame sync error" and "payload length is 10340352, received 2585088" (exactly one binned frame) for every frame, and the inverse case stalls the stream after a single frame. Camera applications end up displaying one bogus frame forever. Program the sensor configuration and apply the control values on stream start instead, where the negotiated mode is always current, and only write the configuration in the runtime PM resume handler when resuming with the stream already started. Signed-off-by: Jurison Murati <eng.juri@gmail.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
11 daysmedia: i2c: ov8865: Drop the runtime PM usage count on stream failureJurison Murati
ov8865_s_stream() takes a runtime PM reference when enabling the stream, but returns without releasing it if ov8865_sw_standby() fails, leaving the reference unbalanced and the sensor powered indefinitely. The same applies to a failure while disabling the stream, in which case the reference acquired at stream start is never dropped. Drop the reference in a single place, both when disabling the stream and on failure, and only update the streaming state on success. Signed-off-by: Jurison Murati <eng.juri@gmail.com> Reviewed-by: Daniel Scally <dan.scally@ideasonboard.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
11 daysmedia: i2c: gc0310: Use devm_v4l2_sensor_clk_get()Sanjay Chitroda
Several camera sensor drivers access the "clock-frequency" property directly to retrieve the external clock rate or handle the external clock manually in the driver. While this is valid on a subset of ACPI platforms, implementing this logic directly in drivers is deprecated and can lead to inconsistent behaviour across drivers. This driver supports ACPI platforms only. It currently retrieves the external clock rate from the "clock-frequency" property and fails probing if the rate does not match the expected value, which is the correct policy for ACPI platforms. Switch to using the devm_v4l2_sensor_clk_get() helper to standardise clock handling. This preserves the existing behaviour on ACPI platforms that specify a clock-frequency property without providing a clock. On platforms that provide a clock, the helper will program the clock to the rate specified by clock-frequency, which is also consistent with the driver's expectations. Reviewed-by: Hans de Goede <johannes.goede@oss.qualcomm.com> Signed-off-by: Sanjay Chitroda <sanjayembeddedse@gmail.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
11 daysmedia: i2c: rdacm21: Fix missing media_entity_cleanup()Biren Pandya
The driver misses calling media_entity_cleanup() on the probe error path and during remove, leaking resources if probe fails after entity initialization or when the driver is unloaded. Fix this by adding media_entity_cleanup() to the rdacm21_probe() error handling path and to rdacm21_remove(). Fixes: a59f853b3b4b ("media: i2c: Add driver for RDACM21 camera module") Signed-off-by: Biren Pandya <birenpandya@gmail.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
11 daysmedia: i2c: imx412: switch to {enable,disable}_streamsElgin Perumbilly
Switch from s_stream to enable_streams and disable_streams callbacks. Signed-off-by: Elgin Perumbilly <elgin.perumbilly@siliconsignals.io> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
11 daysmedia: i2c: imx412: Switch to using the sub-device state lockElgin Perumbilly
Switch to using the sub-device state lock and properly call v4l2_subdev_init_finalize() / v4l2_subdev_cleanup() on probe() / remove(). Signed-off-by: Elgin Perumbilly <elgin.perumbilly@siliconsignals.io> Reviewed-by: Tarang Raval <tarang.raval@siliconsignals.io> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
11 daysmedia: i2c: imx412: Convert to CCI register access helpersElgin Perumbilly
Use the new common CCI register access helpers to replace the private register access helpers in the imx412 driver. This simplifies the driver by reducing the amount of code. Signed-off-by: Elgin Perumbilly <elgin.perumbilly@siliconsignals.io> Reviewed-by: Tarang Raval <tarang.raval@siliconsignals.io> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
2026-07-08media: i2c: imx678: Add driver for Sony IMX678Jai Luthra
Add a V4L2 subdev driver for the Sony IMX678 image sensor. IMX678 is a diagonal 8.86 mm (Type 1/1.8) CMOS active pixel type solid-state image sensor with a square pixel array and 8.40 M effective pixels. The following features are supported by this driver: - MIPI RAW12 output - Monochrome and Color (Bayer filter) variants - Multiple input clock frequencies - Multiple link frequencies - VBLANK and HBLANK control for variable framerate - VFLIP and HFLIP control for flipping readout - Exposure and analogue gain control - Test pattern control Following features are not currently supported: - MIPI RAW10 output - Pixel-perfect crop reporting, accounting for the shift-by-1 when doing HFLIP/VFLIP where the sensor maintains RGGB bayer ordering Along with the ones below which depend on the new raw sensor model: - Embedded data stream - Freely configurable cropping - Increased framerate when cropping - 2x2 binning support Signed-off-by: Jai Luthra <jai.luthra@ideasonboard.com> Reviewed-by: Tarang Raval <tarang.raval@siliconsignals.io> [Sakari Ailus: Add an extra newline to the enum_mbus_code op.] Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
2026-07-08media: i2c: ov7740: fix use-after-destroy in removeBiren Pandya
The ov7740_remove() function had a severe teardown order bug where it destroyed the driver's mutex before freeing the V4L2 control handler which relies on that mutex, leading to a use-after-destroy kernel panic. Furthermore, the driver explicitly called v4l2_ctrl_handler_free() and mutex_destroy() sequentially, but then called ov7740_free_controls() which invokes both of them a second time, resulting in a double-free. This patch fixes the issue by unregistering the subdevice first, and relying exclusively on ov7740_free_controls() to safely tear down the mutex and control handler in the correct order. Fixes: 39c5c4471b8d ("media: i2c: Add the ov7740 image sensor driver") Cc: stable@vger.kernel.org Signed-off-by: Biren Pandya <birenpandya@gmail.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
2026-07-08media: i2c: ov7740: fix unbalanced pm_runtime_get_sync in removeBiren Pandya
The ov7740_remove() function unconditionally called pm_runtime_get_sync() but completely ignored the return value. If the device was already in an error state or disconnected, this could lead to an unbalanced PM runtime usage count or attempt to communicate with an unresponsive device. Disable Runtime PM first, then see if the device is active, and if so, power it off. Signed-off-by: Biren Pandya <birenpandya@gmail.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
2026-07-08media: i2c: ov02a10: fix endpoint parsing use-after-freeBiren Pandya
The ov02a10_check_hwcfg() function calls fwnode_handle_put(ep) immediately after allocating and parsing the endpoint. However, it subsequently calls fwnode_property_read_u32() using the same 'ep' handle, leading to a potential use-after-free. Additionally, reading the optional 'ovti,mipi-clock-voltage' property used to overwrite the 'ret' variable. If the property was missing, 'ret' would become negative, and this failure code would be incorrectly returned at the end of the function, causing probe to fail entirely. Fix the use-after-free by moving fwnode_property_read_u32() before the endpoint is parsed and freed. Avoid the error leak by not assigning the result of fwnode_property_read_u32() to 'ret'. Fixes: 91807efbe8ec ("media: i2c: add OV02A10 image sensor driver") Cc: stable@vger.kernel.org Signed-off-by: Biren Pandya <birenpandya@gmail.com> Reviewed-by: Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
2026-07-08media: i2c: alvium: Fix: Correct name of register in ↵Martin Hecht
alvium_set_ctrl_auto_exposure Write value for auto-exposure into correct register REG_BCRM_EXPOSURE_AUTO_RW instead of wrong register REG_BCRM_WHITE_BALANCE_AUTO_RW. Fixes: 0a7af872915e ("media: i2c: Add support for alvium camera") Cc: stable@vger.kernel.org Signed-off-by: Martin Hecht <mhecht73@gmail.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
2026-07-08media: i2c: cvs: Add NVL ACPI IDArun T
Add INTC10FA to the CVS ACPI match table so the driver can bind to CVS devices exposed on NVL platforms. Signed-off-by: Arun T <arun.t@intel.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
2026-07-08media: i2c: cvs: Add IPU8 PCI device IDArun T
Add the NVL IPU8 PCI device ID to the CVS driver match table so the CVS driver can bind to IPU8 camera hardware. Signed-off-by: Arun T <arun.t@intel.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
2026-07-08media: i2c: imx471: Add Sony IMX471 image sensor driverKate Hsuan
Add a new driver for Sony imx471 camera sensor. It is based on Jimmy Su <jimmy.su@intel.com> implementation and the driver can be found in the following URL. https://github.com/intel/ipu6-drivers/commits/master/drivers/media/i2c/imx471.c This sensor can be found on Lenovo X1 Carbon G14, X9-14 and X9-15 laptops and it is a part of IPU7 solution. The driver was tested on Lenovo X1 Carbon G14, X9-14 and X9-15 laptops. Signed-off-by: Kate Hsuan <hpa@redhat.com> Tested-by: computman <anis@talbi.fr> Reviewed-by: Tarang Raval <tarang.raval@siliconsignals.io> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
2026-07-03Replace <linux/mod_devicetable.h> by more specific <linux/device-id/*.h> (c ↵Uwe Kleine-König (The Capable Hub)
files) Replace the #include of <linux/mod_devicetable.h> by the more specific <linux/device-id/*.h> where applicable. For most cases the include can be dropped completely, only a few drivers need one or two headers added. Acked-by: Danilo Krummrich <dakr@kernel.org> Acked-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Acked-by: Bjorn Helgaas <bhelgaas@google.com> Link: https://patch.msgid.link/1a3f2007c5c5dcf555c09a4035ce3ae8ef1b6c49.1782808461.git.u.kleine-koenig@baylibre.com Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
2026-06-28media: ov9282: Remove unused kerneldoc descriptionRicardo Ribalda
The field has been removed, but the kerneldoc not. Let's take care of this. This patch fixes the following warning: Warning: drivers/media/i2c/ov9282.c:223 Excess struct member 'mutex' description in 'ov9282' Fixes: 0c69a963a300 ("media: i2c: ov9282: Switch to using the sub-device state lock") Signed-off-by: Ricardo Ribalda <ribalda@chromium.org> Reviewed-by: Daniel Scally <dan.scally@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Reviewed-by: Dave Stevenson <dave.stevenson@raspberrypi.com> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
2026-05-28media: i2c: cvs: Add driver of Intel Computer Vision Sensing Controller(CVS)Miguel Vadillo
Add driver for Intel Computer Vision Sensing (CVS) devices found on Intel Luna Lake (LNL), Panther Lake (PTL), and Arrow Lake (ARL) platforms. The CVS device acts as a V4L2 sub-device bridge that manages CSI-2 link ownership between the host (Linux) and firmware for camera sensors. It provides: - Query the device status via sysfs interface - CSI-2 link ownership arbitration between host and CVS firmware - MIPI CSI-2 configuration management - Privacy LED control coordination - Power management integration with runtime PM The driver consists of two main components: core.c: Core driver with probe, command transport, and power management v4l2.c: V4L2 sub-device and media framework integration Hardware Interface: - I2C for command/control communication with device firmware - GPIO signals for ownership handshaking (request/response) - Optional reset and wake interrupt for full-capability variants - Integration with Intel IPU via ipu_bridge The driver supports two hardware capability levels: - Light capability: Basic GPIO-based ownership (2 GPIOs) - Full capability: Enhanced with reset control and wake IRQ (4 GPIOs) Device-specific quirks are handled via a quirk table to accommodate variations across different CVS implementations (Lattice, Synaptics). In addition to I2C-based operation, the driver supports platform device instantiation for systems where CVS is exposed without I2C transport, falling back to GPIO-only ownership control. The CVS driver integrates with the IPU bridge for automatic device discovery via ACPI on supported platforms. PCI device IDs for Intel IPU7 (0x645d, shared by MTL and LNL) and IPU7.5 (0xb05d, shared by ARL and PTL) are included in the driver-local icvs_pci_tbl lookup table, enabling CVS to locate these IPU variants without modifying the shared ipu6-pci-table header. A PM runtime device link is established between IPU (consumer) and CVS (supplier) so that the PM framework automatically resumes CVS before IPU begins streaming, triggering cvs_runtime_resume() to claim CSI-2 link ownership. Ownership is released via cvs_runtime_suspend() after the autosuspend delay. Signed-off-by: Miguel Vadillo <miguel.vadillo@intel.com> Tested-by: Mehdi Djait <mehdi.djait@linux.intel.com> # Dell XPS 13 9350 + IPU7 Reviewed-by: Mehdi Djait <mehdi.djait@linux.intel.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
2026-05-20media: i2c: imx274: trivial cleanupEugen Hristev
Fix some typos, removed superfluous comments/code, some minor code alignment. Signed-off-by: Eugen Hristev <ehristev@kernel.org> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
2026-05-20media: i2c: alvium: fix critical pointer access in alvium_ctrl_initMartin Hecht
The current implementation of alvium_ctrl_init creates several controls in function alvium_ctrl_init and uses the returned pointer without check. That can cause write access over NULL-pointer for several controls. The reworked code checks the pointers before adding flags. Fixes: 0a7af872915e ("media: i2c: Add support for alvium camera") Cc: stable@vger.kernel.org Signed-off-by: Martin Hecht <mhecht73@gmail.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
2026-05-20media: Use named initializers for arrays of i2c_device_dataUwe Kleine-König (The Capable Hub)
While being less compact, using named initializers allows to more easily see which members of the structs are assigned which value without having to lookup the declaration of the struct. And it's also more robust against changes to the struct definition. The mentioned robustness is relevant for a planned change to struct i2c_device_id that replaces .driver_data by an anonymous union. While touching all these arrays, unify usage of whitespace and commas. This patch doesn't modify the compiled arrays, only their representation in source form benefits. The former was confirmed with x86 and arm64 builds. Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
2026-05-19media: ov13b10: Support multiple regulatorsArun T
The OV13B10 sensor driver currently handles a single regulator called avdd, however the sensor can be supplied by up to three regulators. Update the driver to handle all of them together using the regulator bulk API. Signed-off-by: Arun T <arun.t@intel.com> Reviewed-by: Hans de Goede <johannes.goede@oss.qualcomm.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
2026-05-15media: i2c: lm3560: Add proper support for LM3559Svyatoslav Ryhel
The LM3559 is very similar to the LM3560, but it operates at much lower currents. This may result in incorrect current selection if LM3560 ranges are applied to the LM3559. Implement driver data matching to use device-specific current configurations. Since the driver no longer supports platform data and device configuration is performed more granularly, move the remaining enums from the header into the driver file and remove the header. Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
2026-05-15media: i2c: lm3560: Add support for PM featuresSvyatoslav Ryhel
Add support for power management features to better control the LM3560 within the media framework. To achieve the desired PM support, the HWEN GPIO and VIN power supply were added and configured into power on/off sequences. Added PM operations along with the PM configuration setup. Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>