brintos

brintos / linux-shallow public Read only

0
0
Text · 1.1 KiB · 24b15e3 Raw
53 lines · c
1/* SPDX-License-Identifier: GPL-2.0+ */2/*3 * Copyright 2020-2022 Bootlin4 * Author: Paul Kocialkowski <paul.kocialkowski@bootlin.com>5 */6 7#ifndef _SUN6I_MIPI_CSI2_H_8#define _SUN6I_MIPI_CSI2_H_9 10#include <linux/phy/phy.h>11#include <linux/regmap.h>12#include <linux/reset.h>13#include <media/v4l2-device.h>14#include <media/v4l2-fwnode.h>15 16#define SUN6I_MIPI_CSI2_NAME	"sun6i-mipi-csi2"17 18enum sun6i_mipi_csi2_pad {19	SUN6I_MIPI_CSI2_PAD_SINK	= 0,20	SUN6I_MIPI_CSI2_PAD_SOURCE	= 1,21	SUN6I_MIPI_CSI2_PAD_COUNT	= 2,22};23 24struct sun6i_mipi_csi2_format {25	u32	mbus_code;26	u8	data_type;27	u32	bpp;28};29 30struct sun6i_mipi_csi2_bridge {31	struct v4l2_subdev		subdev;32	struct media_pad		pads[SUN6I_MIPI_CSI2_PAD_COUNT];33	struct v4l2_fwnode_endpoint	endpoint;34	struct v4l2_async_notifier	notifier;35	struct v4l2_mbus_framefmt	mbus_format;36	struct mutex			lock; /* Mbus format lock. */37 38	struct v4l2_subdev		*source_subdev;39};40 41struct sun6i_mipi_csi2_device {42	struct device			*dev;43 44	struct regmap			*regmap;45	struct clk			*clock_mod;46	struct reset_control		*reset;47	struct phy			*dphy;48 49	struct sun6i_mipi_csi2_bridge	bridge;50};51 52#endif53