Commit 12fdba56 authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab
Browse files

Merge tag 'for-5.18-2.6-signed' of git://linuxtv.org/sailus/media_tree into media_stage

Even yet more V4L2 patches for 5.18

* tag 'for-5.18-2.6-signed' of git://linuxtv.org/sailus/media_tree

:
  media: i2c: Fix pixel array positions in ov8865
  media: adv7183: Convert to GPIO descriptors
  media: m5mols: Convert to use GPIO descriptors
  media: noon010p30: Convert to use GPIO descriptors
  media: mt9m111: Drop unused include
  media: adv7511: Drop unused include
  media: i2c: isl7998x: Add driver for Intersil ISL7998x
  media: dt-bindings: Add Intersil ISL79987 DT bindings
  media: media-entity: Clarify media_entity_cleanup() usage
  media: i2c: imx274: Drop surplus includes
  media: i2c: ccs: Drop unused include
  v4l: fwnode: Remove now-redundant loop from v4l2_fwnode_parse_reference()
  v4l: fwnode: Drop redunant -ENODATA check in property reference parsing
  media: media-entity: Simplify media_pipeline_start()
  media: media-entity: Add media_pad_is_streaming() helper function
  media: Add a driver for the og01a1b camera sensor
  media: i2c: ov5648: Fix lockdep error
  media: ov5640: Fix set format, v4l2_mbus_pixelcode not updated

Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@kernel.org>
parents 5ad05eca 3d1e4228
Loading
Loading
Loading
Loading
+113 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/media/i2c/isil,isl79987.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Intersil ISL79987 Analog to MIPI CSI-2 decoder

maintainers:
  - Michael Tretter <m.tretter@pengutronix.de>
  - Marek Vasut <marex@denx.de>

description:
  The Intersil ISL79987 is an analog to MIPI CSI-2 decoder which is capable of
  receiving up to four analog stream and multiplexing them into up to four MIPI
  CSI-2 virtual channels, using one MIPI clock lane and 1/2 data lanes.

properties:
  compatible:
    enum:
      - isil,isl79987

  reg:
    maxItems: 1

  reset-gpios:
    maxItems: 1
    description:
      A GPIO spec for the RSTB pin (active high)

  powerdown-gpios:
    maxItems: 1
    description:
      A GPIO spec for the Power Down pin (active high)

  ports:
    $ref: /schemas/graph.yaml#/properties/ports
    properties:
      port@0:
        $ref: /schemas/graph.yaml#/$defs/port-base
        unevaluatedProperties: false
        description: Output port

        properties:
          endpoint:
            $ref: /schemas/media/video-interfaces.yaml#
            unevaluatedProperties: false

            properties:
              data-lanes:
                minItems: 1
                maxItems: 2

            required:
              - data-lanes

    patternProperties:
      "^port@[1-4]$":
        $ref: /schemas/graph.yaml#/properties/port
        description: Input ports

    required:
      - port@0

additionalProperties: false

required:
  - compatible
  - reg
  - ports

examples:
  - |
    #include <dt-bindings/gpio/gpio.h>

    i2c {
      #address-cells = <1>;
      #size-cells = <0>;

      isl7998x_mipi@44 {
        compatible = "isil,isl79987";
        reg = <0x44>;
        powerdown-gpios = <&gpio3 27 GPIO_ACTIVE_HIGH>;
        reset-gpios = <&gpio3 28 GPIO_ACTIVE_HIGH>;

        ports {
          #address-cells = <1>;
          #size-cells = <0>;

          port@0 {
            reg = <0>;
            isl79987_out: endpoint {
              remote-endpoint = <&mipi_csi2_in>;
              data-lanes = <1 2>;
            };
          };

          port@1 {
            reg = <1>;
            endpoint {
              remote-endpoint = <&camera_0>;
            };
          };

          port@2 {
            reg = <2>;
            endpoint {
              remote-endpoint = <&camera_1>;
            };
          };
        };
      };
    };
