本文整理匯總了C++中EXYNOS4_GPD0函數的典型用法代碼示例。如果您正苦於以下問題:C++ EXYNOS4_GPD0函數的具體用法?C++ EXYNOS4_GPD0怎麽用?C++ EXYNOS4_GPD0使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了EXYNOS4_GPD0函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C++代碼示例。
示例1: s3cfb_lcd_on
int s3cfb_lcd_on(struct platform_device *pdev)
{
#if !defined(CONFIG_FB_MDNIE_PWM)
int err;
err = gpio_request_one(EXYNOS4_GPD0(1), GPIOF_OUT_INIT_HIGH, "GPD0");
if (err) {
printk(KERN_ERR "failed to request GPD0 for lcd reset control\n");
return err;
}
gpio_set_value(GPIO_LCD_EN, GPIO_LEVEL_HIGH);
msleep(40);
/* LVDS_N_SHDN to high*/
gpio_set_value(GPIO_LVDS_NSHDN, GPIO_LEVEL_HIGH);
msleep(300);
#if defined(CONFIG_FB_S5P_S6C1372)
gpio_set_value(GPIO_LED_BACKLIGHT_RESET, GPIO_LEVEL_HIGH);
mdelay(2);
#else
gpio_set_value(GPIO_LCD_LDO_EN, GPIO_LEVEL_HIGH);
msleep(200);
#endif
gpio_set_value(EXYNOS4_GPD0(1), GPIO_LEVEL_HIGH);
gpio_free(EXYNOS4_GPD0(1));
#endif
return 0;
}
示例2: lcd_lte480wv_set_power
static void lcd_lte480wv_set_power(struct plat_lcd_data *pd,
unsigned int power)
{
if (power) {
#if !defined(CONFIG_BACKLIGHT_PWM)
gpio_request_one(EXYNOS4_GPD0(1), GPIOF_OUT_INIT_HIGH, "GPD0");
gpio_free(EXYNOS4_GPD0(1));
#endif
/* fire nRESET on power up */
gpio_request(EXYNOS4_GPX0(6), "GPX0");
gpio_direction_output(EXYNOS4_GPX0(6), 1);
mdelay(100);
gpio_set_value(EXYNOS4_GPX0(6), 0);
mdelay(10);
gpio_set_value(EXYNOS4_GPX0(6), 1);
mdelay(10);
gpio_free(EXYNOS4_GPX0(6));
} else {
#if !defined(CONFIG_BACKLIGHT_PWM)
gpio_request_one(EXYNOS4_GPD0(1), GPIOF_OUT_INIT_LOW, "GPD0");
gpio_free(EXYNOS4_GPD0(1));
#endif
}
}
示例3: s3cfb_backlight_off
int s3cfb_backlight_off(struct platform_device *pdev)
{
#if !defined(CONFIG_BACKLIGHT_PWM)
int err;
/* Backlight Low */
err = gpio_request_one(EXYNOS4_GPD0(0), GPIOF_OUT_INIT_LOW, "GPD0");
if (err) {
printk(KERN_ERR "failed to request GPD0 for "
"lcd backlight control\n");
return err;
}
gpio_free(EXYNOS4_GPD0(0));
/* LED_EN (SPI1_MOSI) Low */
err = gpio_request_one(EXYNOS4_GPB(2), GPIOF_OUT_INIT_LOW, "GPB");
if (err) {
printk(KERN_ERR "failed to request GPB for "
"lcd LED_EN control\n");
return err;
}
gpio_free(EXYNOS4_GPB(2));
#endif
return 0;
}
示例4: s3cfb_lcd_off
int s3cfb_lcd_off(struct platform_device *pdev)
{
#if !defined(CONFIG_FB_MDNIE_PWM)
int err;
err = gpio_request_one(EXYNOS4_GPD0(1), GPIOF_OUT_INIT_LOW, "GPD0");
if (err) {
printk(KERN_ERR "failed to request GPD0 for "
"lcd reset control\n");
return err;
}
/* LVDS_nSHDN low*/
gpio_set_value(EXYNOS4_GPD0(1), GPIO_LEVEL_LOW);
gpio_free(EXYNOS4_GPD0(1));
#if defined(CONFIG_FB_S5P_S6C1372)
gpio_set_value(GPIO_LED_BACKLIGHT_RESET, GPIO_LEVEL_LOW);
msleep(200);
#else
gpio_set_value(GPIO_LCD_LDO_EN, GPIO_LEVEL_LOW);
msleep(200);
#endif
/* LVDS_nSHDN low*/
gpio_set_value(GPIO_LVDS_NSHDN, GPIO_LEVEL_LOW);
msleep(40);
/* Disable LVDS Panel Power, 1.2, 1.8, display 3.3V */
gpio_set_value(GPIO_LCD_EN, GPIO_LEVEL_LOW);
msleep(400);
#endif
return 0;
}
示例5: motor_init_hw
static void motor_init_hw(void)
{
if (gpio_request(EXYNOS4_GPD0(0), "VIBTONE_PWM") < 0)
printk(KERN_ERR "[VIB] gpio requst is failed\n");
else {
gpio_direction_output(EXYNOS4_GPD0(0), 0);
printk(KERN_DEBUG "[VIB] gpio request is succeed\n");
}
}
示例6: ips_bl_on
void ips_bl_on(int on)
{
int err;
err = gpio_request(EXYNOS4_GPD0(1), "PWMEN");
if (err) {
printk(KERN_ERR "failed to request PWMEN for "
"I2C control\n");
//return err;
}
#if !defined(CONFIG_BACKLIGHT_PWM)
gpio_direction_output(EXYNOS4_GPD0(1), 1);
gpio_free(EXYNOS4_GPD0(1));
printk("SCP(%s, %d): LCD_PWM_ON\n", __FUNCTION__, __LINE__);
#else
gpio_direction_output(EXYNOS4_GPD0(1), 0);
s3c_gpio_cfgpin(EXYNOS4_GPD0(1), (0x2 << 4));
gpio_free(EXYNOS4_GPD0(1));
printk("SCP(%s, %d): LCD_PWM_ON\n", __FUNCTION__, __LINE__);
#endif
}
示例7: EXYNOS4_GPD0
&s5p_device_hdmi,
&s5p_device_i2c_hdmiphy,
&s5p_device_jpeg,
&s5p_device_mfc,
&s5p_device_mfc_l,
&s5p_device_mfc_r,
&s5p_device_mixer,
&exynos4_device_ohci,
&origen_device_gpiokeys,
&origen_lcd_hv070wsa,
&origen_device_bluetooth,
};
/* LCD Backlight data */
static struct samsung_bl_gpio_info origen_bl_gpio_info = {
.no = EXYNOS4_GPD0(0),
.func = S3C_GPIO_SFN(2),
};
static struct platform_pwm_backlight_data origen_bl_data = {
.pwm_id = 0,
.pwm_period_ns = 1000,
};
static void __init origen_bt_setup(void)
{
gpio_request(EXYNOS4_GPA0(0), "GPIO BT_UART");
/* 4 UART Pins configuration */
s3c_gpio_cfgrange_nopull(EXYNOS4_GPA0(0), 4, S3C_GPIO_SFN(2));
/* Setup BT Reset, this gpio will be requesed by rfkill-gpio */
s3c_gpio_cfgpin(EXYNOS4_GPX2(2), S3C_GPIO_OUTPUT);
示例8: motor_en
static void motor_en(bool enable)
{
gpio_direction_output(EXYNOS4_GPD0(0), enable);
printk(KERN_DEBUG "[VIB] motor_enabled GPIO GPD0(0) : %d\n",
gpio_get_value(EXYNOS4_GPD0(0)));
}
示例9: s3c_i2c7_cfg_gpio
void s3c_i2c7_cfg_gpio(struct platform_device *dev)
{
s3c_gpio_cfgall_range(EXYNOS4_GPD0(2), 2,
S3C_GPIO_SFN(3), S3C_GPIO_PULL_UP);
}
示例10: I2C_BOARD_INFO
};
static struct i2c_board_info smdk4x12_i2c_devs1[] __initdata = {
{ I2C_BOARD_INFO("wm8994", 0x1a), }
};
static struct i2c_board_info smdk4x12_i2c_devs3[] __initdata = {
/* nothing here yet */
};
static struct i2c_board_info smdk4x12_i2c_devs7[] __initdata = {
/* nothing here yet */
};
static struct samsung_bl_gpio_info smdk4x12_bl_gpio_info = {
.no = EXYNOS4_GPD0(1),
.func = S3C_GPIO_SFN(2),
};
static struct platform_pwm_backlight_data smdk4x12_bl_data = {
.pwm_id = 1,
.pwm_period_ns = 1000,
};
static uint32_t smdk4x12_keymap[] __initdata = {
/* KEY(row, col, keycode) */
KEY(1, 0, KEY_D), KEY(1, 1, KEY_A), KEY(1, 2, KEY_B),
KEY(1, 3, KEY_E), KEY(1, 4, KEY_C)
};
static struct matrix_keymap_data smdk4x12_keymap_data __initdata = {
示例11: s3cfb_backlight_on
int s3cfb_backlight_on(struct platform_device *pdev)
{
int err;
#if 0
//VLED_EN
err = gpio_request(EXYNOS4_GPC1(2), "GPC1_2");
if (err) {
printk(KERN_ERR "failed to request GPC1_2 for "
"lcd power control\n");
return err;
}
gpio_direction_output(EXYNOS4_GPC1(2), 1);
s3c_gpio_cfgpin(EXYNOS4_GPC1(2), S3C_GPIO_OUTPUT);
gpio_free(EXYNOS4_GPC1(2));
mdelay(5);
printk("(%s, %d): BK_LCD_EN\n", __FUNCTION__, __LINE__);
#endif
/*modify by cym 20121017 */
#if 0
//VLED_ON
err = gpio_request(EXYNOS4_GPC0(1), "GPC0_1");
if (err) {
printk(KERN_ERR "failed to request GPC0_1 for "
"lcd power control\n");
return err;
}
gpio_direction_output(EXYNOS4_GPC0(1), 1);
s3c_gpio_cfgpin(EXYNOS4_GPC0(1), S3C_GPIO_OUTPUT);
gpio_free(EXYNOS4_GPC0(1));
mdelay(5);
//err = gpio_request(EXYNOS4_GPD0(1), "GPD0_1");
if (err) {
printk(KERN_ERR "failed to request GPD0 for "
"lcd backlight control\n");
//return err;
}
#if !defined(CONFIG_BACKLIGHT_PWM)
gpio_direction_output(EXYNOS4_GPD0(1), 1);
gpio_free(EXYNOS4_GPD0(1));
#else
gpio_direction_output(EXYNOS4_GPD0(1), 0);
s3c_gpio_cfgpin(EXYNOS4_GPD0(1), EXYNOS4_GPD_0_1_TOUT_1);
//gpio_free(EXYNOS4_GPD0(1));
#endif
mdelay(5);
//LED_EN18
err = gpio_request(EXYNOS4_GPC1(1), "GPC1_1");
if (err) {
printk(KERN_ERR "failed to request GPC1_1 for "
"lcd power control\n");
return err;
}
gpio_direction_output(EXYNOS4_GPC1(1), 1);
s3c_gpio_cfgpin(EXYNOS4_GPC1(1), S3C_GPIO_OUTPUT);
gpio_free(EXYNOS4_GPC1(1));
mdelay(5);
#else
//VLED_ON
#if 0
err = gpio_request(EXYNOS4_GPC0(1), "GPC0_1");
if (err) {
printk(KERN_ERR "failed to request GPC0_1 for "
"lcd power control\n");
return err;
}
gpio_direction_output(EXYNOS4_GPC0(1), 1);
s3c_gpio_cfgpin(EXYNOS4_GPC0(1), S3C_GPIO_OUTPUT);
gpio_free(EXYNOS4_GPC0(1));
printk("(%s, %d): VLED_ON\n", __FUNCTION__, __LINE__);
#endif
//mdelay(5);
mdelay(250);
//PWM
err = gpio_request(EXYNOS4_GPD0(1), "GPD0_1");
if (err) {
printk(KERN_ERR "failed to request GPD0 for "
"lcd backlight control\n");
//return err;
}
#if !defined(CONFIG_BACKLIGHT_PWM)
gpio_direction_output(EXYNOS4_GPD0(1), 1);
gpio_free(EXYNOS4_GPD0(1));
#else
/* modify by cym 20130417 for TSC2007 TouchScreen */
//#ifdef CONFIG_TOUCHSCREEN_TSC2007
// gpio_direction_output(EXYNOS4_GPD0(1), 0);
//#else
gpio_direction_output(EXYNOS4_GPD0(1), 0);
//.........這裏部分代碼省略.........
示例12: defined
S3C_GPIO_PULL_NONE, S5P_GPIO_DRVSTR_LV1}, /* MHL_DSDA_1.8V */
{EXYNOS4_GPB(3), S3C_GPIO_INPUT, S3C_GPIO_SETPIN_NONE,
S3C_GPIO_PULL_NONE, S5P_GPIO_DRVSTR_LV1}, /* MHL_DSCL_1.8V */
#endif
#if defined(CONFIG_TARGET_TAB3_WIFI8)
{EXYNOS4_GPC1(3), S3C_GPIO_INPUT, S3C_GPIO_SETPIN_NONE,
S3C_GPIO_PULL_DOWN, S5P_GPIO_DRVSTR_LV1}, /* NC */
{EXYNOS4_GPC1(4), S3C_GPIO_INPUT, S3C_GPIO_SETPIN_NONE,
S3C_GPIO_PULL_DOWN, S5P_GPIO_DRVSTR_LV1}, /* NC */
#else
{EXYNOS4_GPC1(3), S3C_GPIO_INPUT, S3C_GPIO_SETPIN_NONE,
S3C_GPIO_PULL_NONE, S5P_GPIO_DRVSTR_LV1}, /* GRIP_SDA */
{EXYNOS4_GPC1(4), S3C_GPIO_INPUT, S3C_GPIO_SETPIN_NONE,
S3C_GPIO_PULL_NONE, S5P_GPIO_DRVSTR_LV1}, /* GRIP_SCL */
#endif
{EXYNOS4_GPD0(2), S3C_GPIO_INPUT, S3C_GPIO_SETPIN_NONE,
S3C_GPIO_PULL_NONE, S5P_GPIO_DRVSTR_LV1},
{EXYNOS4_GPD0(3), S3C_GPIO_INPUT, S3C_GPIO_SETPIN_NONE,
S3C_GPIO_PULL_NONE, S5P_GPIO_DRVSTR_LV1},
{EXYNOS4_GPD1(0), S3C_GPIO_INPUT, S3C_GPIO_SETPIN_NONE,
S3C_GPIO_PULL_NONE, S5P_GPIO_DRVSTR_LV1},
{EXYNOS4_GPD1(1), S3C_GPIO_INPUT, S3C_GPIO_SETPIN_NONE,
S3C_GPIO_PULL_NONE, S5P_GPIO_DRVSTR_LV1},
{EXYNOS4_GPD1(2), S3C_GPIO_INPUT, S3C_GPIO_SETPIN_NONE,
S3C_GPIO_PULL_NONE, S5P_GPIO_DRVSTR_LV1}, /* SENSOR_I2C_SDA */
{EXYNOS4_GPD1(3), S3C_GPIO_INPUT, S3C_GPIO_SETPIN_NONE,
S3C_GPIO_PULL_NONE, S5P_GPIO_DRVSTR_LV1}, /* SENSOR_I2C_SCL */
#if defined(CONFIG_TARGET_TAB3_WIFI8) || defined(CONFIG_TARGET_TAB3_3G8) || \
defined(CONFIG_TARGET_TAB3_LTE8)
示例13: s3cfb_backlight_off
int s3cfb_backlight_off(struct platform_device *pdev)
{
gpio_request_one(EXYNOS4_GPD0(1), GPIOF_OUT_INIT_LOW, "GPD0");
gpio_free(EXYNOS4_GPD0(1));
return 0;
}
示例14: s3cfb_backlight_off
int s3cfb_backlight_off(struct platform_device *pdev)
{
int err;
//err = gpio_request(EXYNOS4_GPD0(1), "GPD0");
//if (err) {
// printk(KERN_ERR "failed to request GPD0 for "
// "lcd backlight control\n");
// return err;
//}
/* modify by cym 20121017 */
#if 0
gpio_direction_output(EXYNOS4_GPD0(1), 0);
//gpio_free(EXYNOS4_GPD0(1));
//LED_EN18
err = gpio_request(EXYNOS4_GPC1(1), "GPC1_1");
if (err) {
printk(KERN_ERR "failed to request GPC1_1 for "
"lcd power control\n");
return err;
}
gpio_direction_output(EXYNOS4_GPC1(1), 0);
s3c_gpio_cfgpin(EXYNOS4_GPC1(1), S3C_GPIO_OUTPUT);
gpio_free(EXYNOS4_GPC1(1));
//VLED_EN
err = gpio_request(EXYNOS4_GPC1(2), "GPC1_2");
if (err) {
printk(KERN_ERR "failed to request GPC1_2 for "
"lcd power control\n");
return err;
}
gpio_direction_output(EXYNOS4_GPC1(2), 0);
s3c_gpio_cfgpin(EXYNOS4_GPC1(2), S3C_GPIO_OUTPUT);
gpio_free(EXYNOS4_GPC1(2));
//VLED_ON
err = gpio_request(EXYNOS4_GPC0(1), "GPC0_1");
if (err) {
printk(KERN_ERR "failed to request GPC0_1 for "
"lcd power control\n");
return err;
}
gpio_direction_output(EXYNOS4_GPC0(1), 0);
s3c_gpio_cfgpin(EXYNOS4_GPC0(1), S3C_GPIO_OUTPUT);
gpio_free(EXYNOS4_GPC0(1));
#else
//gpio_direction_output(EXYNOS4_GPD0(1), 0);
//gpio_free(EXYNOS4_GPD0(1));
//printk("(%s, %d): LCD_PWM_OFF\n", __FUNCTION__, __LINE__);
#if 0
//TP1_EN
err = gpio_request(EXYNOS4_GPL0(2), "TP1_EN");
if (err) {
printk(KERN_ERR "failed to request TP1_EN for "
"I2C control\n");
return err;
}
gpio_direction_output(EXYNOS4_GPL0(2), 0);
s3c_gpio_cfgpin(EXYNOS4_GPL0(2), S3C_GPIO_OUTPUT);
gpio_free(EXYNOS4_GPL0(2));
mdelay(5);
printk("(%s, %d): TP1_EN_OFF\n", __FUNCTION__, __LINE__);
#endif
//VLED_ON
#if 0
err = gpio_request(EXYNOS4_GPC0(1), "GPC0_1");
if (err) {
printk(KERN_ERR "failed to request GPC0_1 for "
"lcd power control\n");
return err;
}
gpio_direction_output(EXYNOS4_GPC0(1), 0);
s3c_gpio_cfgpin(EXYNOS4_GPC0(1), S3C_GPIO_OUTPUT);
gpio_free(EXYNOS4_GPC0(1));
printk("(%s, %d): VLED_OFF\n", __FUNCTION__, __LINE__);
#endif
#endif
/* end modify */
/* add by cym 20150120 */
#if 1
err = gpio_request(EXYNOS4_GPD0(1), "GPD0_1");
if (err) {
printk(KERN_ERR "failed to request GPD0 for "
"lcd backlight control\n");
//return err;
}
gpio_direction_output(EXYNOS4_GPD0(1), 0);
s3c_gpio_cfgpin(EXYNOS4_GPD0(1), S3C_GPIO_OUTPUT);
gpio_free(EXYNOS4_GPD0(1));
//.........這裏部分代碼省略.........
示例15:
struct gpio_init_data {
uint num;
uint cfg;
uint val;
uint pud;
uint drv;
};
static struct gpio_init_data u1_init_gpios[] = {
{EXYNOS4_GPC1(3), S3C_GPIO_INPUT, S3C_GPIO_SETPIN_NONE,
S3C_GPIO_PULL_NONE, S5P_GPIO_DRVSTR_LV1}, /* CODEC_SDA_1.8V */
{EXYNOS4_GPC1(4), S3C_GPIO_INPUT, S3C_GPIO_SETPIN_NONE,
S3C_GPIO_PULL_NONE, S5P_GPIO_DRVSTR_LV1}, /* CODEC_SCL_1.8V */
{EXYNOS4_GPD0(2), S3C_GPIO_INPUT, S3C_GPIO_SETPIN_NONE,
S3C_GPIO_PULL_NONE, S5P_GPIO_DRVSTR_LV1}, /* MHL_SDA_2.8V */
{EXYNOS4_GPD0(3), S3C_GPIO_INPUT, S3C_GPIO_SETPIN_NONE,
S3C_GPIO_PULL_NONE, S5P_GPIO_DRVSTR_LV1}, /* MHL_SCL_2.8V */
{EXYNOS4_GPD1(0), S3C_GPIO_INPUT, S3C_GPIO_SETPIN_NONE,
S3C_GPIO_PULL_NONE, S5P_GPIO_DRVSTR_LV1}, /* 8M_CAM_SDA_2.8V */
{EXYNOS4_GPD1(1), S3C_GPIO_INPUT, S3C_GPIO_SETPIN_NONE,
S3C_GPIO_PULL_NONE, S5P_GPIO_DRVSTR_LV1}, /* 8M_CAM_SCL_2.8V */
{EXYNOS4_GPD1(2), S3C_GPIO_INPUT, S3C_GPIO_SETPIN_NONE,
S3C_GPIO_PULL_NONE, S5P_GPIO_DRVSTR_LV1}, /* SENSE_SDA_2.8V */
{EXYNOS4_GPD1(3), S3C_GPIO_INPUT, S3C_GPIO_SETPIN_NONE,
S3C_GPIO_PULL_NONE, S5P_GPIO_DRVSTR_LV1}, /* SENSE_SCL_2.8V */
{EXYNOS4_GPK3(1), S3C_GPIO_INPUT, S3C_GPIO_SETPIN_NONE,
S3C_GPIO_PULL_NONE, S5P_GPIO_DRVSTR_LV1}, /* WLAN_SDIO_CMD */