Skip to contentSkip to conversation

: Mfd-Initial-support-for-Texas-Instruments-AIC-family-Codecs

PATCH RESEND Superseded BAJWA, MEHAR 3 participants 4 messages Feb 17, 2013 – Apr 15, 2013 1 message not in the archive Multifunction devices (MFD)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#1 lore raw

PATCH RESEND 1/1 : Mfd-Initial-support-for-Texas-Instruments-AIC-family-Codecs

In reply to a message not in the archive

Hi Samuel,
I am re-sending the MFD support for AIC family of Audio CODECs
from Texas Instruments. The patch was tested on mfd-for-linus-3.8-1. I would like to request that this be considered for inclusion in the kernel at the next available window. Could you please let me know if you have any comments/recommendations for this patch. We would like to work on it and get it up-streamed.

Thanks for your consideration.

Regards,
Mehar.

From 9f26bca6eb69744f259dff1827cac53b49a71884 Mon Sep 17 00:00:00 2001
From: Mehar Bajwa <[email protected]>
Date: Thu, 14 Feb 2013 17:14:34 +0530
Subject: [PATCH] mfd: Initial support for Texas Instruments AIC family of CODECs

Initial support for TI's AIC platform and TLV320AIC3262 CODEC device.

The AIC platform provides common interface to series of low power audio CODECS. This MFD core driver instantiates subdevices that help in supporting range of features provided by AIC family of devices

---
 drivers/mfd/Kconfig                         |   41 +++
 drivers/mfd/Makefile                        |    3 +
 drivers/mfd/tlv320aic3xxx-core.c            |  462 +++++++++++++++++++++++++++
 drivers/mfd/tlv320aic3xxx-i2c.c             |   97 ++++++
 drivers/mfd/tlv320aic3xxx-irq.c             |  234 ++++++++++++++
 drivers/mfd/tlv320aic3xxx-spi.c             |   96 ++++++
 include/linux/mfd/tlv320aic3262-registers.h |  312 ++++++++++++++++++
 include/linux/mfd/tlv320aic3xxx-core.h      |  153 +++++++++
 include/linux/mfd/tlv320aic3xxx-registers.h |   75 +++++
 9 files changed, 1473 insertions(+), 0 deletions(-)
 create mode 100644 drivers/mfd/tlv320aic3xxx-core.c
 create mode 100644 drivers/mfd/tlv320aic3xxx-i2c.c
 create mode 100644 drivers/mfd/tlv320aic3xxx-irq.c
 create mode 100644 drivers/mfd/tlv320aic3xxx-spi.c
 create mode 100644 include/linux/mfd/tlv320aic3262-registers.h
 create mode 100644 include/linux/mfd/tlv320aic3xxx-core.h
 create mode 100644 include/linux/mfd/tlv320aic3xxx-registers.h
drivers/mfd/Kconfig +41 -0
index ff553ba..6f273ea 100644
@@ -45,6 +45,47 @@ config MFD_88PM805
 	  components like codec device, headset/Mic device under the
 	  corresponding menus.
 
+config MFD_AIC3XXX
+	bool "Support for AIC3XXX"
+	select REGMAP
+	select MFD_CORE
+	help
+	  Say yes here if you want support for Texas Instruments AIC audio
+	  codec.
+	  You have to select individual I2C or SPI depending on
+	  AIC3XXX interfacing with platform.
+
+config MFD_AIC3XXX_I2C
+	bool "Support Texas Instruments AIC3XXX platform with I2C"
+	select MFD_AIC3XXX
+	select REGMAP_I2C
+	depends on I2C
+	help
+	  Support for the Texas Instruments TLV320AIC3XXX family of audio SoC
+	  core functionality controlled via I2C.  This driver provides common
+	  support for accessing the device, additional drivers must be enabled
+	  in order to use the functionality of the device.
+
+config MFD_AIC3XXX_SPI
+	bool "Support Texas Instruments AIC3XXX  platform with SPI"
+	select MFD_AIC3XXX
+	select REGMAP_SPI
+	depends on SPI_MASTER
+	help
+	  Support for the Texas Instruments TLV320AIC3XXX family of audio SoC
+	  core functionality controlled via SPI.  This driver provides common
+	  support for accessing the device, additional drivers must be enabled
+	  in order to use the functionality of the device.
+
+config MFD_AIC3262
+	bool "Support Texas Instruments AIC3262"
+	depends on MFD_AIC3XXX
+	help
+	  If you say yes here you will get support for Texas Instrument
+	  TLV320AIC3262 low power audio SoC.
+	  Addition driver must be enabled to use this in order to use
+	  functionality on device.
+
 config MFD_SM501
 	tristate "Support for Silicon Motion SM501"
 	 ---help---
