Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
K
kernel
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
phytec
vm016-mx8m
kernel
Commits
a7cbb138
Commit
a7cbb138
authored
Sep 23, 2019
by
Enrico Scholz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
onsemi: core: added 'hblank (effective)' control
Signed-off-by:
Enrico Scholz
<
enrico.scholz@sigma-chemnitz.de
>
parent
7136bacf
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
0 deletions
+27
-0
drivers/media/i2c/onsemi/onsemi-core.c
drivers/media/i2c/onsemi/onsemi-core.c
+26
-0
drivers/media/i2c/onsemi/onsemi-core.h
drivers/media/i2c/onsemi/onsemi-core.h
+1
-0
No files found.
drivers/media/i2c/onsemi/onsemi-core.c
View file @
a7cbb138
...
...
@@ -2541,6 +2541,21 @@ static int onsemi_g_ctrl(struct v4l2_ctrl *ctrl)
goto
out
;
switch
(
ctrl
->
id
)
{
case
V4L2_CID_X_HBLANK_EFFECTIVE
:
{
unsigned
int
h_size
;
struct
onsemi_v4l_parm
const
*
parm
=
onsemi
->
v4l_parm
;
if
(
!
parm
)
{
rc
=
-
EPIPE
;
goto
out
;
}
onsemi_get_frame_size
(
onsemi
,
parm
,
&
h_size
,
NULL
);
ctrl
->
val
=
h_size
-
parm
->
crop
.
width
;
rc
=
0
;
break
;
}
default:
dev_dbg
(
onsemi
->
dev
,
"unhandled control %08x (%s)
\n
"
,
ctrl
->
id
,
v4l2_ctrl_get_name
(
ctrl
->
id
));
...
...
@@ -2577,6 +2592,17 @@ static struct v4l2_ctrl_config const onsemi_core_ctrls[] = {
.
max
=
65535
,
.
step
=
1
,
.
def
=
1
,
},
{
.
ops
=
&
onsemi_core_ctrl_ops
,
.
id
=
V4L2_CID_X_HBLANK_EFFECTIVE
,
.
name
=
"hblank (effective)"
,
.
type
=
V4L2_CTRL_TYPE_INTEGER
,
.
flags
=
(
V4L2_CTRL_FLAG_READ_ONLY
|
V4L2_CTRL_FLAG_VOLATILE
),
.
min
=
0
,
.
max
=
65535
,
.
step
=
1
,
.
def
=
1
,
},
{
.
ops
=
&
onsemi_core_ctrl_ops
,
.
id
=
V4L2_CID_HFLIP
,
...
...
drivers/media/i2c/onsemi/onsemi-core.h
View file @
a7cbb138
...
...
@@ -51,6 +51,7 @@ enum {
V4L2_CID_X_BLACK_LEVEL_AUTO
,
V4L2_CID_X_FLASH_DELAY
,
V4L2_CID_X_HBLANK_EFFECTIVE
,
};
enum
onsemi_pwr_state
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment