Exemplo n.º 1
0
void ara_board_exit(void) {
    int i;

    /* Run the board specific code */
    if (board_info->board_exit) {
        board_info->board_exit(board_info);
    }

    /*
     * First unregister the TCA64xx I/O Expanders and associated I2C bus(ses).
     * Done in reverse order from registration to account for IRQ chaining
     * between I/O Expander chips.
     */
    for (i = board_info->nr_io_expanders - 1; i >= 0; i--) {
        struct io_expander_info *io_exp = &board_info->io_expanders[i];

        if (io_exp->io_exp_driver_data)
            tca64xx_deinit(io_exp->io_exp_driver_data);

        if (io_exp->i2c_dev)
            up_i2cuninitialize(io_exp->i2c_dev);
    }

    /* Lastly unregister the GPIO Chip driver */
    stm32_gpio_deinit();

    board_info = NULL;
}
Exemplo n.º 2
0
void board_exit(void) {
    int i;

    /* If we were able to bringup the refclk, turn it off now. */
    if (vreg_get_pwr_state(&refclk_main_vreg) == VREG_PWR_UP) {
        vreg_put(&refclk_main_vreg);
    }

    /*
     * Unregister the TCA64xx I/O Expanders and associated I2C
     * bus(ses).  Done in reverse order from registration to account
     * for IRQ chaining between I/O Expander chips.
     */
    for (i = evt1_board_info.nr_io_expanders - 1; i >= 0; i--) {
        struct io_expander_info *io_exp = &evt1_board_info.io_expanders[i];

        if (io_exp->io_exp_driver_data)
            tca64xx_deinit(io_exp->io_exp_driver_data);

        if (io_exp->i2c_dev)
            up_i2cuninitialize(io_exp->i2c_dev);
    }

    /* Lastly unregister the GPIO Chip driver */
    stm32_gpio_deinit();
}
Exemplo n.º 3
0
void board_exit(void) {
    int i;
    /*
     * First unregister the TCA64xx I/O Expanders and associated I2C bus(ses).
     * Done in reverse order from registration to account for IRQ chaining
     * between I/O Expander chips.
     */
    for (i = sdb_board_info.nr_io_expanders - 1; i >= 0; i--) {
        struct io_expander_info *io_exp = &sdb_board_info.io_expanders[i];

        if (io_exp->io_exp_driver_data)
            tca64xx_deinit(io_exp->io_exp_driver_data);

        if (io_exp->i2c_dev)
            up_i2cuninitialize(io_exp->i2c_dev);
    }

    /* Disable the I/O Expanders power */
    vreg_put(&ioexp_vreg);

    /* Lastly unregister the GPIO Chip driver */
    stm32_gpio_deinit();
}