summaryrefslogtreecommitdiffstats
path: root/drivers/gpio/gpio-msm-v2.c
diff options
context:
space:
mode:
authorJohan Hovold <johan@kernel.org>2015-05-04 17:10:44 +0200
committerLinus Walleij <linus.walleij@linaro.org>2015-05-12 10:47:39 +0200
commit6ffcb7971486ea4f1eb14f07f8efb0b6f829a23c (patch)
treecf2c8ed5ec678cc8698cd62774c211ac30ea765d /drivers/gpio/gpio-msm-v2.c
parent56d30ec14c13303eb9e7c34358ba6549fc7b0121 (diff)
downloadblackbird-op-linux-6ffcb7971486ea4f1eb14f07f8efb0b6f829a23c.tar.gz
blackbird-op-linux-6ffcb7971486ea4f1eb14f07f8efb0b6f829a23c.zip
gpio: sysfs: use per-gpio locking
Add a per-gpio mutex to serialise attribute operations rather than use one global mutex for all gpios and chips. Having a single global lock for all gpios in a system adds unnecessary latency to the sysfs interface, and especially when having gpio controllers connected over slow buses. Now that the global gpio-sysfs interrupt table is gone and with per-gpio data in place, we can easily switch to using a more fine-grained locking scheme. Keep the global mutex to serialise the global (class) operations of gpio export and unexport and chip removal. Also document the locking assumptions made. Note that this is also needed to fix a race between gpiod_export and gpiod_unexport. Signed-off-by: Johan Hovold <johan@kernel.org> Reviewed-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/gpio/gpio-msm-v2.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud