Ejemplo n.º 1
0
void cycle11 (void) {
    if (do_cycle11 == 1) {
        // Set Halt
        set_halt_until_mbus_tx();

        gpio_init(0xFFFF); // All Output
        gpio_write_data(0xF0F0); // 1111 0000 1111 0000
        gpio_kill_bit(15);       // 0111 0000 1111 0000
        gpio_set_bit(1);         // 0111 0000 1111 0010
        gpio_set_2bits(11, 8);   // 0111 1001 1111 0010
        gpio_kill_bit(12);       // 0110 1001 1111 0010

        if (gpio_get_data() == 0xF2) {pass (0xC, gpio_get_data());}
        else {fail (0xC, gpio_get_data());}

        gpio_close();
    }
}
Ejemplo n.º 2
0
static irqreturn_t gpio_c17_int_hndlr (int irq, void *dev_id, struct pt_regs *regs)
{
static int counter;
u32 value;

       gpio_config_int_en(2, 17, FALSE);
       counter ++;
       value = gpio_get_data (2, 17);
       printk (KERN_INFO"Get the %d interrupt C17 with value %d\n", counter, value);
       gpio_config_int_en(2, 17, TRUE);
       return IRQ_HANDLED;
}
Ejemplo n.º 3
0
static irqreturn_t gpio_c16_int_hndlr(int irq, void *dev_id,
                struct pt_regs *regs)
{
        udelay(100);
        if (gpio_get_data(2, 16) == 1) {
                det_dp_hi = 1;
                //      mc13783_otg_wakeup ();
                //      gpio_config_int_en(2, 17, FALSE);
        } else {
                det_dp_hi = 0;
                //      gpio_config_int_en(2, 16, TRUE);
        }
        TRACE_MSG1(REMOVE_TCD, "Changing the state of DP to %d", det_dp_hi);
        pmic_otg_wakeup();
        return IRQ_HANDLED;
}
Ejemplo n.º 4
0
/*
 * Probe for the card. If present the GPIO data would be set.
 */
int sdhc_find_card(void)
{
	return gpio_get_data(0, 24);
}
Ejemplo n.º 5
0
/*
 * Probe for the mmc card.
 * @return The function returns 0 if card is inserted, 1 if removed.
 */
int sdhc_find_card(void)
{
	return gpio_get_data(3, 23);
}