Thread (156 messages) 156 messages, 11 authors, 2017-07-31

Re: [PATCH v3 04/14] GPIO: Add gpio-ingenic driver

From: Paul Cercueil <paul@crapouillou.net>
Date: 2017-02-09 17:15:09
Also in: linux-fbdev, linux-gpio, linux-mips, linux-mmc, linux-pwm, lkml

Hi,
What some drivers do when they just get/set a bit in a register
to get/set or set the direction of a GPIO, is to select GPIO_GENERIC
and just bgpio_init() with the right iomem pointers, then the core
will register handlers for get, set, set_direcition callback and
get_direction and your driver can just focus on the remainders.
GPIO_GENERIC and bgpio_init() would work for my .set() / .get() 
callbacks,
not for my .direction_input() / .direction_output() callbacks which need
to set more than one register.
If you're not just replacing these with GPIO_GENERIC, please also
include a .get_direction() callback.
My .direction_input() and .direction_output() callbacks just call into
the pinctrl driver, using pinctrl_gpio_direction_[in,out]put().
I didn't find a way to get the direction info from the pinctrl driver,
is that something that the core should provide?

Thanks,
-Paul
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help