diff options
Diffstat (limited to 'drivers/mfd/wm8994-core.c')
| -rw-r--r-- | drivers/mfd/wm8994-core.c | 84 | 
1 files changed, 3 insertions, 81 deletions
diff --git a/drivers/mfd/wm8994-core.c b/drivers/mfd/wm8994-core.c index e1c283e6d4e..e6fab94e2c8 100644 --- a/drivers/mfd/wm8994-core.c +++ b/drivers/mfd/wm8994-core.c @@ -33,85 +33,7 @@  #include "wm8994.h" -/** - * wm8994_reg_read: Read a single WM8994 register. - * - * @wm8994: Device to read from. - * @reg: Register to read. - */ -int wm8994_reg_read(struct wm8994 *wm8994, unsigned short reg) -{ -	unsigned int val; -	int ret; - -	ret = regmap_read(wm8994->regmap, reg, &val); - -	if (ret < 0) -		return ret; -	else -		return val; -} -EXPORT_SYMBOL_GPL(wm8994_reg_read); - -/** - * wm8994_bulk_read: Read multiple WM8994 registers - * - * @wm8994: Device to read from - * @reg: First register - * @count: Number of registers - * @buf: Buffer to fill.  The data will be returned big endian. - */ -int wm8994_bulk_read(struct wm8994 *wm8994, unsigned short reg, -		     int count, u16 *buf) -{ -	return regmap_bulk_read(wm8994->regmap, reg, buf, count); -} - -/** - * wm8994_reg_write: Write a single WM8994 register. - * - * @wm8994: Device to write to. - * @reg: Register to write to. - * @val: Value to write. - */ -int wm8994_reg_write(struct wm8994 *wm8994, unsigned short reg, -		     unsigned short val) -{ -	return regmap_write(wm8994->regmap, reg, val); -} -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.  Data must be big-endian formatted. - */ -int wm8994_bulk_write(struct wm8994 *wm8994, unsigned short reg, -		      int count, const u16 *buf) -{ -	return regmap_raw_write(wm8994->regmap, reg, buf, count * sizeof(u16)); -} -EXPORT_SYMBOL_GPL(wm8994_bulk_write); - -/** - * wm8994_set_bits: Set the value of a bitfield in a WM8994 register - * - * @wm8994: Device to write to. - * @reg: Register to write to. - * @mask: Mask of bits to set. - * @val: Value to set (unshifted) - */ -int wm8994_set_bits(struct wm8994 *wm8994, unsigned short reg, -		    unsigned short mask, unsigned short val) -{ -	return regmap_update_bits(wm8994->regmap, reg, mask, val); -} -EXPORT_SYMBOL_GPL(wm8994_set_bits); - -static struct mfd_cell wm8994_regulator_devs[] = { +static const struct mfd_cell wm8994_regulator_devs[] = {  	{  		.name = "wm8994-ldo",  		.id = 1, @@ -140,7 +62,7 @@ static struct resource wm8994_gpio_resources[] = {  	},  }; -static struct mfd_cell wm8994_devs[] = { +static const struct mfd_cell wm8994_devs[] = {  	{  		.name = "wm8994-codec",  		.num_resources = ARRAY_SIZE(wm8994_codec_resources), @@ -714,7 +636,7 @@ static int wm8994_i2c_probe(struct i2c_client *i2c,  	if (i2c->dev.of_node) {  		of_id = of_match_device(wm8994_of_match, &i2c->dev);  		if (of_id) -			wm8994->type = (int)of_id->data; +			wm8994->type = (enum wm8994_type)of_id->data;  	} else {  		wm8994->type = id->driver_data;  	}  | 
