Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c9750456 authored by Matej Dujava's avatar Matej Dujava Committed by Greg Kroah-Hartman
Browse files

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: default avatarMatej Dujava <mdujava@kocurkovo.cz>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 1c597367
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -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,
+20 −15
Original line number Diff line number Diff line
@@ -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 */
}
+20 −23
Original line number Diff line number Diff line
@@ -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
+11 −22
Original line number Diff line number Diff line
@@ -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];

+21 −28
Original line number Diff line number Diff line
@@ -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
Loading