Merge git://linuxtv.org/sailus/media_tree into media_stage

* git://linuxtv.org/sailus/media_tree: (47 commits)
  media: i2c: ov4689: code cleanup
  media: ov9650: Drop platform data code path
  media: ov7670: Drop unused include
  media: ov2640: Drop legacy includes
  media: tc358746: add Toshiba TC358746 Parallel to CSI-2 bridge driver
  media: dt-bindings: add bindings for Toshiba TC358746
  phy: dphy: add support to calculate the timing based on hs_clk_rate
  phy: dphy: refactor get_default_config
  v4l: subdev: Warn if disabling streaming failed, return success
  dw9768: Enable low-power probe on ACPI
  media: i2c: imx290: Replace GAIN control with ANALOGUE_GAIN
  media: i2c: imx290: Add crop selection targets support
  media: i2c: imx290: Factor out format retrieval to separate function
  media: i2c: imx290: Move registers with fixed value to init array
  media: i2c: imx290: Create controls for fwnode properties
  media: i2c: imx290: Implement HBLANK and VBLANK controls
  media: i2c: imx290: Split control initialization to separate function
  media: i2c: imx290: Fix max gain value
  media: i2c: imx290: Add exposure time control
  media: i2c: imx290: Define more register macros
  ...
This commit is contained in:
Mauro Carvalho Chehab 2022-11-08 08:46:21 +00:00
commit 1e284ea984
36 changed files with 9326 additions and 523 deletions

View File

