aboutsummaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)AuthorFilesLines
2026-01-14media: mt9m114: Tweak default hblank and vblank for more accurate fpsHans de Goede1-2/+2
The PLL gets programmed to achieve a 48 MHz pixelclock, with the current vblank + hblank defaults this results in a fps of: 48000000 / ((1296 + 307) * (976 + 23) = 29.974 fps Tweak the defaults to get closer to 30 fps: 48000000 / ((1296 + 308) * (976 + 21) = 30.015 fps This improves things from being 0.026 fps too low to 0.015 fps too high. 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>
2026-01-14media: mt9m114: Fix default hblank and vblank valuesHans de Goede1-3/+4
The current default hblank and vblank values are based on reaching 30 fps with the pixel-array outputting 1280x960, but the default format for the pixel-array source pad and the isp sink pad is 1296x976, correct the default hblank and vblank values to take this into account. 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>
2026-01-14media: mt9m114: Lower minimum vblank valueHans de Goede1-2/+2
As the comment above the defines says, the minimum values are undocumented so the lowest values seen in register lists are used. The version of the mt9m114 driver shipped together with the atomisp code uses 21 for vblank in its register lists, lower MT9M114_MIN_VBLANK accordingly. 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>
2026-01-14media: mt9m114: Use aptina-PLL helper to get PLL valuesHans de Goede2-16/+49
Before this change the driver used hardcoded PLL m, n and p values to achieve a 48MHz pixclock when used with an external clock with a frequency of 24 MHz. Use aptina_pll_calculate() to allow the driver to work with different external clock frequencies. The m, n, and p values will be unchanged with a 24 MHz extclk and this has also been tested with a 19.2 MHz clock where m gets increased from 32 to 40. Suggested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Hans de Goede <johannes.goede@oss.qualcomm.com> [Sakari Ailus: Fix capitalisation of "MHz".] Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
2026-01-14media: aptina-pll: Debug log p1 min and max valuesHans de Goede1-0/+2
Make aptina_pll_calculate() debug log the calculated p1 min and max values, this makes it easier to see how the m, n and p1 values were chosen. 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>
2026-01-14media: i2c: ov2735: request reset GPIO as initially assertedElgin Perumbilly1-1/+1
The reset GPIO must be requested in the asserted (HIGH) state to keep the sensor in standby during probe and power sequencing. Signed-off-by: Elgin Perumbilly <elgin.perumbilly@siliconsignals.io> Acked-by: Tarang Raval <tarang.raval@siliconsignals.io> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
2026-01-14media: ccs: Support frame descriptorsSakari Ailus2-4/+74
Provide information on the frame layout using frame descriptors. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Reviewed-by: Julien Massot <julien.massot@collabora.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
2026-01-14media: ccs: Track streaming stateSakari Ailus2-4/+11
With enable_streams and disable_streams, the driver for a device where streams are not independently started and stopped needs to maintain state information on streams that have been requested to be started. Do that now. In the future, a helper function in the framework is a desirable way to do this instead. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Reviewed-by: Julien Massot <julien.massot@collabora.com> Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
2026-01-14media: ccs: Use {enable,disable}_streams operationsSakari Ailus1-45/+34
Switch from s_stream() video op to enable_streams() and disable_streams() pad operations. They are preferred and required for streams support. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
2026-01-14media: ccs: Fix setting initial sub-device stateSakari Ailus1-1/+9
Fix setting sub-device state for non-source sub-devices. Fixes: 5755be5f15d9 ("media: v4l2-subdev: Rename .init_cfg() operation to .init_state()") Cc: stable@vger.kernel.org # for v6.8 and later Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
2026-01-14media: i2c: og0ve1b: make configurable vblank control of the sensorVladimir Zapolskiy1-15/+40
Configurable vertical blanking size control allows users to set a wanted image frame rate. Reviewed-by: Tarang Raval <tarang.raval@siliconsignals.io> Signed-off-by: Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
2026-01-14media: i2c: ov6211: make configurable vblank control of the sensorVladimir Zapolskiy1-15/+40
Configurable vertical blanking size control allows users to set a wanted image frame rate. Reviewed-by: Tarang Raval <tarang.raval@siliconsignals.io> Signed-off-by: Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
2026-01-14staging: media: atomisp: fix trailing statementArjun Changla1-1/+2
Fix checkpatch error "trailing statements should be on next line" by moving the return statement to a new line. Signed-off-by: Arjun Changla <arjunchangla7@gmail.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
2026-01-14media: staging: atomisp: remove redundant OOM error messagesZixuan Dong1-4/+1
The memory allocation functions (kvzalloc) already emit a stack dump on failure when GFP_KERNEL is used. Printing an extra error message is redundant and increases code size. This resolves the checkpatch warnings: WARNING: Possible unnecessary 'out of memory' message Signed-off-by: Zixuan Dong <dbeidachazi@foxmail.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
2026-01-14media: i2c: ov5647: Add V4L2_CID_LINK_FREQUENCY controlDave Stevenson1-1/+24
The link frequency can vary between modes, so add it as a control. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> Signed-off-by: Jai Luthra <jai.luthra@ideasonboard.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
2026-01-14media: i2c: ov5647: Tidy up PIXEL_RATE controlJai Luthra1-8/+1
The pixel rate control is marked as read-only by the framework itself, so no need to mark it explicitly in the driver. Also, we can set the ops to NULL to avoid checking for it in the s_ctrl implementation. Suggested-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com> Reviewed-by: Dave Stevenson <dave.stevenson@raspberrypi.com> Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com> Signed-off-by: Jai Luthra <jai.luthra@ideasonboard.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
2026-01-14media: i2c: ov5647: Use the same PLL config for full, 1080p, and binned modesDave Stevenson1-4/+4
In order to simplify the driver slightly, use the same PLL configuration, and hence pixel rate and link frequency (to be added) for the full, 1080p, and binned modes. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com> Signed-off-by: Jai Luthra <jai.luthra@ideasonboard.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
2026-01-14media: i2c: ov5647: Separate out the common registers.Dave Stevenson1-193/+50
There are many registers in common between all the modes. Pull those out into one common table. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> Signed-off-by: Jai Luthra <jai.luthra@ideasonboard.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
2026-01-14media: i2c: ov5647: Tidy up mode registers to make the order commonDave Stevenson1-19/+14
To make comparisons of the mode registers easier, put the registers for the binned and VGA modes in the same order as the others. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com> Signed-off-by: Jai Luthra <jai.luthra@ideasonboard.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
2026-01-14media: i2c: ov5647: Add control of V4L2_CID_HBLANKDave Stevenson1-13/+13
The driver did expose V4L2_CID_HBLANK, but as a READ_ONLY control. The sensor only uses the HTS register to control the line length, so convert this control to read/write, with the appropriate ranges. Adopt the old fixed values as the minimum values permitted in each mode to avoid issues of it not streaming. This should allow exposure times up to ~3 seconds (up from ~1sec). Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com> Signed-off-by: Jai Luthra <jai.luthra@ideasonboard.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
2026-01-14media: i2c: ov5647: Use v4l2_async_register_subdev_sensor for lens bindingDave Stevenson1-1/+1
v4l2_async_register_subdev doesn't bind in lens or flash drivers, but v4l2_async_register_subdev_sensor does. Switch to using v4l2_async_register_subdev_sensor. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com> Signed-off-by: Jai Luthra <jai.luthra@ideasonboard.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
2026-01-14media: i2c: ov5647: Support HFLIP and VFLIPDavid Plowman1-7/+74
Add missing controls for horizontal and vertical flipping. The sensor readout mirrors in the horizontal direction by default (if 0x3821[1] = 0) which can make things unnecessarily difficult for applications. The register table prior to this commit was setting that bit explicitly, to achieve a normally oriented image. Now that we have userspace controls for HFLIP, we keep the convention and report the non-mirrored image (with 0x3821[1] = 1) as horizontal_flip=0, and vice versa. Signed-off-by: David Plowman <david.plowman@raspberrypi.com> Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com> Co-developed-by: Jai Luthra <jai.luthra@ideasonboard.com> Signed-off-by: Jai Luthra <jai.luthra@ideasonboard.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
2026-01-14media: i2c: ov5647: Parse and register propertiesLaurent Pinchart1-1/+8
Parse device properties and register controls for them using the V4L2 fwnode properties helpers. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com> Signed-off-by: Jai Luthra <jai.luthra@ideasonboard.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
2026-01-14media: i2c: ov5647: Add support for regulator controlDave Stevenson1-3/+40
The driver supported using GPIOs to control the shutdown line, but no regulator control. Add regulator hooks. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com> Signed-off-by: Jai Luthra <jai.luthra@ideasonboard.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
2026-01-14media: i2c: ov5647: Fix PIXEL_RATE value for VGA modeJai Luthra1-1/+1
The pixel rate for VGA (640x480) mode is configured in the mode's table to be 58.333 MPix/s instead of 55 MPix/s, so fix it. Fixes: 911f4516ee2b ("media: ov5647: Support V4L2_CID_PIXEL_RATE") Cc: stable@vger.kernel.org Link: https://lore.kernel.org/all/CAPY8ntA2TCf9FuB6Nk%2BOn%2By6N_PMuYPAOAr3Yx8YESwe4skWvw@mail.gmail.com/ Suggested-by: Dave Stevenson <dave.stevenson@raspberrypi.com> Signed-off-by: Jai Luthra <jai.luthra@ideasonboard.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
2026-01-14media: i2c: ov5647: Sensor should report RAW color spaceDavid Plowman1-4/+4
As this sensor captures RAW bayer frames, the colorspace should be V4L2_COLORSPACE_RAW instead of SRGB. Fixes: a8df5af695a1 ("media: ov5647: Add SGGBR10_1X10 modes") Cc: stable@vger.kernel.org Signed-off-by: David Plowman <david.plowman@raspberrypi.com> Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com> Signed-off-by: Jai Luthra <jai.luthra@ideasonboard.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
2026-01-14media: i2c: ov5647: Correct minimum VBLANK valueDavid Plowman1-1/+1
Trial and error reveals that the minimum vblank value appears to be 24 (the OV5647 data sheet does not give any clues). This fixes streaming lock-ups in full resolution mode. Fixes: 2512c06441e3 ("media: ov5647: Support V4L2_CID_VBLANK control") Cc: stable@vger.kernel.org Signed-off-by: David Plowman <david.plowman@raspberrypi.com> Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com> Signed-off-by: Jai Luthra <jai.luthra@ideasonboard.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
2026-01-14media: i2c: ov5647: Correct pixel array offsetDavid Plowman1-1/+1
The top offset in the pixel array is actually 6 (see page 3-1 of the OV5647 data sheet). Fixes: 14f70a3232aa ("media: ov5647: Add support for get_selection()") Cc: stable@vger.kernel.org Signed-off-by: David Plowman <david.plowman@raspberrypi.com> Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com> Signed-off-by: Jai Luthra <jai.luthra@ideasonboard.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
2026-01-14media: i2c: ov5647: Initialize subdev before controlsJai Luthra1-4/+4
In ov5647_init_controls() we call v4l2_get_subdevdata, but it is initialized by v4l2_i2c_subdev_init() in the probe, which currently happens after init_controls(). This can result in a segfault if the error condition is hit, and we try to access i2c_client, so fix the order. Fixes: 4974c2f19fd8 ("media: ov5647: Support gain, exposure and AWB controls") Cc: stable@vger.kernel.org Suggested-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com> Signed-off-by: Jai Luthra <jai.luthra@ideasonboard.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
2026-01-14media: ccs: Move ccs_validate_csi_data_format upSakari Ailus1-14/+14
ccs_validate_csi_data_format() will soon be needed elsewhere, above its current location. Move it up. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Reviewed-by: Julien Massot <julien.massot@collabora.com> Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
2026-01-14media: ccs: Rename out label of ccs_start_streamingSakari Ailus1-19/+19
In preparation for upcoming changes in the function, rename the out label as err_pm_put. The purpose of the label is changed to match its name in the next patch. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
2026-01-14media: ccs: Move ccs_pm_get_init function upSakari Ailus1-36/+37
Prepare for using ccs_pm_get_init from locations earlier than its the current place. Also add a missing newline while at it. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
2026-01-14media: ccs: No need to set streaming to false in power offSakari Ailus1-1/+0
Streaming will have been stopped before the sensor is powered off, and so sensor->streaming is also false already. Do not set it as part of the runtime suspend callback. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
2026-01-14media: v4l2-subdev: Extend VIDIOC_SUBDEV_S_ROUTING error codesSakari Ailus3-3/+3
Return -ENXIO from routing configuration errors other than generic IOCTL argument validation. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
2026-01-14media: v4l2-async: Fix error handling on steps after finding a matchSakari Ailus1-14/+31
Once an async connection is found to be matching with an fwnode, a sub-device may be registered (in case it wasn't already), its bound operation is called, ancillary links are created, the async connection is added to the sub-device's list of connections and removed from the global waiting connection list. Further on, the sub-device's possible own notifier is searched for possible additional matches. Fix these specific issues: - If v4l2_async_match_notify() failed before the sub-notifier handling, the async connection was unbound and its entry removed from the sub-device's async connection list. The latter part was also done in v4l2_async_match_notify(). - The async connection's sd field was only set after creating ancillary links in v4l2_async_match_notify(). It was however dereferenced in v4l2_async_unbind_subdev_one(), which was called on error path of v4l2_async_match_notify() failure. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Tested-by: "Yew, Chang Ching" <chang.ching.yew@intel.com> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
2026-01-14media: ccs: Avoid possible division by zeroSakari Ailus1-1/+1
Calculating maximum M for scaler configuration involves dividing by MIN_X_OUTPUT_SIZE limit register's value. Albeit the value is presumably non-zero, the driver was missing the check it in fact was. Fix this. Reported-by: Josh Poimboeuf <jpoimboe@kernel.org> Closes: https://lore.kernel.org/all/ahukd6b3wonye3zgtptvwzvrxldcruazs2exfvll6etjhmcxyj@vq3eh6pd375b/ Fixes: ccfc97bdb5ae ("[media] smiapp: Add driver") Cc: stable@vger.kernel.org # for 5.15 and later Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Reviewed-by: Nathan Chancellor <nathan@kernel.org> Tested-by: Nathan Chancellor <nathan@kernel.org> # build Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
2026-01-14media: v4l2-fwnode: Allow passing NULL fwnode to endpoint parsersSakari Ailus1-0/+3
v4l2_fwnode_endpoint_parse() and v4l2_fwnode_endpoint_alloc_parse() take a fwnode as the first argument and leave it up to the caller to check a valid fwnode has been obtained through various means. Instead, add a check here so the callers won't need to do that anymore. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Reviewed-by: Michael Riesch <michael.riesch@collabora.com> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
2026-01-14media: v4l2-ctrls: Set error v4l2_ctrl_new_fwnode_properties consistentlySakari Ailus1-1/+2
The vast majority of the callers of v4l2_ctrl_new_fwnode_properties() do check the returned error code but the function does not set the control handler's error on failure. This will make error handling more complicated and prone for bugs. Always assign the control handler's error field on error in v4l2_ctrl_new_fwnode_properties(). Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
2026-01-13spi: fsi: Simplify with scoped for each OF child loopKrzysztof Kozlowski1-5/+2
Use scoped for_each_available_child_of_node_scoped() when iterating over device nodes to make code a bit simpler. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com> Link: https://patch.msgid.link/20251224110240.56803-2-krzysztof.kozlowski@oss.qualcomm.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-01-13host1x: Convert to bus methodsUwe Kleine-König1-34/+33
The callbacks .probe(), .remove() and .shutdown() for device_drivers should go away. So migrate to bus methods. There are two differences that need addressing: - The bus remove callback returns void while the driver remove callback returns int (the actual value is ignored by the core). - The bus shutdown callback is also called for unbound devices, so an additional check for dev->driver != NULL is needed. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com> Tested-by: Luca Ceresoli <luca.ceresoli@bootlin.com> # tegra20 tegra-video Reviewed-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Thierry Reding <treding@nvidia.com> Link: https://patch.msgid.link/dd55d034c68953268ea416aa5c13e41b158fcbb4.1765355236.git.u.kleine-koenig@baylibre.com
2026-01-13soundwire: bus: fix off-by-one when allocating slave IDsHarshit Mogalapalli1-1/+1
ida_alloc_max() interprets its max argument as inclusive. Using SDW_FW_MAX_DEVICES(16) therefore allows an ID of 16 to be allocated, but the IRQ domain created for the bus is sized for IDs 0-15. If 16 is returned, irq_create_mapping() fails and the driver ends up with an invalid IRQ mapping. Limit the allocation to 0-15 by passing SDW_FW_MAX_DEVICES - 1. Reported-by: kernel test robot <lkp@intel.com> Reported-by: Dan Carpenter <dan.carpenter@linaro.org> Closes: https://lore.kernel.org/r/202512240450.hlDH3nCs-lkp@intel.com/ Fixes: aab12022b076 ("soundwire: bus: Add internal slave ID and use for IRQs") Signed-off-by: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com> Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://patch.msgid.link/20260110201959.2523024-1-harshit.m.mogalapalli@oracle.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
2026-01-13host1x: Make remove callback return voidUwe Kleine-König4-10/+4
The return value of struct device_driver::remove is ignored by the core (see device_remove() in drivers/base/dd.c). So it doesn't make sense to let the host1x remove callback return an int just to ignore it later. So make the callback return void. All current implementors return 0, so they are easily converted. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com> Tested-by: Luca Ceresoli <luca.ceresoli@bootlin.com> # tegra20 tegra-video Reviewed-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Thierry Reding <treding@nvidia.com> Link: https://patch.msgid.link/d364fd4ec043d36ee12e46eaef98c57658884f63.1765355236.git.u.kleine-koenig@baylibre.com
2026-01-13auxdisplay: max6959: Replace slab.h with device/devres.hAndy Shevchenko1-1/+1
Replace slab.h with device/devres.h as the devm_*() APIs are defined in the latter. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2026-01-13USB: serial: option: add Telit LE910 MBIM compositionUlrich Mohr1-0/+1
Add support for Telit LE910 module when operating in MBIM composition with additional ttys. This USB product ID is used by the module when AT#USBCFG is set to 7. 0x1252: MBIM + tty(NMEA) + tty(MODEM) + tty(MODEM) + SAP T: Bus=01 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#= 2 Spd=480 MxCh= 0 D: Ver= 2.00 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs= 1 P: Vendor=1bc7 ProdID=1252 Rev=03.18 S: Manufacturer=Android S: Product=LE910C1-EU S: SerialNumber=0123456789ABCDEF C: #Ifs= 6 Cfg#= 1 Atr=a0 MxPwr=500mA I: If#= 0 Alt= 0 #EPs= 1 Cls=02(commc) Sub=0e Prot=00 Driver=cdc_mbim E: Ad=82(I) Atr=03(Int.) MxPS= 64 Ivl=32ms I: If#= 1 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=02 Driver=cdc_mbim E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms I: If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=83(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=84(I) Atr=03(Int.) MxPS= 10 Ivl=32ms I: If#= 3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option E: Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=85(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=86(I) Atr=03(Int.) MxPS= 10 Ivl=32ms I: If#= 4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option E: Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=87(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=88(I) Atr=03(Int.) MxPS= 10 Ivl=32ms I: If#= 5 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option E: Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=89(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=8a(I) Atr=03(Int.) MxPS= 10 Ivl=32ms Signed-off-by: Ulrich Mohr <u.mohr@semex-engcon.com> Cc: stable@vger.kernel.org Signed-off-by: Johan Hovold <johan@kernel.org>
2026-01-13pinctrl: apple: Implement GPIO func check callbackLinus Walleij1-0/+8
This function will check if the indicated function enumerator i.e. the value set into bits 5 and 6 of the pin configuration register, is zero and thus corresponds to the GPIO mode of the pin. This may be necessary to know since the pin controller is flagged as "strict": once you set a pin *explicitly* to GPIO mode using function 0, the core is unaware that this is actually the GPIO mode, and clients may be denied to retrieve the pin as a GPIO. Currently none of the in-kernel device trees sets any pin to GPIO mode, but this may happen any day. Reviewed-by: Sven Peter <sven@kernel.org> Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com> Signed-off-by: Linus Walleij <linusw@kernel.org>
2026-01-13pinctrl: apple: Use unsigned int instead of unsignedLinus Walleij1-5/+5
It is discouraged to use the ambiguous "unsigned" type, use explicit unsigned int in the driver. Reviewed-by: Sven Peter <sven@kernel.org> Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com> Signed-off-by: Linus Walleij <linusw@kernel.org>
2026-01-13r8169: enable LTR supportJaven Xu1-0/+98
This patch will enable RTL8168FP/RTL8168EP/RTL8168H/RTL8125/RTL8126/RTL8127 LTR support. Signed-off-by: Javen Xu <javen_xu@realsil.com.cn> Link: https://patch.msgid.link/20260109070415.1115-3-javen_xu@realsil.com.cn Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2026-01-13r8169: add DASH support for RTL8127APJaven Xu1-0/+4
This adds DASH support for chip RTL8127AP. Its mac version is RTL_GIGA_MAC_VER_80 and revision id is 0x04. DASH is a standard for remote management of network device, allowing out-of-band control. Signed-off-by: Javen Xu <javen_xu@realsil.com.cn> Link: https://patch.msgid.link/20260109070415.1115-2-javen_xu@realsil.com.cn Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2026-01-13gpio: shared: use device_is_compatible() for reset-gpioBartosz Golaszewski1-6/+1
reset-gpio devices now can be identified with device_is_compatible() so use it instead of checking the device name string. Reviewed-by: Linus Walleij <linusw@kernel.org> Link: https://lore.kernel.org/r/20260112093651.23639-1-bartosz.golaszewski@oss.qualcomm.com Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
2026-01-13media: qcom: camss: add support for SM6150 camssWenmeng Liu4-0/+203
The camera subsystem for SM6150 which is based on Spectra 230. For SM6150: - VFE and CSID version: 170 (vfe170, csid170) - CSIPHY version: csiphy-v2.0.1 (14nm) Reviewed-by: Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org> Signed-off-by: Wenmeng Liu <wenmeng.liu@oss.qualcomm.com> Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Signed-off-by: Bryan O'Donoghue <bod@kernel.org> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>