cregit-Linux how code gets into the kernel

Release 4.10 drivers/staging/sm750fb/ddk750_power.c

#include "ddk750_chip.h"
#include "ddk750_reg.h"
#include "ddk750_power.h"


void ddk750_set_dpms(DPMS_t state) { unsigned int value; if (sm750_get_chip_type() == SM750LE) { value = PEEK32(CRT_DISPLAY_CTRL) & ~CRT_DISPLAY_CTRL_DPMS_MASK; value |= (state << CRT_DISPLAY_CTRL_DPMS_SHIFT); POKE32(CRT_DISPLAY_CTRL, value); } else { value = PEEK32(SYSTEM_CTRL); value = (value & ~SYSTEM_CTRL_DPMS_MASK) | state; POKE32(SYSTEM_CTRL, value); } }

Contributors

PersonTokensPropCommitsCommitProp
sudip mukherjeesudip mukherjee5574.32%120.00%
mike rapoportmike rapoport1722.97%240.00%
moshe greenmoshe green11.35%120.00%
elise lennionelise lennion11.35%120.00%
Total74100.00%5100.00%


static unsigned int get_power_mode(void) { if (sm750_get_chip_type() == SM750LE) return 0; return PEEK32(POWER_MODE_CTRL) & POWER_MODE_CTRL_MODE_MASK; }

Contributors

PersonTokensPropCommitsCommitProp
sudip mukherjeesudip mukherjee1970.37%116.67%
mike rapoportmike rapoport311.11%233.33%
supriya karanthsupriya karanth311.11%116.67%
elise lennionelise lennion13.70%116.67%
moshe greenmoshe green13.70%116.67%
Total27100.00%6100.00%

/* * SM50x can operate in one of three modes: 0, 1 or Sleep. * On hardware reset, power mode 0 is default. */
void sm750_set_power_mode(unsigned int mode) { unsigned int ctrl = 0; ctrl = PEEK32(POWER_MODE_CTRL) & ~POWER_MODE_CTRL_MODE_MASK; if (sm750_get_chip_type() == SM750LE) return; switch (mode) { case POWER_MODE_CTRL_MODE_MODE0: ctrl |= POWER_MODE_CTRL_MODE_MODE0; break; case POWER_MODE_CTRL_MODE_MODE1: ctrl |= POWER_MODE_CTRL_MODE_MODE1; break; case POWER_MODE_CTRL_MODE_SLEEP: ctrl |= POWER_MODE_CTRL_MODE_SLEEP; break; default: break; } /* Set up other fields in Power Control Register */ if (mode == POWER_MODE_CTRL_MODE_SLEEP) { ctrl &= ~POWER_MODE_CTRL_OSC_INPUT; #ifdef VALIDATION_CHIP ctrl &= ~POWER_MODE_CTRL_336CLK; #endif } else { ctrl |= POWER_MODE_CTRL_OSC_INPUT; #ifdef VALIDATION_CHIP ctrl |= POWER_MODE_CTRL_336CLK; #endif } /* Program new power mode. */ POKE32(POWER_MODE_CTRL, ctrl); }

Contributors

PersonTokensPropCommitsCommitProp
sudip mukherjeesudip mukherjee7566.37%116.67%
mike rapoportmike rapoport2320.35%233.33%
elise lennionelise lennion1311.50%116.67%
arnd bergmannarnd bergmann10.88%116.67%
moshe greenmoshe green10.88%116.67%
Total113100.00%6100.00%


void sm750_set_current_gate(unsigned int gate) { if (get_power_mode() == POWER_MODE_CTRL_MODE_MODE1) POKE32(MODE1_GATE, gate); else POKE32(MODE0_GATE, gate); }

Contributors

PersonTokensPropCommitsCommitProp
sudip mukherjeesudip mukherjee1858.06%125.00%
elise lennionelise lennion1238.71%250.00%
arnd bergmannarnd bergmann13.23%125.00%
Total31100.00%4100.00%

/* * This function enable/disable the 2D engine. */
void sm750_enable_2d_engine(unsigned int enable) { u32 gate; gate = PEEK32(CURRENT_GATE); if (enable) gate |= (CURRENT_GATE_DE | CURRENT_GATE_CSC); else gate &= ~(CURRENT_GATE_DE | CURRENT_GATE_CSC); sm750_set_current_gate(gate); }

Contributors

PersonTokensPropCommitsCommitProp
sudip mukherjeesudip mukherjee3065.22%125.00%
mike rapoportmike rapoport1328.26%125.00%
arnd bergmannarnd bergmann24.35%125.00%
amitoj kaur chawlaamitoj kaur chawla12.17%125.00%
Total46100.00%4100.00%


void sm750_enable_dma(unsigned int enable) { u32 gate; /* Enable DMA Gate */ gate = PEEK32(CURRENT_GATE); if (enable) gate |= CURRENT_GATE_DMA; else gate &= ~CURRENT_GATE_DMA; sm750_set_current_gate(gate); }

Contributors

PersonTokensPropCommitsCommitProp
sudip mukherjeesudip mukherjee3179.49%125.00%
mike rapoportmike rapoport512.82%125.00%
arnd bergmannarnd bergmann25.13%125.00%
amitoj kaur chawlaamitoj kaur chawla12.56%125.00%
Total39100.00%4100.00%

/* * This function enable/disable the GPIO Engine */
void sm750_enable_gpio(unsigned int enable) { u32 gate; /* Enable GPIO Gate */ gate = PEEK32(CURRENT_GATE); if (enable) gate |= CURRENT_GATE_GPIO; else gate &= ~CURRENT_GATE_GPIO; sm750_set_current_gate(gate); }

Contributors

PersonTokensPropCommitsCommitProp
sudip mukherjeesudip mukherjee3179.49%125.00%
mike rapoportmike rapoport512.82%125.00%
arnd bergmannarnd bergmann25.13%125.00%
amitoj kaur chawlaamitoj kaur chawla12.56%125.00%
Total39100.00%4100.00%

/* * This function enable/disable the I2C Engine */
void sm750_enable_i2c(unsigned int enable) { u32 gate; /* Enable I2C Gate */ gate = PEEK32(CURRENT_GATE); if (enable) gate |= CURRENT_GATE_I2C; else gate &= ~CURRENT_GATE_I2C; sm750_set_current_gate(gate); }

Contributors

PersonTokensPropCommitsCommitProp
sudip mukherjeesudip mukherjee3179.49%125.00%
mike rapoportmike rapoport512.82%125.00%
arnd bergmannarnd bergmann25.13%125.00%
amitoj kaur chawlaamitoj kaur chawla12.56%125.00%
Total39100.00%4100.00%


Overall Contributors

PersonTokensPropCommitsCommitProp
sudip mukherjeesudip mukherjee30271.73%16.67%
mike rapoportmike rapoport7116.86%640.00%
elise lennionelise lennion286.65%426.67%
arnd bergmannarnd bergmann102.38%16.67%
amitoj kaur chawlaamitoj kaur chawla40.95%16.67%
supriya karanthsupriya karanth30.71%16.67%
moshe greenmoshe green30.71%16.67%
Total421100.00%15100.00%
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.