@ -1,57 +0,0 @@
* Sony IMX290 1/2.8-Inch CMOS Image Sensor
The Sony IMX290 is a 1/2.8-Inch CMOS Solid-state image sensor with
Square Pixel for Color Cameras. It is programmable through I2C and 4-wire
interfaces. The sensor output is available via CMOS logic parallel SDR output,
Low voltage LVDS DDR output and CSI-2 serial data output. The CSI-2 bus is the
default. No bindings have been defined for the other busses.
Required Properties:
- compatible: Should be "sony,imx290"
- reg: I2C bus address of the device
- clocks: Reference to the xclk clock.
- clock-names: Should be "xclk".
- clock-frequency: Frequency of the xclk clock in Hz.
- vdddo-supply: Sensor digital IO regulator.
- vdda-supply: Sensor analog regulator.
- vddd-supply: Sensor digital core regulator.
Optional Properties:
- reset-gpios: Sensor reset GPIO
The imx290 device node should contain one 'port' child node with
an 'endpoint' subnode. For further reading on port node refer to
Documentation/devicetree/bindings/media/video-interfaces.txt.
Required Properties on endpoint:
- data-lanes: check ../video-interfaces.txt
- link-frequencies: check ../video-interfaces.txt
- remote-endpoint: check ../video-interfaces.txt
Example:
&i2c1 {
...
imx290: camera-sensor@1a {
compatible = "sony,imx290";
reg = <0x1a>;
reset-gpios = <&msmgpio 35 GPIO_ACTIVE_LOW>;
pinctrl-names = "default";
pinctrl-0 = <&camera_rear_default>;
clocks = <&gcc GCC_CAMSS_MCLK0_CLK>;
clock-names = "xclk";
clock-frequency = <37125000>;
vdddo-supply = <&camera_vdddo_1v8>;
vdda-supply = <&camera_vdda_2v8>;
vddd-supply = <&camera_vddd_1v5>;
port {
imx290_ep: endpoint {
data-lanes = <1 2 3 4>;
link-frequencies = /bits/ 64 <445500000>;
remote-endpoint = <&csiphy0_ep>;
};
};
};

View File

@ -0,0 +1,134 @@
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/media/i2c/ovti,ov4689.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Omnivision OV4689 CMOS
maintainers:
- Mikhail Rudenko <mike.rudenko@gmail.com>
description: |
The Omnivision OV4689 is a high performance, 1/3-inch, 4 megapixel
image sensor. Ihis chip supports high frame rate speeds up to 90 fps
at 2688x1520 resolution. It is programmable through an I2C
interface, and sensor output is sent via 1/2/4 lane MIPI CSI-2
connection.
allOf:
- $ref: /schemas/media/video-interface-devices.yaml#
properties:
compatible:
const: ovti,ov4689
reg:
maxItems: 1
clocks:
description:
External clock (XVCLK) for the sensor, 6-64 MHz
maxItems: 1
dovdd-supply:
description:
Digital I/O voltage supply, 1.7-3.0 V
avdd-supply:
description:
Analog voltage supply, 2.6-3.0 V
dvdd-supply:
description:
Digital core voltage supply, 1.1-1.3 V
powerdown-gpios:
description:
GPIO connected to the powerdown pin (active low)
reset-gpios:
maxItems: 1
description:
GPIO connected to the reset pin (active low)
orientation: true
rotation: true
port:
$ref: /schemas/graph.yaml#/$defs/port-base
additionalProperties: false
description:
Output port node, single endpoint describing the CSI-2 transmitter
properties:
endpoint:
$ref: /schemas/media/video-interfaces.yaml#
unevaluatedProperties: false
properties:
data-lanes:
oneOf:
- items:
- const: 1
- const: 2
- const: 3
- const: 4
- items:
- const: 1
- const: 2
- items:
- const: 1
link-frequencies: true
required:
- data-lanes
- link-frequencies
required:
- compatible
- reg
- clocks
- dovdd-supply
- avdd-supply
- dvdd-supply
- port
additionalProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>
i2c {
#address-cells = <1>;
#size-cells = <0>;
ov4689: camera@36 {
compatible = "ovti,ov4689";
reg = <0x36>;
clocks = <&ov4689_clk>;
avdd-supply = <&ov4689_avdd>;
dovdd-supply = <&ov4689_dovdd>;
dvdd-supply = <&ov4689_dvdd>;
powerdown-gpios = <&pio 107 GPIO_ACTIVE_LOW>;
reset-gpios = <&pio 109 GPIO_ACTIVE_LOW>;
orientation = <2>;
rotation = <0>;
port {
wcam_out: endpoint {
remote-endpoint = <&mipi_in_wcam>;
data-lanes = <1 2 3 4>;
link-frequencies = /bits/ 64 <504000000>;
};
};
};
};
...

View File

@ -0,0 +1,129 @@
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/media/i2c/sony,imx290.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Sony IMX290 1/2.8-Inch CMOS Image Sensor
maintainers:
- Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
- Laurent Pinchart <laurent.pinchart@ideasonboard.com>
description: |-
The Sony IMX290 is a 1/2.8-Inch CMOS Solid-state image sensor with Square
Pixel for Color Cameras. It is programmable through I2C and 4-wire
interfaces. The sensor output is available via CMOS logic parallel SDR
output, Low voltage LVDS DDR output and CSI-2 serial data output. The CSI-2
bus is the default. No bindings have been defined for the other busses.
properties:
compatible:
enum:
- sony,imx290
reg:
maxItems: 1
clocks:
maxItems: 1
clock-names:
description: Input clock (37.125 MHz or 74.25 MHz)
items:
- const: xclk
clock-frequency:
description: Frequency of the xclk clock in Hz
vdda-supply:
description: Analog power supply (2.9V)
vddd-supply:
description: Digital core power supply (1.2V)
vdddo-supply:
description: Digital I/O power supply (1.8V)
reset-gpios:
description: Sensor reset (XCLR) GPIO
maxItems: 1
port:
$ref: /schemas/graph.yaml#/$defs/port-base
description: |
Video output port
properties:
endpoint:
$ref: /schemas/media/video-interfaces.yaml#
unevaluatedProperties: false
properties:
data-lanes:
anyOf:
- items:
- const: 1
- const: 2
- items:
- const: 1
- const: 2
- const: 3
- const: 4
link-frequencies: true
required:
- data-lanes
- link-frequencies
additionalProperties: false
required:
- compatible
- reg
- clocks
- clock-names
- clock-frequency
- vdda-supply
- vddd-supply
- vdddo-supply
- port
additionalProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>
i2c {
#address-cells = <1>;
#size-cells = <0>;
imx290: camera-sensor@1a {
compatible = "sony,imx290";
reg = <0x1a>;
pinctrl-names = "default";
pinctrl-0 = <&camera_rear_default>;
clocks = <&gcc 90>;
clock-names = "xclk";
clock-frequency = <37125000>;
vdddo-supply = <&camera_vdddo_1v8>;
vdda-supply = <&camera_vdda_2v8>;
vddd-supply = <&camera_vddd_1v5>;
reset-gpios = <&msmgpio 35 GPIO_ACTIVE_LOW>;
port {
imx290_ep: endpoint {
data-lanes = <1 2 3 4>;
link-frequencies = /bits/ 64 <445500000>;
remote-endpoint = <&csiphy0_ep>;
};
};
};
};
...

View File

@ -0,0 +1,113 @@
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
# Copyright (c) 2022 STMicroelectronics SA.
%YAML 1.2
---
$id: http://devicetree.org/schemas/media/i2c/st,st-vgxy61.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: STMicroelectronics VGxy61 HDR Global Shutter Sensor Family Device Tree Bindings
maintainers:
- Benjamin Mugnier <benjamin.mugnier@foss.st.com>
- Sylvain Petinot <sylvain.petinot@foss.st.com>
description: |-
STMicroelectronics VGxy61 family has a CSI-2 output port. CSI-2 output is a
quad lanes 800Mbps per lane.
Supported formats are RAW8, RAW10, RAW12, RAW14 and RAW16.
Following part number are supported
- VG5661 and VG6661 are 1.6 Mpx (1464 x 1104) monochrome and color sensors.
Maximum frame rate is 75 fps.
- VG5761 and VG6761 are 2.3 Mpx (1944 x 1204) monochrome and color sensors.
Maximum frame rate is 60 fps.
properties:
compatible:
const: st,st-vgxy61
reg:
maxItems: 1
clocks:
maxItems: 1
VCORE-supply:
description:
Sensor digital core supply. Must be 1.2 volts.
VDDIO-supply:
description:
Sensor digital IO supply. Must be 1.8 volts.
VANA-supply:
description:
Sensor analog supply. Must be 2.8 volts.
reset-gpios:
description:
Reference to the GPIO connected to the reset pin, if any.
This is an active low signal to the vgxy61.
st,strobe-gpios-polarity:
description:
Invert polarity of illuminator's lights strobe GPIOs.
These GPIOs directly drive the illuminator LEDs.
type: boolean
port:
$ref: /schemas/graph.yaml#/$defs/port-base
additionalProperties: false
properties:
endpoint:
$ref: /schemas/media/video-interfaces.yaml#
unevaluatedProperties: false
properties:
data-lanes:
description:
CSI lanes to use
items:
- const: 1
- const: 2
- const: 3
- const: 4
remote-endpoint: true
required:
- data-lanes
required:
- compatible
- clocks
- VCORE-supply
- VDDIO-supply
- VANA-supply
- port
additionalProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>
i2c {
#address-cells = <1>;
#size-cells = <0>;
vgxy61: csi2tx@10 {
compatible = "st,st-vgxy61";
reg = <0x10>;
clocks = <&clk_ext_camera>;
VCORE-supply = <&v1v2>;
VDDIO-supply = <&v1v8>;
VANA-supply = <&v2v8>;
reset-gpios = <&mfxgpio 18 GPIO_ACTIVE_LOW>;
port {
ep0: endpoint {
data-lanes = <1 2 3 4>;
remote-endpoint = <&mipi_csi2_out>;
};
};
};
};
...

View File

@ -0,0 +1,178 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/media/i2c/toshiba,tc358746.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Toshiba TC358746 Parallel to MIPI CSI2 Bridge
maintainers:
- Marco Felsch <kernel@pengutronix.de>
description: |-
The Toshiba TC358746 converts a parallel video stream into a MIPI CSI-2
stream. The direction can be either parallel-in -> csi-out or csi-in ->
parallel-out The chip is programmable trough I2C and SPI but the SPI
interface is only supported in parallel-in -> csi-out mode.
Note that the current device tree bindings only support the
parallel-in -> csi-out path.
properties:
compatible:
const: toshiba,tc358746
reg:
maxItems: 1
clocks:
description:
The phandle to the reference clock source. This corresponds to the
hardware pin REFCLK.
maxItems: 1
clock-names:
const: refclk
"#clock-cells":
description: |
The bridge can act as clock provider for the sensor. To enable this
support #clock-cells must be specified. Attention if this feature is used
then the mclk rate must be at least: (2 * link-frequency) / 8
`------------------´ ^
internal PLL rate smallest possible
mclk-div
const: 0
clock-output-names:
description:
The clock name of the MCLK output, the default name is tc358746-mclk.
maxItems: 1
vddc-supply:
description: Digital core voltage supply, 1.2 volts
vddio-supply:
description: Digital I/O voltage supply, 1.8 volts
vddmipi-supply:
description: MIPI CSI phy voltage supply, 1.2 volts
reset-gpios:
description:
The phandle and specifier for the GPIO that controls the chip reset.
This corresponds to the hardware pin RESX which is physically active low.
maxItems: 1
ports:
$ref: /schemas/graph.yaml#/properties/ports
properties:
port@0:
$ref: /schemas/graph.yaml#/$defs/port-base
description: Input port
properties:
endpoint:
$ref: /schemas/media/video-interfaces.yaml#
unevaluatedProperties: false
properties:
hsync-active: true
vsync-active: true
bus-type:
enum: [ 5, 6 ]
required:
- hsync-active
- vsync-active
- bus-type
port@1:
$ref: /schemas/graph.yaml#/$defs/port-base
description: Output port
properties:
endpoint:
$ref: /schemas/media/video-interfaces.yaml#
unevaluatedProperties: false
properties:
data-lanes:
minItems: 1
maxItems: 4
clock-noncontinuous: true
link-frequencies: true
required:
- data-lanes
- link-frequencies
required:
- port@0
- port@1
required:
- compatible
- reg
- clocks
- clock-names
- vddc-supply
- vddio-supply
- vddmipi-supply
- ports
additionalProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>
i2c {
#address-cells = <1>;
#size-cells = <0>;
csi-bridge@e {
compatible = "toshiba,tc358746";
reg = <0xe>;
clocks = <&refclk>;
clock-names = "refclk";
reset-gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
vddc-supply = <&v1_2d>;
vddio-supply = <&v1_8d>;
vddmipi-supply = <&v1_2d>;
/* sensor mclk provider */
#clock-cells = <0>;
ports {
#address-cells = <1>;
#size-cells = <0>;
/* Input */
port@0 {
reg = <0>;
tc358746_in: endpoint {
remote-endpoint = <&sensor_out>;
hsync-active = <0>;
vsync-active = <0>;
bus-type = <5>;
};
};
/* Output */
port@1 {
reg = <1>;
tc358746_out: endpoint {
remote-endpoint = <&mipi_csi2_in>;
data-lanes = <1 2>;
clock-noncontinuous;
link-frequencies = /bits/ 64 <216000000>;
};
};
};
};
};

View File

@ -0,0 +1,23 @@
.. SPDX-License-Identifier: GPL-2.0
ST VGXY61 camera sensor driver
==============================
The ST VGXY61 driver implements the following controls:
``V4L2_CID_HDR_SENSOR_MODE``
-------------------------------
Change the sensor HDR mode. A HDR picture is obtained by merging two captures of the same scene
using two different exposure periods.
.. flat-table::
:header-rows: 0
:stub-columns: 0
:widths: 1 4
* - HDR linearize
- The merger outputs a long exposure capture as long as it is not saturated.
* - HDR substraction
- This involves subtracting the short exposure frame from the long exposure frame.
* - "No HDR"
- This mode is used for standard dynamic range (SDR) exposures.

View File

@ -661,3 +661,11 @@ enum v4l2_scene_mode -
.. [#f1]
This control may be changed to a menu control in the future, if more
options are required.
``V4L2_CID_HDR_SENSOR_MODE (menu)``
Change the sensor HDR mode. A HDR picture is obtained by merging two
captures of the same scene using two different exposure periods. HDR mode
describes the way these two captures are merged in the sensor.
As modes differ for each sensor, menu items are not standardized by this
control and are left to the programmer.

View File

@ -6057,6 +6057,43 @@ the following codes.
- y\ :sub:`2`
- y\ :sub:`1`
- y\ :sub:`0`
* .. _MEDIA-BUS-FMT-Y16-1X16:
- MEDIA_BUS_FMT_Y16_1X16
- 0x202e
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- y\ :sub:`15`
- y\ :sub:`14`
- y\ :sub:`13`
- y\ :sub:`12`
- y\ :sub:`11`
- y\ :sub:`10`
- y\ :sub:`9`
- y\ :sub:`8`
- y\ :sub:`7`
- y\ :sub:`6`
- y\ :sub:`5`
- y\ :sub:`4`
- y\ :sub:`3`
- y\ :sub:`2`
- y\ :sub:`1`
- y\ :sub:`0`
* .. _MEDIA-BUS-FMT-UYVY8-1X16:
- MEDIA_BUS_FMT_UYVY8_1X16

View File

@ -15181,6 +15181,13 @@ S: Maintained
T: git git://linuxtv.org/media_tree.git
F: drivers/media/i2c/ov08d10.c
OMNIVISION OV08X40 SENSOR DRIVER
M: Jason Chen <jason.z.chen@intel.com>
L: linux-media@vger.kernel.org
S: Maintained
T: git git://linuxtv.org/media_tree.git
F: drivers/media/i2c/ov08x40.c
OMNIVISION OV13858 SENSOR DRIVER
M: Sakari Ailus <sakari.ailus@linux.intel.com>
L: linux-media@vger.kernel.org
@ -15219,6 +15226,14 @@ S: Maintained
T: git git://linuxtv.org/media_tree.git
F: drivers/media/i2c/ov2740.c
OMNIVISION OV4689 SENSOR DRIVER
M: Mikhail Rudenko <mike.rudenko@gmail.com>
L: linux-media@vger.kernel.org
S: Maintained
T: git git://linuxtv.org/media_tree.git
F: Documentation/devicetree/bindings/media/i2c/ovti,ov4689.yaml
F: drivers/media/i2c/ov5647.c
OMNIVISION OV5640 SENSOR DRIVER
M: Steve Longerbeam <slongerbeam@gmail.com>
L: linux-media@vger.kernel.org
@ -19188,7 +19203,7 @@ M: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
L: linux-media@vger.kernel.org
S: Maintained
T: git git://linuxtv.org/media_tree.git
F: Documentation/devicetree/bindings/media/i2c/imx290.txt
F: Documentation/devicetree/bindings/media/i2c/sony,imx290.yaml
F: drivers/media/i2c/imx290.c
SONY IMX319 SENSOR DRIVER
@ -19503,6 +19518,16 @@ S: Maintained
F: Documentation/hwmon/stpddc60.rst
F: drivers/hwmon/pmbus/stpddc60.c
ST VGXY61 DRIVER
M: Benjamin Mugnier <benjamin.mugnier@foss.st.com>
M: Sylvain Petinot <sylvain.petinot@foss.st.com>
L: linux-media@vger.kernel.org
S: Maintained
T: git git://linuxtv.org/media_tree.git
F: Documentation/devicetree/bindings/media/i2c/st,st-vgxy61.yaml
F: Documentation/userspace-api/media/drivers/st-vgxy61.rst
F: drivers/media/i2c/st-vgxy61.c
ST VL53L0X ToF RANGER(I2C) IIO DRIVER
M: Song Qiang <songqiang1304521@gmail.com>
L: linux-iio@vger.kernel.org

View File

@ -364,6 +364,19 @@ config VIDEO_OV08D10
To compile this driver as a module, choose M here: the
module will be called ov08d10.
config VIDEO_OV08X40
tristate "OmniVision OV08X40 sensor support"
depends on VIDEO_V4L2 && I2C
select MEDIA_CONTROLLER
select VIDEO_V4L2_SUBDEV_API
select V4L2_FWNODE
help
This is a Video4Linux2 sensor driver for the OmniVision
OV08X40 camera.
To compile this driver as a module, choose M here: the
module will be called ov08x40.
config VIDEO_OV13858
tristate "OmniVision OV13858 sensor support"
depends on I2C && VIDEO_DEV
@ -445,6 +458,19 @@ config VIDEO_OV2740
To compile this driver as a module, choose M here: the
module will be called ov2740.
config VIDEO_OV4689
tristate "OmniVision OV4689 sensor support"
depends on GPIOLIB && VIDEO_DEV && I2C
select MEDIA_CONTROLLER
select VIDEO_V4L2_SUBDEV_API
select V4L2_FWNODE
help
This is a Video4Linux2 sensor-level driver for the OmniVision
OV4689 camera.
To compile this driver as a module, choose M here: the
module will be called ov4689.
config VIDEO_OV5640
tristate "OmniVision OV5640 sensor support"
depends on OF
@ -769,6 +795,16 @@ config VIDEO_SR030PC30
help
This driver supports SR030PC30 VGA camera from Siliconfile
config VIDEO_ST_VGXY61
tristate "ST VGXY61 sensor support"
depends on OF && GPIOLIB && VIDEO_DEV && I2C
select MEDIA_CONTROLLER
select VIDEO_V4L2_SUBDEV_API
select V4L2_FWNODE
help
This is a Video4Linux2 sensor driver for the ST VGXY61
camera sensor.
config VIDEO_VS6624
tristate "ST VS6624 sensor support"
depends on VIDEO_DEV && I2C
@ -1272,6 +1308,23 @@ config VIDEO_TC358743_CEC
When selected the tc358743 will support the optional
HDMI CEC feature.
config VIDEO_TC358746
tristate "Toshiba TC358746 parallel-CSI2 bridge"
depends on VIDEO_DEV && PM && I2C
select VIDEO_V4L2_SUBDEV_API
select MEDIA_CONTROLLER
select V4L2_FWNODE
select GENERIC_PHY_MIPI_DPHY
select REGMAP_I2C
select COMMON_CLK
help
Support for the Toshiba TC358746 parallel to MIPI CSI-2 bridge.
The bridge can work in both directions but currently only the
parallel-in / csi-out path is supported.
To compile this driver as a module, choose M here: the
module will be called tc358746.
config VIDEO_TVP514X
tristate "Texas Instruments TVP514x video decoder"
depends on VIDEO_DEV && I2C

View File

@ -72,6 +72,7 @@ obj-$(CONFIG_VIDEO_NOON010PC30) += noon010pc30.o
obj-$(CONFIG_VIDEO_OG01A1B) += og01a1b.o
obj-$(CONFIG_VIDEO_OV02A10) += ov02a10.o
obj-$(CONFIG_VIDEO_OV08D10) += ov08d10.o
obj-$(CONFIG_VIDEO_OV08X40) += ov08x40.o
obj-$(CONFIG_VIDEO_OV13858) += ov13858.o
obj-$(CONFIG_VIDEO_OV13B10) += ov13b10.o
obj-$(CONFIG_VIDEO_OV2640) += ov2640.o
@ -79,6 +80,7 @@ obj-$(CONFIG_VIDEO_OV2659) += ov2659.o
obj-$(CONFIG_VIDEO_OV2680) += ov2680.o
obj-$(CONFIG_VIDEO_OV2685) += ov2685.o
obj-$(CONFIG_VIDEO_OV2740) += ov2740.o
obj-$(CONFIG_VIDEO_OV4689) += ov4689.o
obj-$(CONFIG_VIDEO_OV5640) += ov5640.o
obj-$(CONFIG_VIDEO_OV5645) += ov5645.o
obj-$(CONFIG_VIDEO_OV5647) += ov5647.o
@ -117,7 +119,9 @@ obj-$(CONFIG_VIDEO_SAA7185) += saa7185.o
obj-$(CONFIG_VIDEO_SONY_BTF_MPX) += sony-btf-mpx.o
obj-$(CONFIG_VIDEO_SR030PC30) += sr030pc30.o
obj-$(CONFIG_VIDEO_ST_MIPID02) += st-mipid02.o
obj-$(CONFIG_VIDEO_ST_VGXY61) += st-vgxy61.o
obj-$(CONFIG_VIDEO_TC358743) += tc358743.o
obj-$(CONFIG_VIDEO_TC358746) += tc358746.o
obj-$(CONFIG_VIDEO_TDA1997X) += tda1997x.o
obj-$(CONFIG_VIDEO_TDA7432) += tda7432.o
obj-$(CONFIG_VIDEO_TDA9840) += tda9840.o

View File

@ -327,18 +327,18 @@ static int ad5820_probe(struct i2c_client *client,
ret = media_entity_pads_init(&coil->subdev.entity, 0, NULL);
if (ret < 0)
goto cleanup2;
goto clean_mutex;
ret = v4l2_async_register_subdev(&coil->subdev);
if (ret < 0)
goto cleanup;
goto clean_entity;
return ret;
cleanup2:
mutex_destroy(&coil->power_lock);
cleanup:
clean_entity:
media_entity_cleanup(&coil->subdev.entity);
clean_mutex:
mutex_destroy(&coil->power_lock);
return ret;
}

View File

@ -414,6 +414,7 @@ static int dw9768_probe(struct i2c_client *client)
{
struct device *dev = &client->dev;
struct dw9768 *dw9768;
bool full_power;
unsigned int i;
int ret;
@ -469,13 +470,23 @@ static int dw9768_probe(struct i2c_client *client)
dw9768->sd.entity.function = MEDIA_ENT_F_LENS;
/*
* Figure out whether we're going to power up the device here. Generally
* this is done if CONFIG_PM is disabled in a DT system or the device is
* to be powered on in an ACPI system. Similarly for power off in
* remove.
*/
pm_runtime_enable(dev);
if (!pm_runtime_enabled(dev)) {
full_power = (is_acpi_node(dev_fwnode(dev)) &&
acpi_dev_state_d0(dev)) ||
(is_of_node(dev_fwnode(dev)) && !pm_runtime_enabled(dev));
if (full_power) {
ret = dw9768_runtime_resume(dev);
if (ret < 0) {
dev_err(dev, "failed to power on: %d\n", ret);
goto err_clean_entity;
}
pm_runtime_set_active(dev);
}
ret = v4l2_async_register_subdev(&dw9768->sd);
@ -484,14 +495,17 @@ static int dw9768_probe(struct i2c_client *client)
goto err_power_off;
}
pm_runtime_idle(dev);
return 0;
err_power_off:
if (pm_runtime_enabled(dev))
pm_runtime_disable(dev);
else
if (full_power) {
dw9768_runtime_suspend(dev);
pm_runtime_set_suspended(dev);
}
err_clean_entity:
pm_runtime_disable(dev);
media_entity_cleanup(&dw9768->sd.entity);
err_free_handler:
v4l2_ctrl_handler_free(&dw9768->ctrls);
@ -503,14 +517,17 @@ static void dw9768_remove(struct i2c_client *client)
{
struct v4l2_subdev *sd = i2c_get_clientdata(client);
struct dw9768 *dw9768 = sd_to_dw9768(sd);
struct device *dev = &client->dev;
v4l2_async_unregister_subdev(&dw9768->sd);
v4l2_ctrl_handler_free(&dw9768->ctrls);
media_entity_cleanup(&dw9768->sd.entity);
pm_runtime_disable(&client->dev);
if (!pm_runtime_status_suspended(&client->dev))
dw9768_runtime_suspend(&client->dev);
pm_runtime_set_suspended(&client->dev);
if ((is_acpi_node(dev_fwnode(dev)) && acpi_dev_state_d0(dev)) ||
(is_of_node(dev_fwnode(dev)) && !pm_runtime_enabled(dev))) {
dw9768_runtime_suspend(dev);
pm_runtime_set_suspended(dev);
}
pm_runtime_disable(dev);
}
static const struct of_device_id dw9768_of_table[] = {

View File

@ -2008,22 +2008,24 @@ static int hi846_parse_dt(struct hi846 *hi846, struct device *dev)
bus_cfg.bus.mipi_csi2.num_data_lanes != 4) {
dev_err(dev, "number of CSI2 data lanes %d is not supported",
bus_cfg.bus.mipi_csi2.num_data_lanes);
v4l2_fwnode_endpoint_free(&bus_cfg);
return -EINVAL;
ret = -EINVAL;
goto check_hwcfg_error;
}
hi846->nr_lanes = bus_cfg.bus.mipi_csi2.num_data_lanes;
if (!bus_cfg.nr_of_link_frequencies) {
dev_err(dev, "link-frequency property not found in DT\n");
return -EINVAL;
ret = -EINVAL;
goto check_hwcfg_error;
}
/* Check that link frequences for all the modes are in device tree */
fq = hi846_check_link_freqs(hi846, &bus_cfg);
if (fq) {
dev_err(dev, "Link frequency of %lld is not supported\n", fq);
return -EINVAL;
ret = -EINVAL;
goto check_hwcfg_error;
}
v4l2_fwnode_endpoint_free(&bus_cfg);
@ -2044,6 +2046,10 @@ static int hi846_parse_dt(struct hi846 *hi846, struct device *dev)
}
return 0;
check_hwcfg_error:
v4l2_fwnode_endpoint_free(&bus_cfg);
return ret;
}
static int hi846_probe(struct i2c_client *client)

File diff suppressed because it is too large Load Diff

3327
drivers/media/i2c/ov08x40.c Normal file

File diff suppressed because it is too large Load Diff

View File

@ -16,9 +16,7 @@
#include <linux/clk.h>
#include <linux/slab.h>
#include <linux/delay.h>
#include <linux/gpio.h>
#include <linux/gpio/consumer.h>
#include <linux/of_gpio.h>
#include <linux/v4l2-mediabus.h>
#include <linux/videodev2.h>

1018
drivers/media/i2c/ov4689.c Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1090,7 +1090,7 @@ static int ov5645_probe(struct i2c_client *client)
}
/* get system clock (xclk) */
ov5645->xclk = devm_clk_get(dev, "xclk");
ov5645->xclk = devm_clk_get(dev, NULL);
if (IS_ERR(ov5645->xclk)) {
dev_err(dev, "could not get xclk");
return PTR_ERR(ov5645->xclk);

View File

@ -2597,6 +2597,7 @@ static void ov5648_remove(struct i2c_client *client)
v4l2_ctrl_handler_free(&sensor->ctrls.handler);
mutex_destroy(&sensor->mutex);
media_entity_cleanup(&subdev->entity);
v4l2_fwnode_endpoint_free(&sensor->endpoint);
}
static const struct dev_pm_ops ov5648_pm_ops = {

View File

@ -15,7 +15,6 @@
#include <linux/i2c.h>
#include <linux/delay.h>
#include <linux/videodev2.h>
#include <linux/gpio.h>
#include <linux/gpio/consumer.h>
#include <media/v4l2-device.h>
#include <media/v4l2-event.h>

View File

@ -2110,17 +2110,18 @@ static int ov8856_set_stream(struct v4l2_subdev *sd, int enable)
return ret;
}
static int __ov8856_power_on(struct ov8856 *ov8856)
static int ov8856_power_on(struct device *dev)
{
struct i2c_client *client = v4l2_get_subdevdata(&ov8856->sd);
struct v4l2_subdev *sd = dev_get_drvdata(dev);
struct ov8856 *ov8856 = to_ov8856(sd);
int ret;
if (is_acpi_node(dev_fwnode(&client->dev)))
if (is_acpi_node(dev_fwnode(dev)))
return 0;
ret = clk_prepare_enable(ov8856->xvclk);
if (ret < 0) {
dev_err(&client->dev, "failed to enable xvclk\n");
dev_err(dev, "failed to enable xvclk\n");
return ret;
}
@ -2132,7 +2133,7 @@ static int __ov8856_power_on(struct ov8856 *ov8856)
ret = regulator_bulk_enable(ARRAY_SIZE(ov8856_supply_names),
ov8856->supplies);
if (ret < 0) {
dev_err(&client->dev, "failed to enable regulators\n");
dev_err(dev, "failed to enable regulators\n");
goto disable_clk;
}
@ -2148,17 +2149,20 @@ disable_clk:
return ret;
}
static void __ov8856_power_off(struct ov8856 *ov8856)
static int ov8856_power_off(struct device *dev)
{
struct i2c_client *client = v4l2_get_subdevdata(&ov8856->sd);
struct v4l2_subdev *sd = dev_get_drvdata(dev);
struct ov8856 *ov8856 = to_ov8856(sd);
if (is_acpi_node(dev_fwnode(&client->dev)))
return;
if (is_acpi_node(dev_fwnode(dev)))
return 0;
gpiod_set_value_cansleep(ov8856->reset_gpio, 1);
regulator_bulk_disable(ARRAY_SIZE(ov8856_supply_names),
ov8856->supplies);
clk_disable_unprepare(ov8856->xvclk);
return 0;
}
static int __maybe_unused ov8856_suspend(struct device *dev)
@ -2170,7 +2174,7 @@ static int __maybe_unused ov8856_suspend(struct device *dev)
if (ov8856->streaming)
ov8856_stop_streaming(ov8856);
__ov8856_power_off(ov8856);
ov8856_power_off(dev);
mutex_unlock(&ov8856->mutex);
return 0;
@ -2184,7 +2188,7 @@ static int __maybe_unused ov8856_resume(struct device *dev)
mutex_lock(&ov8856->mutex);
__ov8856_power_on(ov8856);
ov8856_power_on(dev);
if (ov8856->streaming) {
ret = ov8856_start_streaming(ov8856);
if (ret) {
@ -2451,7 +2455,7 @@ static void ov8856_remove(struct i2c_client *client)
pm_runtime_disable(&client->dev);
mutex_destroy(&ov8856->mutex);
__ov8856_power_off(ov8856);
ov8856_power_off(&client->dev);
}
static int ov8856_probe(struct i2c_client *client)
@ -2475,7 +2479,7 @@ static int ov8856_probe(struct i2c_client *client)
full_power = acpi_dev_state_d0(&client->dev);
if (full_power) {
ret = __ov8856_power_on(ov8856);
ret = ov8856_power_on(&client->dev);
if (ret) {
dev_err(&client->dev, "failed to power on\n");
return ret;
@ -2531,13 +2535,14 @@ probe_error_v4l2_ctrl_handler_free:
mutex_destroy(&ov8856->mutex);
probe_power_off:
__ov8856_power_off(ov8856);
ov8856_power_off(&client->dev);
return ret;
}
static const struct dev_pm_ops ov8856_pm_ops = {
SET_SYSTEM_SLEEP_PM_OPS(ov8856_suspend, ov8856_resume)
SET_RUNTIME_PM_OPS(ov8856_power_off, ov8856_power_on, NULL)
};
#ifdef CONFIG_ACPI

View File

@ -10,7 +10,6 @@
*/
#include <linux/clk.h>
#include <linux/delay.h>
#include <linux/gpio.h>
#include <linux/gpio/consumer.h>
#include <linux/i2c.h>
#include <linux/kernel.h>
@ -30,7 +29,6 @@
#include <media/v4l2-image-sizes.h>
#include <media/v4l2-subdev.h>
#include <media/v4l2-mediabus.h>
#include <media/i2c/ov9650.h>
static int debug;
module_param(debug, int, 0644);
@ -1402,38 +1400,6 @@ static const struct v4l2_subdev_ops ov965x_subdev_ops = {
.video = &ov965x_video_ops,
};
/*
* Reset and power down GPIOs configuration
*/
static int ov965x_configure_gpios_pdata(struct ov965x *ov965x,
const struct ov9650_platform_data *pdata)
{
int ret, i;
int gpios[NUM_GPIOS];
struct device *dev = regmap_get_device(ov965x->regmap);
gpios[GPIO_PWDN] = pdata->gpio_pwdn;
gpios[GPIO_RST] = pdata->gpio_reset;
for (i = 0; i < ARRAY_SIZE(ov965x->gpios); i++) {
int gpio = gpios[i];
if (!gpio_is_valid(gpio))
continue;
ret = devm_gpio_request_one(dev, gpio,
GPIOF_OUT_INIT_HIGH, "OV965X");
if (ret < 0)
return ret;
v4l2_dbg(1, debug, &ov965x->sd, "set gpio %d to 1\n", gpio);
gpio_set_value_cansleep(gpio, 1);
gpio_export(gpio, 0);
ov965x->gpios[i] = gpio_to_desc(gpio);
}
return 0;
}
static int ov965x_configure_gpios(struct ov965x *ov965x)
{
struct device *dev = regmap_get_device(ov965x->regmap);
@ -1493,7 +1459,6 @@ out:
static int ov965x_probe(struct i2c_client *client)
{
const struct ov9650_platform_data *pdata = client->dev.platform_data;
struct v4l2_subdev *sd;
struct ov965x *ov965x;
int ret;
@ -1513,17 +1478,7 @@ static int ov965x_probe(struct i2c_client *client)
return PTR_ERR(ov965x->regmap);
}
if (pdata) {
if (pdata->mclk_frequency == 0) {
dev_err(&client->dev, "MCLK frequency not specified\n");
return -EINVAL;
}
ov965x->mclk_frequency = pdata->mclk_frequency;
ret = ov965x_configure_gpios_pdata(ov965x, pdata);
if (ret < 0)
return ret;
} else if (dev_fwnode(&client->dev)) {
if (dev_fwnode(&client->dev)) {
ov965x->clk = devm_clk_get(&client->dev, NULL);
if (IS_ERR(ov965x->clk))
return PTR_ERR(ov965x->clk);
@ -1534,7 +1489,7 @@ static int ov965x_probe(struct i2c_client *client)
return ret;
} else {
dev_err(&client->dev,
"Neither platform data nor device property specified\n");
"No device properties specified\n");
return -EINVAL;
}

File diff suppressed because it is too large Load Diff

1694
drivers/media/i2c/tc358746.c Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1380,9 +1380,7 @@ static int subdev_notifier_bound(struct v4l2_async_notifier *notifier,
/* Find platform data for this sensor subdev */
for (i = 0; i < ARRAY_SIZE(fmd->sensor); i++)
if (fmd->sensor[i].asd &&
fmd->sensor[i].asd->match.fwnode ==
of_fwnode_handle(subdev->dev->of_node))
if (fmd->sensor[i].asd == asd)
si = &fmd->sensor[i];
if (si == NULL)

View File

@ -1043,6 +1043,7 @@ const char *v4l2_ctrl_get_name(u32 id)
case V4L2_CID_UNIT_CELL_SIZE: return "Unit Cell Size";
case V4L2_CID_CAMERA_ORIENTATION: return "Camera Orientation";
case V4L2_CID_CAMERA_SENSOR_ROTATION: return "Camera Sensor Rotation";
case V4L2_CID_HDR_SENSOR_MODE: return "HDR Sensor Mode";
/* FM Radio Modulator controls */
/* Keep the order of the 'case's the same as in v4l2-controls.h! */
@ -1370,6 +1371,7 @@ void v4l2_ctrl_fill(u32 id, const char **name, enum v4l2_ctrl_type *type,
case V4L2_CID_STATELESS_H264_START_CODE:
case V4L2_CID_CAMERA_ORIENTATION:
case V4L2_CID_MPEG_VIDEO_INTRA_REFRESH_PERIOD_TYPE:
case V4L2_CID_HDR_SENSOR_MODE:
*type = V4L2_CTRL_TYPE_MENU;
break;
case V4L2_CID_LINK_FREQ:

View File

@ -318,6 +318,20 @@ static int call_get_mbus_config(struct v4l2_subdev *sd, unsigned int pad,
sd->ops->pad->get_mbus_config(sd, pad, config);
}
static int call_s_stream(struct v4l2_subdev *sd, int enable)
{
int ret;
ret = sd->ops->video->s_stream(sd, enable);
if (!enable && ret < 0) {
dev_warn(sd->dev, "disabling streaming failed (%d)\n", ret);
return 0;
}
return ret;
}
#ifdef CONFIG_MEDIA_CONTROLLER
/*
* Create state-management wrapper for pad ops dealing with subdev state. The
@ -377,6 +391,7 @@ static const struct v4l2_subdev_pad_ops v4l2_subdev_call_pad_wrappers = {
static const struct v4l2_subdev_video_ops v4l2_subdev_call_video_wrappers = {
.g_frame_interval = call_g_frame_interval,
.s_frame_interval = call_s_frame_interval,
.s_stream = call_s_stream,
};
const struct v4l2_subdev_ops v4l2_subdev_call_wrappers = {

View File

@ -17,19 +17,21 @@
* from the valid ranges specified in Section 6.9, Table 14, Page 41
* of the D-PHY specification (v1.2).
*/
int phy_mipi_dphy_get_default_config(unsigned long pixel_clock,
static int phy_mipi_dphy_calc_config(unsigned long pixel_clock,
unsigned int bpp,
unsigned int lanes,
unsigned long long hs_clk_rate,
struct phy_configure_opts_mipi_dphy *cfg)
{
unsigned long long hs_clk_rate;
unsigned long long ui;
if (!cfg)
return -EINVAL;
hs_clk_rate = pixel_clock * bpp;
do_div(hs_clk_rate, lanes);
if (!hs_clk_rate) {
hs_clk_rate = pixel_clock * bpp;
do_div(hs_clk_rate, lanes);
}
ui = ALIGN(PSEC_PER_SEC, hs_clk_rate);
do_div(ui, hs_clk_rate);
@ -75,8 +77,29 @@ int phy_mipi_dphy_get_default_config(unsigned long pixel_clock,
return 0;
}
int phy_mipi_dphy_get_default_config(unsigned long pixel_clock,
unsigned int bpp,
unsigned int lanes,
struct phy_configure_opts_mipi_dphy *cfg)
{
return phy_mipi_dphy_calc_config(pixel_clock, bpp, lanes, 0, cfg);
}
EXPORT_SYMBOL(phy_mipi_dphy_get_default_config);
int phy_mipi_dphy_get_default_config_for_hsclk(unsigned long long hs_clk_rate,
unsigned int lanes,
struct phy_configure_opts_mipi_dphy *cfg)
{
if (!hs_clk_rate)
return -EINVAL;
return phy_mipi_dphy_calc_config(0, 0, lanes, hs_clk_rate, cfg);
}
EXPORT_SYMBOL(phy_mipi_dphy_get_default_config_for_hsclk);
/*
* Validate D-PHY configuration according to MIPI D-PHY specification
* (v1.2, Section Section 6.9 "Global Operation Timing Parameters").

View File

@ -188,6 +188,28 @@ static int imgu_subdev_set_fmt(struct v4l2_subdev *sd,
return 0;
}
static struct v4l2_rect *
imgu_subdev_get_crop(struct imgu_v4l2_subdev *sd,
struct v4l2_subdev_state *sd_state, unsigned int pad,
enum v4l2_subdev_format_whence which)
{
if (which == V4L2_SUBDEV_FORMAT_TRY)
return v4l2_subdev_get_try_crop(&sd->subdev, sd_state, pad);
else
return &sd->rect.eff;
}
static struct v4l2_rect *
imgu_subdev_get_compose(struct imgu_v4l2_subdev *sd,
struct v4l2_subdev_state *sd_state, unsigned int pad,
enum v4l2_subdev_format_whence which)
{
if (which == V4L2_SUBDEV_FORMAT_TRY)
return v4l2_subdev_get_try_compose(&sd->subdev, sd_state, pad);
else
return &sd->rect.bds;
}
static int imgu_subdev_get_selection(struct v4l2_subdev *sd,
struct v4l2_subdev_state *sd_state,
struct v4l2_subdev_selection *sel)
@ -200,18 +222,12 @@ static int imgu_subdev_get_selection(struct v4l2_subdev *sd,
switch (sel->target) {
case V4L2_SEL_TGT_CROP:
if (sel->which == V4L2_SUBDEV_FORMAT_TRY)
sel->r = *v4l2_subdev_get_try_crop(sd, sd_state,
sel->pad);
else
sel->r = imgu_sd->rect.eff;
sel->r = *imgu_subdev_get_crop(imgu_sd, sd_state, sel->pad,
sel->which);
return 0;
case V4L2_SEL_TGT_COMPOSE:
if (sel->which == V4L2_SUBDEV_FORMAT_TRY)
sel->r = *v4l2_subdev_get_try_compose(sd, sd_state,
sel->pad);
else
sel->r = imgu_sd->rect.bds;
sel->r = *imgu_subdev_get_compose(imgu_sd, sd_state, sel->pad,
sel->which);
return 0;
default:
return -EINVAL;
@ -223,10 +239,9 @@ static int imgu_subdev_set_selection(struct v4l2_subdev *sd,
struct v4l2_subdev_selection *sel)
{
struct imgu_device *imgu = v4l2_get_subdevdata(sd);
struct imgu_v4l2_subdev *imgu_sd = container_of(sd,
struct imgu_v4l2_subdev,
subdev);
struct v4l2_rect *rect, *try_sel;
struct imgu_v4l2_subdev *imgu_sd =
container_of(sd, struct imgu_v4l2_subdev, subdev);
struct v4l2_rect *rect;
dev_dbg(&imgu->pci_dev->dev,
"set subdev %u sel which %u target 0x%4x rect [%ux%u]",
@ -238,22 +253,18 @@ static int imgu_subdev_set_selection(struct v4l2_subdev *sd,
switch (sel->target) {
case V4L2_SEL_TGT_CROP:
try_sel = v4l2_subdev_get_try_crop(sd, sd_state, sel->pad);
rect = &imgu_sd->rect.eff;
rect = imgu_subdev_get_crop(imgu_sd, sd_state, sel->pad,
sel->which);
break;
case V4L2_SEL_TGT_COMPOSE:
try_sel = v4l2_subdev_get_try_compose(sd, sd_state, sel->pad);
rect = &imgu_sd->rect.bds;
rect = imgu_subdev_get_compose(imgu_sd, sd_state, sel->pad,
sel->which);
break;
default:
return -EINVAL;
}
if (sel->which == V4L2_SUBDEV_FORMAT_TRY)
*try_sel = sel->r;
else
*rect = sel->r;
*rect = sel->r;
return 0;
}

View File

@ -279,6 +279,9 @@ int phy_mipi_dphy_get_default_config(unsigned long pixel_clock,
unsigned int bpp,
unsigned int lanes,
struct phy_configure_opts_mipi_dphy *cfg);
int phy_mipi_dphy_get_default_config_for_hsclk(unsigned long long hs_clk_rate,
unsigned int lanes,
struct phy_configure_opts_mipi_dphy *cfg);
int phy_mipi_dphy_config_validate(struct phy_configure_opts_mipi_dphy *cfg);
#endif /* __PHY_MIPI_DPHY_H_ */

View File

@ -1,24 +0,0 @@
/* SPDX-License-Identifier: GPL-2.0-only */
/*
* OV9650/OV9652 camera sensors driver
*
* Copyright (C) 2013 Sylwester Nawrocki <sylvester.nawrocki@gmail.com>
*/
#ifndef OV9650_H_
#define OV9650_H_
/**
* struct ov9650_platform_data - ov9650 driver platform data
* @mclk_frequency: the sensor's master clock frequency in Hz
* @gpio_pwdn: number of a GPIO connected to OV965X PWDN pin
* @gpio_reset: number of a GPIO connected to OV965X RESET pin
*
* If any of @gpio_pwdn or @gpio_reset are unused then they should be
* set to a negative value. @mclk_frequency must always be specified.
*/
struct ov9650_platform_data {
unsigned long mclk_frequency;
int gpio_pwdn;
int gpio_reset;
};
#endif /* OV9650_H_ */

View File

@ -237,7 +237,7 @@ struct media_pad {
* @link_validate: Return whether a link is valid from the entity point of
* view. The media_pipeline_start() function
* validates all links by calling this operation. Optional.
* @has_pad_interdep: Return whether a two pads inside the entity are
* @has_pad_interdep: Return whether two pads of the entity are
* interdependent. If two pads are interdependent they are
* part of the same pipeline and enabling one of the pads
* means that the other pad will become "locked" and
@ -1144,7 +1144,7 @@ __must_check int __media_pipeline_start(struct media_pad *pad,
* media_pipeline_stop - Mark a pipeline as not streaming
* @pad: Starting pad
*
* Mark all pads connected to a given pads through enabled links, either
* Mark all pads connected to a given pad through enabled links, either
* directly or indirectly, as not streaming. The media_pad pipe field is
* reset to %NULL.
*

View File

@ -176,7 +176,10 @@ struct v4l2_subdev_io_pin_config {
* @s_register: callback for VIDIOC_DBG_S_REGISTER() ioctl handler code.
*
* @s_power: puts subdevice in power saving mode (on == 0) or normal operation
* mode (on == 1).
* mode (on == 1). DEPRECATED. See
* Documentation/driver-api/media/camera-sensor.rst . pre_streamon and
* post_streamoff callbacks can be used for e.g. setting the bus to LP-11
* mode before s_stream is called.
*
* @interrupt_service_routine: Called by the bridge chip's interrupt service
* handler, when an interrupt status has be raised due to this subdev,
@ -437,8 +440,10 @@ enum v4l2_subdev_pre_streamon_flags {
* @g_input_status: get input status. Same as the status field in the
* &struct v4l2_input
*
* @s_stream: used to notify the driver that a video stream will start or has
* stopped.
* @s_stream: start (enabled == 1) or stop (enabled == 0) streaming on the
* sub-device. Failure on stop will remove any resources acquired in
* streaming start, while the error code is still returned by the driver.
* Also see call_s_stream wrapper in v4l2-subdev.c.
*
* @g_pixelaspect: callback to return the pixelaspect ratio.
*

View File

@ -69,7 +69,7 @@
#define MEDIA_BUS_FMT_RGB121212_1X36 0x1019
#define MEDIA_BUS_FMT_RGB161616_1X48 0x101a
/* YUV (including grey) - next is 0x202e */
/* YUV (including grey) - next is 0x202f */
#define MEDIA_BUS_FMT_Y8_1X8 0x2001
#define MEDIA_BUS_FMT_UV8_1X8 0x2015
#define MEDIA_BUS_FMT_UYVY8_1_5X8 0x2002
@ -92,6 +92,7 @@
#define MEDIA_BUS_FMT_YUYV12_2X12 0x201e
#define MEDIA_BUS_FMT_YVYU12_2X12 0x201f
#define MEDIA_BUS_FMT_Y14_1X14 0x202d
#define MEDIA_BUS_FMT_Y16_1X16 0x202e
#define MEDIA_BUS_FMT_UYVY8_1X16 0x200f
#define MEDIA_BUS_FMT_VYUY8_1X16 0x2010
#define MEDIA_BUS_FMT_YUYV8_1X16 0x2011

View File

@ -1019,6 +1019,8 @@ enum v4l2_auto_focus_range {
#define V4L2_CID_CAMERA_SENSOR_ROTATION (V4L2_CID_CAMERA_CLASS_BASE+35)
#define V4L2_CID_HDR_SENSOR_MODE (V4L2_CID_CAMERA_CLASS_BASE+36)
/* FM Modulator class control IDs */
#define V4L2_CID_FM_TX_CLASS_BASE (V4L2_CTRL_CLASS_FM_TX | 0x900)