Linux Kernel
3.7.1
Main Page
Related Pages
Modules
Namespaces
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Groups
Pages
drivers
media
platform
s5p-fimc
fimc-mdevice.h
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2011 - 2012 Samsung Electronics Co., Ltd.
3
*
4
* This program is free software; you can redistribute it and/or modify
5
* it under the terms of the GNU General Public License version 2 as
6
* published by the Free Software Foundation.
7
*/
8
9
#ifndef FIMC_MDEVICE_H_
10
#define FIMC_MDEVICE_H_
11
12
#include <
linux/clk.h
>
13
#include <
linux/platform_device.h
>
14
#include <
linux/mutex.h
>
15
#include <
media/media-device.h
>
16
#include <
media/media-entity.h
>
17
#include <
media/v4l2-device.h
>
18
#include <
media/v4l2-subdev.h
>
19
20
#include "
fimc-core.h
"
21
#include "
fimc-lite.h
"
22
#include "
mipi-csis.h
"
23
24
/* Group IDs of sensor, MIPI-CSIS, FIMC-LITE and the writeback subdevs. */
25
#define SENSOR_GROUP_ID (1 << 8)
26
#define CSIS_GROUP_ID (1 << 9)
27
#define WRITEBACK_GROUP_ID (1 << 10)
28
#define FIMC_GROUP_ID (1 << 11)
29
#define FLITE_GROUP_ID (1 << 12)
30
31
#define FIMC_MAX_SENSORS 8
32
#define FIMC_MAX_CAMCLKS 2
33
34
struct
fimc_csis_info
{
35
struct
v4l2_subdev
*
sd
;
36
int
id
;
37
};
38
39
struct
fimc_camclk_info
{
40
struct
clk
*
clock
;
41
int
use_count
;
42
unsigned
long
frequency
;
43
};
44
53
struct
fimc_sensor_info
{
54
struct
s5p_fimc_isp_info
pdata
;
55
struct
v4l2_subdev
*
subdev
;
56
struct
fimc_dev
*
host
;
57
};
58
72
struct
fimc_md
{
73
struct
fimc_csis_info
csis
[
CSIS_MAX_ENTITIES
];
74
struct
fimc_sensor_info
sensor
[
FIMC_MAX_SENSORS
];
75
int
num_sensors
;
76
struct
fimc_camclk_info
camclk
[
FIMC_MAX_CAMCLKS
];
77
struct
fimc_lite
*
fimc_lite
[
FIMC_LITE_MAX_DEVS
];
78
struct
fimc_dev
*
fimc
[
FIMC_MAX_DEVS
];
79
struct
media_device
media_dev
;
80
struct
v4l2_device
v4l2_dev
;
81
struct
platform_device
*
pdev
;
82
bool
user_subdev_api
;
83
spinlock_t
slock
;
84
};
85
86
#define is_subdev_pad(pad) (pad == NULL || \
87
media_entity_type(pad->entity) == MEDIA_ENT_T_V4L2_SUBDEV)
88
89
#define me_subtype(me) \
90
((me->type) & (MEDIA_ENT_TYPE_MASK | MEDIA_ENT_SUBTYPE_MASK))
91
92
#define subdev_has_devnode(__sd) (__sd->flags & V4L2_SUBDEV_FL_HAS_DEVNODE)
93
94
static
inline
struct
fimc_md
*entity_to_fimc_mdev(
struct
media_entity
*me)
95
{
96
return
me->
parent
==
NULL
?
NULL
:
97
container_of
(me->
parent
,
struct
fimc_md
,
media_dev
);
98
}
99
100
static
inline
void
fimc_md_graph_lock(
struct
fimc_dev
*
fimc
)
101
{
102
mutex_lock
(&fimc->
vid_cap
.vfd.entity.parent->graph_mutex);
103
}
104
105
static
inline
void
fimc_md_graph_unlock(
struct
fimc_dev
*
fimc
)
106
{
107
mutex_unlock
(&fimc->
vid_cap
.vfd.entity.parent->graph_mutex);
108
}
109
110
int
fimc_md_set_camclk
(
struct
v4l2_subdev
*
sd
,
bool
on);
111
112
#endif
Generated on Thu Jan 10 2013 13:49:39 for Linux Kernel by
1.8.2