+14 −0
Original line number Diff line number Diff line
@@ -10006,6 +10006,14 @@ L: linux-iio@vger.kernel.org
F:	Documentation/devicetree/bindings/counter/interrupt-counter.yaml
F:	drivers/counter/interrupt-cnt.c
INTERSIL ISL7998X VIDEO DECODER DRIVER
M:	Michael Tretter <m.tretter@pengutronix.de>
R:	Pengutronix Kernel Team <kernel@pengutronix.de>
L:	linux-media@vger.kernel.org
S:	Maintained
F:	Documentation/devicetree/bindings/media/i2c/isil,isl79987.yaml
F:	drivers/media/i2c/isl7998x.c
INVENSENSE ICM-426xx IMU DRIVER
M:	Jean-Baptiste Maneyrol <jmaneyrol@invensense.com>
L:	linux-iio@vger.kernel.org
@@ -14185,6 +14193,12 @@ M: Harald Welte <laforge@gnumonks.org>
S:	Maintained
F:	drivers/char/pcmcia/cm4040_cs.*
OMNIVISION OG01A1B SENSOR DRIVER
M:	Shawn Tu <shawnx.tu@intel.com>
L:	linux-media@vger.kernel.org
S:	Maintained
F:	drivers/media/i2c/og01a1b.c
OMNIVISION OV02A10 SENSOR DRIVER
M:	Dongchun Zhu <dongchun.zhu@mediatek.com>
L:	linux-media@vger.kernel.org
+23 −0
Original line number Diff line number Diff line
@@ -325,6 +325,16 @@ config VIDEO_BT866
	  To compile this driver as a module, choose M here: the
	  module will be called bt866.

config VIDEO_ISL7998X
	tristate "Intersil ISL7998x video decoder"
	depends on VIDEO_V4L2 && I2C
	depends on OF_GPIO
	select MEDIA_CONTROLLER
	select VIDEO_V4L2_SUBDEV_API
	help
	  Support for Intersil ISL7998x analog to MIPI-CSI2 or
	  BT.656 decoder.

config VIDEO_KS0127
	tristate "KS0127 video decoder"
	depends on VIDEO_V4L2 && I2C
@@ -912,6 +922,19 @@ config VIDEO_IMX412
	  To compile this driver as a module, choose M here: the
	  module will be called imx412.

config VIDEO_OG01A1B
	tristate "OmniVision OG01A1B sensor support"
	depends on I2C && VIDEO_V4L2
	select MEDIA_CONTROLLER
	select VIDEO_V4L2_SUBDEV_API
	select V4L2_FWNODE
	help
	  This is a Video4Linux2 sensor driver for the OmniVision
	  OG01A1B camera.

	  To compile this driver as a module, choose M here: the
	  module will be called og01a1b.

config VIDEO_OV02A10
	tristate "OmniVision OV02A10 sensor support"
	depends on VIDEO_V4L2 && I2C
+2 −0
Original line number Diff line number Diff line
@@ -64,6 +64,7 @@ obj-$(CONFIG_VIDEO_VP27SMPX) += vp27smpx.o
obj-$(CONFIG_VIDEO_SONY_BTF_MPX) += sony-btf-mpx.o
obj-$(CONFIG_VIDEO_UPD64031A) += upd64031a.o
obj-$(CONFIG_VIDEO_UPD64083) += upd64083.o
obj-$(CONFIG_VIDEO_OG01A1B) += og01a1b.o
obj-$(CONFIG_VIDEO_OV02A10) += ov02a10.o
obj-$(CONFIG_VIDEO_OV08D10) += ov08d10.o
obj-$(CONFIG_VIDEO_OV2640) += ov2640.o
@@ -133,6 +134,7 @@ obj-$(CONFIG_VIDEO_IMX334) += imx334.o
obj-$(CONFIG_VIDEO_IMX335)	+= imx335.o
obj-$(CONFIG_VIDEO_IMX355)	+= imx355.o
obj-$(CONFIG_VIDEO_IMX412)	+= imx412.o
obj-$(CONFIG_VIDEO_ISL7998X)	+= isl7998x.o
obj-$(CONFIG_VIDEO_MAX9286)	+= max9286.o
obj-$(CONFIG_VIDEO_MAX9271_LIB)	+= max9271.o
obj-$(CONFIG_VIDEO_RDACM20)	+= rdacm20.o
+25 −26
Original line number Diff line number Diff line
@@ -7,7 +7,7 @@

