Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci-2.6.23
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux
linux-davinci-2.6.23
Commits
d2867be8
Commit
d2867be8
authored
Jul 30, 2008
by
邱宗炽
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ths8200 and FB driver code format adjust
Signed-off-by:
邱宗炽
<
tqiu@neuros.com.cn
>
parent
00d2c3e5
Changes
2
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
278 additions
and
310 deletions
+278
-310
drivers/video/davinci-ths8200.c
drivers/video/davinci-ths8200.c
+127
-127
drivers/video/dm/dm_main.c
drivers/video/dm/dm_main.c
+151
-183
No files found.
drivers/video/davinci-ths8200.c
View file @
d2867be8
...
...
@@ -38,8 +38,7 @@
static
int
ths8200_attach_adapter
(
struct
i2c_adapter
*
adapter
);
static
int
ths8200_detach_client
(
struct
i2c_client
*
client
);
static
int
ths8200_detect_client
(
struct
i2c_adapter
*
adapter
,
int
address
,
int
kind
);
static
int
ths8200_detect_client
(
struct
i2c_adapter
*
adapter
,
int
address
,
int
kind
);
static
inline
int
ths8200_write_value
(
u8
reg
,
u8
value
);
static
inline
int
ths8200_read_value
(
u8
reg
);
...
...
@@ -56,8 +55,7 @@ static struct i2c_driver ths8200_driver = {
};
/* I2C Addresses to scan */
static
unsigned
short
normal_i2c
[]
=
{
0x20
,
\
I2C_CLIENT_END
};
static
unsigned
short
normal_i2c
[]
=
{
0x20
,
I2C_CLIENT_END
};
/* This makes all addr_data:s */
I2C_CLIENT_INSMOD
;
...
...
@@ -74,8 +72,7 @@ static inline int ths8200_write_value(u8 reg, u8 value)
{
int
ret
;
ret
=
i2c_smbus_write_byte_data
(
ths8200_client
,
reg
,
value
);
ret
=
i2c_smbus_write_byte_data
(
ths8200_client
,
reg
,
value
);
if
(
ret
!=
0
)
DPRINTK
(
"Write Error Address = %x
\n
"
,
reg
);
...
...
@@ -100,8 +97,7 @@ static int ths8200_detach_client(struct i2c_client *client)
err
=
i2c_detach_client
(
client
);
if
(
err
)
{
DPRINTK
(
"Client deregistration failed, \
client not detached.
\n
"
);
DPRINTK
(
"Client deregistration failed, client not detached.
\n
"
);
return
err
;
}
kfree
(
client
);
...
...
@@ -117,19 +113,17 @@ static int ths8200_detect_client(struct i2c_adapter *adapter,
FN_IN
;
if
(
!
i2c_check_functionality
(
adapter
,
I2C_FUNC_SMBUS_WORD_DATA
|
if
(
!
i2c_check_functionality
(
adapter
,
I2C_FUNC_SMBUS_WORD_DATA
|
I2C_FUNC_SMBUS_WRITE_BYTE
))
{
DPRINTK
(
"Functinality check failed for %s
\n
"
,
client_name
);
DPRINTK
(
"Functinality check failed for %s
\n
"
,
client_name
);
return
err
;
}
ths8200_client
=
kmalloc
(
sizeof
(
struct
i2c_client
),
GFP_KERNEL
);
ths8200_client
=
kmalloc
(
sizeof
(
struct
i2c_client
),
GFP_KERNEL
);
if
(
ths8200_client
==
NULL
)
{
err
=
-
ENOMEM
;
DPRINTK
(
"Couldn't allocate memory for %s
\n
"
,
client_name
);
DPRINTK
(
"Couldn't allocate memory for %s
\n
"
,
client_name
);
return
err
;
}
...
...
@@ -156,7 +150,8 @@ int ths8200_set_480p_mode(void)
ths8200_write_value
(
CHIP_CTL_REG
,
CHIP_SOFTWARE_RESET
);
/* take ths8200 out of reset and in normal operation mode */
ths8200_write_value
(
CHIP_CTL_REG
,
CHIP_SOFTWARE_OUT_OF_RESET
|
ths8200_write_value
(
CHIP_CTL_REG
,
CHIP_SOFTWARE_OUT_OF_RESET
|
CHIP_LOW_FREQUENCY
);
/* place color space conversion control in reset state */
...
...
@@ -177,7 +172,8 @@ int ths8200_set_480p_mode(void)
CSC_PROTECTION_ON
);
/* set YCx20 External Sync */
ths8200_write_value
(
DTG2_CNTL_REG
,
HS_IN_POSITIVE_POLARITY
|
ths8200_write_value
(
DTG2_CNTL_REG
,
HS_IN_POSITIVE_POLARITY
|
VS_IN_POSITIVE_POLARITY
|
HS_OUT_POSITIVE_POLARITY
|
VS_OUT_POSITIVE_POLARITY
);
...
...
@@ -283,7 +279,8 @@ int ths8200_set_480p_mode(void)
ths8200_write_value
(
CHIP_CTL_REG
,
CHIP_SOFTWARE_RESET
);
/* take ths8200 out of reset and in normal operation mode */
ths8200_write_value
(
CHIP_CTL_REG
,
CHIP_SOFTWARE_OUT_OF_RESET
|
ths8200_write_value
(
CHIP_CTL_REG
,
CHIP_SOFTWARE_OUT_OF_RESET
|
CHIP_LOW_FREQUENCY
);
printk
(
KERN_INFO
"THS8200 set video mode as 480p
\n
"
);
...
...
@@ -319,7 +316,8 @@ int ths8200_set_720p_mode(void)
CSC_PROTECTION_ON
);
/* set YCx20 External Sync */
ths8200_write_value
(
DTG2_CNTL_REG
,
HS_IN_POSITIVE_POLARITY
|
ths8200_write_value
(
DTG2_CNTL_REG
,
HS_IN_POSITIVE_POLARITY
|
VS_IN_POSITIVE_POLARITY
|
HS_OUT_POSITIVE_POLARITY
|
VS_OUT_POSITIVE_POLARITY
);
...
...
@@ -436,11 +434,13 @@ int ths8200_set_1080i_mode(void)
FN_IN
;
/* place ths8200 in reset state */
ths8200_write_value
(
CHIP_CTL_REG
,
CHIP_SOFTWARE_RESET
|
ths8200_write_value
(
CHIP_CTL_REG
,
CHIP_SOFTWARE_RESET
|
CHIP_LOW_FREQUENCY
);
/* take ths8200 out of reset and in normal operation mode */
ths8200_write_value
(
CHIP_CTL_REG
,
CHIP_SOFTWARE_OUT_OF_RESET
|
ths8200_write_value
(
CHIP_CTL_REG
,
CHIP_SOFTWARE_OUT_OF_RESET
|
CHIP_LOW_FREQUENCY
);
/* place color space conversion control in reset state */
...
...
@@ -468,7 +468,8 @@ int ths8200_set_1080i_mode(void)
ths8200_write_value
(
CSM_GY_CNTL_MULT_MSB_REG
,
0x00
);
/* set YCx20 External Sync */
ths8200_write_value
(
DTG2_CNTL_REG
,
HS_IN_POSITIVE_POLARITY
|
ths8200_write_value
(
DTG2_CNTL_REG
,
HS_IN_POSITIVE_POLARITY
|
VS_IN_POSITIVE_POLARITY
|
HS_OUT_POSITIVE_POLARITY
|
VS_OUT_POSITIVE_POLARITY
|
...
...
@@ -635,8 +636,7 @@ static __init int ths8200_init(void)
FN_IN
;
if
(
i2c_add_driver
(
&
ths8200_driver
))
{
DPRINTK
(
"Driver registration failed, \
module not inserted.
\n
"
);
DPRINTK
(
"Driver registration failed, module not inserted.
\n
"
);
return
-
ENODEV
;
}
...
...
drivers/video/dm/dm_main.c
View file @
d2867be8
This diff is collapsed.
Click to expand it.
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