本文整理汇总了C++中pxa_gpio_mode函数的典型用法代码示例。如果您正苦于以下问题:C++ pxa_gpio_mode函数的具体用法?C++ pxa_gpio_mode怎么用?C++ pxa_gpio_mode使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了pxa_gpio_mode函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: sharpsl_pm_pxa_init
void sharpsl_pm_pxa_init(void)
{
pxa_gpio_mode(sharpsl_pm.machinfo->gpio_acin | GPIO_IN);
pxa_gpio_mode(sharpsl_pm.machinfo->gpio_batfull | GPIO_IN);
pxa_gpio_mode(sharpsl_pm.machinfo->gpio_batlock | GPIO_IN);
/* Register interrupt handlers */
if (request_irq(IRQ_GPIO(sharpsl_pm.machinfo->gpio_acin), sharpsl_ac_isr, IRQF_DISABLED, "AC Input Detect", sharpsl_ac_isr)) {
dev_err(sharpsl_pm.dev, "Could not get irq %d.\n", IRQ_GPIO(sharpsl_pm.machinfo->gpio_acin));
}
else set_irq_type(IRQ_GPIO(sharpsl_pm.machinfo->gpio_acin),IRQ_TYPE_EDGE_BOTH);
if (request_irq(IRQ_GPIO(sharpsl_pm.machinfo->gpio_batlock), sharpsl_fatal_isr, IRQF_DISABLED, "Battery Cover", sharpsl_fatal_isr)) {
dev_err(sharpsl_pm.dev, "Could not get irq %d.\n", IRQ_GPIO(sharpsl_pm.machinfo->gpio_batlock));
}
else set_irq_type(IRQ_GPIO(sharpsl_pm.machinfo->gpio_batlock),IRQ_TYPE_EDGE_FALLING);
if (sharpsl_pm.machinfo->gpio_fatal) {
if (request_irq(IRQ_GPIO(sharpsl_pm.machinfo->gpio_fatal), sharpsl_fatal_isr, IRQF_DISABLED, "Fatal Battery", sharpsl_fatal_isr)) {
dev_err(sharpsl_pm.dev, "Could not get irq %d.\n", IRQ_GPIO(sharpsl_pm.machinfo->gpio_fatal));
}
else set_irq_type(IRQ_GPIO(sharpsl_pm.machinfo->gpio_fatal),IRQ_TYPE_EDGE_FALLING);
}
if (sharpsl_pm.machinfo->batfull_irq)
{
/* Register interrupt handler. */
if (request_irq(IRQ_GPIO(sharpsl_pm.machinfo->gpio_batfull), sharpsl_chrg_full_isr, IRQF_DISABLED, "CO", sharpsl_chrg_full_isr)) {
dev_err(sharpsl_pm.dev, "Could not get irq %d.\n", IRQ_GPIO(sharpsl_pm.machinfo->gpio_batfull));
}
else set_irq_type(IRQ_GPIO(sharpsl_pm.machinfo->gpio_batfull),IRQ_TYPE_EDGE_RISING);
}
}
开发者ID:8497165,项目名称:JetKernel,代码行数:33,代码来源:sharpsl_pm.c
示例2: corgi_charger_init
static void corgi_charger_init(void)
{
pxa_gpio_mode(CORGI_GPIO_ADC_TEMP_ON | GPIO_OUT);
pxa_gpio_mode(CORGI_GPIO_CHRG_ON | GPIO_OUT);
pxa_gpio_mode(CORGI_GPIO_CHRG_UKN | GPIO_OUT);
pxa_gpio_mode(CORGI_GPIO_KEY_INT | GPIO_IN);
}
开发者ID:12019,项目名称:linux-2.6.34-ts471x,代码行数:7,代码来源:corgi_pm.c
示例3: poodle_init
static void __init poodle_init(void)
{
int ret = 0;
pm_power_off = poodle_poweroff;
arm_pm_restart = poodle_restart;
/* setup sleep mode values */
PWER = 0x00000002;
PFER = 0x00000000;
PRER = 0x00000002;
PGSR0 = 0x00008000;
PGSR1 = 0x003F0202;
PGSR2 = 0x0001C000;
PCFR |= PCFR_OPDE;
/* cpu initialize */
/* Pgsr Register */
PGSR0 = 0x0146dd80;
PGSR1 = 0x03bf0890;
PGSR2 = 0x0001c000;
/* Alternate Register */
GAFR0_L = 0x01001000;
GAFR0_U = 0x591a8010;
GAFR1_L = 0x900a8451;
GAFR1_U = 0xaaa5aaaa;
GAFR2_L = 0x8aaaaaaa;
GAFR2_U = 0x00000002;
/* Direction Register */
GPDR0 = 0xd3f0904c;
GPDR1 = 0xfcffb7d3;
GPDR2 = 0x0001ffff;
/* Output Register */
GPCR0 = 0x00000000;
GPCR1 = 0x00000000;
GPCR2 = 0x00000000;
GPSR0 = 0x00400000;
GPSR1 = 0x00000000;
GPSR2 = 0x00000000;
set_pxa_fb_parent(&poodle_locomo_device.dev);
set_pxa_fb_info(&poodle_fb_info);
pxa_gpio_mode(POODLE_GPIO_USB_PULLUP | GPIO_OUT);
pxa_gpio_mode(POODLE_GPIO_IR_ON | GPIO_OUT);
pxa_set_udc_info(&udc_info);
pxa_set_mci_info(&poodle_mci_platform_data);
pxa_set_ficp_info(&poodle_ficp_platform_data);
platform_scoop_config = &poodle_pcmcia_config;
ret = platform_add_devices(devices, ARRAY_SIZE(devices));
if (ret) {
printk(KERN_WARNING "poodle: Unable to register LoCoMo device\n");
}
corgi_ssp_set_machinfo(&poodle_ssp_machinfo);
}
开发者ID:Broadcom,项目名称:stblinux-2.6.18,代码行数:60,代码来源:poodle.c
示例4: pxa2xx_ac97_probe
static int pxa2xx_ac97_probe(struct platform_device *pdev)
{
int ret;
ret = request_irq(IRQ_AC97, pxa2xx_ac97_irq, IRQF_DISABLED, "AC97", NULL);
if (ret < 0)
goto err;
pxa_gpio_mode(GPIO31_SYNC_AC97_MD);
pxa_gpio_mode(GPIO30_SDATA_OUT_AC97_MD);
pxa_gpio_mode(GPIO28_BITCLK_AC97_MD);
pxa_gpio_mode(GPIO29_SDATA_IN_AC97_MD);
#ifdef CONFIG_PXA27x
/* Use GPIO 113 as AC97 Reset on Bulverde */
pxa_gpio_mode(113 | GPIO_ALT_FN_2_OUT);
#endif
pxa_set_cken(CKEN_AC97, 1);
return 0;
err:
if (CKEN & (1 << CKEN_AC97)) {
GCR |= GCR_ACLINK_OFF;
free_irq(IRQ_AC97, NULL);
pxa_set_cken(CKEN_AC97, 0);
}
return ret;
}
开发者ID:canalplus,项目名称:r7oss,代码行数:27,代码来源:pxa2xx-ac97.c
示例5: idp_mci_init
static int idp_mci_init(struct device *dev, irqreturn_t (*idp_detect_int)(int, void *, struct pt_regs *), void *data)
{
/* setup GPIO for PXA25x MMC controller */
pxa_gpio_mode(GPIO6_MMCCLK_MD);
pxa_gpio_mode(GPIO8_MMCCS0_MD);
return 0;
}
开发者ID:devicenull,项目名称:supermicro_ipmi_firmware,代码行数:8,代码来源:idp.c
示例6: colibri_init
static void __init colibri_init(void)
{
/* DM9000 LAN */
pxa_gpio_mode(GPIO78_nCS_2_MD);
pxa_gpio_mode(GPIO_DM9000 | GPIO_IN);
platform_add_devices(colibri_devices, ARRAY_SIZE(colibri_devices));
}
开发者ID:274914765,项目名称:C,代码行数:8,代码来源:colibri.c
示例7: hx4700_init
static void __init hx4700_init( void )
{
#if 0 // keep for reference, from bootldr
GPSR0 = 0x0935ede7;
GPSR1 = 0xffdf40f7;
GPSR2 = 0x0173c9f6;
GPSR3 = 0x01f1e342;
GPCR0 = ~0x0935ede7;
GPCR1 = ~0xffdf40f7;
GPCR2 = ~0x0173c9f6;
GPCR3 = ~0x01f1e342;
GPDR0 = 0xda7a841c;
GPDR1 = 0x68efbf83;
GPDR2 = 0xbfbff7db;
GPDR3 = 0x007ffff5;
GAFR0_L = 0x80115554;
GAFR0_U = 0x591a8558;
GAFR1_L = 0x600a9558;
GAFR1_U = 0x0005a0aa;
GAFR2_L = 0xa0000000;
GAFR2_U = 0x00035402;
GAFR3_L = 0x00010000;
GAFR3_U = 0x00001404;
MSC0 = 0x25e225e2;
MSC1 = 0x12cc2364;
MSC2 = 0x16dc7ffc;
#endif
SET_HX4700_GPIO( ASIC3_RESET_N, 0 );
mdelay(10);
SET_HX4700_GPIO( ASIC3_RESET_N, 1 );
mdelay(10);
SET_HX4700_GPIO( EUART_RESET, 1 );
/* configure serial */
pxa_gpio_mode( GPIO_NR_HX4700_COM_RXD_MD );
pxa_gpio_mode( GPIO_NR_HX4700_COM_CTS_MD );
pxa_gpio_mode( GPIO_NR_HX4700_COM_DCD_MD );
pxa_gpio_mode( GPIO_NR_HX4700_COM_DSR_MD );
pxa_gpio_mode( GPIO_NR_HX4700_COM_RING_MD );
pxa_gpio_mode( GPIO_NR_HX4700_COM_TXD_MD );
pxa_gpio_mode( GPIO_NR_HX4700_COM_DTR_MD );
pxa_gpio_mode( GPIO_NR_HX4700_COM_RTS_MD );
/* Enable RS232 in case we'd have boot console there. In case
cable is not actually attached, it will be turned off as
soon as hx4700_serial is initialized. */
SET_HX4700_GPIO(RS232_ON, 1);
pxa_gpio_mode( GPIO_NR_HX4700_I2C_SCL_MD );
pxa_gpio_mode( GPIO_NR_HX4700_I2C_SDA_MD );
platform_add_devices( devices, ARRAY_SIZE(devices) );
pxa_set_ficp_info(&hx4700_ficp_platform_data);
led_trigger_register_shared("hx4700-radio", &hx4700_radio_trig);
}
开发者ID:ManiacTwister,项目名称:linux-hnd,代码行数:57,代码来源:hx4700.c
示例8: gumstix_mci_init
static int gumstix_mci_init(struct device *dev, irq_handler_t detect_int,
void *data)
{
pxa_gpio_mode(GPIO6_MMCCLK_MD);
pxa_gpio_mode(GPIO53_MMCCLK_MD);
pxa_gpio_mode(GPIO8_MMCCS0_MD);
return 0;
}
开发者ID:hugh-smtl,项目名称:linux-2.6,代码行数:9,代码来源:gumstix.c
示例9: tosa_irda_transceiver_mode
/*
* Irda
*/
static void tosa_irda_transceiver_mode(struct device *dev, int mode)
{
if (mode & IR_OFF) {
reset_scoop_gpio(&tosascoop_device.dev,TOSA_SCOOP_IR_POWERDWN);
pxa_gpio_mode(GPIO47_STTXD|GPIO_DFLT_LOW);
pxa_gpio_mode(GPIO47_STTXD|GPIO_OUT);
} else {
pxa_gpio_mode(GPIO47_STTXD_MD);
set_scoop_gpio(&tosascoop_device.dev,TOSA_SCOOP_IR_POWERDWN);
}
}
开发者ID:Broadcom,项目名称:stblinux-2.6.18,代码行数:14,代码来源:tosa.c
示例10: pxa_ac97_warm_pxa27x
static inline void pxa_ac97_warm_pxa27x(void)
{
gsr_bits = 0;
/* warm reset broken on Bulverde,
so manually keep AC97 reset high */
pxa_gpio_mode(113 | GPIO_OUT | GPIO_DFLT_HIGH);
udelay(10);
GCR |= GCR_WARM_RST;
pxa_gpio_mode(113 | GPIO_ALT_FN_2_OUT);
udelay(500);
}
开发者ID:458941968,项目名称:mini2440-kernel-2.6.29,代码行数:12,代码来源:pxa2xx-ac97-lib.c
示例11: pxa2xx_ac97_hw_probe
int __devinit pxa2xx_ac97_hw_probe(struct platform_device *dev)
{
int ret;
if (cpu_is_pxa25x() || cpu_is_pxa27x()) {
pxa_gpio_mode(GPIO31_SYNC_AC97_MD);
pxa_gpio_mode(GPIO30_SDATA_OUT_AC97_MD);
pxa_gpio_mode(GPIO28_BITCLK_AC97_MD);
pxa_gpio_mode(GPIO29_SDATA_IN_AC97_MD);
}
if (cpu_is_pxa27x()) {
/* Use GPIO 113 as AC97 Reset on Bulverde */
pxa_gpio_mode(113 | GPIO_ALT_FN_2_OUT);
ac97conf_clk = clk_get(&dev->dev, "AC97CONFCLK");
if (IS_ERR(ac97conf_clk)) {
ret = PTR_ERR(ac97conf_clk);
ac97conf_clk = NULL;
goto err_conf;
}
}
ac97_clk = clk_get(&dev->dev, "AC97CLK");
if (IS_ERR(ac97_clk)) {
ret = PTR_ERR(ac97_clk);
ac97_clk = NULL;
goto err_clk;
}
ret = clk_enable(ac97_clk);
if (ret)
goto err_clk2;
ret = request_irq(IRQ_AC97, pxa2xx_ac97_irq, IRQF_DISABLED, "AC97", NULL);
if (ret < 0)
goto err_irq;
return 0;
err_irq:
GCR |= GCR_ACLINK_OFF;
err_clk2:
clk_put(ac97_clk);
ac97_clk = NULL;
err_clk:
if (ac97conf_clk) {
clk_put(ac97conf_clk);
ac97conf_clk = NULL;
}
err_conf:
return ret;
}
开发者ID:458941968,项目名称:mini2440-kernel-2.6.29,代码行数:52,代码来源:pxa2xx-ac97-lib.c
示例12: mainstone_ohci_init
static int mainstone_ohci_init(struct device *dev)
{
/* setup Port1 GPIO pin. */
pxa_gpio_mode( 88 | GPIO_ALT_FN_1_IN); /* USBHPWR1 */
pxa_gpio_mode( 89 | GPIO_ALT_FN_2_OUT); /* USBHPEN1 */
/* Set the Power Control Polarity Low and Power Sense
Polarity Low to active low. */
UHCHR = (UHCHR | UHCHR_PCPL | UHCHR_PSPL) &
~(UHCHR_SSEP1 | UHCHR_SSEP2 | UHCHR_SSEP3 | UHCHR_SSE);
return 0;
}
开发者ID:ManiacTwister,项目名称:linux-hnd,代码行数:13,代码来源:mainstone.c
示例13: spitz_mci_init
static int spitz_mci_init(struct device *dev, irq_handler_t spitz_detect_int, void *data)
{
int err;
/* setup GPIO for PXA27x MMC controller */
pxa_gpio_mode(GPIO32_MMCCLK_MD);
pxa_gpio_mode(GPIO112_MMCCMD_MD);
pxa_gpio_mode(GPIO92_MMCDAT0_MD);
pxa_gpio_mode(GPIO109_MMCDAT1_MD);
pxa_gpio_mode(GPIO110_MMCDAT2_MD);
pxa_gpio_mode(GPIO111_MMCDAT3_MD);
pxa_gpio_mode(SPITZ_GPIO_nSD_DETECT | GPIO_IN);
pxa_gpio_mode(SPITZ_GPIO_nSD_WP | GPIO_IN);
spitz_mci_platform_data.detect_delay = msecs_to_jiffies(250);
err = request_irq(SPITZ_IRQ_GPIO_nSD_DETECT, spitz_detect_int,
IRQF_DISABLED | IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING,
"MMC card detect", data);
if (err) {
printk(KERN_ERR "spitz_mci_init: MMC/SD: can't request MMC card detect IRQ\n");
return -1;
}
return 0;
}
开发者ID:D-Land,项目名称:operating-systems,代码行数:26,代码来源:spitz.c
示例14: cmx270_mci_init
static int cmx270_mci_init(struct device *dev,
irq_handler_t cmx270_detect_int,
void *data)
{
int err;
/*
* setup GPIO for PXA27x MMC controller
*/
pxa_gpio_mode(GPIO32_MMCCLK_MD);
pxa_gpio_mode(GPIO112_MMCCMD_MD);
pxa_gpio_mode(GPIO92_MMCDAT0_MD);
pxa_gpio_mode(GPIO109_MMCDAT1_MD);
pxa_gpio_mode(GPIO110_MMCDAT2_MD);
pxa_gpio_mode(GPIO111_MMCDAT3_MD);
/* SB-X270 uses GPIO105 as SD power enable */
pxa_gpio_mode(105 | GPIO_OUT);
/* card detect IRQ on GPIO 83 */
pxa_gpio_mode(IRQ_TO_GPIO(CMX270_MMC_IRQ));
set_irq_type(CMX270_MMC_IRQ, IRQT_FALLING);
err = request_irq(CMX270_MMC_IRQ, cmx270_detect_int,
IRQF_DISABLED | IRQF_TRIGGER_FALLING,
"MMC card detect", data);
if (err) {
printk(KERN_ERR "cmx270_mci_init: MMC/SD: can't"
" request MMC card detect IRQ\n");
return -1;
}
return 0;
}
开发者ID:PennPanda,项目名称:linux-repo,代码行数:34,代码来源:cm-x270.c
示例15: pxa2xx_ac97_resume
static int pxa2xx_ac97_resume(struct platform_device *pdev,
struct snd_soc_cpu_dai *dai)
{
pxa_gpio_mode(GPIO31_SYNC_AC97_MD);
pxa_gpio_mode(GPIO30_SDATA_OUT_AC97_MD);
pxa_gpio_mode(GPIO28_BITCLK_AC97_MD);
pxa_gpio_mode(GPIO29_SDATA_IN_AC97_MD);
#ifdef CONFIG_PXA27x
/* Use GPIO 113 as AC97 Reset on Bulverde */
pxa_gpio_mode(113 | GPIO_ALT_FN_2_OUT);
#endif
pxa_set_cken(CKEN2_AC97, 1);
return 0;
}
开发者ID:mrtos,项目名称:Logitech-Revue,代码行数:14,代码来源:pxa2xx-ac97.c
示例16: pxa2xx_ac97_hw_resume
int pxa2xx_ac97_hw_resume(void)
{
if (cpu_is_pxa25x() || cpu_is_pxa27x()) {
pxa_gpio_mode(GPIO31_SYNC_AC97_MD);
pxa_gpio_mode(GPIO30_SDATA_OUT_AC97_MD);
pxa_gpio_mode(GPIO28_BITCLK_AC97_MD);
pxa_gpio_mode(GPIO29_SDATA_IN_AC97_MD);
}
if (cpu_is_pxa27x()) {
/* Use GPIO 113 or 95 as AC97 Reset on Bulverde */
set_resetgpio_mode(RESETGPIO_NORMAL_ALTFUNC);
}
clk_enable(ac97_clk);
return 0;
}
开发者ID:mecke,项目名称:linux-2.6,代码行数:15,代码来源:pxa2xx-ac97-lib.c
示例17: athena_ohci_init
static int athena_ohci_init(struct device *dev)
{
/* setup Port1 GPIO pin. */
pxa_gpio_mode( 88 | GPIO_ALT_FN_1_IN); /* USBHPWR1 */
pxa_gpio_mode( 89 | GPIO_ALT_FN_2_OUT); /* USBHPEN1 */
/* Set the Power Control Polarity Low and Power Sense
Polarity Low to active high. */
UHCHR = (UHCHR | UHCHR_PSPL| UHCHR_SSEP2 | UHCHR_CGR) &
~(UHCHR_SSEP1 | UHCHR_PCPL | UHCHR_SSEP3 | UHCHR_SSE);
UHCRHDA &= ~UHCRHDA_NOCP;
return 0;
}
开发者ID:bqwd36,项目名称:android-athena,代码行数:15,代码来源:htcathena.c
示例18: lubbock_mci_init
static int lubbock_mci_init(struct device *dev,
irqreturn_t (*detect_int)(int, void *, struct pt_regs *),
void *data)
{
/* setup GPIO for PXA25x MMC controller */
pxa_gpio_mode(GPIO6_MMCCLK_MD);
pxa_gpio_mode(GPIO8_MMCCS0_MD);
/* detect card insert/eject */
mmc_detect_int = detect_int;
init_timer(&mmc_timer);
mmc_timer.data = (unsigned long) data;
return request_irq(LUBBOCK_SD_IRQ, lubbock_detect_int,
SA_SAMPLE_RANDOM, "lubbock-sd-detect", data);
}
开发者ID:devicenull,项目名称:supermicro_ipmi_firmware,代码行数:15,代码来源:lubbock.c
示例19: cmx270_init_irq
static void __init cmx270_init_irq(void)
{
pxa27x_init_irq();
cmx270_pci_init_irq();
/* Setup interrupt for dm9000 */
pxa_gpio_mode(IRQ_TO_GPIO(CMX270_ETHIRQ));
set_irq_type(CMX270_ETHIRQ, IRQT_RISING);
/* Setup interrupt for 2700G */
pxa_gpio_mode(IRQ_TO_GPIO(CMX270_GFXIRQ));
set_irq_type(CMX270_GFXIRQ, IRQT_FALLING);
}
开发者ID:PennPanda,项目名称:linux-repo,代码行数:15,代码来源:cm-x270.c
示例20: htcuniversal_phone_probe
static int
htcuniversal_phone_probe( struct platform_device *dev )
{
struct htcuniversal_phone_funcs *funcs = dev->dev.platform_data;
/* configure phone UART */
pxa_gpio_mode( GPIO_NR_HTCUNIVERSAL_PHONE_RXD_MD );
pxa_gpio_mode( GPIO_NR_HTCUNIVERSAL_PHONE_TXD_MD );
pxa_gpio_mode( GPIO_NR_HTCUNIVERSAL_PHONE_UART_CTS_MD );
pxa_gpio_mode( GPIO_NR_HTCUNIVERSAL_PHONE_UART_RTS_MD );
funcs->configure = htcuniversal_phone_configure;
return 0;
}
开发者ID:ManiacTwister,项目名称:linux-hnd,代码行数:15,代码来源:htcuniversal_phone.c
注:本文中的pxa_gpio_mode函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论