#include <linux/delay.h>
#include <linux/errno.h>
#include <linux/gpio.h>
#include <linux/gpio/consumer.h>
#include <linux/i2c.h>
#include <linux/init.h>
#include <linux/module.h>
@@ -28,8 +28,8 @@ struct adv7183 {
	v4l2_std_id std; /* Current set standard */
	u32 input;
	u32 output;
	unsigned reset_pin;
	unsigned oe_pin;
	struct gpio_desc *reset_pin;
	struct gpio_desc *oe_pin;
	struct v4l2_mbus_framefmt fmt;
};

@@ -465,9 +465,9 @@ static int adv7183_s_stream(struct v4l2_subdev *sd, int enable)
	struct adv7183 *decoder = to_adv7183(sd);

	if (enable)
		gpio_set_value(decoder->oe_pin, 0);
		gpiod_set_value(decoder->oe_pin, 1);
	else
		gpio_set_value(decoder->oe_pin, 1);
		gpiod_set_value(decoder->oe_pin, 0);
	udelay(1);
	return 0;
}
@@ -531,7 +531,6 @@ static int adv7183_probe(struct i2c_client *client,
	struct v4l2_subdev_format fmt = {
		.which = V4L2_SUBDEV_FORMAT_ACTIVE,
	};
	const unsigned *pin_array;

	/* Check if the adapter supports the needed features */
	if (!i2c_check_functionality(client->adapter, I2C_FUNC_SMBUS_BYTE_DATA))
@@ -540,29 +539,28 @@ static int adv7183_probe(struct i2c_client *client,
	v4l_info(client, "chip found @ 0x%02x (%s)\n",
			client->addr << 1, client->adapter->name);

	pin_array = client->dev.platform_data;
	if (pin_array == NULL)
		return -EINVAL;

	decoder = devm_kzalloc(&client->dev, sizeof(*decoder), GFP_KERNEL);
	if (decoder == NULL)
		return -ENOMEM;

	decoder->reset_pin = pin_array[0];
	decoder->oe_pin = pin_array[1];

	if (devm_gpio_request_one(&client->dev, decoder->reset_pin,
				  GPIOF_OUT_INIT_LOW, "ADV7183 Reset")) {
		v4l_err(client, "failed to request GPIO %d\n", decoder->reset_pin);
		return -EBUSY;
	}

	if (devm_gpio_request_one(&client->dev, decoder->oe_pin,
				  GPIOF_OUT_INIT_HIGH,
				  "ADV7183 Output Enable")) {
		v4l_err(client, "failed to request GPIO %d\n", decoder->oe_pin);
		return -EBUSY;
	}
	/*
	 * Requesting high will assert reset, the line should be
	 * flagged as active low in descriptor table or machine description.
	 */
	decoder->reset_pin = devm_gpiod_get(&client->dev, "reset",
					    GPIOD_OUT_HIGH);
	if (IS_ERR(decoder->reset_pin))
		return PTR_ERR(decoder->reset_pin);
	gpiod_set_consumer_name(decoder->reset_pin, "ADV7183 Reset");
	/*
	 * Requesting low will start with output disabled, the line should be
	 * flagged as active low in descriptor table or machine description.
	 */
	decoder->oe_pin = devm_gpiod_get(&client->dev, "oe",
					 GPIOD_OUT_LOW);
	if (IS_ERR(decoder->oe_pin))
		return PTR_ERR(decoder->oe_pin);
	gpiod_set_consumer_name(decoder->reset_pin, "ADV7183 Output Enable");

	sd = &decoder->sd;
	v4l2_i2c_subdev_init(sd, client, &adv7183_ops);
@@ -594,7 +592,8 @@ static int adv7183_probe(struct i2c_client *client,
	/* reset chip */
	/* reset pulse width at least 5ms */
	mdelay(10);
	gpio_set_value(decoder->reset_pin, 1);
	/* De-assert reset line (descriptor tagged active low) */
	gpiod_set_value(decoder->reset_pin, 0);
	/* wait 5ms before any further i2c writes are performed */
	mdelay(5);

Loading