linux/drivers/media/pci/mgb4/mgb4_sysfs_in.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (C) 2021-2023 Digiteq Automotive
 *     author: Martin Tuma <[email protected]>
 *
 * This module handles all the sysfs info/configuration that is related to the
 * v4l2 input devices.
 */

#include <linux/device.h>
#include "mgb4_core.h"
#include "mgb4_i2c.h"
#include "mgb4_vin.h"
#include "mgb4_cmt.h"
#include "mgb4_sysfs.h"

/* Common for both FPDL3 and GMSL */

static ssize_t input_id_show(struct device *dev,
			     struct device_attribute *attr, char *buf)
{}

static ssize_t oldi_lane_width_show(struct device *dev,
				    struct device_attribute *attr, char *buf)
{}

/*
 * OLDI lane width change is expected to be called on live streams. Video device
 * locking/queue check is not needed.
 */
static ssize_t oldi_lane_width_store(struct device *dev,
				     struct device_attribute *attr,
				     const char *buf, size_t count)
{}

static ssize_t color_mapping_show(struct device *dev,
				  struct device_attribute *attr, char *buf)
{}

/*
 * Color mapping change is expected to be called on live streams. Video device
 * locking/queue check is not needed.
 */
static ssize_t color_mapping_store(struct device *dev,
				   struct device_attribute *attr,
				   const char *buf, size_t count)
{}

static ssize_t link_status_show(struct device *dev,
				struct device_attribute *attr, char *buf)
{}

static ssize_t stream_status_show(struct device *dev,
				  struct device_attribute *attr, char *buf)
{}

static ssize_t video_width_show(struct device *dev,
				struct device_attribute *attr, char *buf)
{}

static ssize_t video_height_show(struct device *dev,
				 struct device_attribute *attr, char *buf)
{}

static ssize_t hsync_status_show(struct device *dev,
				 struct device_attribute *attr, char *buf)
{}

static ssize_t vsync_status_show(struct device *dev,
				 struct device_attribute *attr, char *buf)
{}

static ssize_t hsync_gap_length_show(struct device *dev,
				     struct device_attribute *attr,
				     char *buf)
{}

/*
 * HSYNC gap length change is expected to be called on live streams. Video
 * device locking/queue check is not needed.
 */
static ssize_t hsync_gap_length_store(struct device *dev,
				      struct device_attribute *attr,
				      const char *buf, size_t count)
{}

static ssize_t vsync_gap_length_show(struct device *dev,
				     struct device_attribute *attr, char *buf)
{}

/*
 * VSYNC gap length change is expected to be called on live streams. Video
 * device locking/queue check is not needed.
 */
static ssize_t vsync_gap_length_store(struct device *dev,
				      struct device_attribute *attr,
				      const char *buf, size_t count)
{}

static ssize_t pclk_frequency_show(struct device *dev,
				   struct device_attribute *attr, char *buf)
{}

static ssize_t hsync_width_show(struct device *dev,
				struct device_attribute *attr, char *buf)
{}

static ssize_t vsync_width_show(struct device *dev,
				struct device_attribute *attr, char *buf)
{}

static ssize_t hback_porch_show(struct device *dev,
				struct device_attribute *attr, char *buf)
{}

static ssize_t hfront_porch_show(struct device *dev,
				 struct device_attribute *attr, char *buf)
{}

static ssize_t vback_porch_show(struct device *dev,
				struct device_attribute *attr, char *buf)
{}

static ssize_t vfront_porch_show(struct device *dev,
				 struct device_attribute *attr, char *buf)
{}

static ssize_t frequency_range_show(struct device *dev,
				    struct device_attribute *attr, char *buf)
{}

static ssize_t frequency_range_store(struct device *dev,
				     struct device_attribute *attr,
				     const char *buf, size_t count)
{}

/* FPDL3 only */

static ssize_t fpdl3_input_width_show(struct device *dev,
				      struct device_attribute *attr, char *buf)
{}

/*
 * FPD-Link width change is expected to be called on live streams. Video device
 * locking/queue check is not needed.
 */
static ssize_t fpdl3_input_width_store(struct device *dev,
				       struct device_attribute *attr,
				       const char *buf, size_t count)
{}

/* GMSL only */

static ssize_t gmsl_mode_show(struct device *dev,
			      struct device_attribute *attr, char *buf)
{}

/*
 * GMSL mode change is expected to be called on live streams. Video device
 * locking/queue check is not needed.
 */
static ssize_t gmsl_mode_store(struct device *dev,
			       struct device_attribute *attr, const char *buf,
			       size_t count)
{}

static ssize_t gmsl_stream_id_show(struct device *dev,
				   struct device_attribute *attr, char *buf)
{}

static ssize_t gmsl_stream_id_store(struct device *dev,
				    struct device_attribute *attr,
				    const char *buf, size_t count)
{}

static ssize_t gmsl_fec_show(struct device *dev, struct device_attribute *attr,
			     char *buf)
{}

/*
 * GMSL FEC change is expected to be called on live streams. Video device
 * locking/queue check is not needed.
 */
static ssize_t gmsl_fec_store(struct device *dev, struct device_attribute *attr,
			      const char *buf, size_t count)
{}

static DEVICE_ATTR_RO(input_id);
static DEVICE_ATTR_RW(oldi_lane_width);
static DEVICE_ATTR_RW(color_mapping);
static DEVICE_ATTR_RO(link_status);
static DEVICE_ATTR_RO(stream_status);
static DEVICE_ATTR_RO(video_width);
static DEVICE_ATTR_RO(video_height);
static DEVICE_ATTR_RO(hsync_status);
static DEVICE_ATTR_RO(vsync_status);
static DEVICE_ATTR_RW(hsync_gap_length);
static DEVICE_ATTR_RW(vsync_gap_length);
static DEVICE_ATTR_RO(pclk_frequency);
static DEVICE_ATTR_RO(hsync_width);
static DEVICE_ATTR_RO(vsync_width);
static DEVICE_ATTR_RO(hback_porch);
static DEVICE_ATTR_RO(hfront_porch);
static DEVICE_ATTR_RO(vback_porch);
static DEVICE_ATTR_RO(vfront_porch);
static DEVICE_ATTR_RW(frequency_range);

static DEVICE_ATTR_RW(fpdl3_input_width);

static DEVICE_ATTR_RW(gmsl_mode);
static DEVICE_ATTR_RW(gmsl_stream_id);
static DEVICE_ATTR_RW(gmsl_fec);

struct attribute *mgb4_fpdl3_in_attrs[] =;

struct attribute *mgb4_gmsl_in_attrs[] =;