regmap: introduce fast_io busses, and use a spinlock for them
authorStephen Warren <swarren@nvidia.com>
Wed, 4 Apr 2012 21:48:28 +0000 (15:48 -0600)
committerVarun Wadekar <vwadekar@nvidia.com>
Wed, 18 Apr 2012 05:36:36 +0000 (10:36 +0530)
commitccc76e0ec4ec0092714990dcae68f02871dc342d
tree53ca89713a1eb1f0b751ee001a4f8df1a3bf52c0
parentcee7ac2412a11dfa1a526b916326fc186ac50c05
regmap: introduce fast_io busses, and use a spinlock for them

Some bus types have very fast IO. For these, acquiring a mutex for every
IO operation is a significant overhead. Allow busses to indicate their IO
is fast, and enhance regmap to use a spinlock for those busses.

[Currently limited to native endian registers -- broonie]

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
(cherry picked from commit bacdbe077342ecc9e7b3e374cc5a41995116706a)

Change-Id: I337f27a09f2b176b46e8f6d05401957a1abc0609
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/96503
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>
drivers/base/regmap/internal.h
drivers/base/regmap/regcache-rbtree.c
drivers/base/regmap/regcache.c
drivers/base/regmap/regmap.c
include/linux/regmap.h