drivers/mfd/Makefile +3 -0
index 8b977f8..7627ffb 100644
@@ -6,6 +6,9 @@
 obj-$(CONFIG_MFD_88PM860X)	+= 88pm860x.o
 obj-$(CONFIG_MFD_88PM800)	+= 88pm800.o 88pm80x.o
 obj-$(CONFIG_MFD_88PM805)	+= 88pm805.o 88pm80x.o
+obj-$(CONFIG_MFD_AIC3XXX)	+= tlv320aic3xxx-core.o tlv320aic3xxx-irq.o
+obj-$(CONFIG_MFD_AIC3XXX_I2C)	+= tlv320aic3xxx-i2c.o
+obj-$(CONFIG_MFD_AIC3XXX_SPI)	+= tlv320aic3xxx-spi.o
 obj-$(CONFIG_MFD_SM501)		+= sm501.o
 obj-$(CONFIG_MFD_ASIC3)		+= asic3.o tmio_core.o
 
drivers/mfd/tlv320aic3xxx-core.c new file +462 -0

462 lines not on this page · raw message

drivers/mfd/tlv320aic3xxx-i2c.c new file +97 -0

97 lines not on this page · raw message

drivers/mfd/tlv320aic3xxx-irq.c new file +234 -0

234 lines not on this page · raw message

drivers/mfd/tlv320aic3xxx-spi.c new file +96 -0

96 lines not on this page · raw message

include/linux/mfd/tlv320aic3262-registers.h new file +312 -0

312 lines not on this page · raw message

include/linux/mfd/tlv320aic3xxx-core.h new file +153 -0

153 lines not on this page · raw message

include/linux/mfd/tlv320aic3xxx-registers.h new file +75 -0

75 lines not on this page · raw message

Signature · 1 line
1.7.0.4
#2 lore raw

Hi Mehar,

Quoted 7 lines · MEHAR

Hi Samuel,
I am re-sending the MFD support for AIC family of Audio CODECs
from Texas Instruments. The patch was tested on mfd-for-linus-3.8-1. I would like to request that this be considered for inclusion in the kernel at the next available window. Could you please let me know if you have any comments/recommendations for this patch. We would like to work on it and get it up-streamed.

The patch looks good to me, but I'd like it to be splitted in several pieces. You can probably place the core, the irq, the spi and the i2c pieces in their own patches.

Cheers,
Samuel.

Signature · 2 lines
Intel Open Source Technology Centre
http://oss.intel.com/
#3 lore raw
Quoted 10 lines · Samuel Ortiz

Hi Mehar,

Quoted 7 lines · MEHAR

Hi Samuel,
I am re-sending the MFD support for AIC family of Audio CODECs
from Texas Instruments. The patch was tested on mfd-for-linus-3.8-1. I would like to request that this be considered for inclusion in the kernel at the next available window. Could you please let me know if you have any comments/recommendations for this patch. We would like to work on it and get it up-streamed.

Quoted 7 lines

The patch looks good to me, but I'd like it to be splitted in several pieces. You can probably place the core, the irq, the spi and the i2c pieces in their own patches.

Cheers,
Samuel.

Hi Samuel,
Thanks for your comments. As suggested by you, I am sending
individual patches as version 2.

Regards,
Mehar

Quoted 1 line

From 767b98b6a6ab08b2c0e22c4d0b16a17d1eeadf5d Mon Sep 17 00:00:00 2001

From: Mehar Bajwa <[email protected]>
Date: Fri, 12 Apr 2013 15:24:40 +0530
Subject: [PATCH 1/4] mfd: Initial support for Texas Instruments AIC family of CODECs

