diff options
author | Tomasz Figa | 2013-03-18 22:31:50 +0100 |
---|---|---|
committer | Linus Walleij | 2013-04-09 09:36:42 +0200 |
commit | 198469504ac77ee04fe0f185bd668e1909aaba5f (patch) | |
tree | ba3530c083d886bbfe4ce4be55b1e10c197ad50f /drivers/pinctrl/pinctrl-samsung.h | |
parent | Merge tag 'v3.9-rc5' into devel (diff) | |
download | kernel-qcow2-linux-198469504ac77ee04fe0f185bd668e1909aaba5f.tar.gz kernel-qcow2-linux-198469504ac77ee04fe0f185bd668e1909aaba5f.tar.xz kernel-qcow2-linux-198469504ac77ee04fe0f185bd668e1909aaba5f.zip |
pinctrl: samsung: Protect bank registers with a spinlock
Certain pin control registers can be accessed from different contexts,
i.e. pinctrl, gpio and irq functions. This makes the locking provided by
pin control core insufficient.
This patch adds necessary locking using a per bank spinlock as it was
done in the old Samsung GPIO driver.
Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/pinctrl-samsung.h')
-rw-r--r-- | drivers/pinctrl/pinctrl-samsung.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/pinctrl/pinctrl-samsung.h b/drivers/pinctrl/pinctrl-samsung.h index e2d4e67f7e88..b9dbe7949fab 100644 --- a/drivers/pinctrl/pinctrl-samsung.h +++ b/drivers/pinctrl/pinctrl-samsung.h @@ -119,6 +119,7 @@ struct samsung_pinctrl_drv_data; * @irq_domain: IRQ domain of the bank. * @gpio_chip: GPIO chip of the bank. * @grange: linux gpio pin range supported by this bank. + * @slock: spinlock protecting bank registers */ struct samsung_pin_bank { u32 pctl_offset; @@ -137,6 +138,7 @@ struct samsung_pin_bank { struct irq_domain *irq_domain; struct gpio_chip gpio_chip; struct pinctrl_gpio_range grange; + spinlock_t slock; }; /** |