本文整理汇总了C++中s3c2410_gpio_setpin函数的典型用法代码示例。如果您正苦于以下问题:C++ s3c2410_gpio_setpin函数的具体用法?C++ s3c2410_gpio_setpin怎么用?C++ s3c2410_gpio_setpin使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了s3c2410_gpio_setpin函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: gpio_wifi_reset
void gpio_wifi_reset(void)
{
unsigned int pin;
pin = S3C2410_GPF6;
mdelay(1);
s3c2410_gpio_setpin(pin, 0);
mdelay(10);
s3c2410_gpio_setpin(pin, 1);
mdelay(1);
}
示例2: h1940_blueled_set
/*
* Blue led.
* (it can only be blue flashing led)
*/
static void h1940_blueled_set(struct led_classdev *led_dev,
enum led_brightness value)
{
if (value) {
/* flashing Blue */
h1940_latch_control(0, H1940_LATCH_LED_FLASH);
s3c2410_gpio_setpin(S3C2410_GPA3, 1);
} else {
h1940_latch_control(H1940_LATCH_LED_FLASH, 0);
s3c2410_gpio_setpin(S3C2410_GPA3, 0);
}
}
示例3: gsm_on_off
static void gsm_on_off(struct device *dev, int on)
{
if (!on) {
s3c2410_gpio_cfgpin(S3C2410_GPH1, S3C2410_GPIO_INPUT);
s3c2410_gpio_cfgpin(S3C2410_GPH2, S3C2410_GPIO_INPUT);
pcf50633_gpio_set(gta02_pcf, PCF50633_GPIO2, 0);
if (gta02_gsm.con) {
s3c24xx_serial_console_set_silence(0);
console_start(gta02_gsm.con);
dev_dbg(dev, "powered down gta02 GSM, enabling "
"serial console\n");
}
return;
}
if (gta02_gsm.con) {
dev_dbg(dev, "powering up GSM, thus "
"disconnecting serial console\n");
console_stop(gta02_gsm.con);
s3c24xx_serial_console_set_silence(1);
}
/* allow UART to talk to GSM side now we will power it */
s3c2410_gpio_cfgpin(S3C2410_GPH1, S3C2410_GPH1_nRTS0);
s3c2410_gpio_cfgpin(S3C2410_GPH2, S3C2410_GPH2_TXD0);
pcf50633_gpio_set(gta02_pcf, PCF50633_GPIO2, 7);
msleep(100);
s3c2410_gpio_setpin(GTA02_GPIO_MODEM_ON, 1);
msleep(500);
s3c2410_gpio_setpin(GTA02_GPIO_MODEM_ON, 0);
/*
* workaround for calypso firmware moko10 and earlier,
* without this it will leave IRQ line high after
* booting
*/
s3c2410_gpio_setpin(S3C2410_GPH1, 1);
s3c2410_gpio_cfgpin(S3C2410_GPH1, S3C2410_GPH1_OUTP);
msleep(1000);
s3c2410_gpio_cfgpin(S3C2410_GPH1, S3C2410_GPH1_nRTS0);
}
示例4: nexcoder_sensorboard_init
static void __init nexcoder_sensorboard_init(void)
{
// Initialize SCCB bus
s3c2410_gpio_setpin(S3C2410_GPE14, 1); // IICSCL
s3c2410_gpio_cfgpin(S3C2410_GPE14, S3C2410_GPE14_OUTP);
s3c2410_gpio_setpin(S3C2410_GPE15, 1); // IICSDA
s3c2410_gpio_cfgpin(S3C2410_GPE15, S3C2410_GPE15_OUTP);
// Power up the sensor board
s3c2410_gpio_setpin(S3C2410_GPF1, 1);
s3c2410_gpio_cfgpin(S3C2410_GPF1, S3C2410_GPF1_OUTP); // CAM_GPIO7 => nLDO_PWRDN
s3c2410_gpio_setpin(S3C2410_GPF2, 0);
s3c2410_gpio_cfgpin(S3C2410_GPF2, S3C2410_GPF2_OUTP); // CAM_GPIO6 => CAM_PWRDN
}
示例5: nexcoder_sensorboard_init
static void __init nexcoder_sensorboard_init(void)
{
// Initialize SCCB bus
s3c2410_gpio_setpin(S3C2410_GPE(14), 1); // IICSCL
s3c_gpio_cfgpin(S3C2410_GPE(14), S3C2410_GPIO_OUTPUT);
s3c2410_gpio_setpin(S3C2410_GPE(15), 1); // IICSDA
s3c_gpio_cfgpin(S3C2410_GPE(15), S3C2410_GPIO_OUTPUT);
// Power up the sensor board
s3c2410_gpio_setpin(S3C2410_GPF(1), 1);
s3c_gpio_cfgpin(S3C2410_GPF(1), S3C2410_GPIO_OUTPUT); // CAM_GPIO7 => nLDO_PWRDN
s3c2410_gpio_setpin(S3C2410_GPF(2), 0);
s3c_gpio_cfgpin(S3C2410_GPF(2), S3C2410_GPIO_OUTPUT); // CAM_GPIO6 => CAM_PWRDN
}
示例6: lm4853_set_spk
static int lm4853_set_spk(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{
int val = ucontrol->value.integer.value[0];
if (val) {
lm4853_state |= LM4853_SPK;
s3c2410_gpio_setpin(GTA02_GPIO_HP_IN, 0);
} else {
lm4853_state &= ~LM4853_SPK;
s3c2410_gpio_setpin(GTA02_GPIO_HP_IN, 1);
}
return 0;
}
示例7: n30_udc_pullup
static void n30_udc_pullup(enum s3c2410_udc_cmd_e cmd)
{
switch (cmd) {
case S3C2410_UDC_P_ENABLE :
s3c2410_gpio_setpin(S3C2410_GPB3, 1);
break;
case S3C2410_UDC_P_DISABLE :
s3c2410_gpio_setpin(S3C2410_GPB3, 0);
break;
case S3C2410_UDC_P_RESET :
break;
default:
break;
}
}
示例8: gsm_write
static ssize_t gsm_write(struct device *dev, struct device_attribute *attr,
const char *buf, size_t count)
{
unsigned long on = simple_strtoul(buf, NULL, 10);
if (!strcmp(attr->attr.name, "power_on")) {
gsm_on_off(dev, on);
return count;
}
if (!strcmp(attr->attr.name, "download")) {
/*
* the keyboard / buttons driver requests and enables
* the JACK_INSERT IRQ. We have to take care about
* not enabling and disabling the IRQ when it was
* already in that state or we get "unblanaced IRQ"
* kernel warnings and stack dumps. So we use the
* copy of the ndl_gsm state to figure out if we should
* enable or disable the jack interrupt
*/
if (on) {
if (gta02_gsm.gpio_ndl_gsm)
disable_irq(gpio_to_irq(
GTA02_GPIO_JACK_INSERT));
} else {
if (!gta02_gsm.gpio_ndl_gsm)
enable_irq(gpio_to_irq(
GTA02_GPIO_JACK_INSERT));
}
gta02_gsm.gpio_ndl_gsm = !on;
s3c2410_gpio_setpin(GTA02_GPIO_nDL_GSM, !on);
return count;
}
if (!strcmp(attr->attr.name, "flowcontrolled")) {
if (on) {
gta_gsm_interrupts = 0;
s3c2410_gpio_setpin(S3C2410_GPH1, 1);
s3c2410_gpio_cfgpin(S3C2410_GPH1, S3C2410_GPH1_OUTP);
} else
s3c2410_gpio_cfgpin(S3C2410_GPH1, S3C2410_GPH1_nRTS0);
}
return count;
}
示例9: smdk_machine_init
void __init smdk_machine_init(void)
{
#ifndef CONFIG_MACH_CANOPUS
/* Configure the LEDs (even if we have no LED support)*/
s3c2410_gpio_cfgpin(S3C2410_GPF4, S3C2410_GPF4_OUTP);
s3c2410_gpio_cfgpin(S3C2410_GPF5, S3C2410_GPF5_OUTP);
s3c2410_gpio_cfgpin(S3C2410_GPF6, S3C2410_GPF6_OUTP);
s3c2410_gpio_cfgpin(S3C2410_GPF7, S3C2410_GPF7_OUTP);
s3c2410_gpio_setpin(S3C2410_GPF4, 1);
s3c2410_gpio_setpin(S3C2410_GPF5, 1);
s3c2410_gpio_setpin(S3C2410_GPF6, 1);
s3c2410_gpio_setpin(S3C2410_GPF7, 1);
s3c_device_nand.dev.platform_data = &smdk_nand_info;
#else
canopus_gpio_init();
q_s3c2416_init_clocks();
if (q_hw_ver(SWP2000)
|| q_hw_ver(7800_MP2)) {
q_clock_init(0, 48000000); /* for USB */
} else if (q_hw_ver(KTQOOK_TP2)
|| q_hw_ver(KTQOOK_MP)
|| q_hw_ver(SKATM)) {
q_clock_init(1, 48000000); /* for USB */
}
if (q_hw_ver(SKATM)) {
q_clock_init(0, 12000000); /* for SmartCard reader */
}
#endif // CONFIG_MACH_CANOPUS
//For s3c nand partition
s3c_device_nand.dev.platform_data = &nand_mtd_info;
platform_add_devices(smdk_devs, ARRAY_SIZE(smdk_devs));
if (q_hw_ver(KTQOOK))
platform_add_devices(kt_devs, ARRAY_SIZE(kt_devs));
s3c2410_pm_init();
#ifdef CONFIG_MACH_CANOPUS
q_param_proc_init();
#endif
}
示例10: osiris_map_io
static void __init osiris_map_io(void)
{
unsigned long flags;
/* initialise the clocks */
s3c24xx_dclk0.parent = NULL;
s3c24xx_dclk0.rate = 12*1000*1000;
s3c24xx_dclk1.parent = NULL;
s3c24xx_dclk1.rate = 24*1000*1000;
s3c24xx_clkout0.parent = &s3c24xx_dclk0;
s3c24xx_clkout1.parent = &s3c24xx_dclk1;
s3c24xx_uclk.parent = &s3c24xx_clkout1;
s3c24xx_register_clocks(osiris_clocks, ARRAY_SIZE(osiris_clocks));
s3c_device_nand.dev.platform_data = &osiris_nand_info;
s3c24xx_init_io(osiris_iodesc, ARRAY_SIZE(osiris_iodesc));
s3c24xx_init_clocks(0);
s3c24xx_init_uarts(osiris_uartcfgs, ARRAY_SIZE(osiris_uartcfgs));
/* fix bus configuration (nBE settings wrong on ABLE pre v2.20) */
local_irq_save(flags);
__raw_writel(__raw_readl(S3C2410_BWSCON) | S3C2410_BWSCON_ST1 | S3C2410_BWSCON_ST2 | S3C2410_BWSCON_ST3 | S3C2410_BWSCON_ST4 | S3C2410_BWSCON_ST5, S3C2410_BWSCON);
local_irq_restore(flags);
/* write-protect line to the NAND */
s3c2410_gpio_setpin(S3C2410_GPA0, 1);
}
示例11: jive_power_off
static void jive_power_off(void)
{
printk(KERN_INFO "powering system down...\n");
s3c2410_gpio_setpin(S3C2410_GPC(5), 1);
s3c_gpio_cfgpin(S3C2410_GPC(5), S3C2410_GPIO_OUTPUT);
}
示例12: jive_lcm_reset
static void jive_lcm_reset(unsigned int set)
{
printk(KERN_DEBUG "%s(%d)\n", __func__, set);
s3c2410_gpio_setpin(S3C2410_GPG13, set);
s3c2410_gpio_cfgpin(S3C2410_GPG13, S3C2410_GPIO_OUTPUT);
}
示例13: udc_disable
/*
* udc_disable - disable USB device controller
*/
static void udc_disable(struct s3c_udc *dev)
{
DEBUG_SETUP("%s: %p\n", __FUNCTION__, dev);
udc_set_address(dev, 0);
dev->ep0state = WAIT_FOR_SETUP;
dev->gadget.speed = USB_SPEED_UNKNOWN;
dev->usb_address = 0;
/* usb power disable */
#if defined(CONFIG_CPU_S3C2450) || defined(CONFIG_CPU_S3C2416)
s3c2410_gpio_pullup(S3C2443_GPH14, 1); /* pull-down enable */
s3c2410_gpio_pullup(S3C2410_GPF2, 1); /* pull-down enable */
#else
s3c2410_gpio_pullup(S3C2443_GPH14, 2); /* pull-down enable */
#endif
s3c2410_gpio_cfgpin(S3C2443_GPH14, S3C2443_GPH14_OUTP);
s3c2410_gpio_setpin(S3C2443_GPH14, 0);
/* usb clock disable */
__raw_writel(0, S3C_UCLKCON);
/* USB Port is Suspend mode */
__raw_writel(__raw_readl(S3C2410_MISCCR)|(1<<12), S3C2410_MISCCR);
/* PHY power disable */
__raw_writel(__raw_readl(S3C_PWRCFG)&~(1<<4), S3C_PWRCFG);
}
示例14: hsmmc_set_gpio
/*
* HS-MMC GPIO Set function for S3C2443 SMDK board
*/
void hsmmc_set_gpio (uint channel, uint width)
{
/* GPIO L */
s3c2410_gpio_cfgpin(S3C2443_GPL0, S3C2443_GPL0_SD0DAT0);
s3c2410_gpio_cfgpin(S3C2443_GPL1, S3C2443_GPL1_SD0DAT1);
s3c2410_gpio_cfgpin(S3C2443_GPL2, S3C2443_GPL2_SD0DAT2);
s3c2410_gpio_cfgpin(S3C2443_GPL3, S3C2443_GPL3_SD0DAT3);
s3c2410_gpio_cfgpin(S3C2443_GPL4, S3C2443_GPL4_SD0DAT4);
s3c2410_gpio_cfgpin(S3C2443_GPL5, S3C2443_GPL5_SD0DAT5);
s3c2410_gpio_cfgpin(S3C2443_GPL6, S3C2443_GPL6_SD0DAT6);
s3c2410_gpio_cfgpin(S3C2443_GPL7, S3C2443_GPL7_SD0DAT7);
s3c2410_gpio_cfgpin(S3C2443_GPL8, S3C2443_GPL8_SD0CMD);
s3c2410_gpio_cfgpin(S3C2443_GPL9, S3C2443_GPL9_SD0CLK);
/* GPIO J */
s3c2410_gpio_cfgpin(S3C2443_GPJ13, S3C2443_GPJ13_SD0LED);
s3c2410_gpio_cfgpin(S3C2443_GPJ14, S3C2443_GPJ14_nSD0CD);
#if 0
s3c2410_gpio_cfgpin(S3C2443_GPJ15, S3C2443_GPJ15_OUTP);
#endif
s3c2410_gpio_cfgpin(S3C2443_GPJ15, S3C2443_GPJ15_nSD0WP); /* write protect enable */
s3c2410_gpio_setpin(S3C2443_GPJ15, 1);
}
示例15: gta02_gsm_probe
static int __init gta02_gsm_probe(struct platform_device *pdev)
{
switch (S3C_SYSTEM_REV_ATAG) {
case GTA02v1_SYSTEM_REV:
case GTA02v2_SYSTEM_REV:
case GTA02v3_SYSTEM_REV:
case GTA02v4_SYSTEM_REV:
case GTA02v5_SYSTEM_REV:
case GTA02v6_SYSTEM_REV:
break;
default:
dev_warn(&pdev->dev, "Unknown Freerunner Revision 0x%x, "
"some PM features not available!!!\n",
system_rev);
break;
}
gta02_gsm.con = find_s3c24xx_console();
if (!gta02_gsm.con)
dev_warn(&pdev->dev,
"cannot find S3C24xx console driver\n");
/* note that download initially disabled, and enforce that */
gta02_gsm.gpio_ndl_gsm = 1;
s3c2410_gpio_setpin(GTA02_GPIO_nDL_GSM, 1);
/* GSM is to be initially off (at boot, or if this module inserted) */
gsm_on_off(&pdev->dev, 0);
return sysfs_create_group(&pdev->dev.kobj, >a02_gsm_attr_group);
}