public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mfd: Add WM8321 support
@ 2010-07-21 13:23 Mark Brown
  2010-07-25 22:38 ` Samuel Ortiz
  0 siblings, 1 reply; 2+ messages in thread
From: Mark Brown @ 2010-07-21 13:23 UTC (permalink / raw)
  To: Samuel Ortiz; +Cc: linux-kernel, Mark Brown

The WM8321 is a PMIC for low power, high performance applications. From a
software point of view the device is identical to the WM8320, all the
differences between the two devices are visible only in hardware.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
---
 drivers/mfd/wm831x-core.c |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/drivers/mfd/wm831x-core.c b/drivers/mfd/wm831x-core.c
index 1a968f3..cb94e7e 100644
--- a/drivers/mfd/wm831x-core.c
+++ b/drivers/mfd/wm831x-core.c
@@ -95,6 +95,7 @@ enum wm831x_parent {
 	WM8311 = 0x8311,
 	WM8312 = 0x8312,
 	WM8320 = 0x8320,
+	WM8321 = 0x8321,
 };
 
 static int wm831x_reg_locked(struct wm831x *wm831x, unsigned short reg)
@@ -1533,6 +1534,12 @@ static int wm831x_device_init(struct wm831x *wm831x, unsigned long id, int irq)
 		dev_info(wm831x->dev, "WM8320 revision %c\n", 'A' + rev);
 		break;
 
+	case WM8321:
+		parent = WM8321;
+		wm831x->num_gpio = 12;
+		dev_info(wm831x->dev, "WM8321 revision %c\n", 'A' + rev);
+		break;
+
 	default:
 		dev_err(wm831x->dev, "Unknown WM831x device %04x\n", ret);
 		ret = -EINVAL;
@@ -1607,6 +1614,12 @@ static int wm831x_device_init(struct wm831x *wm831x, unsigned long id, int irq)
 				      NULL, 0);
 		break;
 
+	case WM8321:
+		ret = mfd_add_devices(wm831x->dev, -1,
+				      wm8320_devs, ARRAY_SIZE(wm8320_devs),
+				      NULL, 0);
+		break;
+
 	default:
 		/* If this happens the bus probe function is buggy */
 		BUG();
@@ -1779,6 +1792,7 @@ static const struct i2c_device_id wm831x_i2c_id[] = {
 	{ "wm8311", WM8311 },
 	{ "wm8312", WM8312 },
 	{ "wm8320", WM8320 },
+	{ "wm8321", WM8321 },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, wm831x_i2c_id);
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] mfd: Add WM8321 support
  2010-07-21 13:23 [PATCH] mfd: Add WM8321 support Mark Brown
@ 2010-07-25 22:38 ` Samuel Ortiz
  0 siblings, 0 replies; 2+ messages in thread
From: Samuel Ortiz @ 2010-07-25 22:38 UTC (permalink / raw)
  To: Mark Brown; +Cc: linux-kernel

Hi Mark,

On Wed, Jul 21, 2010 at 02:23:37PM +0100, Mark Brown wrote:
> The WM8321 is a PMIC for low power, high performance applications. From a
> software point of view the device is identical to the WM8320, all the
> differences between the two devices are visible only in hardware.
Patch applied, many thanks.

Cheers,
Samuel.


> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
> ---
>  drivers/mfd/wm831x-core.c |   14 ++++++++++++++
>  1 files changed, 14 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/mfd/wm831x-core.c b/drivers/mfd/wm831x-core.c
> index 1a968f3..cb94e7e 100644
> --- a/drivers/mfd/wm831x-core.c
> +++ b/drivers/mfd/wm831x-core.c
> @@ -95,6 +95,7 @@ enum wm831x_parent {
>  	WM8311 = 0x8311,
>  	WM8312 = 0x8312,
>  	WM8320 = 0x8320,
> +	WM8321 = 0x8321,
>  };
>  
>  static int wm831x_reg_locked(struct wm831x *wm831x, unsigned short reg)
> @@ -1533,6 +1534,12 @@ static int wm831x_device_init(struct wm831x *wm831x, unsigned long id, int irq)
>  		dev_info(wm831x->dev, "WM8320 revision %c\n", 'A' + rev);
>  		break;
>  
> +	case WM8321:
> +		parent = WM8321;
> +		wm831x->num_gpio = 12;
> +		dev_info(wm831x->dev, "WM8321 revision %c\n", 'A' + rev);
> +		break;
> +
>  	default:
>  		dev_err(wm831x->dev, "Unknown WM831x device %04x\n", ret);
>  		ret = -EINVAL;
> @@ -1607,6 +1614,12 @@ static int wm831x_device_init(struct wm831x *wm831x, unsigned long id, int irq)
>  				      NULL, 0);
>  		break;
>  
> +	case WM8321:
> +		ret = mfd_add_devices(wm831x->dev, -1,
> +				      wm8320_devs, ARRAY_SIZE(wm8320_devs),
> +				      NULL, 0);
> +		break;
> +
>  	default:
>  		/* If this happens the bus probe function is buggy */
>  		BUG();
> @@ -1779,6 +1792,7 @@ static const struct i2c_device_id wm831x_i2c_id[] = {
>  	{ "wm8311", WM8311 },
>  	{ "wm8312", WM8312 },
>  	{ "wm8320", WM8320 },
> +	{ "wm8321", WM8321 },
>  	{ }
>  };
>  MODULE_DEVICE_TABLE(i2c, wm831x_i2c_id);
> -- 
> 1.7.1
> 

-- 
Intel Open Source Technology Centre
http://oss.intel.com/

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-07-25 22:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-21 13:23 [PATCH] mfd: Add WM8321 support Mark Brown
2010-07-25 22:38 ` Samuel Ortiz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox