
22 Jul
2011
22 Jul
'11
6:38 a.m.
Hi Prafulla,
Thank you so much for feedback.
In this case mvgpio.c is enabling support for gpio framework that will be interfaced using asm/gpio.h.
- You can split stuff in mvgpio.h to asm/arch/gpio.h and/or mvgpio.c
- you can move it to drivers/gpio/
I would recommend first option.
So you mean the first patch will have only mvgpio.c that enables the support for gpio for Marvell SoCs and then second patch will enable support for Armada series via gpio.h file. So if anyone want to use mvgpio.c he/she should write a compatible version of gpio.h in their arch folder. I hope i am getting your right.
+static int get_gpio_base(int bank) +{
switch (bank) {
case 0:
return GPIO_BANK0_BASE;
case 1:
return GPIO_BANK1_BASE;
case 2:
return GPIO_BANK2_BASE;
case 3:
return GPIO_BANK3_BASE;
}
return 0;
+}
As discussed, this would be preferred macro in gpio.h
I am finding it difficult to fit this as a macro. so i thought to have it as inline function in gpio.h will that be ok?
Regards, Ajay Bhargav