mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
mfd: Add WM8994 bulk register write operation
Signed-off-by: Mark Brown <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
This commit is contained in:
parent
09b034191a
commit
e93c53870c
2 changed files with 25 additions and 0 deletions
|
|
@ -137,6 +137,29 @@ int wm8994_reg_write(struct wm8994 *wm8994, unsigned short reg,
|
|||
}
|
||||
EXPORT_SYMBOL_GPL(wm8994_reg_write);
|
||||
|
||||
/**
|
||||
* wm8994_bulk_write: Write multiple WM8994 registers
|
||||
*
|
||||
* @wm8994: Device to write to
|
||||
* @reg: First register
|
||||
* @count: Number of registers
|
||||
* @buf: Buffer to write from.
|
||||
*/
|
||||
int wm8994_bulk_write(struct wm8994 *wm8994, unsigned short reg,
|
||||
int count, u16 *buf)
|
||||
{
|
||||
int ret;
|
||||
|
||||
mutex_lock(&wm8994->io_lock);
|
||||
|
||||
ret = wm8994_write(wm8994, reg, count * 2, buf);
|
||||
|
||||
mutex_unlock(&wm8994->io_lock);
|
||||
|
||||
return ret;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(wm8994_bulk_write);
|
||||
|
||||
/**
|
||||
* wm8994_set_bits: Set the value of a bitfield in a WM8994 register
|
||||
*
|
||||
|
|
|
|||
Loading…
Reference in a new issue