On 02/21/14 22:05, Almo Nito wrote:
Can Someone please help converting the following code into sunxi code:

#define GTP_RST_PORT    S5PV210_GPJ3(6)
#define GTP_INT_PORT    S5PV210_GPH1(3)
#define GTP_INT_IRQ     gpio_to_irq(GTP_INT_PORT)
#define GTP_INT_CFG     S3C_GPIO_SFN(0xF)

#define GTP_GPIO_AS_INPUT(pin)          do{\
                                             gpio_direction_input(pin);\
                                             s3c_gpio_setpull(pin,
S3C_GPIO_PULL_NONE);\
                                         }while(0)
#define GTP_GPIO_AS_INT(pin)            do{\
                                             GTP_GPIO_AS_INPUT(pin);\
                                             s3c_gpio_cfgpin(pin,
GTP_INT_CFG);\
                                         }while(0)
#define GTP_GPIO_GET_VALUE(pin)         gpio_get_value(pin)
#define GTP_GPIO_OUTPUT(pin,level)      gpio_direction_output(pin,level)
#define GTP_GPIO_REQUEST(pin, label)    gpio_request(pin, label)
#define GTP_GPIO_FREE(pin)              gpio_free(pin)
#define GTP_IRQ_TAB                     {IRQ_TYPE_EDGE_RISING,
IRQ_TYPE_EDGE_FALLING, IRQ_TYPE_LEVEL_LOW, IRQ_TYPE_LEVEL_HIGH}


This would be very very helpful for me
https://github.com/oliv3r/u-boot-sunxi/blob/8dde68488f9c9b62f41a9cb1a6403660c80a3f60/arch/arm/include/asm/arch-sunxi/gpio.h

this is how it's handled in u-boot.

not quite sure what youa re after though ...

oliver

Thank you very much


--
You received this message because you are subscribed to the Google Groups 
"linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to