staging: sm750fb: fix length of lines, function calls and declaration
This patch breaks lines that are longer than 80 characters and joins together those, that are too short and can be placed at one. Function calls and declarations are updated to fit kernel code style. Signed-off-by: Matej Dujava <mdujava@kocurkovo.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
1c5973675c
commit
c975045656
@ -309,7 +309,8 @@ int ddk750_init_hw(struct initchip_param *pInitParam)
|
||||
* M = {1,...,255}
|
||||
* N = {2,...,15}
|
||||
*/
|
||||
unsigned int sm750_calc_pll_value(unsigned int request_orig, struct pll_value *pll)
|
||||
unsigned int sm750_calc_pll_value(unsigned int request_orig,
|
||||
struct pll_value *pll)
|
||||
{
|
||||
/*
|
||||
* as sm750 register definition,
|
||||
|
@ -29,8 +29,7 @@ static dvi_ctrl_device_t g_dcftSupportedDviController[] = {
|
||||
#endif
|
||||
};
|
||||
|
||||
int dviInit(
|
||||
unsigned char edgeSelect,
|
||||
int dviInit(unsigned char edgeSelect,
|
||||
unsigned char busSelect,
|
||||
unsigned char dualEdgeClkSelect,
|
||||
unsigned char hsyncEnable,
|
||||
@ -39,16 +38,22 @@ int dviInit(
|
||||
unsigned char deskewSetting,
|
||||
unsigned char continuousSyncEnable,
|
||||
unsigned char pllFilterEnable,
|
||||
unsigned char pllFilterValue
|
||||
)
|
||||
unsigned char pllFilterValue)
|
||||
{
|
||||
dvi_ctrl_device_t *pCurrentDviCtrl;
|
||||
|
||||
pCurrentDviCtrl = g_dcftSupportedDviController;
|
||||
if (pCurrentDviCtrl->pfnInit) {
|
||||
return pCurrentDviCtrl->pfnInit(edgeSelect, busSelect, dualEdgeClkSelect, hsyncEnable,
|
||||
vsyncEnable, deskewEnable, deskewSetting, continuousSyncEnable,
|
||||
pllFilterEnable, pllFilterValue);
|
||||
return pCurrentDviCtrl->pfnInit(edgeSelect,
|
||||
busSelect,
|
||||
dualEdgeClkSelect,
|
||||
hsyncEnable,
|
||||
vsyncEnable,
|
||||
deskewEnable,
|
||||
deskewSetting,
|
||||
continuousSyncEnable,
|
||||
pllFilterEnable,
|
||||
pllFilterValue);
|
||||
}
|
||||
return -1; /* error */
|
||||
}
|
||||
|
@ -3,8 +3,7 @@
|
||||
|
||||
/* dvi chip stuffs structros */
|
||||
|
||||
typedef long (*PFN_DVICTRL_INIT)(
|
||||
unsigned char edgeSelect,
|
||||
typedef long (*PFN_DVICTRL_INIT)(unsigned char edgeSelect,
|
||||
unsigned char busSelect,
|
||||
unsigned char dualEdgeClkSelect,
|
||||
unsigned char hsyncEnable,
|
||||
@ -42,8 +41,7 @@ typedef struct _dvi_ctrl_device_t {
|
||||
#define DVI_CTRL_SII164
|
||||
|
||||
/* dvi functions prototype */
|
||||
int dviInit(
|
||||
unsigned char edgeSelect,
|
||||
int dviInit(unsigned char edgeSelect,
|
||||
unsigned char busSelect,
|
||||
unsigned char dualEdgeClkSelect,
|
||||
unsigned char hsyncEnable,
|
||||
@ -52,8 +50,7 @@ int dviInit(
|
||||
unsigned char deskewSetting,
|
||||
unsigned char continuousSyncEnable,
|
||||
unsigned char pllFilterEnable,
|
||||
unsigned char pllFilterValue
|
||||
);
|
||||
unsigned char pllFilterValue);
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -8,9 +8,7 @@
|
||||
#define MAX_HWI2C_FIFO 16
|
||||
#define HWI2C_WAIT_TIMEOUT 0xF0000
|
||||
|
||||
int sm750_hw_i2c_init(
|
||||
unsigned char bus_speed_mode
|
||||
)
|
||||
int sm750_hw_i2c_init(unsigned char bus_speed_mode)
|
||||
{
|
||||
unsigned int value;
|
||||
|
||||
@ -81,11 +79,9 @@ static long hw_i2c_wait_tx_done(void)
|
||||
* Return Value:
|
||||
* Total number of bytes those are actually written.
|
||||
*/
|
||||
static unsigned int hw_i2c_write_data(
|
||||
unsigned char addr,
|
||||
static unsigned int hw_i2c_write_data(unsigned char addr,
|
||||
unsigned int length,
|
||||
unsigned char *buf
|
||||
)
|
||||
unsigned char *buf)
|
||||
{
|
||||
unsigned char count, i;
|
||||
unsigned int total_bytes = 0;
|
||||
@ -148,11 +144,9 @@ static unsigned int hw_i2c_write_data(
|
||||
* Return Value:
|
||||
* Total number of actual bytes read from the slave device
|
||||
*/
|
||||
static unsigned int hw_i2c_read_data(
|
||||
unsigned char addr,
|
||||
static unsigned int hw_i2c_read_data(unsigned char addr,
|
||||
unsigned int length,
|
||||
unsigned char *buf
|
||||
)
|
||||
unsigned char *buf)
|
||||
{
|
||||
unsigned char count, i;
|
||||
unsigned int total_bytes = 0;
|
||||
@ -212,10 +206,7 @@ static unsigned int hw_i2c_read_data(
|
||||
* Return Value:
|
||||
* Register value
|
||||
*/
|
||||
unsigned char sm750_hw_i2c_read_reg(
|
||||
unsigned char addr,
|
||||
unsigned char reg
|
||||
)
|
||||
unsigned char sm750_hw_i2c_read_reg(unsigned char addr, unsigned char reg)
|
||||
{
|
||||
unsigned char value = 0xFF;
|
||||
|
||||
@ -238,11 +229,9 @@ unsigned char sm750_hw_i2c_read_reg(
|
||||
* 0 - Success
|
||||
* -1 - Fail
|
||||
*/
|
||||
int sm750_hw_i2c_write_reg(
|
||||
unsigned char addr,
|
||||
int sm750_hw_i2c_write_reg(unsigned char addr,
|
||||
unsigned char reg,
|
||||
unsigned char data
|
||||
)
|
||||
unsigned char data)
|
||||
{
|
||||
unsigned char value[2];
|
||||
|
||||
|
@ -112,8 +112,7 @@ unsigned short sii164GetDeviceID(void)
|
||||
* 0 - Success
|
||||
* -1 - Fail.
|
||||
*/
|
||||
long sii164InitChip(
|
||||
unsigned char edgeSelect,
|
||||
long sii164InitChip(unsigned char edgeSelect,
|
||||
unsigned char busSelect,
|
||||
unsigned char dualEdgeClkSelect,
|
||||
unsigned char hsyncEnable,
|
||||
@ -122,8 +121,7 @@ long sii164InitChip(
|
||||
unsigned char deskewSetting,
|
||||
unsigned char continuousSyncEnable,
|
||||
unsigned char pllFilterEnable,
|
||||
unsigned char pllFilterValue
|
||||
)
|
||||
unsigned char pllFilterValue)
|
||||
{
|
||||
unsigned char config;
|
||||
|
||||
@ -259,7 +257,6 @@ void sii164ResetChip(void)
|
||||
sii164SetPower(1);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* sii164GetChipString
|
||||
* This function returns a char string name of the current DVI Controller chip.
|
||||
@ -270,7 +267,6 @@ char *sii164GetChipString(void)
|
||||
return gDviCtrlChipName;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* sii164SetPower
|
||||
* This function sets the power configuration of the DVI Controller Chip.
|
||||
@ -278,9 +274,7 @@ char *sii164GetChipString(void)
|
||||
* Input:
|
||||
* powerUp - Flag to set the power down or up
|
||||
*/
|
||||
void sii164SetPower(
|
||||
unsigned char powerUp
|
||||
)
|
||||
void sii164SetPower(unsigned char powerUp)
|
||||
{
|
||||
unsigned char config;
|
||||
|
||||
@ -298,18 +292,16 @@ void sii164SetPower(
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* sii164SelectHotPlugDetectionMode
|
||||
* This function selects the mode of the hot plug detection.
|
||||
*/
|
||||
static void sii164SelectHotPlugDetectionMode(
|
||||
sii164_hot_plug_mode_t hotPlugMode
|
||||
)
|
||||
static void sii164SelectHotPlugDetectionMode(sii164_hot_plug_mode_t hotPlugMode)
|
||||
{
|
||||
unsigned char detectReg;
|
||||
|
||||
detectReg = i2cReadReg(SII164_I2C_ADDRESS, SII164_DETECT) & ~SII164_DETECT_MONITOR_SENSE_OUTPUT_FLAG;
|
||||
detectReg = i2cReadReg(SII164_I2C_ADDRESS, SII164_DETECT) &
|
||||
~SII164_DETECT_MONITOR_SENSE_OUTPUT_FLAG;
|
||||
switch (hotPlugMode) {
|
||||
case SII164_HOTPLUG_DISABLE:
|
||||
detectReg |= SII164_DETECT_MONITOR_SENSE_OUTPUT_HIGH;
|
||||
@ -336,9 +328,7 @@ static void sii164SelectHotPlugDetectionMode(
|
||||
*
|
||||
* enableHotPlug - Enable (=1) / disable (=0) Hot Plug detection
|
||||
*/
|
||||
void sii164EnableHotPlugDetection(
|
||||
unsigned char enableHotPlug
|
||||
)
|
||||
void sii164EnableHotPlugDetection(unsigned char enableHotPlug)
|
||||
{
|
||||
unsigned char detectReg;
|
||||
|
||||
@ -365,7 +355,8 @@ unsigned char sii164IsConnected(void)
|
||||
{
|
||||
unsigned char hotPlugValue;
|
||||
|
||||
hotPlugValue = i2cReadReg(SII164_I2C_ADDRESS, SII164_DETECT) & SII164_DETECT_HOT_PLUG_STATUS_MASK;
|
||||
hotPlugValue = i2cReadReg(SII164_I2C_ADDRESS, SII164_DETECT) &
|
||||
SII164_DETECT_HOT_PLUG_STATUS_MASK;
|
||||
if (hotPlugValue == SII164_DETECT_HOT_PLUG_STATUS_ON)
|
||||
return 1;
|
||||
else
|
||||
@ -384,7 +375,8 @@ unsigned char sii164CheckInterrupt(void)
|
||||
{
|
||||
unsigned char detectReg;
|
||||
|
||||
detectReg = i2cReadReg(SII164_I2C_ADDRESS, SII164_DETECT) & SII164_DETECT_MONITOR_STATE_MASK;
|
||||
detectReg = i2cReadReg(SII164_I2C_ADDRESS, SII164_DETECT) &
|
||||
SII164_DETECT_MONITOR_STATE_MASK;
|
||||
if (detectReg == SII164_DETECT_MONITOR_STATE_CHANGE)
|
||||
return 1;
|
||||
else
|
||||
@ -401,7 +393,8 @@ void sii164ClearInterrupt(void)
|
||||
|
||||
/* Clear the MDI interrupt */
|
||||
detectReg = i2cReadReg(SII164_I2C_ADDRESS, SII164_DETECT);
|
||||
i2cWriteReg(SII164_I2C_ADDRESS, SII164_DETECT, detectReg | SII164_DETECT_MONITOR_STATE_CLEAR);
|
||||
i2cWriteReg(SII164_I2C_ADDRESS, SII164_DETECT,
|
||||
detectReg | SII164_DETECT_MONITOR_STATE_CLEAR);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -13,8 +13,7 @@ typedef enum _sii164_hot_plug_mode_t {
|
||||
|
||||
|
||||
/* Silicon Image SiI164 chip prototype */
|
||||
long sii164InitChip(
|
||||
unsigned char edgeSelect,
|
||||
long sii164InitChip(unsigned char edgeSelect,
|
||||
unsigned char busSelect,
|
||||
unsigned char dualEdgeClkSelect,
|
||||
unsigned char hsyncEnable,
|
||||
@ -23,8 +22,7 @@ long sii164InitChip(
|
||||
unsigned char deskewSetting,
|
||||
unsigned char continuousSyncEnable,
|
||||
unsigned char pllFilterEnable,
|
||||
unsigned char pllFilterValue
|
||||
);
|
||||
unsigned char pllFilterValue);
|
||||
|
||||
unsigned short sii164GetVendorID(void);
|
||||
unsigned short sii164GetDeviceID(void);
|
||||
|
@ -349,8 +349,7 @@ static unsigned char sw_i2c_read_byte(unsigned char ack)
|
||||
* -1 - Fail to initialize the i2c
|
||||
* 0 - Success
|
||||
*/
|
||||
static long sm750le_i2c_init(unsigned char clk_gpio,
|
||||
unsigned char data_gpio)
|
||||
static long sm750le_i2c_init(unsigned char clk_gpio, unsigned char data_gpio)
|
||||
{
|
||||
int i;
|
||||
|
||||
@ -388,10 +387,7 @@ static long sm750le_i2c_init(unsigned char clk_gpio,
|
||||
* -1 - Fail to initialize the i2c
|
||||
* 0 - Success
|
||||
*/
|
||||
long sm750_sw_i2c_init(
|
||||
unsigned char clk_gpio,
|
||||
unsigned char data_gpio
|
||||
)
|
||||
long sm750_sw_i2c_init(unsigned char clk_gpio, unsigned char data_gpio)
|
||||
{
|
||||
int i;
|
||||
|
||||
@ -448,10 +444,7 @@ long sm750_sw_i2c_init(
|
||||
* Return Value:
|
||||
* Register value
|
||||
*/
|
||||
unsigned char sm750_sw_i2c_read_reg(
|
||||
unsigned char addr,
|
||||
unsigned char reg
|
||||
)
|
||||
unsigned char sm750_sw_i2c_read_reg(unsigned char addr, unsigned char reg)
|
||||
{
|
||||
unsigned char data;
|
||||
|
||||
@ -488,11 +481,9 @@ unsigned char sm750_sw_i2c_read_reg(
|
||||
* 0 - Success
|
||||
* -1 - Fail
|
||||
*/
|
||||
long sm750_sw_i2c_write_reg(
|
||||
unsigned char addr,
|
||||
long sm750_sw_i2c_write_reg(unsigned char addr,
|
||||
unsigned char reg,
|
||||
unsigned char data
|
||||
)
|
||||
unsigned char data)
|
||||
{
|
||||
long ret = 0;
|
||||
|
||||
|
@ -28,10 +28,7 @@
|
||||
* -1 - Fail to initialize the i2c
|
||||
* 0 - Success
|
||||
*/
|
||||
long sm750_sw_i2c_init(
|
||||
unsigned char clk_gpio,
|
||||
unsigned char data_gpio
|
||||
);
|
||||
long sm750_sw_i2c_init(unsigned char clk_gpio, unsigned char data_gpio);
|
||||
|
||||
/*
|
||||
* This function reads the slave device's register
|
||||
@ -44,10 +41,7 @@ long sm750_sw_i2c_init(
|
||||
* Return Value:
|
||||
* Register value
|
||||
*/
|
||||
unsigned char sm750_sw_i2c_read_reg(
|
||||
unsigned char addr,
|
||||
unsigned char reg
|
||||
);
|
||||
unsigned char sm750_sw_i2c_read_reg(unsigned char addr, unsigned char reg);
|
||||
|
||||
/*
|
||||
* This function writes a value to the slave device's register
|
||||
@ -62,10 +56,8 @@ unsigned char sm750_sw_i2c_read_reg(
|
||||
* 0 - Success
|
||||
* -1 - Fail
|
||||
*/
|
||||
long sm750_sw_i2c_write_reg(
|
||||
unsigned char addr,
|
||||
long sm750_sw_i2c_write_reg(unsigned char addr,
|
||||
unsigned char reg,
|
||||
unsigned char data
|
||||
);
|
||||
unsigned char data);
|
||||
|
||||
#endif /* _SWI2C_H_ */
|
||||
|
@ -42,7 +42,8 @@ void sm750_hw_de_init(struct lynx_accel *accel)
|
||||
/* dpr1c */
|
||||
reg = 0x3;
|
||||
|
||||
clr = DE_STRETCH_FORMAT_PATTERN_XY | DE_STRETCH_FORMAT_PATTERN_Y_MASK |
|
||||
clr = DE_STRETCH_FORMAT_PATTERN_XY |
|
||||
DE_STRETCH_FORMAT_PATTERN_Y_MASK |
|
||||
DE_STRETCH_FORMAT_PATTERN_X_MASK |
|
||||
DE_STRETCH_FORMAT_ADDRESSING_MASK |
|
||||
DE_STRETCH_FORMAT_SOURCE_HEIGHT_MASK;
|
||||
|
@ -60,15 +60,13 @@ void sm750_hw_cursor_disable(struct lynx_cursor *cursor)
|
||||
poke32(HWC_ADDRESS, 0);
|
||||
}
|
||||
|
||||
void sm750_hw_cursor_setSize(struct lynx_cursor *cursor,
|
||||
int w, int h)
|
||||
void sm750_hw_cursor_setSize(struct lynx_cursor *cursor, int w, int h)
|
||||
{
|
||||
cursor->w = w;
|
||||
cursor->h = h;
|
||||
}
|
||||
|
||||
void sm750_hw_cursor_setPos(struct lynx_cursor *cursor,
|
||||
int x, int y)
|
||||
void sm750_hw_cursor_setPos(struct lynx_cursor *cursor, int x, int y)
|
||||
{
|
||||
u32 reg;
|
||||
|
||||
@ -77,8 +75,7 @@ void sm750_hw_cursor_setPos(struct lynx_cursor *cursor,
|
||||
poke32(HWC_LOCATION, reg);
|
||||
}
|
||||
|
||||
void sm750_hw_cursor_setColor(struct lynx_cursor *cursor,
|
||||
u32 fg, u32 bg)
|
||||
void sm750_hw_cursor_setColor(struct lynx_cursor *cursor, u32 fg, u32 bg)
|
||||
{
|
||||
u32 reg = (fg << HWC_COLOR_12_2_RGB565_SHIFT) &
|
||||
HWC_COLOR_12_2_RGB565_MASK;
|
||||
@ -87,8 +84,8 @@ void sm750_hw_cursor_setColor(struct lynx_cursor *cursor,
|
||||
poke32(HWC_COLOR_3, 0xffe0);
|
||||
}
|
||||
|
||||
void sm750_hw_cursor_setData(struct lynx_cursor *cursor,
|
||||
u16 rop, const u8 *pcol, const u8 *pmsk)
|
||||
void sm750_hw_cursor_setData(struct lynx_cursor *cursor, u16 rop,
|
||||
const u8 *pcol, const u8 *pmsk)
|
||||
{
|
||||
int i, j, count, pitch, offset;
|
||||
u8 color, mask, opr;
|
||||
@ -138,8 +135,8 @@ void sm750_hw_cursor_setData(struct lynx_cursor *cursor,
|
||||
}
|
||||
|
||||
|
||||
void sm750_hw_cursor_setData2(struct lynx_cursor *cursor,
|
||||
u16 rop, const u8 *pcol, const u8 *pmsk)
|
||||
void sm750_hw_cursor_setData2(struct lynx_cursor *cursor, u16 rop,
|
||||
const u8 *pcol, const u8 *pmsk)
|
||||
{
|
||||
int i, j, count, pitch, offset;
|
||||
u8 color, mask;
|
||||
|
Loading…
Reference in New Issue
Block a user