diff options
author | André Fabian Silva Delgado <emulatorman@parabola.nu> | 2016-01-20 14:01:31 -0300 |
---|---|---|
committer | André Fabian Silva Delgado <emulatorman@parabola.nu> | 2016-01-20 14:01:31 -0300 |
commit | b4b7ff4b08e691656c9d77c758fc355833128ac0 (patch) | |
tree | 82fcb00e6b918026dc9f2d1f05ed8eee83874cc0 /drivers/staging/sm750fb/ddk750_power.c | |
parent | 35acfa0fc609f2a2cd95cef4a6a9c3a5c38f1778 (diff) |
Linux-libre 4.4-gnupck-4.4-gnu
Diffstat (limited to 'drivers/staging/sm750fb/ddk750_power.c')
-rw-r--r-- | drivers/staging/sm750fb/ddk750_power.c | 71 |
1 files changed, 5 insertions, 66 deletions
diff --git a/drivers/staging/sm750fb/ddk750_power.c b/drivers/staging/sm750fb/ddk750_power.c index e580dab2b..667e4f822 100644 --- a/drivers/staging/sm750fb/ddk750_power.c +++ b/drivers/staging/sm750fb/ddk750_power.c @@ -17,7 +17,7 @@ void ddk750_setDPMS(DPMS_t state) } } -unsigned int getPowerMode(void) +static unsigned int getPowerMode(void) { if (getChipType() == SM750LE) return 0; @@ -108,7 +108,7 @@ void setCurrentGate(unsigned int gate) */ void enable2DEngine(unsigned int enable) { - uint32_t gate; + u32 gate; gate = PEEK32(CURRENT_GATE); if (enable) { @@ -122,53 +122,9 @@ void enable2DEngine(unsigned int enable) setCurrentGate(gate); } - -/* - * This function enable/disable the ZV Port. - */ -void enableZVPort(unsigned int enable) -{ - uint32_t gate; - - /* Enable ZV Port Gate */ - gate = PEEK32(CURRENT_GATE); - if (enable) { - gate = FIELD_SET(gate, CURRENT_GATE, ZVPORT, ON); -#if 1 - /* Using Software I2C */ - gate = FIELD_SET(gate, CURRENT_GATE, GPIO, ON); -#else - /* Using Hardware I2C */ - gate = FIELD_SET(gate, CURRENT_GATE, I2C, ON); -#endif - } else { - /* Disable ZV Port Gate. There is no way to know whether the - GPIO pins are being used or not. Therefore, do not disable the - GPIO gate. */ - gate = FIELD_SET(gate, CURRENT_GATE, ZVPORT, OFF); - } - - setCurrentGate(gate); -} - - -void enableSSP(unsigned int enable) -{ - uint32_t gate; - - /* Enable SSP Gate */ - gate = PEEK32(CURRENT_GATE); - if (enable) - gate = FIELD_SET(gate, CURRENT_GATE, SSP, ON); - else - gate = FIELD_SET(gate, CURRENT_GATE, SSP, OFF); - - setCurrentGate(gate); -} - void enableDMA(unsigned int enable) { - uint32_t gate; + u32 gate; /* Enable DMA Gate */ gate = PEEK32(CURRENT_GATE); @@ -185,7 +141,7 @@ void enableDMA(unsigned int enable) */ void enableGPIO(unsigned int enable) { - uint32_t gate; + u32 gate; /* Enable GPIO Gate */ gate = PEEK32(CURRENT_GATE); @@ -198,28 +154,11 @@ void enableGPIO(unsigned int enable) } /* - * This function enable/disable the PWM Engine - */ -void enablePWM(unsigned int enable) -{ - uint32_t gate; - - /* Enable PWM Gate */ - gate = PEEK32(CURRENT_GATE); - if (enable) - gate = FIELD_SET(gate, CURRENT_GATE, PWM, ON); - else - gate = FIELD_SET(gate, CURRENT_GATE, PWM, OFF); - - setCurrentGate(gate); -} - -/* * This function enable/disable the I2C Engine */ void enableI2C(unsigned int enable) { - uint32_t gate; + u32 gate; /* Enable I2C Gate */ gate = PEEK32(CURRENT_GATE); |