Initial support for Texas Instruments's AIC CODEC device.

The AIC platform provides common interface to series of low power audio CODECS. This MFD core driver instantiates subdevices that help in supporting range of features provided by AIC family of devices

---
 drivers/mfd/Kconfig                     |   13 +
 drivers/mfd/Makefile                    |    1 +
 drivers/mfd/tlv320aic-core.c            |  462 +++++++++++++++++++++++++++++++
 include/linux/mfd/tlv320aic-core.h      |  112 ++++++++
 include/linux/mfd/tlv320aic-registers.h |   32 +++
 5 files changed, 620 insertions(+), 0 deletions(-)
 create mode 100644 drivers/mfd/tlv320aic-core.c
 create mode 100644 include/linux/mfd/tlv320aic-core.h
 create mode 100644 include/linux/mfd/tlv320aic-registers.h
drivers/mfd/Kconfig +13 -0
index 671f5b1..629d374 100644
@@ -45,6 +45,19 @@ config MFD_88PM805
 	  components like codec device, headset/Mic device under the
 	  corresponding menus.
 
+config MFD_AIC
+	bool "Support for Texas Instruments TLV320AIC platform"
+	select REGMAP
+	select MFD_CORE
+	help
+	  Say yes here if you want support for Texas Instruments AIC audio
+	  codec.
+	  You have to select individual I2C or SPI depending on
+	  AIC interfacing with platform. To enable IRQ handling
+	  facilities select IRQ component under corresponding menus.
+	  you have to select individual components like codec device
+	  to use AIC features.
+
 config MFD_SM501
 	tristate "Support for Silicon Motion SM501"
 	 ---help---
drivers/mfd/Makefile +1 -0
index b90409c..b975c94 100644
@@ -6,6 +6,7 @@
 obj-$(CONFIG_MFD_88PM860X)	+= 88pm860x.o
 obj-$(CONFIG_MFD_88PM800)	+= 88pm800.o 88pm80x.o
 obj-$(CONFIG_MFD_88PM805)	+= 88pm805.o 88pm80x.o
+obj-$(CONFIG_MFD_AIC)		+= tlv320aic-core.o
 obj-$(CONFIG_MFD_SM501)		+= sm501.o
 obj-$(CONFIG_MFD_ASIC3)		+= asic3.o tmio_core.o
 
drivers/mfd/tlv320aic-core.c new file +462 -0

462 lines not on this page · raw message

include/linux/mfd/tlv320aic-core.h new file +112 -0

112 lines not on this page · raw message

