18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0+ */
28c2ecf20Sopenharmony_ci/*
38c2ecf20Sopenharmony_ci * vsp1_sru.h  --  R-Car VSP1 Super Resolution Unit
48c2ecf20Sopenharmony_ci *
58c2ecf20Sopenharmony_ci * Copyright (C) 2013 Renesas Corporation
68c2ecf20Sopenharmony_ci *
78c2ecf20Sopenharmony_ci * Contact: Laurent Pinchart (laurent.pinchart@ideasonboard.com)
88c2ecf20Sopenharmony_ci */
98c2ecf20Sopenharmony_ci#ifndef __VSP1_SRU_H__
108c2ecf20Sopenharmony_ci#define __VSP1_SRU_H__
118c2ecf20Sopenharmony_ci
128c2ecf20Sopenharmony_ci#include <media/media-entity.h>
138c2ecf20Sopenharmony_ci#include <media/v4l2-ctrls.h>
148c2ecf20Sopenharmony_ci#include <media/v4l2-subdev.h>
158c2ecf20Sopenharmony_ci
168c2ecf20Sopenharmony_ci#include "vsp1_entity.h"
178c2ecf20Sopenharmony_ci
188c2ecf20Sopenharmony_cistruct vsp1_device;
198c2ecf20Sopenharmony_ci
208c2ecf20Sopenharmony_ci#define SRU_PAD_SINK				0
218c2ecf20Sopenharmony_ci#define SRU_PAD_SOURCE				1
228c2ecf20Sopenharmony_ci
238c2ecf20Sopenharmony_cistruct vsp1_sru {
248c2ecf20Sopenharmony_ci	struct vsp1_entity entity;
258c2ecf20Sopenharmony_ci
268c2ecf20Sopenharmony_ci	struct v4l2_ctrl_handler ctrls;
278c2ecf20Sopenharmony_ci
288c2ecf20Sopenharmony_ci	unsigned int intensity;
298c2ecf20Sopenharmony_ci};
308c2ecf20Sopenharmony_ci
318c2ecf20Sopenharmony_cistatic inline struct vsp1_sru *to_sru(struct v4l2_subdev *subdev)
328c2ecf20Sopenharmony_ci{
338c2ecf20Sopenharmony_ci	return container_of(subdev, struct vsp1_sru, entity.subdev);
348c2ecf20Sopenharmony_ci}
358c2ecf20Sopenharmony_ci
368c2ecf20Sopenharmony_cistruct vsp1_sru *vsp1_sru_create(struct vsp1_device *vsp1);
378c2ecf20Sopenharmony_ci
388c2ecf20Sopenharmony_ci#endif /* __VSP1_SRU_H__ */
39