summaryrefslogtreecommitdiff
path: root/drivers/pinctrl/pinctrl-samsung.h
diff options
context:
space:
mode:
authorTomasz Figa <tomasz.figa@gmail.com>2013-03-18 22:31:50 +0100
committerLinus Walleij <linus.walleij@linaro.org>2013-04-09 09:36:42 +0200
commit198469504ac77ee04fe0f185bd668e1909aaba5f (patch)
treeba3530c083d886bbfe4ce4be55b1e10c197ad50f /drivers/pinctrl/pinctrl-samsung.h
parent6a7b3e970426f4bc2a8d52f81a4fda6595a9f052 (diff)
downloadlwn-198469504ac77ee04fe0f185bd668e1909aaba5f.tar.gz
lwn-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.h2
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;
};
/**