static void simpad_uart_pm(struct uart_port *port, u_int state, u_int oldstate) { if (port->mapbase == (u_int)&Ser1UTCR0) { if (state) { simpad_clear_cs3_bit(RS232_ON); simpad_clear_cs3_bit(DECT_POWER_ON); }else { simpad_set_cs3_bit(RS232_ON); simpad_set_cs3_bit(DECT_POWER_ON); } } }
static void cs3_gpio_set(struct gpio_chip *chip, unsigned offset, int value) { if (offset > 15) return; if (value) simpad_set_cs3_bit(1 << offset); else simpad_clear_cs3_bit(1 << offset); };
static int simpad_pcmcia_configure_socket(struct soc_pcmcia_socket *skt, const socket_state_t *state) { unsigned long flags; local_irq_save(flags); /* Murphy: see table of MIC2562a-1 */ switch (state->Vcc) { case 0: simpad_clear_cs3_bit(VCC_3V_EN|VCC_5V_EN|EN0|EN1); break; case 33: simpad_clear_cs3_bit(VCC_3V_EN|EN1); simpad_set_cs3_bit(VCC_5V_EN|EN0); break; case 50: simpad_clear_cs3_bit(VCC_5V_EN|EN1); simpad_set_cs3_bit(VCC_3V_EN|EN0); break; default: printk(KERN_ERR "%s(): unrecognized Vcc %u\n", __func__, state->Vcc); simpad_clear_cs3_bit(VCC_3V_EN|VCC_5V_EN|EN0|EN1); local_irq_restore(flags); return -1; } local_irq_restore(flags); return 0; }
static void simpad_pcmcia_socket_suspend(struct soc_pcmcia_socket *skt) { simpad_set_cs3_bit(PCMCIA_RESET); }
static void simpad_pcmcia_socket_suspend(struct soc_pcmcia_socket *skt) { soc_pcmcia_disable_irqs(skt, irqs, ARRAY_SIZE(irqs)); simpad_set_cs3_bit(PCMCIA_RESET); }