Hi Phil, Le Wednesday 29 October 2008 21:00:09 Phil Sutter, vous avez écrit : > As gpiolib doesn't support pin multiplexing, it provides no way to > access the GPIOFUNC register. Also there is no support for setting > interrupt status and level. These functions provide access to them and > are needed by the CompactFlash driver. Right, but we do have interrupt level and status fuctions, registered as callbacks to an extended gpiochip structure. These two functions can remain static to the gpio.c file since we should perform interrupt status and level initialisation at gpiochip init time. Not sure which code you based your work on, but linux-queue tree at linux-mips.org has such code. > > The function rb532_gpio_set_cfg is redundant with > rb532_gpio_direction_{input,output} but was added for simplicity's sake. > Maybe gpiolib support could be dropped completely as there are not many > users of it. Sticking with the gpiolib has two advantages to me : - you can use gpio_set_value/get_value for other - GPIO initialisation should be done right after gpiochip registering I would be rather in favor of adding the other missing callbacks to the rb532_gpio_chip and make them look like the standard get/set functions. Just like what was done with the interrupt level and status functions. -- Best regards, Florian Fainelli Email : florian@xxxxxxxxxxx http://openwrt.org -------------------------------