On Wed, Jul 2, 2014 at 5:40 PM, Tomasz Figa <t.figa@xxxxxxxxxxx> wrote: > This patch makes the pinctrl-samsung driver configure GPIO direction on > its own, without using the pinctrl_gpio_direction_*() "helpers". The > rationale behind this change is as follows: > - pinctrl-samsung does not need translation from GPIO namespace to > pinctrl namespace to handle GPIO operations - GPIO chip and offset > therein are enough to calculate necessary offsets and bit masks in > constant time, > - the pinctrl_gpio_direction_*() functions do not do anything useful > other than translating the pin into pinctrl namespace and calling the > .gpio_set_direction() from pinmux_ops of the controller, > - the undesirable side effect of using those helpers is losing the > ability to change GPIO direction in atomic context, because they > explicitly use a mutex for synchronization, > > Results of this patch are: > - fixed warnings about scheduling while atomic in code that needs to > set GPIO direction in atomic context (e.g. interrupt handler), > - reduced overhead of bitbanging drivers that use gpio_direction_*(), > e.g. i2c-gpio. > > Signed-off-by: Tomasz Figa <t.figa@xxxxxxxxxxx> Well the cross-call function is actually mostly for the case when the pinctrl and GPIO drivers are in different files, or you combine two IP blocks arbitrarily. It's a bit messy anyway. Patch applied. Yours, Linus Walleij -- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html