include/linux/mfd/tlv320aic-registers.h new file +32 -0
new file mode 100644
index 0000000..8b56532
@@ -0,0 +1,32 @@
+/*
+ * tlv320aic-registers: Register bits for AIC codecs
+ *
+ *
+ * Author:      Mukund Navada <[email protected]>
+ *              Mehar Bajwa <[email protected]>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * version 2 as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+#ifndef __MFD_AIC_REGISTERS_H__
+#define __MFD_AIC_REGISTERS_H__
+#define AIC_MAKE_REG(book, page, offset)	(unsigned int)((book << 16) | \
+								(page << 8) | \
+								offset)
+
+#define AIC_RESET			AIC_MAKE_REG(0, 0, 1)
+#define AIC_DEVICE_ID			AIC_MAKE_REG(0, 0, 125)
+#endif
Signature · 1 line
1.7.0.4
Quoted 1 line

From 64df2769d1a817d2c257a6a72fad820a0116abb0 Mon Sep 17 00:00:00 2001

From: Mehar Bajwa <[email protected]>
Date: Fri, 12 Apr 2013 15:38:45 +0530
Subject: [PATCH 2/4] mfd: Interrupt handling support for AIC family

This provides Interrupt handling features for common interface to series of low power AIC audio CODECS.

---
 drivers/mfd/Kconfig                     |   13 ++
 drivers/mfd/Makefile                    |    1 +
 drivers/mfd/tlv320aic-irq.c             |  234 +++++++++++++++++++++++++++++++
 include/linux/mfd/tlv320aic-core.h      |   49 ++++++-
 include/linux/mfd/tlv320aic-registers.h |   57 ++++++++
 5 files changed, 348 insertions(+), 6 deletions(-)
 create mode 100644 drivers/mfd/tlv320aic-irq.c
drivers/mfd/Kconfig +13 -0
index 629d374..3019897 100644
@@ -58,6 +58,19 @@ config MFD_AIC
 	  you have to select individual components like codec device
 	  to use AIC features.
 
+menu "AIC Interface Drivers"
+	depends on MFD_AIC
+
+config MFD_AIC_IRQ
+	bool "Support of IRQ for AIC"
+	depends on MFD_AIC
+	help
+	  Say yes here if you want support of IRQ for Texas Instruments
+	  AIC codec family.
+	  You have to select individual components like codec device
+	  under the corresponding menus.
+endmenu
+
 config MFD_SM501
 	tristate "Support for Silicon Motion SM501"
 	 ---help---
drivers/mfd/Makefile +1 -0
index b975c94..3b39454 100644
@@ -7,6 +7,7 @@ obj-$(CONFIG_MFD_88PM860X)	+= 88pm860x.o
 obj-$(CONFIG_MFD_88PM800)	+= 88pm800.o 88pm80x.o
 obj-$(CONFIG_MFD_88PM805)	+= 88pm805.o 88pm80x.o
 obj-$(CONFIG_MFD_AIC)		+= tlv320aic-core.o
+obj-$(CONFIG_MFD_AIC_IRQ)	+= tlv320aic-irq.o
 obj-$(CONFIG_MFD_SM501)		+= sm501.o
 obj-$(CONFIG_MFD_ASIC3)		+= asic3.o tmio_core.o
 
drivers/mfd/tlv320aic-irq.c new file +234 -0

234 lines not on this page · raw message

include/linux/mfd/tlv320aic-core.h +43 -6

74 lines not on this page · raw message

include/linux/mfd/tlv320aic-registers.h +57 -0

62 lines not on this page · raw message

Signature · 1 line
1.7.0.4
Quoted 1 line

From cc75a5308791e50ae5cb9bc97168ecf81f0db795 Mon Sep 17 00:00:00 2001

From: Mehar Bajwa <[email protected]>
Date: Fri, 12 Apr 2013 15:42:15 +0530
Subject: [PATCH 3/4] mfd: I2C interface with AIC platform

Texas Instruments TLV320AIC family of audio SoC core functionality controlled via I2C. This driver provides common support for accessing the device.

---
 drivers/mfd/Kconfig         |   12 +++++
 drivers/mfd/Makefile        |    1 +
 drivers/mfd/tlv320aic-i2c.c |   98 +++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 111 insertions(+), 0 deletions(-)
 create mode 100644 drivers/mfd/tlv320aic-i2c.c
drivers/mfd/Kconfig +12 -0
index 3019897..40eb328 100644
@@ -64,11 +64,23 @@ menu "AIC Interface Drivers"
 config MFD_AIC_IRQ
 	bool "Support of IRQ for AIC"
 	depends on MFD_AIC
+	default y
 	help
 	  Say yes here if you want support of IRQ for Texas Instruments
 	  AIC codec family.
 	  You have to select individual components like codec device
 	  under the corresponding menus.
+
+config MFD_AIC_I2C
+	bool "AIC I2C Interface"
+	select REGMAP_I2C
+	depends on MFD_AIC
+	depends on I2C
+	help
+	  Support for the Texas Instruments TLV320AIC family of audio SoC
+	  core functionality controlled via I2C. This driver provides common
+	  support for accessing the device, additional drivers must be enabled
+	  in order to use the functionality of the device.
 endmenu
 
 config MFD_SM501
drivers/mfd/Makefile +1 -0
index 3b39454..1e2c96a 100644
@@ -8,6 +8,7 @@ obj-$(CONFIG_MFD_88PM800)	+= 88pm800.o 88pm80x.o
 obj-$(CONFIG_MFD_88PM805)	+= 88pm805.o 88pm80x.o
 obj-$(CONFIG_MFD_AIC)		+= tlv320aic-core.o
 obj-$(CONFIG_MFD_AIC_IRQ)	+= tlv320aic-irq.o
+obj-$(CONFIG_MFD_AIC_I2C)	+= tlv320aic-i2c.o
 obj-$(CONFIG_MFD_SM501)		+= sm501.o
 obj-$(CONFIG_MFD_ASIC3)		+= asic3.o tmio_core.o
 
drivers/mfd/tlv320aic-i2c.c new file +98 -0

98 lines not on this page · raw message

Signature · 1 line
1.7.0.4
Quoted 1 line

From 5ff43c8a4da33b481f6554efaae3f5de0c4b6693 Mon Sep 17 00:00:00 2001

From: Mehar Bajwa <[email protected]>
Date: Fri, 12 Apr 2013 15:44:24 +0530
Subject: [PATCH 4/4] mfd: SPI interface with AIC platform

Texas Instruments TLV320AIC family of audio SoC core functionality controlled via SPI. This driver provides common support for accessing the device.

---
 drivers/mfd/Kconfig         |   11 +++++
 drivers/mfd/Makefile        |    1 +
 drivers/mfd/tlv320aic-spi.c |   97 +++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 109 insertions(+), 0 deletions(-)
 create mode 100644 drivers/mfd/tlv320aic-spi.c
drivers/mfd/Kconfig +11 -0
index 40eb328..b1d6269 100644
@@ -81,6 +81,17 @@ config MFD_AIC_I2C
 	  core functionality controlled via I2C. This driver provides common
 	  support for accessing the device, additional drivers must be enabled
 	  in order to use the functionality of the device.
+
+config MFD_AIC_SPI
+	bool "AIC SPI Interface"
+	select REGMAP_SPI
+	depends on MFD_AIC
+	depends on SPI_MASTER
+	help
+	  Support for the Texas Instruments TLV320AIC family of audio SoC
+	  core functionality controlled via SPI.  This driver provides common
+	  support for accessing the device, additional drivers must be enabled
+	  in order to use the functionality of the device.
 endmenu
 
 config MFD_SM501
drivers/mfd/Makefile +1 -0
index 1e2c96a..dfdcfa2 100644
@@ -9,6 +9,7 @@ obj-$(CONFIG_MFD_88PM805)	+= 88pm805.o 88pm80x.o
 obj-$(CONFIG_MFD_AIC)		+= tlv320aic-core.o
 obj-$(CONFIG_MFD_AIC_IRQ)	+= tlv320aic-irq.o
 obj-$(CONFIG_MFD_AIC_I2C)	+= tlv320aic-i2c.o
+obj-$(CONFIG_MFD_AIC_SPI)	+= tlv320aic-spi.o
 obj-$(CONFIG_MFD_SM501)		+= sm501.o
 obj-$(CONFIG_MFD_ASIC3)		+= asic3.o tmio_core.o
 
drivers/mfd/tlv320aic-spi.c new file +97 -0

97 lines not on this page · raw message

Signature · 1 line
1.7.0.4
#4 lore raw
Quoted 15 lines · On Mon, Apr 15, 2013 at 05:41:55PM +0530, x0172184 wrote:
Quoted 14 lines · Samuel Ortiz

Hi Mehar,

Quoted 7 lines · MEHAR

Hi Samuel,
I am re-sending the MFD support for AIC family of Audio CODECs
from Texas Instruments. The patch was tested on mfd-for-linus-3.8-1. I would like to request that this be considered for inclusion in the kernel at the next available window. Could you please let me know if you have any comments/recommendations for this patch. We would like to work on it and get it up-streamed.

The patch looks good to me, but I'd like it to be splitted in several pieces. You can probably place the core, the irq, the spi and the i2c pieces in their own patches.

Quoted 6 lines
Quoted 3 lines

Cheers,
Samuel.

Hi Samuel,
Thanks for your comments. As suggested by you, I am sending
individual patches as version 2.

Please do not send them as attached patches, but inlined. One patch per email and threaded, please.

Cheers,
Samuel.

Signature · 2 lines
Intel Open Source Technology Centre
http://oss.intel.com/