Date:2011-03-14 14:37:07 (11 years 6 months ago)
Author:Lars C.
Commit:2e58d1e94f379e9ec86b72b8a8e7b02712117406
Message:JZ47XX: GPIO: Add support for FUNC4

On the JZ4760 a pin can have upto 4 alternate functions.
This patch adds support for setting the 4th alternate function.
Files: arch/mips/jz47xx/gpiov2.c (1 diff)

Change Details

arch/mips/jz47xx/gpiov2.c
9292        jz_gpio_write_bit(gpio, JZ_REG_GPIO_TRIGGER_CLEAR);
9393    } else {
9494        jz_gpio_write_bit(gpio, JZ_REG_GPIO_FUNC_SET);
95        jz_gpio_write_bit(gpio, JZ_REG_GPIO_TRIGGER_CLEAR);
9695        switch (function) {
9796        case JZ_GPIO_FUNC1:
9897            jz_gpio_write_bit(gpio, JZ_REG_GPIO_SELECT_CLEAR);
98            jz_gpio_write_bit(gpio, JZ_REG_GPIO_TRIGGER_CLEAR);
9999            break;
100        case JZ_GPIO_FUNC2:
101            jz_gpio_write_bit(gpio, JZ_REG_GPIO_SELECT_SET);
102            jz_gpio_write_bit(gpio, JZ_REG_GPIO_TRIGGER_CLEAR);
100103        case JZ_GPIO_FUNC3:
104            jz_gpio_write_bit(gpio, JZ_REG_GPIO_SELECT_CLEAR);
101105            jz_gpio_write_bit(gpio, JZ_REG_GPIO_TRIGGER_SET);
102        case JZ_GPIO_FUNC2: /* Falltrough */
106            break;
107        case JZ_GPIO_FUNC4:
103108            jz_gpio_write_bit(gpio, JZ_REG_GPIO_SELECT_SET);
109            jz_gpio_write_bit(gpio, JZ_REG_GPIO_TRIGGER_SET);
104110            break;
105111        default:
106112            BUG();

Archive Download the corresponding diff file



interactive