From: Mark Brown Date: Sun, 15 Apr 2012 11:37:47 +0000 (+0100) Subject: regulator: core: Provide standard enable operations for regmap users X-Git-Tag: v3.5-rc1~177^2~58^3~16 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cd6dffb4c6c476f5787f4df3eda7ecb16e25780d;p=pandora-kernel.git regulator: core: Provide standard enable operations for regmap users Since the enable(), disable() and is_enabled() operations for most regmap based regulators come down to reading and updating a single register bit we can factor out the code and allow these drivers to just define which bit to update using the enable_reg and enable_mask fields in their desc and then use operations provided by the core. As well as the code saving this opens the door to future optimisation of the bulk operations - if the core can realise that we are updating a single register for multiple regulators then it should be able to combine these updates into a single physical operation. Signed-off-by: Mark Brown Acked-by: Liam Girdwood --- Reading git-diff-tree failed