All of lore.kernel.org
 help / color / mirror / Atom feed
* ARM: pxa: add support for Raumfeld audio devices
@ 2009-11-25 10:42 Daniel Mack
  2009-11-25 10:42 ` [PATCH 01/17] ARM: pxa/raumfeld: add basic structure for devices Daniel Mack
                   ` (17 more replies)
  0 siblings, 18 replies; 51+ messages in thread
From: Daniel Mack @ 2009-11-25 10:42 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

Here is a series of 17 patches to support the multiroom audio devices
produced and sold by Raumfeld. The kernel is based on mainline, and all
other pieces needed by these devices have already been submitted over
the last months.

What was still missing is the board support code which I would like to
let it life in the mainline git, too. The series is based on top of
Eric's pxa-devel tree.

For more information about the hardware, see http://www.raumfeld.com/en/

If that's still possible, I'd be happy if they could make it to 2.6.33.

Please note that one patch depends on the MAX8660 power regulator driver
which I cherry-picked in my tree. As there's need for a special include
file, I don't know what the best way would be to avoid build breakage.
Maybe queue it for 2.6.33-rc2, after the regulator tree has been merged?

Daniel

[PATCH 01/17] ARM: pxa/raumfeld: add basic structure for devices
[PATCH 02/17] ARM: pxa/raumfeld: add GPIO definitions
[PATCH 03/17] ARM: pxa/raumfeld: add SMSC9220 ethernet support
[PATCH 04/17] ARM: pxa/raumfeld: add OHCI function
[PATCH 05/17] ARM: pxa/raumfeld: add rotary encoder support
[PATCH 06/17] ARM: pxa/raumfeld: add GPIO buttons
[PATCH 07/17] ARM: pxa/raumfeld: add GPIO connected LEDs
[PATCH 08/17] ARM: pxa/raumfeld: add one-wire function
[PATCH 09/17] ARM: pxa/raumfeld: add NAND partitions
[PATCH 10/17] ARM: pxa/raumfeld: add framebuffer and backlight devices
[PATCH 11/17] ARM: pxa/raumfeld: add SPI controlled devices
[PATCH 12/17] ARM: pxa/raumfeld: add audio related functions
[PATCH 13/17] ARM: pxa/raumfeld: add Marvell Libertas via SDIO
[PATCH 14/17] ARM: pxa/raumfeld: add power supply framework
[PATCH 15/17] ARM: pxa/raumfeld: add support for I2C controlled devices
[PATCH 16/17] ALSA: ARM: add Raumfeld audio support
[PATCH 17/17] ARM: pxa/raumfeld: Add defconfig

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

* [PATCH 01/17] ARM: pxa/raumfeld: add basic structure for devices
  2009-11-25 10:42 ARM: pxa: add support for Raumfeld audio devices Daniel Mack
@ 2009-11-25 10:42 ` Daniel Mack
  2009-11-25 15:26   ` Mike Rapoport
  2009-11-25 10:42 ` [PATCH 02/17] ARM: pxa/raumfeld: add GPIO definitions Daniel Mack
                   ` (16 subsequent siblings)
  17 siblings, 1 reply; 51+ messages in thread
From: Daniel Mack @ 2009-11-25 10:42 UTC (permalink / raw)
  To: linux-arm-kernel

No function yet, just the file skeletons.

Signed-off-by: Daniel Mack <daniel@caiaq.de>
---
 arch/arm/mach-pxa/Kconfig    |   18 ++++++
 arch/arm/mach-pxa/Makefile   |    3 +
 arch/arm/mach-pxa/raumfeld.c |  122 ++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 143 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/mach-pxa/raumfeld.c

diff --git a/arch/arm/mach-pxa/Kconfig b/arch/arm/mach-pxa/Kconfig
index 20e645a..f4dd069 100644
--- a/arch/arm/mach-pxa/Kconfig
+++ b/arch/arm/mach-pxa/Kconfig
@@ -399,6 +399,24 @@ config MACH_TREO680
 	  Say Y here if you intend to run this kernel on Palm Treo 680
 	  smartphone.
 
+config MACH_RAUMFELD_RC
+	bool "Raumfeld Controller"
+	select PXA3xx
+	select CPU_PXA300
+	select HAVE_PWM
+
+config MACH_RAUMFELD_CONNECTOR
+	bool "Raumfeld Connector"
+	select PXA3xx
+	select CPU_PXA300
+	select PXA_SSP
+
+config MACH_RAUMFELD_SPEAKER
+	bool "Raumfeld Speaker"
+	select PXA3xx
+	select CPU_PXA300
+	select PXA_SSP
+
 config PXA_SHARPSL
 	bool "SHARP Zaurus SL-5600, SL-C7xx and SL-Cxx00 Models"
 	select SHARP_SCOOP
diff --git a/arch/arm/mach-pxa/Makefile b/arch/arm/mach-pxa/Makefile
index b5d29e6..1ed7509 100644
--- a/arch/arm/mach-pxa/Makefile
+++ b/arch/arm/mach-pxa/Makefile
@@ -88,6 +88,9 @@ obj-$(CONFIG_MACH_E740)		+= e740.o
 obj-$(CONFIG_MACH_E750)		+= e750.o
 obj-$(CONFIG_MACH_E400)		+= e400.o
 obj-$(CONFIG_MACH_E800)		+= e800.o
+obj-$(CONFIG_MACH_RAUMFELD_RC)		+= raumfeld.o
+obj-$(CONFIG_MACH_RAUMFELD_CONNECTOR)	+= raumfeld.o
+obj-$(CONFIG_MACH_RAUMFELD_SPEAKER)	+= raumfeld.o
 
 # Support for blinky lights
 led-y := leds.o
diff --git a/arch/arm/mach-pxa/raumfeld.c b/arch/arm/mach-pxa/raumfeld.c
new file mode 100644
index 0000000..89ead5f
--- /dev/null
+++ b/arch/arm/mach-pxa/raumfeld.c
@@ -0,0 +1,122 @@
+/*
+ * arch/arm/mach-pxa/raumfeld.c
+ *
+ * Support for the following Raumfeld devices:
+ *
+ * 	* Controller
+ *  	* Connector
+ *  	* Speaker S/M
+ *
+ * See http://www.raumfeld.com for details.
+ *
+ * Copyright (c) 2009 Daniel Mack <daniel@caiaq.de>
+ *
+ * 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.
+ */
+
+#include <linux/init.h>
+#include <linux/kernel.h>
+#include <linux/sysdev.h>
+#include <linux/interrupt.h>
+
+#include <asm/mach-types.h>
+#include <asm/mach/arch.h>
+
+#include <mach/hardware.h>
+#include <mach/pxa3xx-regs.h>
+#include <mach/mfp-pxa3xx.h>
+#include <mach/mfp-pxa300.h>
+
+#include "generic.h"
+#include "devices.h"
+#include "clock.h"
+
+/*
+ * GPIO configuration (common for all hardware platforms)
+ */
+static mfp_cfg_t raumfeld_pin_config[] __initdata = {
+	/* UART1 */
+	GPIO77_UART1_RXD,
+	GPIO78_UART1_TXD,
+	GPIO79_UART1_CTS,
+	GPIO81_UART1_DSR,
+	GPIO83_UART1_DTR,
+	GPIO84_UART1_RTS,
+
+	/* UART3 */
+	GPIO110_UART3_RXD,
+};
+
+static void __init raumfeld_common_init(void)
+{
+	enable_irq_wake(IRQ_WAKEUP0);
+	pxa_set_ffuart_info(NULL);
+
+	gpio_request(mfp_to_gpio(GPIO_W2W_RESET), "Wi2Wi reset");
+	gpio_direction_output(mfp_to_gpio(GPIO_W2W_RESET), 0);
+
+	gpio_request(mfp_to_gpio(GPIO_W2W_PDN), "Wi2Wi powerup");
+	gpio_direction_output(mfp_to_gpio(GPIO_W2W_PDN), 0);
+
+	/* this can be used to switch off the device */
+	gpio_request(mfp_to_gpio(GPIO_SHUTDOWN_SUPPLY), "supply shutdown");
+	gpio_direction_output(mfp_to_gpio(GPIO_SHUTDOWN_SUPPLY), 0);
+
+	pxa3xx_mfp_config(ARRAY_AND_SIZE(raumfeld_pin_config));
+}
+
+static void __init raumfeld_controller_init(void)
+{
+	raumfeld_common_init();
+}
+
+static void __init raumfeld_connector_init(void)
+{
+	raumfeld_common_init();
+}
+
+static void __init raumfeld_speaker_init(void)
+{
+	raumfeld_common_init();
+}
+
+/* physical memory regions */
+#define	RAUMFELD_SDRAM_BASE	0xa0000000	/* SDRAM region */
+
+#ifdef CONFIG_MACH_RAUMFELD_RC
+MACHINE_START(RAUMFELD_RC, "Raumfeld Controller")
+	.phys_io	= 0x40000000,
+	.io_pg_offst	= (io_p2v(0x40000000) >> 18) & 0xfffc,
+	.boot_params	= RAUMFELD_SDRAM_BASE + 0x100,
+	.init_machine	= raumfeld_controller_init,
+	.map_io		= pxa_map_io,
+	.init_irq	= pxa3xx_init_irq,
+	.timer		= &pxa_timer,
+MACHINE_END
+#endif
+
+#ifdef CONFIG_MACH_RAUMFELD_CONNECTOR
+MACHINE_START(RAUMFELD_CONNECTOR, "Raumfeld Connector")
+	.phys_io	= 0x40000000,
+	.io_pg_offst	= (io_p2v(0x40000000) >> 18) & 0xfffc,
+	.boot_params	= RAUMFELD_SDRAM_BASE + 0x100,
+	.init_machine	= raumfeld_connector_init,
+	.map_io		= pxa_map_io,
+	.init_irq	= pxa3xx_init_irq,
+	.timer		= &pxa_timer,
+MACHINE_END
+#endif
+
+#ifdef CONFIG_MACH_RAUMFELD_SPEAKER
+MACHINE_START(RAUMFELD_SPEAKER, "Raumfeld Speaker")
+	.phys_io	= 0x40000000,
+	.io_pg_offst	= (io_p2v(0x40000000) >> 18) & 0xfffc,
+	.boot_params	= RAUMFELD_SDRAM_BASE + 0x100,
+	.init_machine	= raumfeld_speaker_init,
+	.map_io		= pxa_map_io,
+	.init_irq	= pxa3xx_init_irq,
+	.timer		= &pxa_timer,
+MACHINE_END
+#endif
-- 
1.6.5.2

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

* [PATCH 02/17] ARM: pxa/raumfeld: add GPIO definitions
  2009-11-25 10:42 ARM: pxa: add support for Raumfeld audio devices Daniel Mack
  2009-11-25 10:42 ` [PATCH 01/17] ARM: pxa/raumfeld: add basic structure for devices Daniel Mack
@ 2009-11-25 10:42 ` Daniel Mack
  2009-11-25 10:42 ` [PATCH 03/17] ARM: pxa/raumfeld: add SMSC9220 ethernet support Daniel Mack
                   ` (15 subsequent siblings)
  17 siblings, 0 replies; 51+ messages in thread
From: Daniel Mack @ 2009-11-25 10:42 UTC (permalink / raw)
  To: linux-arm-kernel

Signed-off-by: Daniel Mack <daniel@caiaq.de>
---
 arch/arm/mach-pxa/raumfeld.c |   43 ++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 43 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-pxa/raumfeld.c b/arch/arm/mach-pxa/raumfeld.c
index 89ead5f..075e337 100644
--- a/arch/arm/mach-pxa/raumfeld.c
+++ b/arch/arm/mach-pxa/raumfeld.c
@@ -33,6 +33,49 @@
 #include "devices.h"
 #include "clock.h"
 
+/* common GPIO	definitions */
+
+/* inputs */
+#define GPIO_ON_OFF		MFP_PIN_GPIO14
+#define GPIO_VOLENC_A		MFP_PIN_GPIO19
+#define GPIO_VOLENC_B		MFP_PIN_GPIO20
+#define GPIO_CHARGE_DONE	MFP_PIN_GPIO23
+#define GPIO_CHARGE_IND		MFP_PIN_GPIO27
+#define GPIO_TOUCH_IRQ		MFP_PIN_GPIO32
+#define GPIO_ETH_IRQ		MFP_PIN_GPIO40
+#define GPIO_SPI_MISO		MFP_PIN_GPIO98
+#define GPIO_ACCEL_IRQ		MFP_PIN_GPIO104
+#define GPIO_RESCUE_BOOT	MFP_PIN_GPIO115
+#define GPIO_DOCK_DETECT	MFP_PIN_GPIO116
+#define GPIO_KEY1		MFP_PIN_GPIO117
+#define GPIO_KEY2		MFP_PIN_GPIO118
+#define GPIO_KEY3		MFP_PIN_GPIO119
+#define GPIO_CHARGE_USB_OK	MFP_PIN_GPIO112
+#define GPIO_CHARGE_DC_OK	MFP_PIN_GPIO101
+#define GPIO_CHARGE_USB_SUSP	MFP_PIN_GPIO102
+
+/* outputs */
+#define GPIO_SHUTDOWN_SUPPLY	MFP_PIN_GPIO16
+#define GPIO_SHUTDOWN_BATT	MFP_PIN_GPIO18
+#define GPIO_CHRG_PEN2		MFP_PIN_GPIO31
+#define GPIO_TFT_VA_EN		MFP_PIN_GPIO33
+#define GPIO_SPDIF_CS		MFP_PIN_GPIO34
+#define GPIO_LED2		MFP_PIN_GPIO35
+#define GPIO_LED1		MFP_PIN_GPIO36
+#define GPIO_SPDIF_RESET	MFP_PIN_GPIO38
+#define GPIO_SPI_CLK		MFP_PIN_GPIO95
+#define GPIO_MCLK_DAC_CS	MFP_PIN_GPIO96
+#define GPIO_SPI_MOSI		MFP_PIN_GPIO97
+#define GPIO_W1_PULLUP_ENABLE	MFP_PIN_GPIO105
+#define GPIO_MCLK_RESET		MFP_PIN_GPIO111
+#define GPIO_W2W_RESET		MFP_PIN_GPIO113
+#define GPIO_W2W_PDN		MFP_PIN_GPIO114
+#define GPIO_CODEC_RESET	MFP_PIN_GPIO120
+#define GPIO_AUDIO_VA_ENABLE	MFP_PIN_GPIO124
+#define GPIO_ACCEL_CS		MFP_PIN_GPIO125
+#define GPIO_ONE_WIRE		MFP_PIN_GPIO126
+#define GPIO_DISPLAY_ENABLE	MFP_PIN_GPIO106
+
 /*
  * GPIO configuration (common for all hardware platforms)
  */
-- 
1.6.5.2

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

* [PATCH 03/17] ARM: pxa/raumfeld: add SMSC9220 ethernet support
  2009-11-25 10:42 ARM: pxa: add support for Raumfeld audio devices Daniel Mack
  2009-11-25 10:42 ` [PATCH 01/17] ARM: pxa/raumfeld: add basic structure for devices Daniel Mack
  2009-11-25 10:42 ` [PATCH 02/17] ARM: pxa/raumfeld: add GPIO definitions Daniel Mack
@ 2009-11-25 10:42 ` Daniel Mack
  2009-11-25 15:26   ` Mike Rapoport
  2009-11-25 10:42 ` [PATCH 04/17] ARM: pxa/raumfeld: add OHCI function Daniel Mack
                   ` (14 subsequent siblings)
  17 siblings, 1 reply; 51+ messages in thread
From: Daniel Mack @ 2009-11-25 10:42 UTC (permalink / raw)
  To: linux-arm-kernel

The 'Connector' and 'Speaker S/M' devices have an SMSC9220 ethernet chip
onboard.

Signed-off-by: Daniel Mack <daniel@caiaq.de>
---
 arch/arm/mach-pxa/raumfeld.c |   51 ++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 51 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-pxa/raumfeld.c b/arch/arm/mach-pxa/raumfeld.c
index 075e337..82af0dc 100644
--- a/arch/arm/mach-pxa/raumfeld.c
+++ b/arch/arm/mach-pxa/raumfeld.c
@@ -19,7 +19,10 @@
 #include <linux/init.h>
 #include <linux/kernel.h>
 #include <linux/sysdev.h>
+#include <linux/platform_device.h>
 #include <linux/interrupt.h>
+#include <linux/gpio.h>
+#include <linux/smsc911x.h>
 
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
@@ -92,6 +95,52 @@ static mfp_cfg_t raumfeld_pin_config[] __initdata = {
 	GPIO110_UART3_RXD,
 };
 
+/*
+ * SMSC LAN9220 Ethernet
+ */
+
+static struct resource smc91x_resources[] = {
+	{
+		.start	= PXA3xx_CS2_PHYS,
+		.end	= PXA3xx_CS2_PHYS + 0xfffff,
+		.flags	= IORESOURCE_MEM,
+	},
+	{
+		.start	= gpio_to_irq(mfp_to_gpio(GPIO_ETH_IRQ)),
+		.end	= gpio_to_irq(mfp_to_gpio(GPIO_ETH_IRQ)),
+		.flags	= IORESOURCE_IRQ | IRQF_TRIGGER_FALLING,
+	}
+};
+
+static struct smsc911x_platform_config raumfeld_smsc911x_config = {
+	.phy_interface	= PHY_INTERFACE_MODE_MII,
+	.irq_polarity	= SMSC911X_IRQ_POLARITY_ACTIVE_LOW,
+	.irq_type	= SMSC911X_IRQ_TYPE_OPEN_DRAIN,
+	.flags		= SMSC911X_USE_32BIT | SMSC911X_SAVE_MAC_ADDRESS,
+};
+
+static struct platform_device smc91x_device = {
+	.name		= "smsc911x",
+	.id		= -1,
+	.num_resources	= ARRAY_SIZE(smc91x_resources),
+	.resource	= smc91x_resources,
+	.dev		= {
+		.platform_data = &raumfeld_smsc911x_config,
+	}
+};
+
+static mfp_cfg_t raumfeld_eth_pin_config[] __initdata = {
+	GPIO1_nCS2,			/* CS */
+	GPIO40_GPIO | MFP_PULL_HIGH,	/* IRQ */
+};
+
+static void __init raumfeld_eth_init(void)
+{
+	pxa3xx_mfp_config(ARRAY_AND_SIZE(raumfeld_eth_pin_config));
+	platform_device_register(&smc91x_device);
+}
+
+
 static void __init raumfeld_common_init(void)
 {
 	enable_irq_wake(IRQ_WAKEUP0);
@@ -118,11 +167,13 @@ static void __init raumfeld_controller_init(void)
 static void __init raumfeld_connector_init(void)
 {
 	raumfeld_common_init();
+	raumfeld_eth_init();
 }
 
 static void __init raumfeld_speaker_init(void)
 {
 	raumfeld_common_init();
+	raumfeld_eth_init();
 }
 
 /* physical memory regions */
-- 
1.6.5.2

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

* [PATCH 04/17] ARM: pxa/raumfeld: add OHCI function
  2009-11-25 10:42 ARM: pxa: add support for Raumfeld audio devices Daniel Mack
                   ` (2 preceding siblings ...)
  2009-11-25 10:42 ` [PATCH 03/17] ARM: pxa/raumfeld: add SMSC9220 ethernet support Daniel Mack
@ 2009-11-25 10:42 ` Daniel Mack
  2009-11-25 10:42 ` [PATCH 05/17] ARM: pxa/raumfeld: add rotary encoder support Daniel Mack
                   ` (13 subsequent siblings)
  17 siblings, 0 replies; 51+ messages in thread
From: Daniel Mack @ 2009-11-25 10:42 UTC (permalink / raw)
  To: linux-arm-kernel

All Raumfeld devices feature an USB (OHCI) host port.

Signed-off-by: Daniel Mack <daniel@caiaq.de>
---
 arch/arm/mach-pxa/raumfeld.c |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-pxa/raumfeld.c b/arch/arm/mach-pxa/raumfeld.c
index 82af0dc..2d47dc2 100644
--- a/arch/arm/mach-pxa/raumfeld.c
+++ b/arch/arm/mach-pxa/raumfeld.c
@@ -31,6 +31,7 @@
 #include <mach/pxa3xx-regs.h>
 #include <mach/mfp-pxa3xx.h>
 #include <mach/mfp-pxa300.h>
+#include <mach/ohci.h>
 
 #include "generic.h"
 #include "devices.h"
@@ -93,6 +94,10 @@ static mfp_cfg_t raumfeld_pin_config[] __initdata = {
 
 	/* UART3 */
 	GPIO110_UART3_RXD,
+
+	/* USB Host */
+	GPIO0_2_USBH_PEN,
+	GPIO1_2_USBH_PWR,
 };
 
 /*
@@ -140,6 +145,13 @@ static void __init raumfeld_eth_init(void)
 	platform_device_register(&smc91x_device);
 }
 
+/**
+ * USB (OHCI) support
+ */
+static struct pxaohci_platform_data raumfeld_ohci_info = {
+	.port_mode      = PMM_GLOBAL_MODE,
+	.flags		= ENABLE_PORT1,
+};
 
 static void __init raumfeld_common_init(void)
 {
@@ -157,6 +169,7 @@ static void __init raumfeld_common_init(void)
 	gpio_direction_output(mfp_to_gpio(GPIO_SHUTDOWN_SUPPLY), 0);
 
 	pxa3xx_mfp_config(ARRAY_AND_SIZE(raumfeld_pin_config));
+	pxa_set_ohci_info(&raumfeld_ohci_info);
 }
 
 static void __init raumfeld_controller_init(void)
-- 
1.6.5.2

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

* [PATCH 05/17] ARM: pxa/raumfeld: add rotary encoder support
  2009-11-25 10:42 ARM: pxa: add support for Raumfeld audio devices Daniel Mack
                   ` (3 preceding siblings ...)
  2009-11-25 10:42 ` [PATCH 04/17] ARM: pxa/raumfeld: add OHCI function Daniel Mack
@ 2009-11-25 10:42 ` Daniel Mack
  2009-11-25 15:26   ` Mike Rapoport
  2009-11-25 10:42 ` [PATCH 06/17] ARM: pxa/raumfeld: add GPIO buttons Daniel Mack
                   ` (12 subsequent siblings)
  17 siblings, 1 reply; 51+ messages in thread
From: Daniel Mack @ 2009-11-25 10:42 UTC (permalink / raw)
  To: linux-arm-kernel

The 'Controller' and 'Speaker S/M' have a rotary encoder device for
volume control.

Signed-off-by: Daniel Mack <daniel@caiaq.de>
---
 arch/arm/mach-pxa/raumfeld.c |   35 +++++++++++++++++++++++++++++++++++
 1 files changed, 35 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-pxa/raumfeld.c b/arch/arm/mach-pxa/raumfeld.c
index 2d47dc2..a2a2b18 100644
--- a/arch/arm/mach-pxa/raumfeld.c
+++ b/arch/arm/mach-pxa/raumfeld.c
@@ -23,6 +23,8 @@
 #include <linux/interrupt.h>
 #include <linux/gpio.h>
 #include <linux/smsc911x.h>
+#include <linux/input.h>
+#include <linux/rotary_encoder.h>
 
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
@@ -153,6 +155,27 @@ static struct pxaohci_platform_data raumfeld_ohci_info = {
 	.flags		= ENABLE_PORT1,
 };
 
+/**
+ * Rotary encoder input device
+ */
+static struct rotary_encoder_platform_data raumfeld_rotary_encoder_info = {
+	.steps		= 24,
+	.axis		= REL_X,
+	.relative_axis	= 1,
+	.gpio_a		= mfp_to_gpio(GPIO_VOLENC_A),
+	.gpio_b		= mfp_to_gpio(GPIO_VOLENC_B),
+	.inverted_a	= 1,
+	.inverted_b	= 0,
+};
+
+static struct platform_device rotary_encoder_device = {
+	.name		= "rotary-encoder",
+	.id		= 0,
+	.dev		= {
+		.platform_data = &raumfeld_rotary_encoder_info,
+	}
+};
+
 static void __init raumfeld_common_init(void)
 {
 	enable_irq_wake(IRQ_WAKEUP0);
@@ -174,6 +197,12 @@ static void __init raumfeld_common_init(void)
 
 static void __init raumfeld_controller_init(void)
 {
+	struct platform_device *raumfeld_controller_devices[] = {
+		&rotary_encoder_device,
+	};
+
+	platform_add_devices(ARRAY_AND_SIZE(raumfeld_controller_devices));
+
 	raumfeld_common_init();
 }
 
@@ -185,6 +214,12 @@ static void __init raumfeld_connector_init(void)
 
 static void __init raumfeld_speaker_init(void)
 {
+	struct platform_device *raumfeld_speaker_devices[] = {
+		&rotary_encoder_device,
+	};
+
+	platform_add_devices(ARRAY_AND_SIZE(raumfeld_speaker_devices));
+
 	raumfeld_common_init();
 	raumfeld_eth_init();
 }
-- 
1.6.5.2

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

* [PATCH 06/17] ARM: pxa/raumfeld: add GPIO buttons
  2009-11-25 10:42 ARM: pxa: add support for Raumfeld audio devices Daniel Mack
                   ` (4 preceding siblings ...)
  2009-11-25 10:42 ` [PATCH 05/17] ARM: pxa/raumfeld: add rotary encoder support Daniel Mack
@ 2009-11-25 10:42 ` Daniel Mack
  2009-11-25 10:42 ` [PATCH 07/17] ARM: pxa/raumfeld: add GPIO connected LEDs Daniel Mack
                   ` (11 subsequent siblings)
  17 siblings, 0 replies; 51+ messages in thread
From: Daniel Mack @ 2009-11-25 10:42 UTC (permalink / raw)
  To: linux-arm-kernel

Signed-off-by: Daniel Mack <daniel@caiaq.de>
---
 arch/arm/mach-pxa/raumfeld.c |   90 ++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 90 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-pxa/raumfeld.c b/arch/arm/mach-pxa/raumfeld.c
index a2a2b18..23bf890 100644
--- a/arch/arm/mach-pxa/raumfeld.c
+++ b/arch/arm/mach-pxa/raumfeld.c
@@ -25,6 +25,7 @@
 #include <linux/smsc911x.h>
 #include <linux/input.h>
 #include <linux/rotary_encoder.h>
+#include <linux/gpio_keys.h>
 
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
@@ -176,8 +177,96 @@ static struct platform_device rotary_encoder_device = {
 	}
 };
 
+/**
+ * GPIO buttons
+ */
+
+static struct gpio_keys_button gpio_keys_button[] = {
+	{
+		.code			= KEY_F1,
+		.type			= EV_KEY,
+		.gpio			= mfp_to_gpio(GPIO_KEY1),
+		.active_low		= 1,
+		.wakeup			= 0,
+		.debounce_interval	= 5, /* ms */
+		.desc			= "Button 1",
+	},
+	{
+		.code			= KEY_F2,
+		.type			= EV_KEY,
+		.gpio			= mfp_to_gpio(GPIO_KEY2),
+		.active_low		= 1,
+		.wakeup			= 0,
+		.debounce_interval	= 5, /* ms */
+		.desc			= "Button 2",
+	},
+	{
+		.code			= KEY_F3,
+		.type			= EV_KEY,
+		.gpio			= mfp_to_gpio(GPIO_KEY3),
+		.active_low		= 1,
+		.wakeup			= 0,
+		.debounce_interval	= 5, /* ms */
+		.desc			= "Button 3",
+	},
+	{
+		.code			= KEY_F4,
+		.type			= EV_KEY,
+		.gpio			= mfp_to_gpio(GPIO_RESCUE_BOOT),
+		.active_low		= 0,
+		.wakeup			= 0,
+		.debounce_interval	= 5, /* ms */
+		.desc			= "rescue boot button",
+	},
+	{
+		.code			= KEY_F5,
+		.type			= EV_KEY,
+		.gpio			= mfp_to_gpio(GPIO_DOCK_DETECT),
+		.active_low		= 0,
+		.wakeup			= 0,
+		.debounce_interval	= 5, /* ms */
+		.desc			= "dock detect",
+	},
+	{
+		.code			= KEY_F6,
+		.type			= EV_KEY,
+		.gpio			= mfp_to_gpio(GPIO_ON_OFF),
+		.active_low		= 0,
+		.wakeup			= 0,
+		.debounce_interval	= 5, /* ms */
+		.desc			= "on/off button",
+	},
+};
+
+static struct gpio_keys_platform_data gpio_keys_platform_data = {
+	.buttons	= gpio_keys_button,
+	.nbuttons	= ARRAY_SIZE(gpio_keys_button),
+	.rep		= 0,
+};
+
+static struct platform_device raumfeld_gpio_keys_device = {
+	.name	= "gpio-keys",
+	.id	= -1,
+	.dev 	= {
+		.platform_data	= &gpio_keys_platform_data,
+	}
+};
+
+static struct platform_device *raumfeld_common_devices[] = {
+	&raumfeld_gpio_keys_device,
+};
+
 static void __init raumfeld_common_init(void)
 {
+	/* The on/off button polarity has changed after revision 1 */
+	if ((system_rev & 0xff) > 1) {
+		int i;
+
+		for (i = 0; i < ARRAY_SIZE(gpio_keys_button); i++)
+			if (!strcmp(gpio_keys_button[i].desc, "on/off button"))
+				gpio_keys_button[i].active_low = 1;
+	}
+
 	enable_irq_wake(IRQ_WAKEUP0);
 	pxa_set_ffuart_info(NULL);
 
@@ -193,6 +282,7 @@ static void __init raumfeld_common_init(void)
 
 	pxa3xx_mfp_config(ARRAY_AND_SIZE(raumfeld_pin_config));
 	pxa_set_ohci_info(&raumfeld_ohci_info);
+	platform_add_devices(ARRAY_AND_SIZE(raumfeld_common_devices));
 }
 
 static void __init raumfeld_controller_init(void)
-- 
1.6.5.2

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

* [PATCH 07/17] ARM: pxa/raumfeld: add GPIO connected LEDs
  2009-11-25 10:42 ARM: pxa: add support for Raumfeld audio devices Daniel Mack
                   ` (5 preceding siblings ...)
  2009-11-25 10:42 ` [PATCH 06/17] ARM: pxa/raumfeld: add GPIO buttons Daniel Mack
@ 2009-11-25 10:42 ` Daniel Mack
  2009-11-25 10:42 ` [PATCH 08/17] ARM: pxa/raumfeld: add one-wire function Daniel Mack
                   ` (10 subsequent siblings)
  17 siblings, 0 replies; 51+ messages in thread
From: Daniel Mack @ 2009-11-25 10:42 UTC (permalink / raw)
  To: linux-arm-kernel

Signed-off-by: Daniel Mack <daniel@caiaq.de>
---
 arch/arm/mach-pxa/raumfeld.c |   35 +++++++++++++++++++++++++++++++++++
 1 files changed, 35 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-pxa/raumfeld.c b/arch/arm/mach-pxa/raumfeld.c
index 23bf890..d03d180 100644
--- a/arch/arm/mach-pxa/raumfeld.c
+++ b/arch/arm/mach-pxa/raumfeld.c
@@ -26,6 +26,7 @@
 #include <linux/input.h>
 #include <linux/rotary_encoder.h>
 #include <linux/gpio_keys.h>
+#include <linux/leds.h>
 
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
@@ -252,8 +253,42 @@ static struct platform_device raumfeld_gpio_keys_device = {
 	}
 };
 
+/**
+ * GPIO LEDs
+ */
+
+static struct gpio_led raumfeld_leds[] = {
+	{
+		.name		= "raumfeld:1",
+		.gpio		= mfp_to_gpio(GPIO_LED1),
+		.active_low	= 1,
+		.default_state	= LEDS_GPIO_DEFSTATE_ON,
+	},
+	{
+		.name		= "raumfeld:2",
+		.gpio		= mfp_to_gpio(GPIO_LED2),
+		.active_low	= 0,
+		.default_state	= LEDS_GPIO_DEFSTATE_OFF,
+	}
+};
+
+static struct gpio_led_platform_data raumfeld_led_platform_data = {
+	.leds		= raumfeld_leds,
+	.num_leds	= ARRAY_SIZE(raumfeld_leds),
+};
+
+static struct platform_device raumfeld_led_device = {
+	.name	= "leds-gpio",
+	.id	= -1,
+	.dev	= {
+		.platform_data = &raumfeld_led_platform_data,
+	},
+};
+
+
 static struct platform_device *raumfeld_common_devices[] = {
 	&raumfeld_gpio_keys_device,
+	&raumfeld_led_device,
 };
 
 static void __init raumfeld_common_init(void)
-- 
1.6.5.2

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

* [PATCH 08/17] ARM: pxa/raumfeld: add one-wire function
  2009-11-25 10:42 ARM: pxa: add support for Raumfeld audio devices Daniel Mack
                   ` (6 preceding siblings ...)
  2009-11-25 10:42 ` [PATCH 07/17] ARM: pxa/raumfeld: add GPIO connected LEDs Daniel Mack
@ 2009-11-25 10:42 ` Daniel Mack
  2009-11-25 17:02   ` Russell King - ARM Linux
  2009-11-25 10:42 ` [PATCH 09/17] ARM: pxa/raumfeld: add NAND partitions Daniel Mack
                   ` (9 subsequent siblings)
  17 siblings, 1 reply; 51+ messages in thread
From: Daniel Mack @ 2009-11-25 10:42 UTC (permalink / raw)
  To: linux-arm-kernel

The 'Controller' device has a battery pack connected to an One-Wire bus.

Signed-off-by: Daniel Mack <daniel@caiaq.de>
---
 arch/arm/mach-pxa/raumfeld.c |   38 ++++++++++++++++++++++++++++++++++++++
 1 files changed, 38 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-pxa/raumfeld.c b/arch/arm/mach-pxa/raumfeld.c
index d03d180..5d85f98 100644
--- a/arch/arm/mach-pxa/raumfeld.c
+++ b/arch/arm/mach-pxa/raumfeld.c
@@ -27,6 +27,8 @@
 #include <linux/rotary_encoder.h>
 #include <linux/gpio_keys.h>
 #include <linux/leds.h>
+#include <linux/w1-gpio.h>
+#include <linux/sched.h>
 
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
@@ -285,6 +287,41 @@ static struct platform_device raumfeld_led_device = {
 	},
 };
 
+/**
+ * One-wire (W1 bus) support
+ */
+static void w1_enable_external_pullup(int enable)
+{
+	gpio_set_value(mfp_to_gpio(GPIO_W1_PULLUP_ENABLE), enable);
+	schedule_timeout(HZ);
+}
+
+static struct w1_gpio_platform_data w1_gpio_platform_data = {
+	.pin			= mfp_to_gpio(GPIO_ONE_WIRE),
+	.is_open_drain		= 0,
+	.enable_external_pullup	= w1_enable_external_pullup,
+};
+
+struct platform_device raumfeld_w1_gpio_device = {
+	.name	= "w1-gpio",
+	.dev	= {
+		.platform_data = &w1_gpio_platform_data
+	}
+};
+
+static void __init raumfeld_w1_init(void)
+{
+	mfp_cfg_t raumfeld_onewire_pin_config[] = {
+		GPIO126_GPIO | MFP_LPM_FLOAT,
+		GPIO105_GPIO | MFP_PULL_LOW | MFP_LPM_PULL_LOW,
+	};
+
+	pxa3xx_mfp_config(ARRAY_AND_SIZE(raumfeld_onewire_pin_config));
+	gpio_request(mfp_to_gpio(GPIO_W1_PULLUP_ENABLE),
+		"W1 external pullup enable");
+	gpio_direction_output(mfp_to_gpio(GPIO_W1_PULLUP_ENABLE), 0);
+	platform_device_register(&raumfeld_w1_gpio_device);
+}
 
 static struct platform_device *raumfeld_common_devices[] = {
 	&raumfeld_gpio_keys_device,
@@ -329,6 +366,7 @@ static void __init raumfeld_controller_init(void)
 	platform_add_devices(ARRAY_AND_SIZE(raumfeld_controller_devices));
 
 	raumfeld_common_init();
+	raumfeld_w1_init();
 }
 
 static void __init raumfeld_connector_init(void)
-- 
1.6.5.2

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

* [PATCH 09/17] ARM: pxa/raumfeld: add NAND partitions
  2009-11-25 10:42 ARM: pxa: add support for Raumfeld audio devices Daniel Mack
                   ` (7 preceding siblings ...)
  2009-11-25 10:42 ` [PATCH 08/17] ARM: pxa/raumfeld: add one-wire function Daniel Mack
@ 2009-11-25 10:42 ` Daniel Mack
  2009-11-25 15:26   ` Mike Rapoport
  2009-11-25 10:42 ` [PATCH 10/17] ARM: pxa/raumfeld: add framebuffer and backlight devices Daniel Mack
                   ` (8 subsequent siblings)
  17 siblings, 1 reply; 51+ messages in thread
From: Daniel Mack @ 2009-11-25 10:42 UTC (permalink / raw)
  To: linux-arm-kernel

Signed-off-by: Daniel Mack <daniel@caiaq.de>
---
 arch/arm/mach-pxa/raumfeld.c |   36 ++++++++++++++++++++++++++++++++++++
 1 files changed, 36 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-pxa/raumfeld.c b/arch/arm/mach-pxa/raumfeld.c
index 5d85f98..66b9af1 100644
--- a/arch/arm/mach-pxa/raumfeld.c
+++ b/arch/arm/mach-pxa/raumfeld.c
@@ -37,6 +37,7 @@
 #include <mach/pxa3xx-regs.h>
 #include <mach/mfp-pxa3xx.h>
 #include <mach/mfp-pxa300.h>
+#include <mach/pxa3xx_nand.h>
 #include <mach/ohci.h>
 
 #include "generic.h"
@@ -152,6 +153,40 @@ static void __init raumfeld_eth_init(void)
 }
 
 /**
+ * NAND
+ */
+static struct mtd_partition raumfeld_nand_partitions[] = {
+	{
+		.name		= "Bootloader",
+		.offset		= 0,
+		.size		= 0xa0000,
+		.mask_flags	= MTD_WRITEABLE, /* force read-only */
+	},
+	{
+		.name		= "BootloaderEnvironment",
+		.offset		= 0xa0000,
+		.size		= 0x20000,
+	},
+	{
+		.name		= "BootloaderSplashScreen",
+		.offset		= 0xc0000,
+		.size		= 0x60000,
+	},
+	{
+		.name		= "UBI",
+		.offset		= 0x120000,
+		.size		= MTDPART_SIZ_FULL,
+	},
+};
+
+static struct pxa3xx_nand_platform_data raumfeld_nand_info = {
+	.enable_arbiter	= 1,
+	.keep_config	= 1,
+	.parts		= raumfeld_nand_partitions,
+	.nr_parts	= ARRAY_SIZE(raumfeld_nand_partitions),
+};
+
+/**
  * USB (OHCI) support
  */
 static struct pxaohci_platform_data raumfeld_ohci_info = {
@@ -355,6 +390,7 @@ static void __init raumfeld_common_init(void)
 	pxa3xx_mfp_config(ARRAY_AND_SIZE(raumfeld_pin_config));
 	pxa_set_ohci_info(&raumfeld_ohci_info);
 	platform_add_devices(ARRAY_AND_SIZE(raumfeld_common_devices));
+	pxa3xx_set_nand_info(&raumfeld_nand_info);
 }
 
 static void __init raumfeld_controller_init(void)
-- 
1.6.5.2

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

* [PATCH 10/17] ARM: pxa/raumfeld: add framebuffer and backlight devices
  2009-11-25 10:42 ARM: pxa: add support for Raumfeld audio devices Daniel Mack
                   ` (8 preceding siblings ...)
  2009-11-25 10:42 ` [PATCH 09/17] ARM: pxa/raumfeld: add NAND partitions Daniel Mack
@ 2009-11-25 10:42 ` Daniel Mack
  2009-11-25 10:42 ` [PATCH 11/17] ARM: pxa/raumfeld: add SPI controlled devices Daniel Mack
                   ` (7 subsequent siblings)
  17 siblings, 0 replies; 51+ messages in thread
From: Daniel Mack @ 2009-11-25 10:42 UTC (permalink / raw)
  To: linux-arm-kernel

Signed-off-by: Daniel Mack <daniel@caiaq.de>
---
 arch/arm/mach-pxa/raumfeld.c |  121 ++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 121 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-pxa/raumfeld.c b/arch/arm/mach-pxa/raumfeld.c
index 66b9af1..d0c4eab 100644
--- a/arch/arm/mach-pxa/raumfeld.c
+++ b/arch/arm/mach-pxa/raumfeld.c
@@ -29,6 +29,7 @@
 #include <linux/leds.h>
 #include <linux/w1-gpio.h>
 #include <linux/sched.h>
+#include <linux/pwm_backlight.h>
 
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
@@ -39,6 +40,7 @@
 #include <mach/mfp-pxa300.h>
 #include <mach/pxa3xx_nand.h>
 #include <mach/ohci.h>
+#include <mach/pxafb.h>
 
 #include "generic.h"
 #include "devices.h"
@@ -358,6 +360,124 @@ static void __init raumfeld_w1_init(void)
 	platform_device_register(&raumfeld_w1_gpio_device);
 }
 
+/**
+ * Framebuffer device
+ */
+static mfp_cfg_t raumfeld_lcd_pin_config[] __initdata = {
+	GPIO54_LCD_LDD_0,
+	GPIO55_LCD_LDD_1,
+	GPIO56_LCD_LDD_2,
+	GPIO57_LCD_LDD_3,
+	GPIO58_LCD_LDD_4,
+	GPIO59_LCD_LDD_5,
+	GPIO60_LCD_LDD_6,
+	GPIO61_LCD_LDD_7,
+	GPIO62_LCD_LDD_8,
+	GPIO63_LCD_LDD_9,
+	GPIO64_LCD_LDD_10,
+	GPIO65_LCD_LDD_11,
+	GPIO66_LCD_LDD_12,
+	GPIO67_LCD_LDD_13,
+	GPIO68_LCD_LDD_14,
+	GPIO69_LCD_LDD_15,
+	GPIO70_LCD_LDD_16,
+	GPIO71_LCD_LDD_17,
+	GPIO72_LCD_FCLK,
+	GPIO73_LCD_LCLK,
+	GPIO74_LCD_PCLK,
+	GPIO75_LCD_BIAS,
+};
+
+/* PWM controlled backlight */
+static struct platform_pwm_backlight_data raumfeld_pwm_backlight_data = {
+	.pwm_id		= 0,
+	.max_brightness	= 100,
+	.dft_brightness	= 100,
+	/* 10000 ns = 10 ms ^= 100 kHz */
+	.pwm_period_ns	= 10000,
+};
+
+static struct platform_device raumfeld_pwm_backlight_device = {
+	.name	= "pwm-backlight",
+	.dev	= {
+		.parent		= &pxa27x_device_pwm0.dev,
+		.platform_data	= &raumfeld_pwm_backlight_data,
+	}
+};
+
+/* LT3593 controlled backlight */
+static struct gpio_led raumfeld_lt3593_led = {
+	.name		= "backlight",
+	.gpio		= mfp_to_gpio(MFP_PIN_GPIO17),
+	.default_state	= LEDS_GPIO_DEFSTATE_ON,
+};
+
+static struct gpio_led_platform_data raumfeld_lt3593_platform_data = {
+	.leds		= &raumfeld_lt3593_led,
+	.num_leds	= 1,
+};
+
+static struct platform_device raumfeld_lt3593_device = {
+	.name	= "leds-lt3593",
+	.id	= -1,
+	.dev	= {
+		.platform_data = &raumfeld_lt3593_platform_data,
+	},
+};
+
+static struct pxafb_mode_info sharp_lq043t3dx02_mode = {
+	.pixclock	= 111000,
+	.xres		= 480,
+	.yres		= 272,
+	.bpp		= 16,
+	.hsync_len	= 4,
+	.left_margin	= 2,
+	.right_margin	= 1,
+	.vsync_len	= 1,
+	.upper_margin	= 3,
+	.lower_margin	= 1,
+	.sync		= 0,
+};
+
+static struct pxafb_mach_info raumfeld_sharp_lcd_info = {
+	.modes		= &sharp_lq043t3dx02_mode,
+	.num_modes	= 1,
+	.video_mem_size = 0x400000,
+	.lcd_conn	= LCD_COLOR_TFT_16BPP | LCD_PCLK_EDGE_FALL,
+#ifdef CONFIG_PXA3XX_GCU
+	.acceleration_enabled = 1,
+#endif
+};
+
+static int gpio_display_enable = GPIO_DISPLAY_ENABLE;
+
+static void __init raumfeld_lcd_init(void)
+{
+	pxa3xx_mfp_config(ARRAY_AND_SIZE(raumfeld_lcd_pin_config));
+	set_pxa_fb_info(&raumfeld_sharp_lcd_info);
+
+	/* Earlier devices had the backlight regulator controlled
+	 * via PWM, later versions use another controller for that */
+	if ((system_rev & 0xff) < 2) {
+		mfp_cfg_t raumfeld_pwm_pin_config = GPIO17_PWM0_OUT;
+		pxa3xx_mfp_config(&raumfeld_pwm_pin_config, 1);
+		platform_device_register(&raumfeld_pwm_backlight_device);
+	} else
+		platform_device_register(&raumfeld_lt3593_device);
+
+	gpio_request(mfp_to_gpio(GPIO_TFT_VA_EN), "display VA enable");
+	gpio_direction_output(mfp_to_gpio(GPIO_TFT_VA_EN), 1);
+	gpio_set_value(mfp_to_gpio(GPIO_TFT_VA_EN), 1);
+
+	gpio_request(mfp_to_gpio(gpio_display_enable), "display enable");
+	gpio_direction_output(mfp_to_gpio(gpio_display_enable), 1);
+	gpio_set_value(mfp_to_gpio(gpio_display_enable), 1);
+
+#ifdef CONFIG_PXA3XX_GCU
+	platform_device_register(&pxa3xx_device_gcu);
+#endif
+}
+
 static struct platform_device *raumfeld_common_devices[] = {
 	&raumfeld_gpio_keys_device,
 	&raumfeld_led_device,
@@ -402,6 +522,7 @@ static void __init raumfeld_controller_init(void)
 	platform_add_devices(ARRAY_AND_SIZE(raumfeld_controller_devices));
 
 	raumfeld_common_init();
+	raumfeld_lcd_init();
 	raumfeld_w1_init();
 }
 
-- 
1.6.5.2

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

* [PATCH 11/17] ARM: pxa/raumfeld: add SPI controlled devices
  2009-11-25 10:42 ARM: pxa: add support for Raumfeld audio devices Daniel Mack
                   ` (9 preceding siblings ...)
  2009-11-25 10:42 ` [PATCH 10/17] ARM: pxa/raumfeld: add framebuffer and backlight devices Daniel Mack
@ 2009-11-25 10:42 ` Daniel Mack
  2009-11-25 10:42 ` [PATCH 12/17] ARM: pxa/raumfeld: add audio related functions Daniel Mack
                   ` (6 subsequent siblings)
  17 siblings, 0 replies; 51+ messages in thread
From: Daniel Mack @ 2009-11-25 10:42 UTC (permalink / raw)
  To: linux-arm-kernel

Signed-off-by: Daniel Mack <daniel@caiaq.de>
---
 arch/arm/mach-pxa/raumfeld.c |   87 ++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 87 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-pxa/raumfeld.c b/arch/arm/mach-pxa/raumfeld.c
index d0c4eab..43a8195 100644
--- a/arch/arm/mach-pxa/raumfeld.c
+++ b/arch/arm/mach-pxa/raumfeld.c
@@ -30,6 +30,9 @@
 #include <linux/w1-gpio.h>
 #include <linux/sched.h>
 #include <linux/pwm_backlight.h>
+#include <linux/spi/spi.h>
+#include <linux/spi/spi_gpio.h>
+#include <linux/lis3lv02d.h>
 
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
@@ -107,6 +110,11 @@ static mfp_cfg_t raumfeld_pin_config[] __initdata = {
 	/* USB Host */
 	GPIO0_2_USBH_PEN,
 	GPIO1_2_USBH_PWR,
+
+	/* SPI */
+	GPIO34_GPIO,	/* SPDIF_CS */
+	GPIO96_GPIO,	/* MCLK_CS */
+	GPIO125_GPIO,	/* ACCEL_CS */
 };
 
 /*
@@ -478,9 +486,85 @@ static void __init raumfeld_lcd_init(void)
 #endif
 }
 
+/**
+ * SPI devices
+ */
+
+struct spi_gpio_platform_data raumfeld_spi_platform_data = {
+	.sck		= mfp_to_gpio(GPIO_SPI_CLK),
+	.mosi		= mfp_to_gpio(GPIO_SPI_MOSI),
+	.miso		= mfp_to_gpio(GPIO_SPI_MISO),
+	.num_chipselect	= 3,
+};
+
+static struct platform_device raumfeld_spi_device = {
+	.name	= "spi_gpio",
+	.id	= 0,
+	.dev 	= {
+		.platform_data	= &raumfeld_spi_platform_data,
+	}
+};
+
+static struct lis3lv02d_platform_data lis3_pdata = {
+	.click_flags 	= LIS3_CLICK_SINGLE_X |
+			  LIS3_CLICK_SINGLE_Y |
+			  LIS3_CLICK_SINGLE_Z,
+	.irq_cfg	= LIS3_IRQ1_CLICK | LIS3_IRQ2_CLICK,
+	.wakeup_flags	= LIS3_WAKEUP_X_LO | LIS3_WAKEUP_X_HI |
+			  LIS3_WAKEUP_Y_LO | LIS3_WAKEUP_Y_HI |
+			  LIS3_WAKEUP_Z_LO | LIS3_WAKEUP_Z_HI,
+	.wakeup_thresh	= 10,
+	.click_thresh_x = 10,
+	.click_thresh_y = 10,
+	.click_thresh_z = 10,
+};
+
+#define SPI_AK4104	\
+{			\
+	.modalias	= "ak4104",	\
+	.max_speed_hz	= 10000,	\
+	.bus_num	= 0,		\
+	.chip_select	= 0,		\
+	.controller_data = (void *) mfp_to_gpio(GPIO_SPDIF_CS),	\
+}
+
+#define SPI_LIS3	\
+{			\
+	.modalias	= "lis3lv02d_spi",	\
+	.max_speed_hz	= 1000000,		\
+	.bus_num	= 0,			\
+	.chip_select	= 1,			\
+	.controller_data = (void *) mfp_to_gpio(GPIO_ACCEL_CS),	\
+	.platform_data	= &lis3_pdata,		\
+	.irq		= gpio_to_irq(mfp_to_gpio(GPIO_ACCEL_IRQ)),	\
+}
+
+#define SPI_DAC7512	\
+{	\
+	.modalias	= "dac7512",		\
+	.max_speed_hz	= 1000000,		\
+	.bus_num	= 0,			\
+	.chip_select	= 2,			\
+	.controller_data = (void *) mfp_to_gpio(GPIO_MCLK_DAC_CS),	\
+}
+
+static struct spi_board_info connector_spi_devices[] __initdata = {
+	SPI_AK4104,
+	SPI_DAC7512,
+};
+
+static struct spi_board_info speaker_spi_devices[] __initdata = {
+	SPI_DAC7512,
+};
+
+static struct spi_board_info controller_spi_devices[] __initdata = {
+	SPI_LIS3,
+};
+
 static struct platform_device *raumfeld_common_devices[] = {
 	&raumfeld_gpio_keys_device,
 	&raumfeld_led_device,
+	&raumfeld_spi_device,
 };
 
 static void __init raumfeld_common_init(void)
@@ -520,6 +604,7 @@ static void __init raumfeld_controller_init(void)
 	};
 
 	platform_add_devices(ARRAY_AND_SIZE(raumfeld_controller_devices));
+	spi_register_board_info(ARRAY_AND_SIZE(controller_spi_devices));
 
 	raumfeld_common_init();
 	raumfeld_lcd_init();
@@ -528,6 +613,7 @@ static void __init raumfeld_controller_init(void)
 
 static void __init raumfeld_connector_init(void)
 {
+	spi_register_board_info(ARRAY_AND_SIZE(connector_spi_devices));
 	raumfeld_common_init();
 	raumfeld_eth_init();
 }
@@ -539,6 +625,7 @@ static void __init raumfeld_speaker_init(void)
 	};
 
 	platform_add_devices(ARRAY_AND_SIZE(raumfeld_speaker_devices));
+	spi_register_board_info(ARRAY_AND_SIZE(speaker_spi_devices));
 
 	raumfeld_common_init();
 	raumfeld_eth_init();
-- 
1.6.5.2

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

* [PATCH 12/17] ARM: pxa/raumfeld: add audio related functions
  2009-11-25 10:42 ARM: pxa: add support for Raumfeld audio devices Daniel Mack
                   ` (10 preceding siblings ...)
  2009-11-25 10:42 ` [PATCH 11/17] ARM: pxa/raumfeld: add SPI controlled devices Daniel Mack
@ 2009-11-25 10:42 ` Daniel Mack
  2009-11-25 11:41   ` Mark Brown
  2009-11-25 17:07   ` Russell King - ARM Linux
  2009-11-25 10:42 ` [PATCH 13/17] ARM: pxa/raumfeld: add Marvell Libertas via SDIO Daniel Mack
                   ` (5 subsequent siblings)
  17 siblings, 2 replies; 51+ messages in thread
From: Daniel Mack @ 2009-11-25 10:42 UTC (permalink / raw)
  To: linux-arm-kernel

Signed-off-by: Daniel Mack <daniel@caiaq.de>
---
 arch/arm/mach-pxa/raumfeld.c |   68 ++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 68 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-pxa/raumfeld.c b/arch/arm/mach-pxa/raumfeld.c
index 43a8195..1516990 100644
--- a/arch/arm/mach-pxa/raumfeld.c
+++ b/arch/arm/mach-pxa/raumfeld.c
@@ -33,6 +33,7 @@
 #include <linux/spi/spi.h>
 #include <linux/spi/spi_gpio.h>
 #include <linux/lis3lv02d.h>
+#include <linux/delay.h>
 
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
@@ -561,6 +562,64 @@ static struct spi_board_info controller_spi_devices[] __initdata = {
 	SPI_LIS3,
 };
 
+/**
+ * Audio related things
+ */
+void raumfeld_enable_audio(bool en)
+{
+	if (!machine_is_raumfeld_speaker() &&
+	    !machine_is_raumfeld_connector())
+		return;
+
+	if (en) {
+		gpio_set_value(mfp_to_gpio(GPIO_AUDIO_VA_ENABLE), 1);
+		gpio_set_value(mfp_to_gpio(GPIO_MCLK_RESET), 1);
+
+		/* wait some time to let VA and the clocks become stable */
+		schedule_timeout(HZ/10);
+
+		gpio_set_value(mfp_to_gpio(GPIO_SPDIF_RESET), 1);
+		gpio_set_value(mfp_to_gpio(GPIO_CODEC_RESET), 1);
+	} else {
+		gpio_set_value(mfp_to_gpio(GPIO_MCLK_RESET), 0);
+		gpio_set_value(mfp_to_gpio(GPIO_SPDIF_RESET), 0);
+		gpio_set_value(mfp_to_gpio(GPIO_CODEC_RESET), 0);
+		gpio_set_value(mfp_to_gpio(GPIO_AUDIO_VA_ENABLE), 0);
+	}
+}
+
+static void raumfeld_claim_audio_gpios(void)
+{
+	gpio_request(mfp_to_gpio(GPIO_AUDIO_VA_ENABLE), "Audio VA enable");
+	gpio_direction_output(mfp_to_gpio(GPIO_AUDIO_VA_ENABLE), 0);
+
+	gpio_request(mfp_to_gpio(GPIO_MCLK_RESET), "MCLK reset");
+	gpio_direction_output(mfp_to_gpio(GPIO_MCLK_RESET), 0);
+
+	gpio_request(mfp_to_gpio(GPIO_CODEC_RESET), "cs4270 codec reset");
+	gpio_direction_output(mfp_to_gpio(GPIO_CODEC_RESET), 0);
+
+	gpio_request(mfp_to_gpio(GPIO_SPDIF_RESET), "ak4104 s/pdif reset");
+	gpio_direction_output(mfp_to_gpio(GPIO_SPDIF_RESET), 0);
+}
+
+static mfp_cfg_t raumfeld_ssp1_pin_config[] = {
+	/* SSP for I2S */
+	GPIO85_SSP1_SCLK,
+	GPIO89_SSP1_EXTCLK,
+	GPIO86_SSP1_FRM,
+	GPIO87_SSP1_TXD,
+	GPIO88_SSP1_RXD,
+	GPIO90_SSP1_SYSCLK,
+};
+
+static mfp_cfg_t raumfeld_ssp2_pin_config[] = {
+	GPIO25_SSP2_SCLK,
+	GPIO26_SSP2_FRM,
+	GPIO27_SSP2_TXD,
+	GPIO29_SSP2_EXTCLK,
+};
+
 static struct platform_device *raumfeld_common_devices[] = {
 	&raumfeld_gpio_keys_device,
 	&raumfeld_led_device,
@@ -613,9 +672,14 @@ static void __init raumfeld_controller_init(void)
 
 static void __init raumfeld_connector_init(void)
 {
+	pxa3xx_mfp_config(ARRAY_AND_SIZE(raumfeld_ssp1_pin_config));
+	pxa3xx_mfp_config(ARRAY_AND_SIZE(raumfeld_ssp2_pin_config));
 	spi_register_board_info(ARRAY_AND_SIZE(connector_spi_devices));
 	raumfeld_common_init();
 	raumfeld_eth_init();
+
+	raumfeld_claim_audio_gpios();
+	raumfeld_enable_audio(true);
 }
 
 static void __init raumfeld_speaker_init(void)
@@ -624,11 +688,15 @@ static void __init raumfeld_speaker_init(void)
 		&rotary_encoder_device,
 	};
 
+	pxa3xx_mfp_config(ARRAY_AND_SIZE(raumfeld_ssp1_pin_config));
 	platform_add_devices(ARRAY_AND_SIZE(raumfeld_speaker_devices));
 	spi_register_board_info(ARRAY_AND_SIZE(speaker_spi_devices));
 
 	raumfeld_common_init();
 	raumfeld_eth_init();
+
+	raumfeld_claim_audio_gpios();
+	raumfeld_enable_audio(true);
 }
 
 /* physical memory regions */
-- 
1.6.5.2

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

* [PATCH 13/17] ARM: pxa/raumfeld: add Marvell Libertas via SDIO
  2009-11-25 10:42 ARM: pxa: add support for Raumfeld audio devices Daniel Mack
                   ` (11 preceding siblings ...)
  2009-11-25 10:42 ` [PATCH 12/17] ARM: pxa/raumfeld: add audio related functions Daniel Mack
@ 2009-11-25 10:42 ` Daniel Mack
  2009-11-25 11:49   ` Mark Brown
  2009-11-25 10:42 ` [PATCH 14/17] ARM: pxa/raumfeld: add power supply framework Daniel Mack
                   ` (4 subsequent siblings)
  17 siblings, 1 reply; 51+ messages in thread
From: Daniel Mack @ 2009-11-25 10:42 UTC (permalink / raw)
  To: linux-arm-kernel

Signed-off-by: Daniel Mack <daniel@caiaq.de>
---
 arch/arm/mach-pxa/raumfeld.c |   56 ++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 56 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-pxa/raumfeld.c b/arch/arm/mach-pxa/raumfeld.c
index 1516990..1b54778 100644
--- a/arch/arm/mach-pxa/raumfeld.c
+++ b/arch/arm/mach-pxa/raumfeld.c
@@ -34,6 +34,7 @@
 #include <linux/spi/spi_gpio.h>
 #include <linux/lis3lv02d.h>
 #include <linux/delay.h>
+#include <linux/regulator/consumer.h>
 
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
@@ -45,6 +46,7 @@
 #include <mach/pxa3xx_nand.h>
 #include <mach/ohci.h>
 #include <mach/pxafb.h>
+#include <mach/mmc.h>
 
 #include "generic.h"
 #include "devices.h"
@@ -116,6 +118,14 @@ static mfp_cfg_t raumfeld_pin_config[] __initdata = {
 	GPIO34_GPIO,	/* SPDIF_CS */
 	GPIO96_GPIO,	/* MCLK_CS */
 	GPIO125_GPIO,	/* ACCEL_CS */
+
+	/* MMC */
+	GPIO3_MMC1_DAT0,
+	GPIO4_MMC1_DAT1,
+	GPIO5_MMC1_DAT2,
+	GPIO6_MMC1_DAT3,
+	GPIO7_MMC1_CLK,
+	GPIO8_MMC1_CMD,
 };
 
 /*
@@ -620,6 +630,51 @@ static mfp_cfg_t raumfeld_ssp2_pin_config[] = {
 	GPIO29_SSP2_EXTCLK,
 };
 
+/**
+ * MMC for Marvell Libertas 8688 via SDIO
+ */
+
+#define WIFI_VOLTAGE	3300000
+
+static void raumfeld_mci_setpower(struct device *dev, unsigned int on)
+{
+	int ret = 0;
+	struct regulator *regulator = regulator_get(dev, "vcc_wifi");
+
+	/* bring up V6 for SDIO/WLAN */
+	if (IS_ERR(regulator)) {
+		printk(KERN_ERR "%s(): unable to get regulator. err = %ld\n",
+			__func__, PTR_ERR(regulator));
+		return;
+	}
+
+	if (on && !regulator_is_enabled(regulator)) {
+		ret = regulator_enable(regulator);
+		if (!ret)
+			ret = regulator_set_voltage(regulator,
+					WIFI_VOLTAGE, WIFI_VOLTAGE);
+	} else if (!on && regulator_is_enabled(regulator))
+		ret = regulator_disable(regulator);
+
+	if (ret)
+		printk(KERN_ERR "%s: unable to %sable regulator: ret = %d\n",
+				__func__, on ? "en" : "dis", ret);
+
+	regulator_put(regulator);
+
+	gpio_set_value(mfp_to_gpio(GPIO_W2W_RESET), on);
+	gpio_set_value(mfp_to_gpio(GPIO_W2W_PDN), on);
+}
+
+static struct pxamci_platform_data raumfeld_mci_platform_data = {
+	.detect_delay		= 20,
+	.ocr_mask		= MMC_VDD_32_33 | MMC_VDD_33_34,
+	.setpower		= raumfeld_mci_setpower,
+	.gpio_card_detect	= -1,
+	.gpio_card_ro		= -1,
+	.gpio_power		= -1,
+};
+
 static struct platform_device *raumfeld_common_devices[] = {
 	&raumfeld_gpio_keys_device,
 	&raumfeld_led_device,
@@ -654,6 +709,7 @@ static void __init raumfeld_common_init(void)
 	pxa_set_ohci_info(&raumfeld_ohci_info);
 	platform_add_devices(ARRAY_AND_SIZE(raumfeld_common_devices));
 	pxa3xx_set_nand_info(&raumfeld_nand_info);
+	pxa_set_mci_info(&raumfeld_mci_platform_data);
 }
 
 static void __init raumfeld_controller_init(void)
-- 
1.6.5.2

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

* [PATCH 14/17] ARM: pxa/raumfeld: add power supply framework
  2009-11-25 10:42 ARM: pxa: add support for Raumfeld audio devices Daniel Mack
                   ` (12 preceding siblings ...)
  2009-11-25 10:42 ` [PATCH 13/17] ARM: pxa/raumfeld: add Marvell Libertas via SDIO Daniel Mack
@ 2009-11-25 10:42 ` Daniel Mack
  2009-11-25 10:42 ` [PATCH 15/17] ARM: pxa/raumfeld: add support for I2C controlled devices Daniel Mack
                   ` (3 subsequent siblings)
  17 siblings, 0 replies; 51+ messages in thread
From: Daniel Mack @ 2009-11-25 10:42 UTC (permalink / raw)
  To: linux-arm-kernel

Signed-off-by: Daniel Mack <daniel@caiaq.de>
---
 arch/arm/mach-pxa/raumfeld.c |  119 ++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 119 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-pxa/raumfeld.c b/arch/arm/mach-pxa/raumfeld.c
index 1b54778..9a234e7 100644
--- a/arch/arm/mach-pxa/raumfeld.c
+++ b/arch/arm/mach-pxa/raumfeld.c
@@ -35,6 +35,8 @@
 #include <linux/lis3lv02d.h>
 #include <linux/delay.h>
 #include <linux/regulator/consumer.h>
+#include <linux/pda_power.h>
+#include <linux/power_supply.h>
 
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
@@ -675,6 +677,107 @@ static struct pxamci_platform_data raumfeld_mci_platform_data = {
 	.gpio_power		= -1,
 };
 
+/*
+ * External power / charge logic
+ */
+
+static int gpio_charge_dc_ok;
+static int gpio_charge_usb_ok;
+static int gpio_charge_usb_susp;
+static int gpio_charge_ind;
+
+static int power_supply_init(struct device *dev)
+{
+	return 0;
+}
+
+static void power_supply_exit(struct device *dev)
+{
+}
+
+static int raumfeld_is_ac_online(void)
+{
+	return !gpio_get_value(gpio_charge_dc_ok);
+}
+
+static int raumfeld_is_usb_online(void)
+{
+	return 0;
+}
+
+static char *raumfeld_power_supplicants[] = { "ds2760-battery.0" };
+
+static struct pda_power_pdata power_supply_info = {
+	.init			= power_supply_init,
+	.is_ac_online		= raumfeld_is_ac_online,
+	.is_usb_online		= raumfeld_is_usb_online,
+	.exit			= power_supply_exit,
+	.supplied_to		= raumfeld_power_supplicants,
+	.num_supplicants	= ARRAY_SIZE(raumfeld_power_supplicants)
+};
+
+static struct resource power_supply_resources[] = {
+	{
+		.name  = "ac",
+		.flags = IORESOURCE_IRQ |
+			 IORESOURCE_IRQ_HIGHEDGE | IORESOURCE_IRQ_LOWEDGE,
+		.start = GPIO_CHARGE_DC_OK,
+		.end   = GPIO_CHARGE_DC_OK,
+	},
+};
+
+static irqreturn_t charge_done_irq(int irq, void *dev_id)
+{
+	struct power_supply *psy;
+
+	psy = power_supply_get_by_name("ds2760-battery.0");
+
+	if (psy)
+		power_supply_set_battery_charged(psy);
+
+	return IRQ_HANDLED;
+}
+
+static struct platform_device raumfeld_power_supply = {
+	.name = "pda-power",
+	.id   = -1,
+	.dev  = {
+		.platform_data = &power_supply_info,
+	},
+	.resource      = power_supply_resources,
+	.num_resources = ARRAY_SIZE(power_supply_resources),
+};
+
+static void __init raumfeld_power_init(void)
+{
+	int err;
+
+	/* Set PEN2 high to enable maximum charge current */
+	gpio_request(mfp_to_gpio(GPIO_CHRG_PEN2), "CHRG_PEN2");
+	gpio_direction_output(mfp_to_gpio(GPIO_CHRG_PEN2), 1);
+
+	gpio_charge_ind = mfp_to_gpio(GPIO_CHARGE_IND);
+	gpio_charge_dc_ok = mfp_to_gpio(GPIO_CHARGE_DC_OK);
+	gpio_charge_usb_ok = mfp_to_gpio(GPIO_CHARGE_USB_OK);
+	gpio_charge_usb_susp = mfp_to_gpio(GPIO_CHARGE_USB_SUSP);
+
+	gpio_request(gpio_charge_ind, "CHARGE_IND");
+	gpio_request(gpio_charge_dc_ok, "CABLE_DC_OK");
+	gpio_request(gpio_charge_usb_ok, "CABLE_USB_OK");
+	gpio_request(gpio_charge_usb_susp, "CHARGE_USB_SUSP");
+	gpio_direction_output(gpio_charge_usb_susp, 0);
+
+	err = request_irq(mfp_to_gpio(gpio_to_irq(GPIO_CHARGE_DONE)),
+			&charge_done_irq, IORESOURCE_IRQ_LOWEDGE,
+			"charge_done", NULL);
+
+	if (err < 0)
+		printk(KERN_ERR "%s: unable to register irq %d\n", __func__,
+			GPIO_CHARGE_DONE);
+	else
+		platform_device_register(&raumfeld_power_supply);
+}
+
 static struct platform_device *raumfeld_common_devices[] = {
 	&raumfeld_gpio_keys_device,
 	&raumfeld_led_device,
@@ -718,10 +821,26 @@ static void __init raumfeld_controller_init(void)
 		&rotary_encoder_device,
 	};
 
+	mfp_cfg_t raumfeld_controller_pin_config[] = {
+		/* CHRG_USB_OK */
+		GPIO101_GPIO | MFP_PULL_HIGH,
+		/* CHRG_USB_OK */
+		GPIO112_GPIO | MFP_PULL_HIGH,
+		/* CHRG_USB_SUSP */
+		GPIO102_GPIO,
+		/* DISPLAY_ENABLE */
+		GPIO106_GPIO,
+	};
+
+	pxa3xx_mfp_config(ARRAY_AND_SIZE(raumfeld_controller_pin_config));
 	platform_add_devices(ARRAY_AND_SIZE(raumfeld_controller_devices));
 	spi_register_board_info(ARRAY_AND_SIZE(controller_spi_devices));
 
+	gpio_request(mfp_to_gpio(GPIO_SHUTDOWN_BATT), "battery shutdown");
+	gpio_direction_output(mfp_to_gpio(GPIO_SHUTDOWN_BATT), 0);
+
 	raumfeld_common_init();
+	raumfeld_power_init();
 	raumfeld_lcd_init();
 	raumfeld_w1_init();
 }
-- 
1.6.5.2

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

* [PATCH 15/17] ARM: pxa/raumfeld: add support for I2C controlled devices
  2009-11-25 10:42 ARM: pxa: add support for Raumfeld audio devices Daniel Mack
                   ` (13 preceding siblings ...)
  2009-11-25 10:42 ` [PATCH 14/17] ARM: pxa/raumfeld: add power supply framework Daniel Mack
@ 2009-11-25 10:42 ` Daniel Mack
  2009-11-25 10:42   ` Daniel Mack
                   ` (2 subsequent siblings)
  17 siblings, 0 replies; 51+ messages in thread
From: Daniel Mack @ 2009-11-25 10:42 UTC (permalink / raw)
  To: linux-arm-kernel

Signed-off-by: Daniel Mack <daniel@caiaq.de>
---
 arch/arm/mach-pxa/raumfeld.c |   75 ++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 75 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-pxa/raumfeld.c b/arch/arm/mach-pxa/raumfeld.c
index 9a234e7..9b1b52c 100644
--- a/arch/arm/mach-pxa/raumfeld.c
+++ b/arch/arm/mach-pxa/raumfeld.c
@@ -26,10 +26,12 @@
 #include <linux/input.h>
 #include <linux/rotary_encoder.h>
 #include <linux/gpio_keys.h>
+#include <linux/input/eeti_ts.h>
 #include <linux/leds.h>
 #include <linux/w1-gpio.h>
 #include <linux/sched.h>
 #include <linux/pwm_backlight.h>
+#include <linux/i2c.h>
 #include <linux/spi/spi.h>
 #include <linux/spi/spi_gpio.h>
 #include <linux/lis3lv02d.h>
@@ -37,6 +39,7 @@
 #include <linux/regulator/consumer.h>
 #include <linux/pda_power.h>
 #include <linux/power_supply.h>
+#include <linux/regulator/max8660.h>
 
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
@@ -49,6 +52,7 @@
 #include <mach/ohci.h>
 #include <mach/pxafb.h>
 #include <mach/mmc.h>
+#include <plat/i2c.h>
 
 #include "generic.h"
 #include "devices.h"
@@ -116,6 +120,10 @@ static mfp_cfg_t raumfeld_pin_config[] __initdata = {
 	GPIO0_2_USBH_PEN,
 	GPIO1_2_USBH_PWR,
 
+	/* I2C */
+	GPIO21_I2C_SCL | MFP_LPM_FLOAT | MFP_PULL_FLOAT,
+	GPIO22_I2C_SDA | MFP_LPM_FLOAT | MFP_PULL_FLOAT,
+
 	/* SPI */
 	GPIO34_GPIO,	/* SPDIF_CS */
 	GPIO96_GPIO,	/* MCLK_CS */
@@ -778,6 +786,64 @@ static void __init raumfeld_power_init(void)
 		platform_device_register(&raumfeld_power_supply);
 }
 
+/**
+ * Regulator support for vcc_wifi
+ */
+
+static struct regulator_consumer_supply vcc_wifi_supply =
+	REGULATOR_SUPPLY("vcc_wifi", "pxa2xx-mci.0");
+
+static struct regulator_init_data vcc_wifi_init_data = {
+	.constraints = {
+		.min_uV = WIFI_VOLTAGE,
+		.max_uV = WIFI_VOLTAGE,
+		.valid_modes_mask = REGULATOR_MODE_NORMAL,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS |
+				  REGULATOR_CHANGE_VOLTAGE,
+	},
+	.consumer_supplies = &vcc_wifi_supply,
+	.num_consumer_supplies = 1,
+};
+
+struct max8660_subdev_data max8660_v6_subdev_data = {
+	.id		= MAX8660_V6,
+	.name		= "vcc_wifi",
+	.platform_data	= &vcc_wifi_init_data,
+};
+
+static struct max8660_platform_data max8660_pdata = {
+	.subdevs = &max8660_v6_subdev_data,
+	.num_subdevs = 1,
+};
+
+/**
+ * I2C devices
+ */
+
+static struct i2c_board_info raumfeld_pwri2c_board_info = {
+	.type		= "max8660",
+	.addr		= 0x34,
+	.platform_data	= &max8660_pdata,
+};
+
+static struct i2c_board_info raumfeld_connector_i2c_board_info[] __initdata = {
+	{
+		.type	= "cs4270",
+		.addr	= 0x48,
+	},
+};
+
+static struct eeti_ts_platform_data eeti_ts_pdata = {
+	.irq_active_high = 1,
+};
+
+static struct i2c_board_info raumfeld_controller_i2c_board_info __initdata = {
+	.type	= "eeti_ts",
+	.addr	= 0x0a,
+	.irq	= gpio_to_irq(mfp_to_gpio(GPIO_TOUCH_IRQ)),
+	.platform_data = &eeti_ts_pdata,
+};
+
 static struct platform_device *raumfeld_common_devices[] = {
 	&raumfeld_gpio_keys_device,
 	&raumfeld_led_device,
@@ -813,6 +879,9 @@ static void __init raumfeld_common_init(void)
 	platform_add_devices(ARRAY_AND_SIZE(raumfeld_common_devices));
 	pxa3xx_set_nand_info(&raumfeld_nand_info);
 	pxa_set_mci_info(&raumfeld_mci_platform_data);
+	pxa_set_i2c_info(NULL);
+	pxa3xx_set_i2c_power_info(NULL);
+	i2c_register_board_info(1, &raumfeld_pwri2c_board_info, 1);
 }
 
 static void __init raumfeld_controller_init(void)
@@ -835,6 +904,7 @@ static void __init raumfeld_controller_init(void)
 	pxa3xx_mfp_config(ARRAY_AND_SIZE(raumfeld_controller_pin_config));
 	platform_add_devices(ARRAY_AND_SIZE(raumfeld_controller_devices));
 	spi_register_board_info(ARRAY_AND_SIZE(controller_spi_devices));
+	i2c_register_board_info(0, &raumfeld_controller_i2c_board_info, 1);
 
 	gpio_request(mfp_to_gpio(GPIO_SHUTDOWN_BATT), "battery shutdown");
 	gpio_direction_output(mfp_to_gpio(GPIO_SHUTDOWN_BATT), 0);
@@ -850,6 +920,9 @@ static void __init raumfeld_connector_init(void)
 	pxa3xx_mfp_config(ARRAY_AND_SIZE(raumfeld_ssp1_pin_config));
 	pxa3xx_mfp_config(ARRAY_AND_SIZE(raumfeld_ssp2_pin_config));
 	spi_register_board_info(ARRAY_AND_SIZE(connector_spi_devices));
+	i2c_register_board_info(0,
+			ARRAY_AND_SIZE(raumfeld_connector_i2c_board_info));
+
 	raumfeld_common_init();
 	raumfeld_eth_init();
 
@@ -866,6 +939,8 @@ static void __init raumfeld_speaker_init(void)
 	pxa3xx_mfp_config(ARRAY_AND_SIZE(raumfeld_ssp1_pin_config));
 	platform_add_devices(ARRAY_AND_SIZE(raumfeld_speaker_devices));
 	spi_register_board_info(ARRAY_AND_SIZE(speaker_spi_devices));
+	i2c_register_board_info(0,
+			ARRAY_AND_SIZE(raumfeld_connector_i2c_board_info));
 
 	raumfeld_common_init();
 	raumfeld_eth_init();
-- 
1.6.5.2

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

* [PATCH 16/17] ALSA: ARM: add Raumfeld audio support
  2009-11-25 10:42 ARM: pxa: add support for Raumfeld audio devices Daniel Mack
@ 2009-11-25 10:42   ` Daniel Mack
  2009-11-25 10:42 ` [PATCH 02/17] ARM: pxa/raumfeld: add GPIO definitions Daniel Mack
                     ` (16 subsequent siblings)
  17 siblings, 0 replies; 51+ messages in thread
From: Daniel Mack @ 2009-11-25 10:42 UTC (permalink / raw)
  To: linux-arm-kernel; +Cc: alsa-devel, Mark Brown, eric.y.miao

Signed-off-by: Daniel Mack <daniel@caiaq.de>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: alsa-devel@alsa-project.org
---
 sound/soc/pxa/Kconfig    |    9 ++
 sound/soc/pxa/Makefile   |    2 +
 sound/soc/pxa/raumfeld.c |  338 ++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 349 insertions(+), 0 deletions(-)
 create mode 100644 sound/soc/pxa/raumfeld.c

diff --git a/sound/soc/pxa/Kconfig b/sound/soc/pxa/Kconfig
index dcb3181..9c3bfd9 100644
--- a/sound/soc/pxa/Kconfig
+++ b/sound/soc/pxa/Kconfig
@@ -117,6 +117,15 @@ config SND_SOC_ZYLONITE
 	  Say Y if you want to add support for SoC audio on the
 	  Marvell Zylonite reference platform.
 
+config SND_SOC_RAUMFELD
+	tristate "SoC Audio support Raumfeld audio adapter"
+	depends on SND_PXA2XX_SOC && (MACH_RAUMFELD_SPEAKER || MACH_RAUMFELD_CONNECTOR)
+	select SND_PXA_SOC_SSP
+	select SND_SOC_CS4270
+	select SND_SOC_AK4104
+	help
+	  Say Y if you want to add support for SoC audio on Raumfeld devices
+
 config SND_PXA2XX_SOC_MAGICIAN
 	tristate "SoC Audio support for HTC Magician"
 	depends on SND_PXA2XX_SOC && MACH_MAGICIAN
diff --git a/sound/soc/pxa/Makefile b/sound/soc/pxa/Makefile
index 6e096b4..f3e08fd 100644
--- a/sound/soc/pxa/Makefile
+++ b/sound/soc/pxa/Makefile
@@ -23,6 +23,7 @@ snd-soc-zylonite-objs := zylonite.o
 snd-soc-magician-objs := magician.o
 snd-soc-mioa701-objs := mioa701_wm9713.o
 snd-soc-imote2-objs := imote2.o
+snd-soc-raumfeld-objs := raumfeld.o
 
 obj-$(CONFIG_SND_PXA2XX_SOC_CORGI) += snd-soc-corgi.o
 obj-$(CONFIG_SND_PXA2XX_SOC_POODLE) += snd-soc-poodle.o
@@ -37,3 +38,4 @@ obj-$(CONFIG_SND_PXA2XX_SOC_MAGICIAN) += snd-soc-magician.o
 obj-$(CONFIG_SND_PXA2XX_SOC_MIOA701) += snd-soc-mioa701.o
 obj-$(CONFIG_SND_SOC_ZYLONITE) += snd-soc-zylonite.o
 obj-$(CONFIG_SND_PXA2XX_SOC_IMOTE2) += snd-soc-imote2.o
+obj-$(CONFIG_SND_SOC_RAUMFELD) += snd-soc-raumfeld.o
diff --git a/sound/soc/pxa/raumfeld.c b/sound/soc/pxa/raumfeld.c
new file mode 100644
index 0000000..7efc30a
--- /dev/null
+++ b/sound/soc/pxa/raumfeld.c
@@ -0,0 +1,338 @@
+/*
+ * raumfeld_audio.c  --  SoC audio for Raumfeld audio devices
+ *
+ * Copyright (c) 2009 Daniel Mack <daniel@caiaq.de>
+ *
+ * based on code from:
+ *
+ *    Wolfson Microelectronics PLC.
+ *    Openedhand Ltd.
+ *    Liam Girdwood <lrg@slimlogic.co.uk>
+ *    Richard Purdie <richard@openedhand.com>
+ *
+ * This program is free software; you can redistribute  it and/or modify it
+ * under  the terms of  the GNU General  Public License as published by the
+ * Free Software Foundation;  either version 2 of the  License, or (at your
+ * option) any later version.
+ */
+
+#include <linux/module.h>
+#include <linux/i2c.h>
+#include <linux/delay.h>
+#include <sound/pcm.h>
+#include <sound/soc.h>
+#include <sound/soc-dapm.h>
+#include <asm/mach-types.h>
+#include <mach/mfp-pxa3xx.h>
+#include <mach/mfp-pxa300.h>
+
+#include "../codecs/cs4270.h"
+#include "../codecs/ak4104.h"
+#include "pxa2xx-pcm.h"
+#include "pxa-ssp.h"
+
+extern void raumfeld_enable_audio(bool en);
+
+static struct i2c_client *max9486_client;
+static struct i2c_board_info max9486_hwmon_info = {
+	I2C_BOARD_INFO("max9485", 0x63),
+};
+
+/* set_max9485_clk() - call with
+ * 	clk = 0 for 11.2896 MHz
+ * 	clk = 1 for 12.2880 MHz
+ */
+
+static void set_max9485_clk(int clk)
+{
+	char buf = clk ? 0x23 : 0x22;
+	i2c_master_send(max9486_client, &buf, 1);
+}
+
+/* CS4270 */
+static int raumfeld_cs4270_startup(struct snd_pcm_substream *substream)
+{
+	struct snd_soc_pcm_runtime *rtd = substream->private_data;
+	struct snd_soc_dai *codec_dai = rtd->dai->codec_dai;
+
+	set_max9485_clk(0);
+
+	return snd_soc_dai_set_sysclk(codec_dai, 0, 11289600, 0);
+}
+
+static void raumfeld_cs4270_shutdown(struct snd_pcm_substream *substream)
+{
+}
+
+static int raumfeld_cs4270_hw_params(struct snd_pcm_substream *substream,
+				     struct snd_pcm_hw_params *params)
+{
+	struct snd_soc_pcm_runtime *rtd = substream->private_data;
+	struct snd_soc_dai *codec_dai = rtd->dai->codec_dai;
+	struct snd_soc_dai *cpu_dai = rtd->dai->cpu_dai;
+	unsigned int fmt, clk = 0;
+	int ret = 0;
+
+	switch (params_rate(params)) {
+	case 8000:
+	case 16000:
+	case 48000:
+	case 96000:
+		set_max9485_clk(1);
+		clk = 12288000;
+		break;
+	case 11025:
+	case 22050:
+	case 44100:
+	case 88200:
+		set_max9485_clk(0);
+		clk = 11289600;
+		break;
+	}
+
+	fmt = SND_SOC_DAIFMT_I2S |
+	      SND_SOC_DAIFMT_NB_NF |
+	      SND_SOC_DAIFMT_CBS_CFS;
+
+	/* setup the CODEC DAI */
+	ret = snd_soc_dai_set_fmt(codec_dai, fmt);
+	if (ret < 0)
+		return ret;
+
+	ret = snd_soc_dai_set_sysclk(codec_dai, 0, clk, 0);
+	if (ret < 0)
+		return ret;
+
+	/* setup the CPU DAI */
+	ret = snd_soc_dai_set_pll(cpu_dai, 0, 0, clk);
+	if (ret < 0)
+		return ret;
+
+	ret = snd_soc_dai_set_fmt(cpu_dai, fmt);
+	if (ret < 0)
+		return ret;
+
+	ret = snd_soc_dai_set_clkdiv(cpu_dai, PXA_SSP_DIV_SCR, 4);
+	if (ret < 0)
+		return ret;
+
+	ret = snd_soc_dai_set_sysclk(cpu_dai, PXA_SSP_CLK_EXT, 0, 1);
+	if (ret < 0)
+		return ret;
+
+	return 0;
+}
+
+static struct snd_soc_ops raumfeld_cs4270_ops = {
+	.startup = raumfeld_cs4270_startup,
+	.hw_params = raumfeld_cs4270_hw_params,
+	.shutdown = raumfeld_cs4270_shutdown,
+};
+
+static int raumfeld_cs4270_init(struct snd_soc_codec *codec)
+{
+	return 0;
+}
+
+static int raumfeld_line_suspend(struct platform_device *pdev, pm_message_t state)
+{
+	raumfeld_enable_audio(false);
+	return 0;
+}
+
+static int raumfeld_line_resume(struct platform_device *pdev)
+{
+	raumfeld_enable_audio(true);
+	return 0;
+}
+
+static struct snd_soc_dai_link raumfeld_line_dai = {
+	.name		= "CS4270",
+	.stream_name	= "CS4270",
+	.cpu_dai	= &pxa_ssp_dai[PXA_DAI_SSP1],
+	.codec_dai	= &cs4270_dai,
+	.init		= raumfeld_cs4270_init,
+	.ops		= &raumfeld_cs4270_ops,
+};
+
+static struct snd_soc_card snd_soc_line_raumfeld = {
+	.name		= "Raumfeld analog",
+	.platform	= &pxa2xx_soc_platform,
+	.dai_link	= &raumfeld_line_dai,
+	.suspend_post	= raumfeld_line_suspend,
+	.resume_pre	= raumfeld_line_resume,
+	.num_links	= 1,
+};
+
+
+/* AK4104 */
+
+static int raumfeld_ak4104_startup(struct snd_pcm_substream *substream)
+{
+	return 0;
+}
+
+static void raumfeld_ak4104_shutdown(struct snd_pcm_substream *substream)
+{
+}
+
+static int raumfeld_ak4104_hw_params(struct snd_pcm_substream *substream,
+				     struct snd_pcm_hw_params *params)
+{
+	struct snd_soc_pcm_runtime *rtd = substream->private_data;
+	struct snd_soc_dai *codec_dai = rtd->dai->codec_dai;
+	struct snd_soc_dai *cpu_dai = rtd->dai->cpu_dai;
+	int fmt, ret = 0, clk = 0;
+
+	switch (params_rate(params)) {
+	case 8000:
+	case 16000:
+	case 48000:
+	case 96000:
+		set_max9485_clk(1);
+		clk = 12288000;
+		break;
+	case 11025:
+	case 22050:
+	case 44100:
+	case 88200:
+		set_max9485_clk(0);
+		clk = 11289600;
+		break;
+	}
+
+	fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF;
+
+	/* setup the CODEC DAI */
+	ret = snd_soc_dai_set_fmt(codec_dai, fmt | SND_SOC_DAIFMT_CBS_CFS);
+	if (ret < 0)
+		return ret;
+
+	/* setup the CPU DAI */
+	ret = snd_soc_dai_set_pll(cpu_dai, 0, 0, clk);
+	if (ret < 0)
+		return ret;
+
+	ret = snd_soc_dai_set_fmt(cpu_dai, fmt | SND_SOC_DAIFMT_CBS_CFS);
+	if (ret < 0)
+		return ret;
+
+	ret = snd_soc_dai_set_clkdiv(cpu_dai, PXA_SSP_DIV_SCR, 4);
+	if (ret < 0)
+		return ret;
+
+	ret = snd_soc_dai_set_sysclk(cpu_dai, PXA_SSP_CLK_EXT, 0, 1);
+	if (ret < 0)
+		return ret;
+
+	return 0;
+}
+
+static struct snd_soc_ops raumfeld_ak4104_ops = {
+	.startup = raumfeld_ak4104_startup,
+	.hw_params = raumfeld_ak4104_hw_params,
+	.shutdown = raumfeld_ak4104_shutdown,
+};
+
+static int raumfeld_ak4104_init(struct snd_soc_codec *codec)
+{
+	return 0;
+}
+
+static struct snd_soc_dai_link raumfeld_spdif_dai = {
+	.name		= "ak4104",
+	.stream_name	= "Playback",
+	.cpu_dai	= &pxa_ssp_dai[PXA_DAI_SSP2],
+	.codec_dai	= &ak4104_dai,
+	.init		= raumfeld_ak4104_init,
+	.ops		= &raumfeld_ak4104_ops,
+};
+
+static struct snd_soc_card snd_soc_spdif_raumfeld = {
+	.name		= "Raumfeld S/PDIF",
+	.platform	= &pxa2xx_soc_platform,
+	.dai_link	= &raumfeld_spdif_dai,
+	.num_links	= 1
+};
+
+/* raumfeld_audio audio subsystem */
+static struct snd_soc_device raumfeld_line_devdata = {
+	.card = &snd_soc_line_raumfeld,
+	.codec_dev = &soc_codec_device_cs4270,
+};
+
+static struct snd_soc_device raumfeld_spdif_devdata = {
+	.card = &snd_soc_spdif_raumfeld,
+	.codec_dev = &soc_codec_device_ak4104,
+};
+
+static struct platform_device *raumfeld_audio_line_device;
+static struct platform_device *raumfeld_audio_spdif_device;
+
+static int __init raumfeld_audio_init(void)
+{
+	int ret;
+
+	if (!machine_is_raumfeld_speaker() &&
+	    !machine_is_raumfeld_connector())
+		return 0;
+
+	max9486_client = i2c_new_device(i2c_get_adapter(0),
+					 &max9486_hwmon_info);
+
+	if (!max9486_client)
+		return -ENOMEM;
+
+	set_max9485_clk(1);
+
+	/* LINE */
+	raumfeld_audio_line_device = platform_device_alloc("soc-audio", 0);
+	if (!raumfeld_audio_line_device)
+		return -ENOMEM;
+
+	platform_set_drvdata(raumfeld_audio_line_device,
+			     &raumfeld_line_devdata);
+	raumfeld_line_devdata.dev = &raumfeld_audio_line_device->dev;
+	ret = platform_device_add(raumfeld_audio_line_device);
+	if (ret)
+		platform_device_put(raumfeld_audio_line_device);
+
+	if (machine_is_raumfeld_speaker())
+		return ret;
+
+	/* S/PDIF */
+	raumfeld_audio_spdif_device = platform_device_alloc("soc-audio", 1);
+	if (!raumfeld_audio_spdif_device) {
+		platform_device_put(raumfeld_audio_line_device);
+		return -ENOMEM;
+	}
+
+	platform_set_drvdata(raumfeld_audio_spdif_device,
+			     &raumfeld_spdif_devdata);
+	raumfeld_spdif_devdata.dev = &raumfeld_audio_spdif_device->dev;
+	ret = platform_device_add(raumfeld_audio_spdif_device);
+	if (ret) {
+		platform_device_put(raumfeld_audio_line_device);
+		platform_device_put(raumfeld_audio_spdif_device);
+	}
+
+	return ret;
+}
+
+static void __exit raumfeld_audio_exit(void)
+{
+	platform_device_unregister(raumfeld_audio_line_device);
+
+	if (machine_is_raumfeld_connector())
+		platform_device_unregister(raumfeld_audio_spdif_device);
+
+	i2c_unregister_device(max9486_client);
+}
+
+module_init(raumfeld_audio_init);
+module_exit(raumfeld_audio_exit);
+
+/* Module information */
+MODULE_AUTHOR("Daniel Mack <daniel@caiaq.de>");
+MODULE_DESCRIPTION("Raumfeld audio SoC");
+MODULE_LICENSE("GPL");
-- 
1.6.5.2

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

* [PATCH 16/17] ALSA: ARM: add Raumfeld audio support
@ 2009-11-25 10:42   ` Daniel Mack
  0 siblings, 0 replies; 51+ messages in thread
From: Daniel Mack @ 2009-11-25 10:42 UTC (permalink / raw)
  To: linux-arm-kernel

Signed-off-by: Daniel Mack <daniel@caiaq.de>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: alsa-devel at alsa-project.org
---
 sound/soc/pxa/Kconfig    |    9 ++
 sound/soc/pxa/Makefile   |    2 +
 sound/soc/pxa/raumfeld.c |  338 ++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 349 insertions(+), 0 deletions(-)
 create mode 100644 sound/soc/pxa/raumfeld.c

diff --git a/sound/soc/pxa/Kconfig b/sound/soc/pxa/Kconfig
index dcb3181..9c3bfd9 100644
--- a/sound/soc/pxa/Kconfig
+++ b/sound/soc/pxa/Kconfig
@@ -117,6 +117,15 @@ config SND_SOC_ZYLONITE
 	  Say Y if you want to add support for SoC audio on the
 	  Marvell Zylonite reference platform.
 
+config SND_SOC_RAUMFELD
+	tristate "SoC Audio support Raumfeld audio adapter"
+	depends on SND_PXA2XX_SOC && (MACH_RAUMFELD_SPEAKER || MACH_RAUMFELD_CONNECTOR)
+	select SND_PXA_SOC_SSP
+	select SND_SOC_CS4270
+	select SND_SOC_AK4104
+	help
+	  Say Y if you want to add support for SoC audio on Raumfeld devices
+
 config SND_PXA2XX_SOC_MAGICIAN
 	tristate "SoC Audio support for HTC Magician"
 	depends on SND_PXA2XX_SOC && MACH_MAGICIAN
diff --git a/sound/soc/pxa/Makefile b/sound/soc/pxa/Makefile
index 6e096b4..f3e08fd 100644
--- a/sound/soc/pxa/Makefile
+++ b/sound/soc/pxa/Makefile
@@ -23,6 +23,7 @@ snd-soc-zylonite-objs := zylonite.o
 snd-soc-magician-objs := magician.o
 snd-soc-mioa701-objs := mioa701_wm9713.o
 snd-soc-imote2-objs := imote2.o
+snd-soc-raumfeld-objs := raumfeld.o
 
 obj-$(CONFIG_SND_PXA2XX_SOC_CORGI) += snd-soc-corgi.o
 obj-$(CONFIG_SND_PXA2XX_SOC_POODLE) += snd-soc-poodle.o
@@ -37,3 +38,4 @@ obj-$(CONFIG_SND_PXA2XX_SOC_MAGICIAN) += snd-soc-magician.o
 obj-$(CONFIG_SND_PXA2XX_SOC_MIOA701) += snd-soc-mioa701.o
 obj-$(CONFIG_SND_SOC_ZYLONITE) += snd-soc-zylonite.o
 obj-$(CONFIG_SND_PXA2XX_SOC_IMOTE2) += snd-soc-imote2.o
+obj-$(CONFIG_SND_SOC_RAUMFELD) += snd-soc-raumfeld.o
diff --git a/sound/soc/pxa/raumfeld.c b/sound/soc/pxa/raumfeld.c
new file mode 100644
index 0000000..7efc30a
--- /dev/null
+++ b/sound/soc/pxa/raumfeld.c
@@ -0,0 +1,338 @@
+/*
+ * raumfeld_audio.c  --  SoC audio for Raumfeld audio devices
+ *
+ * Copyright (c) 2009 Daniel Mack <daniel@caiaq.de>
+ *
+ * based on code from:
+ *
+ *    Wolfson Microelectronics PLC.
+ *    Openedhand Ltd.
+ *    Liam Girdwood <lrg@slimlogic.co.uk>
+ *    Richard Purdie <richard@openedhand.com>
+ *
+ * This program is free software; you can redistribute  it and/or modify it
+ * under  the terms of  the GNU General  Public License as published by the
+ * Free Software Foundation;  either version 2 of the  License, or (at your
+ * option) any later version.
+ */
+
+#include <linux/module.h>
+#include <linux/i2c.h>
+#include <linux/delay.h>
+#include <sound/pcm.h>
+#include <sound/soc.h>
+#include <sound/soc-dapm.h>
+#include <asm/mach-types.h>
+#include <mach/mfp-pxa3xx.h>
+#include <mach/mfp-pxa300.h>
+
+#include "../codecs/cs4270.h"
+#include "../codecs/ak4104.h"
+#include "pxa2xx-pcm.h"
+#include "pxa-ssp.h"
+
+extern void raumfeld_enable_audio(bool en);
+
+static struct i2c_client *max9486_client;
+static struct i2c_board_info max9486_hwmon_info = {
+	I2C_BOARD_INFO("max9485", 0x63),
+};
+
+/* set_max9485_clk() - call with
+ * 	clk = 0 for 11.2896 MHz
+ * 	clk = 1 for 12.2880 MHz
+ */
+
+static void set_max9485_clk(int clk)
+{
+	char buf = clk ? 0x23 : 0x22;
+	i2c_master_send(max9486_client, &buf, 1);
+}
+
+/* CS4270 */
+static int raumfeld_cs4270_startup(struct snd_pcm_substream *substream)
+{
+	struct snd_soc_pcm_runtime *rtd = substream->private_data;
+	struct snd_soc_dai *codec_dai = rtd->dai->codec_dai;
+
+	set_max9485_clk(0);
+
+	return snd_soc_dai_set_sysclk(codec_dai, 0, 11289600, 0);
+}
+
+static void raumfeld_cs4270_shutdown(struct snd_pcm_substream *substream)
+{
+}
+
+static int raumfeld_cs4270_hw_params(struct snd_pcm_substream *substream,
+				     struct snd_pcm_hw_params *params)
+{
+	struct snd_soc_pcm_runtime *rtd = substream->private_data;
+	struct snd_soc_dai *codec_dai = rtd->dai->codec_dai;
+	struct snd_soc_dai *cpu_dai = rtd->dai->cpu_dai;
+	unsigned int fmt, clk = 0;
+	int ret = 0;
+
+	switch (params_rate(params)) {
+	case 8000:
+	case 16000:
+	case 48000:
+	case 96000:
+		set_max9485_clk(1);
+		clk = 12288000;
+		break;
+	case 11025:
+	case 22050:
+	case 44100:
+	case 88200:
+		set_max9485_clk(0);
+		clk = 11289600;
+		break;
+	}
+
+	fmt = SND_SOC_DAIFMT_I2S |
+	      SND_SOC_DAIFMT_NB_NF |
+	      SND_SOC_DAIFMT_CBS_CFS;
+
+	/* setup the CODEC DAI */
+	ret = snd_soc_dai_set_fmt(codec_dai, fmt);
+	if (ret < 0)
+		return ret;
+
+	ret = snd_soc_dai_set_sysclk(codec_dai, 0, clk, 0);
+	if (ret < 0)
+		return ret;
+
+	/* setup the CPU DAI */
+	ret = snd_soc_dai_set_pll(cpu_dai, 0, 0, clk);
+	if (ret < 0)
+		return ret;
+
+	ret = snd_soc_dai_set_fmt(cpu_dai, fmt);
+	if (ret < 0)
+		return ret;
+
+	ret = snd_soc_dai_set_clkdiv(cpu_dai, PXA_SSP_DIV_SCR, 4);
+	if (ret < 0)
+		return ret;
+
+	ret = snd_soc_dai_set_sysclk(cpu_dai, PXA_SSP_CLK_EXT, 0, 1);
+	if (ret < 0)
+		return ret;
+
+	return 0;
+}
+
+static struct snd_soc_ops raumfeld_cs4270_ops = {
+	.startup = raumfeld_cs4270_startup,
+	.hw_params = raumfeld_cs4270_hw_params,
+	.shutdown = raumfeld_cs4270_shutdown,
+};
+
+static int raumfeld_cs4270_init(struct snd_soc_codec *codec)
+{
+	return 0;
+}
+
+static int raumfeld_line_suspend(struct platform_device *pdev, pm_message_t state)
+{
+	raumfeld_enable_audio(false);
+	return 0;
+}
+
+static int raumfeld_line_resume(struct platform_device *pdev)
+{
+	raumfeld_enable_audio(true);
+	return 0;
+}
+
+static struct snd_soc_dai_link raumfeld_line_dai = {
+	.name		= "CS4270",
+	.stream_name	= "CS4270",
+	.cpu_dai	= &pxa_ssp_dai[PXA_DAI_SSP1],
+	.codec_dai	= &cs4270_dai,
+	.init		= raumfeld_cs4270_init,
+	.ops		= &raumfeld_cs4270_ops,
+};
+
+static struct snd_soc_card snd_soc_line_raumfeld = {
+	.name		= "Raumfeld analog",
+	.platform	= &pxa2xx_soc_platform,
+	.dai_link	= &raumfeld_line_dai,
+	.suspend_post	= raumfeld_line_suspend,
+	.resume_pre	= raumfeld_line_resume,
+	.num_links	= 1,
+};
+
+
+/* AK4104 */
+
+static int raumfeld_ak4104_startup(struct snd_pcm_substream *substream)
+{
+	return 0;
+}
+
+static void raumfeld_ak4104_shutdown(struct snd_pcm_substream *substream)
+{
+}
+
+static int raumfeld_ak4104_hw_params(struct snd_pcm_substream *substream,
+				     struct snd_pcm_hw_params *params)
+{
+	struct snd_soc_pcm_runtime *rtd = substream->private_data;
+	struct snd_soc_dai *codec_dai = rtd->dai->codec_dai;
+	struct snd_soc_dai *cpu_dai = rtd->dai->cpu_dai;
+	int fmt, ret = 0, clk = 0;
+
+	switch (params_rate(params)) {
+	case 8000:
+	case 16000:
+	case 48000:
+	case 96000:
+		set_max9485_clk(1);
+		clk = 12288000;
+		break;
+	case 11025:
+	case 22050:
+	case 44100:
+	case 88200:
+		set_max9485_clk(0);
+		clk = 11289600;
+		break;
+	}
+
+	fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF;
+
+	/* setup the CODEC DAI */
+	ret = snd_soc_dai_set_fmt(codec_dai, fmt | SND_SOC_DAIFMT_CBS_CFS);
+	if (ret < 0)
+		return ret;
+
+	/* setup the CPU DAI */
+	ret = snd_soc_dai_set_pll(cpu_dai, 0, 0, clk);
+	if (ret < 0)
+		return ret;
+
+	ret = snd_soc_dai_set_fmt(cpu_dai, fmt | SND_SOC_DAIFMT_CBS_CFS);
+	if (ret < 0)
+		return ret;
+
+	ret = snd_soc_dai_set_clkdiv(cpu_dai, PXA_SSP_DIV_SCR, 4);
+	if (ret < 0)
+		return ret;
+
+	ret = snd_soc_dai_set_sysclk(cpu_dai, PXA_SSP_CLK_EXT, 0, 1);
+	if (ret < 0)
+		return ret;
+
+	return 0;
+}
+
+static struct snd_soc_ops raumfeld_ak4104_ops = {
+	.startup = raumfeld_ak4104_startup,
+	.hw_params = raumfeld_ak4104_hw_params,
+	.shutdown = raumfeld_ak4104_shutdown,
+};
+
+static int raumfeld_ak4104_init(struct snd_soc_codec *codec)
+{
+	return 0;
+}
+
+static struct snd_soc_dai_link raumfeld_spdif_dai = {
+	.name		= "ak4104",
+	.stream_name	= "Playback",
+	.cpu_dai	= &pxa_ssp_dai[PXA_DAI_SSP2],
+	.codec_dai	= &ak4104_dai,
+	.init		= raumfeld_ak4104_init,
+	.ops		= &raumfeld_ak4104_ops,
+};
+
+static struct snd_soc_card snd_soc_spdif_raumfeld = {
+	.name		= "Raumfeld S/PDIF",
+	.platform	= &pxa2xx_soc_platform,
+	.dai_link	= &raumfeld_spdif_dai,
+	.num_links	= 1
+};
+
+/* raumfeld_audio audio subsystem */
+static struct snd_soc_device raumfeld_line_devdata = {
+	.card = &snd_soc_line_raumfeld,
+	.codec_dev = &soc_codec_device_cs4270,
+};
+
+static struct snd_soc_device raumfeld_spdif_devdata = {
+	.card = &snd_soc_spdif_raumfeld,
+	.codec_dev = &soc_codec_device_ak4104,
+};
+
+static struct platform_device *raumfeld_audio_line_device;
+static struct platform_device *raumfeld_audio_spdif_device;
+
+static int __init raumfeld_audio_init(void)
+{
+	int ret;
+
+	if (!machine_is_raumfeld_speaker() &&
+	    !machine_is_raumfeld_connector())
+		return 0;
+
+	max9486_client = i2c_new_device(i2c_get_adapter(0),
+					 &max9486_hwmon_info);
+
+	if (!max9486_client)
+		return -ENOMEM;
+
+	set_max9485_clk(1);
+
+	/* LINE */
+	raumfeld_audio_line_device = platform_device_alloc("soc-audio", 0);
+	if (!raumfeld_audio_line_device)
+		return -ENOMEM;
+
+	platform_set_drvdata(raumfeld_audio_line_device,
+			     &raumfeld_line_devdata);
+	raumfeld_line_devdata.dev = &raumfeld_audio_line_device->dev;
+	ret = platform_device_add(raumfeld_audio_line_device);
+	if (ret)
+		platform_device_put(raumfeld_audio_line_device);
+
+	if (machine_is_raumfeld_speaker())
+		return ret;
+
+	/* S/PDIF */
+	raumfeld_audio_spdif_device = platform_device_alloc("soc-audio", 1);
+	if (!raumfeld_audio_spdif_device) {
+		platform_device_put(raumfeld_audio_line_device);
+		return -ENOMEM;
+	}
+
+	platform_set_drvdata(raumfeld_audio_spdif_device,
+			     &raumfeld_spdif_devdata);
+	raumfeld_spdif_devdata.dev = &raumfeld_audio_spdif_device->dev;
+	ret = platform_device_add(raumfeld_audio_spdif_device);
+	if (ret) {
+		platform_device_put(raumfeld_audio_line_device);
+		platform_device_put(raumfeld_audio_spdif_device);
+	}
+
+	return ret;
+}
+
+static void __exit raumfeld_audio_exit(void)
+{
+	platform_device_unregister(raumfeld_audio_line_device);
+
+	if (machine_is_raumfeld_connector())
+		platform_device_unregister(raumfeld_audio_spdif_device);
+
+	i2c_unregister_device(max9486_client);
+}
+
+module_init(raumfeld_audio_init);
+module_exit(raumfeld_audio_exit);
+
+/* Module information */
+MODULE_AUTHOR("Daniel Mack <daniel@caiaq.de>");
+MODULE_DESCRIPTION("Raumfeld audio SoC");
+MODULE_LICENSE("GPL");
-- 
1.6.5.2

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

* [PATCH 17/17] ARM: pxa/raumfeld: Add defconfig
  2009-11-25 10:42 ARM: pxa: add support for Raumfeld audio devices Daniel Mack
                   ` (15 preceding siblings ...)
  2009-11-25 10:42   ` Daniel Mack
@ 2009-11-25 10:42 ` Daniel Mack
  2009-11-25 11:27 ` ARM: pxa: add support for Raumfeld audio devices Mike Rapoport
  17 siblings, 0 replies; 51+ messages in thread
From: Daniel Mack @ 2009-11-25 10:42 UTC (permalink / raw)
  To: linux-arm-kernel

Signed-off-by: Daniel Mack <daniel@caiaq.de>
---
 arch/arm/configs/raumfeld_defconfig | 1898 +++++++++++++++++++++++++++++++++++
 1 files changed, 1898 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/configs/raumfeld_defconfig

diff --git a/arch/arm/configs/raumfeld_defconfig b/arch/arm/configs/raumfeld_defconfig
new file mode 100644
index 0000000..acb1a8f
--- /dev/null
+++ b/arch/arm/configs/raumfeld_defconfig
@@ -0,0 +1,1898 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.32-rc5
+# Sun Nov  1 21:57:32 2009
+#
+CONFIG_ARM=y
+CONFIG_HAVE_PWM=y
+CONFIG_SYS_SUPPORTS_APM_EMULATION=y
+CONFIG_GENERIC_GPIO=y
+CONFIG_GENERIC_TIME=y
+CONFIG_GENERIC_CLOCKEVENTS=y
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_STACKTRACE_SUPPORT=y
+CONFIG_HAVE_LATENCYTOP_SUPPORT=y
+CONFIG_LOCKDEP_SUPPORT=y
+CONFIG_TRACE_IRQFLAGS_SUPPORT=y
+CONFIG_HARDIRQS_SW_RESEND=y
+CONFIG_GENERIC_IRQ_PROBE=y
+CONFIG_RWSEM_GENERIC_SPINLOCK=y
+CONFIG_ARCH_HAS_CPUFREQ=y
+CONFIG_GENERIC_HWEIGHT=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_ARCH_MTD_XIP=y
+CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
+CONFIG_VECTORS_BASE=0xffff0000
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
+CONFIG_CONSTRUCTORS=y
+
+#
+# General setup
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_BROKEN_ON_SMP=y
+CONFIG_INIT_ENV_ARG_LIMIT=32
+CONFIG_LOCALVERSION=""
+# CONFIG_LOCALVERSION_AUTO is not set
+# CONFIG_SWAP is not set
+# CONFIG_SYSVIPC is not set
+# CONFIG_POSIX_MQUEUE is not set
+# CONFIG_BSD_PROCESS_ACCT is not set
+# CONFIG_TASKSTATS is not set
+# CONFIG_AUDIT is not set
+
+#
+# RCU Subsystem
+#
+CONFIG_TREE_RCU=y
+# CONFIG_TREE_PREEMPT_RCU is not set
+# CONFIG_RCU_TRACE is not set
+CONFIG_RCU_FANOUT=32
+# CONFIG_RCU_FANOUT_EXACT is not set
+# CONFIG_TREE_RCU_TRACE is not set
+# CONFIG_IKCONFIG is not set
+CONFIG_LOG_BUF_SHIFT=17
+# CONFIG_GROUP_SCHED is not set
+# CONFIG_CGROUPS is not set
+# CONFIG_SYSFS_DEPRECATED_V2 is not set
+# CONFIG_RELAY is not set
+CONFIG_NAMESPACES=y
+# CONFIG_UTS_NS is not set
+# CONFIG_USER_NS is not set
+# CONFIG_PID_NS is not set
+# CONFIG_NET_NS is not set
+# CONFIG_BLK_DEV_INITRD is not set
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_SYSCTL=y
+CONFIG_ANON_INODES=y
+# CONFIG_EMBEDDED is not set
+CONFIG_UID16=y
+CONFIG_SYSCTL_SYSCALL=y
+CONFIG_KALLSYMS=y
+# CONFIG_KALLSYMS_ALL is not set
+# CONFIG_KALLSYMS_EXTRA_PASS is not set
+CONFIG_HOTPLUG=y
+CONFIG_PRINTK=y
+CONFIG_BUG=y
+CONFIG_ELF_CORE=y
+CONFIG_BASE_FULL=y
+CONFIG_FUTEX=y
+CONFIG_EPOLL=y
+CONFIG_SIGNALFD=y
+CONFIG_TIMERFD=y
+CONFIG_EVENTFD=y
+CONFIG_SHMEM=y
+CONFIG_AIO=y
+
+#
+# Kernel Performance Events And Counters
+#
+CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_SLUB_DEBUG=y
+CONFIG_COMPAT_BRK=y
+# CONFIG_SLAB is not set
+CONFIG_SLUB=y
+# CONFIG_SLOB is not set
+# CONFIG_PROFILING is not set
+CONFIG_HAVE_OPROFILE=y
+# CONFIG_KPROBES is not set
+CONFIG_HAVE_KPROBES=y
+CONFIG_HAVE_KRETPROBES=y
+CONFIG_HAVE_CLK=y
+
+#
+# GCOV-based kernel profiling
+#
+CONFIG_SLOW_WORK=y
+CONFIG_HAVE_GENERIC_DMA_COHERENT=y
+CONFIG_SLABINFO=y
+CONFIG_RT_MUTEXES=y
+CONFIG_BASE_SMALL=0
+CONFIG_MODULES=y
+# CONFIG_MODULE_FORCE_LOAD is not set
+CONFIG_MODULE_UNLOAD=y
+# CONFIG_MODULE_FORCE_UNLOAD is not set
+# CONFIG_MODVERSIONS is not set
+# CONFIG_MODULE_SRCVERSION_ALL is not set
+CONFIG_BLOCK=y
+# CONFIG_LBDAF is not set
+# CONFIG_BLK_DEV_BSG is not set
+# CONFIG_BLK_DEV_INTEGRITY is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=y
+CONFIG_IOSCHED_DEADLINE=y
+CONFIG_IOSCHED_CFQ=y
+# CONFIG_DEFAULT_AS is not set
+# CONFIG_DEFAULT_DEADLINE is not set
+CONFIG_DEFAULT_CFQ=y
+# CONFIG_DEFAULT_NOOP is not set
+CONFIG_DEFAULT_IOSCHED="cfq"
+CONFIG_FREEZER=y
+
+#
+# System Type
+#
+CONFIG_MMU=y
+# CONFIG_ARCH_AAEC2000 is not set
+# CONFIG_ARCH_INTEGRATOR is not set
+# CONFIG_ARCH_REALVIEW is not set
+# CONFIG_ARCH_VERSATILE is not set
+# CONFIG_ARCH_AT91 is not set
+# CONFIG_ARCH_CLPS711X is not set
+# CONFIG_ARCH_GEMINI is not set
+# CONFIG_ARCH_EBSA110 is not set
+# CONFIG_ARCH_EP93XX is not set
+# CONFIG_ARCH_FOOTBRIDGE is not set
+# CONFIG_ARCH_MXC is not set
+# CONFIG_ARCH_STMP3XXX is not set
+# CONFIG_ARCH_NETX is not set
+# CONFIG_ARCH_H720X is not set
+# CONFIG_ARCH_NOMADIK is not set
+# CONFIG_ARCH_IOP13XX is not set
+# CONFIG_ARCH_IOP32X is not set
+# CONFIG_ARCH_IOP33X is not set
+# CONFIG_ARCH_IXP23XX is not set
+# CONFIG_ARCH_IXP2000 is not set
+# CONFIG_ARCH_IXP4XX is not set
+# CONFIG_ARCH_L7200 is not set
+# CONFIG_ARCH_KIRKWOOD is not set
+# CONFIG_ARCH_LOKI is not set
+# CONFIG_ARCH_MV78XX0 is not set
+# CONFIG_ARCH_ORION5X is not set
+# CONFIG_ARCH_MMP is not set
+# CONFIG_ARCH_KS8695 is not set
+# CONFIG_ARCH_NS9XXX is not set
+# CONFIG_ARCH_W90X900 is not set
+# CONFIG_ARCH_PNX4008 is not set
+CONFIG_ARCH_PXA=y
+# CONFIG_ARCH_MSM is not set
+# CONFIG_ARCH_RPC is not set
+# CONFIG_ARCH_SA1100 is not set
+# CONFIG_ARCH_S3C2410 is not set
+# CONFIG_ARCH_S3C64XX is not set
+# CONFIG_ARCH_S5PC1XX is not set
+# CONFIG_ARCH_SHARK is not set
+# CONFIG_ARCH_LH7A40X is not set
+# CONFIG_ARCH_U300 is not set
+# CONFIG_ARCH_DAVINCI is not set
+# CONFIG_ARCH_OMAP is not set
+# CONFIG_ARCH_BCMRING is not set
+
+#
+# Intel PXA2xx/PXA3xx Implementations
+#
+
+#
+# Supported PXA3xx Processor Variants
+#
+CONFIG_CPU_PXA300=y
+# CONFIG_CPU_PXA310 is not set
+CONFIG_CPU_PXA320=y
+# CONFIG_CPU_PXA930 is not set
+# CONFIG_CPU_PXA935 is not set
+# CONFIG_CPU_PXA950 is not set
+
+#
+# Intel/Marvell Dev Platforms (sorted by hardware release time)
+#
+# CONFIG_ARCH_LUBBOCK is not set
+# CONFIG_MACH_MAINSTONE is not set
+# CONFIG_MACH_ZYLONITE is not set
+# CONFIG_MACH_LITTLETON is not set
+# CONFIG_MACH_TAVOREVB is not set
+# CONFIG_MACH_SAAR is not set
+
+#
+# Third Party Dev Platforms (sorted by vendor name)
+#
+# CONFIG_ARCH_PXA_IDP is not set
+# CONFIG_ARCH_VIPER is not set
+# CONFIG_MACH_BALLOON3 is not set
+# CONFIG_MACH_CSB726 is not set
+# CONFIG_MACH_ARMCORE is not set
+# CONFIG_MACH_EM_X270 is not set
+# CONFIG_MACH_EXEDA is not set
+# CONFIG_MACH_CM_X300 is not set
+# CONFIG_ARCH_GUMSTIX is not set
+# CONFIG_MACH_INTELMOTE2 is not set
+# CONFIG_MACH_STARGATE2 is not set
+# CONFIG_MACH_XCEP is not set
+# CONFIG_TRIZEPS_PXA is not set
+# CONFIG_MACH_LOGICPD_PXA270 is not set
+# CONFIG_MACH_PCM027 is not set
+# CONFIG_MACH_COLIBRI is not set
+# CONFIG_MACH_COLIBRI300 is not set
+# CONFIG_MACH_COLIBRI320 is not set
+
+#
+# End-user Products (sorted by vendor name)
+#
+# CONFIG_MACH_H4700 is not set
+# CONFIG_MACH_H5000 is not set
+# CONFIG_MACH_HIMALAYA is not set
+# CONFIG_MACH_MAGICIAN is not set
+# CONFIG_MACH_MIOA701 is not set
+# CONFIG_PXA_EZX is not set
+# CONFIG_MACH_MP900C is not set
+# CONFIG_ARCH_PXA_PALM is not set
+CONFIG_MACH_RAUMFELD_RC=y
+CONFIG_MACH_RAUMFELD_CONNECTOR=y
+CONFIG_MACH_RAUMFELD_PROTO=y
+CONFIG_MACH_RAUMFELD_SPEAKER=y
+# CONFIG_PXA_SHARPSL is not set
+# CONFIG_ARCH_PXA_ESERIES is not set
+CONFIG_PXA3xx=y
+CONFIG_PXA_SSP=y
+CONFIG_PLAT_PXA=y
+
+#
+# Processor Type
+#
+CONFIG_CPU_32=y
+CONFIG_CPU_XSC3=y
+CONFIG_CPU_32v5=y
+CONFIG_CPU_ABRT_EV5T=y
+CONFIG_CPU_PABRT_LEGACY=y
+CONFIG_CPU_CACHE_VIVT=y
+CONFIG_CPU_TLB_V4WBI=y
+CONFIG_CPU_CP15=y
+CONFIG_CPU_CP15_MMU=y
+CONFIG_IO_36=y
+
+#
+# Processor Features
+#
+CONFIG_ARM_THUMB=y
+# CONFIG_CPU_DCACHE_DISABLE is not set
+# CONFIG_CPU_BPREDICT_DISABLE is not set
+CONFIG_OUTER_CACHE=y
+CONFIG_CACHE_XSC3L2=y
+CONFIG_ARM_L1_CACHE_SHIFT=5
+CONFIG_IWMMXT=y
+CONFIG_COMMON_CLKDEV=y
+
+#
+# Bus support
+#
+# CONFIG_PCI_SYSCALL is not set
+# CONFIG_ARCH_SUPPORTS_MSI is not set
+# CONFIG_PCCARD is not set
+
+#
+# Kernel Features
+#
+CONFIG_TICK_ONESHOT=y
+CONFIG_NO_HZ=y
+# CONFIG_HIGH_RES_TIMERS is not set
+CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
+CONFIG_VMSPLIT_3G=y
+# CONFIG_VMSPLIT_2G is not set
+# CONFIG_VMSPLIT_1G is not set
+CONFIG_PAGE_OFFSET=0xC0000000
+CONFIG_PREEMPT_NONE=y
+# CONFIG_PREEMPT_VOLUNTARY is not set
+# CONFIG_PREEMPT is not set
+CONFIG_HZ=100
+CONFIG_AEABI=y
+# CONFIG_OABI_COMPAT is not set
+# CONFIG_ARCH_SPARSEMEM_DEFAULT is not set
+# CONFIG_ARCH_SELECT_MEMORY_MODEL is not set
+# CONFIG_HIGHMEM is not set
+CONFIG_SELECT_MEMORY_MODEL=y
+CONFIG_FLATMEM_MANUAL=y
+# CONFIG_DISCONTIGMEM_MANUAL is not set
+# CONFIG_SPARSEMEM_MANUAL is not set
+CONFIG_FLATMEM=y
+CONFIG_FLAT_NODE_MEM_MAP=y
+CONFIG_PAGEFLAGS_EXTENDED=y
+CONFIG_SPLIT_PTLOCK_CPUS=4096
+# CONFIG_PHYS_ADDR_T_64BIT is not set
+CONFIG_ZONE_DMA_FLAG=0
+CONFIG_VIRT_TO_BUS=y
+CONFIG_HAVE_MLOCK=y
+CONFIG_HAVE_MLOCKED_PAGE_BIT=y
+# CONFIG_KSM is not set
+CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
+CONFIG_ALIGNMENT_TRAP=y
+# CONFIG_UACCESS_WITH_MEMCPY is not set
+
+#
+# Boot options
+#
+CONFIG_ZBOOT_ROM_TEXT=0
+CONFIG_ZBOOT_ROM_BSS=0
+CONFIG_CMDLINE="console=ttyS0,115200 rw"
+# CONFIG_XIP_KERNEL is not set
+# CONFIG_KEXEC is not set
+
+#
+# CPU Power Management
+#
+CONFIG_CPU_FREQ=y
+CONFIG_CPU_FREQ_TABLE=y
+# CONFIG_CPU_FREQ_DEBUG is not set
+CONFIG_CPU_FREQ_STAT=y
+# CONFIG_CPU_FREQ_STAT_DETAILS is not set
+CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
+# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set
+# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
+# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set
+# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set
+CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
+# CONFIG_CPU_FREQ_GOV_POWERSAVE is not set
+# CONFIG_CPU_FREQ_GOV_USERSPACE is not set
+# CONFIG_CPU_FREQ_GOV_ONDEMAND is not set
+# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set
+CONFIG_CPU_IDLE=y
+CONFIG_CPU_IDLE_GOV_LADDER=y
+CONFIG_CPU_IDLE_GOV_MENU=y
+
+#
+# Floating point emulation
+#
+
+#
+# At least one emulation must be selected
+#
+
+#
+# Userspace binary formats
+#
+CONFIG_BINFMT_ELF=y
+# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
+CONFIG_HAVE_AOUT=y
+# CONFIG_BINFMT_AOUT is not set
+# CONFIG_BINFMT_MISC is not set
+
+#
+# Power management options
+#
+CONFIG_PM=y
+# CONFIG_PM_DEBUG is not set
+CONFIG_PM_SLEEP=y
+CONFIG_SUSPEND=y
+CONFIG_SUSPEND_FREEZER=y
+CONFIG_APM_EMULATION=y
+# CONFIG_PM_RUNTIME is not set
+CONFIG_ARCH_SUSPEND_POSSIBLE=y
+CONFIG_NET=y
+
+#
+# Networking options
+#
+CONFIG_PACKET=y
+CONFIG_PACKET_MMAP=y
+CONFIG_UNIX=y
+CONFIG_XFRM=y
+# CONFIG_XFRM_USER is not set
+# CONFIG_XFRM_SUB_POLICY is not set
+# CONFIG_XFRM_MIGRATE is not set
+# CONFIG_XFRM_STATISTICS is not set
+# CONFIG_NET_KEY is not set
+CONFIG_INET=y
+CONFIG_IP_MULTICAST=y
+# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_FIB_HASH=y
+CONFIG_IP_PNP=y
+# CONFIG_IP_PNP_DHCP is not set
+# CONFIG_IP_PNP_BOOTP is not set
+# CONFIG_IP_PNP_RARP is not set
+# CONFIG_NET_IPIP is not set
+# CONFIG_NET_IPGRE is not set
+# CONFIG_IP_MROUTE is not set
+# CONFIG_ARPD is not set
+CONFIG_SYN_COOKIES=y
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_INET_IPCOMP is not set
+# CONFIG_INET_XFRM_TUNNEL is not set
+CONFIG_INET_TUNNEL=y
+CONFIG_INET_XFRM_MODE_TRANSPORT=y
+CONFIG_INET_XFRM_MODE_TUNNEL=y
+CONFIG_INET_XFRM_MODE_BEET=y
+# CONFIG_INET_LRO is not set
+CONFIG_INET_DIAG=y
+CONFIG_INET_TCP_DIAG=y
+# CONFIG_TCP_CONG_ADVANCED is not set
+CONFIG_TCP_CONG_CUBIC=y
+CONFIG_DEFAULT_TCP_CONG="cubic"
+# CONFIG_TCP_MD5SIG is not set
+CONFIG_IPV6=y
+# CONFIG_IPV6_PRIVACY is not set
+# CONFIG_IPV6_ROUTER_PREF is not set
+# CONFIG_IPV6_OPTIMISTIC_DAD is not set
+# CONFIG_INET6_AH is not set
+# CONFIG_INET6_ESP is not set
+# CONFIG_INET6_IPCOMP is not set
+# CONFIG_IPV6_MIP6 is not set
+# CONFIG_INET6_XFRM_TUNNEL is not set
+# CONFIG_INET6_TUNNEL is not set
+CONFIG_INET6_XFRM_MODE_TRANSPORT=y
+CONFIG_INET6_XFRM_MODE_TUNNEL=y
+CONFIG_INET6_XFRM_MODE_BEET=y
+# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set
+CONFIG_IPV6_SIT=y
+CONFIG_IPV6_NDISC_NODETYPE=y
+# CONFIG_IPV6_TUNNEL is not set
+# CONFIG_IPV6_MULTIPLE_TABLES is not set
+# CONFIG_IPV6_MROUTE is not set
+# CONFIG_NETWORK_SECMARK is not set
+# CONFIG_NETFILTER is not set
+# CONFIG_IP_DCCP is not set
+# CONFIG_IP_SCTP is not set
+# CONFIG_RDS is not set
+# CONFIG_TIPC is not set
+# CONFIG_ATM is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_NET_DSA is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_DECNET is not set
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+# CONFIG_PHONET is not set
+# CONFIG_IEEE802154 is not set
+# CONFIG_NET_SCHED is not set
+# CONFIG_DCB is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+# CONFIG_HAMRADIO is not set
+# CONFIG_CAN is not set
+# CONFIG_IRDA is not set
+# CONFIG_BT is not set
+# CONFIG_AF_RXRPC is not set
+CONFIG_WIRELESS=y
+CONFIG_CFG80211=y
+# CONFIG_NL80211_TESTMODE is not set
+# CONFIG_CFG80211_DEVELOPER_WARNINGS is not set
+CONFIG_CFG80211_REG_DEBUG=y
+CONFIG_CFG80211_DEFAULT_PS=y
+CONFIG_CFG80211_DEFAULT_PS_VALUE=1
+CONFIG_WIRELESS_OLD_REGULATORY=y
+CONFIG_WIRELESS_EXT=y
+CONFIG_WIRELESS_EXT_SYSFS=y
+CONFIG_LIB80211=y
+# CONFIG_LIB80211_DEBUG is not set
+CONFIG_MAC80211=y
+CONFIG_MAC80211_RC_MINSTREL=y
+# CONFIG_MAC80211_RC_DEFAULT_PID is not set
+CONFIG_MAC80211_RC_DEFAULT_MINSTREL=y
+CONFIG_MAC80211_RC_DEFAULT="minstrel"
+# CONFIG_MAC80211_MESH is not set
+# CONFIG_MAC80211_LEDS is not set
+# CONFIG_MAC80211_DEBUG_MENU is not set
+# CONFIG_WIMAX is not set
+# CONFIG_RFKILL is not set
+# CONFIG_NET_9P is not set
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
+# CONFIG_DEVTMPFS is not set
+CONFIG_STANDALONE=y
+CONFIG_PREVENT_FIRMWARE_BUILD=y
+CONFIG_FW_LOADER=y
+CONFIG_FIRMWARE_IN_KERNEL=y
+CONFIG_EXTRA_FIRMWARE=""
+# CONFIG_DEBUG_DRIVER is not set
+# CONFIG_DEBUG_DEVRES is not set
+# CONFIG_SYS_HYPERVISOR is not set
+# CONFIG_CONNECTOR is not set
+CONFIG_MTD=y
+# CONFIG_MTD_DEBUG is not set
+# CONFIG_MTD_TESTS is not set
+CONFIG_MTD_CONCAT=y
+CONFIG_MTD_PARTITIONS=y
+# CONFIG_MTD_REDBOOT_PARTS is not set
+# CONFIG_MTD_CMDLINE_PARTS is not set
+# CONFIG_MTD_AFS_PARTS is not set
+# CONFIG_MTD_AR7_PARTS is not set
+
+#
+# User Modules And Translation Layers
+#
+CONFIG_MTD_CHAR=y
+CONFIG_MTD_BLKDEVS=y
+CONFIG_MTD_BLOCK=y
+# CONFIG_FTL is not set
+CONFIG_NFTL=y
+CONFIG_NFTL_RW=y
+# CONFIG_INFTL is not set
+# CONFIG_RFD_FTL is not set
+# CONFIG_SSFDC is not set
+# CONFIG_MTD_OOPS is not set
+
+#
+# RAM/ROM/Flash chip drivers
+#
+# CONFIG_MTD_CFI is not set
+# CONFIG_MTD_JEDECPROBE is not set
+CONFIG_MTD_MAP_BANK_WIDTH_1=y
+CONFIG_MTD_MAP_BANK_WIDTH_2=y
+CONFIG_MTD_MAP_BANK_WIDTH_4=y
+# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
+CONFIG_MTD_CFI_I1=y
+CONFIG_MTD_CFI_I2=y
+# CONFIG_MTD_CFI_I4 is not set
+# CONFIG_MTD_CFI_I8 is not set
+# CONFIG_MTD_RAM is not set
+# CONFIG_MTD_ROM is not set
+# CONFIG_MTD_ABSENT is not set
+
+#
+# Mapping drivers for chip access
+#
+# CONFIG_MTD_COMPLEX_MAPPINGS is not set
+# CONFIG_MTD_PLATRAM is not set
+
+#
+# Self-contained MTD device drivers
+#
+# CONFIG_MTD_DATAFLASH is not set
+# CONFIG_MTD_M25P80 is not set
+# CONFIG_MTD_SST25L is not set
+# CONFIG_MTD_SLRAM is not set
+# CONFIG_MTD_PHRAM is not set
+# CONFIG_MTD_MTDRAM is not set
+CONFIG_MTD_BLOCK2MTD=y
+
+#
+# Disk-On-Chip Device Drivers
+#
+# CONFIG_MTD_DOC2000 is not set
+# CONFIG_MTD_DOC2001 is not set
+# CONFIG_MTD_DOC2001PLUS is not set
+CONFIG_MTD_NAND=y
+# CONFIG_MTD_NAND_VERIFY_WRITE is not set
+# CONFIG_MTD_NAND_ECC_SMC is not set
+# CONFIG_MTD_NAND_MUSEUM_IDS is not set
+# CONFIG_MTD_NAND_H1900 is not set
+# CONFIG_MTD_NAND_GPIO is not set
+CONFIG_MTD_NAND_IDS=y
+# CONFIG_MTD_NAND_DISKONCHIP is not set
+# CONFIG_MTD_NAND_SHARPSL is not set
+CONFIG_MTD_NAND_PXA3xx=y
+# CONFIG_MTD_NAND_PXA3xx_BUILTIN is not set
+# CONFIG_MTD_NAND_NANDSIM is not set
+# CONFIG_MTD_NAND_PLATFORM is not set
+# CONFIG_MTD_ALAUDA is not set
+# CONFIG_MTD_ONENAND is not set
+
+#
+# LPDDR flash memory drivers
+#
+# CONFIG_MTD_LPDDR is not set
+
+#
+# UBI - Unsorted block images
+#
+CONFIG_MTD_UBI=y
+CONFIG_MTD_UBI_WL_THRESHOLD=4096
+CONFIG_MTD_UBI_BEB_RESERVE=1
+# CONFIG_MTD_UBI_GLUEBI is not set
+
+#
+# UBI debugging options
+#
+# CONFIG_MTD_UBI_DEBUG is not set
+# CONFIG_PARPORT is not set
+CONFIG_BLK_DEV=y
+# CONFIG_BLK_DEV_COW_COMMON is not set
+CONFIG_BLK_DEV_LOOP=y
+# CONFIG_BLK_DEV_CRYPTOLOOP is not set
+# CONFIG_BLK_DEV_NBD is not set
+# CONFIG_BLK_DEV_UB is not set
+# CONFIG_BLK_DEV_RAM is not set
+# CONFIG_CDROM_PKTCDVD is not set
+# CONFIG_ATA_OVER_ETH is not set
+# CONFIG_MG_DISK is not set
+CONFIG_MISC_DEVICES=y
+# CONFIG_ICS932S401 is not set
+# CONFIG_ENCLOSURE_SERVICES is not set
+CONFIG_ISL29003=y
+CONFIG_TI_DAC7512=y
+# CONFIG_C2PORT is not set
+
+#
+# EEPROM support
+#
+# CONFIG_EEPROM_AT24 is not set
+# CONFIG_EEPROM_AT25 is not set
+# CONFIG_EEPROM_LEGACY is not set
+# CONFIG_EEPROM_MAX6875 is not set
+# CONFIG_EEPROM_93CX6 is not set
+CONFIG_HAVE_IDE=y
+# CONFIG_IDE is not set
+
+#
+# SCSI device support
+#
+# CONFIG_RAID_ATTRS is not set
+CONFIG_SCSI=y
+CONFIG_SCSI_DMA=y
+# CONFIG_SCSI_TGT is not set
+# CONFIG_SCSI_NETLINK is not set
+CONFIG_SCSI_PROC_FS=y
+
+#
+# SCSI support type (disk, tape, CD-ROM)
+#
+CONFIG_BLK_DEV_SD=y
+# CONFIG_CHR_DEV_ST is not set
+# CONFIG_CHR_DEV_OSST is not set
+# CONFIG_BLK_DEV_SR is not set
+CONFIG_CHR_DEV_SG=y
+# CONFIG_CHR_DEV_SCH is not set
+# CONFIG_SCSI_MULTI_LUN is not set
+# CONFIG_SCSI_CONSTANTS is not set
+# CONFIG_SCSI_LOGGING is not set
+# CONFIG_SCSI_SCAN_ASYNC is not set
+CONFIG_SCSI_WAIT_SCAN=m
+
+#
+# SCSI Transports
+#
+# CONFIG_SCSI_SPI_ATTRS is not set
+# CONFIG_SCSI_FC_ATTRS is not set
+# CONFIG_SCSI_ISCSI_ATTRS is not set
+# CONFIG_SCSI_SAS_LIBSAS is not set
+# CONFIG_SCSI_SRP_ATTRS is not set
+CONFIG_SCSI_LOWLEVEL=y
+# CONFIG_ISCSI_TCP is not set
+# CONFIG_LIBFC is not set
+# CONFIG_LIBFCOE is not set
+# CONFIG_SCSI_DEBUG is not set
+# CONFIG_SCSI_DH is not set
+# CONFIG_SCSI_OSD_INITIATOR is not set
+# CONFIG_ATA is not set
+# CONFIG_MD is not set
+CONFIG_NETDEVICES=y
+# CONFIG_DUMMY is not set
+# CONFIG_BONDING is not set
+# CONFIG_MACVLAN is not set
+# CONFIG_EQUALIZER is not set
+# CONFIG_TUN is not set
+# CONFIG_VETH is not set
+CONFIG_PHYLIB=y
+
+#
+# MII PHY device drivers
+#
+# CONFIG_MARVELL_PHY is not set
+# CONFIG_DAVICOM_PHY is not set
+# CONFIG_QSEMI_PHY is not set
+# CONFIG_LXT_PHY is not set
+# CONFIG_CICADA_PHY is not set
+# CONFIG_VITESSE_PHY is not set
+# CONFIG_SMSC_PHY is not set
+# CONFIG_BROADCOM_PHY is not set
+# CONFIG_ICPLUS_PHY is not set
+# CONFIG_REALTEK_PHY is not set
+# CONFIG_NATIONAL_PHY is not set
+# CONFIG_STE10XP is not set
+# CONFIG_LSI_ET1011C_PHY is not set
+# CONFIG_FIXED_PHY is not set
+# CONFIG_MDIO_BITBANG is not set
+CONFIG_NET_ETHERNET=y
+CONFIG_MII=y
+# CONFIG_AX88796 is not set
+# CONFIG_SMC91X is not set
+# CONFIG_DM9000 is not set
+# CONFIG_ENC28J60 is not set
+# CONFIG_ETHOC is not set
+# CONFIG_SMC911X is not set
+CONFIG_SMSC911X=y
+# CONFIG_DNET is not set
+# CONFIG_IBM_NEW_EMAC_ZMII is not set
+# CONFIG_IBM_NEW_EMAC_RGMII is not set
+# CONFIG_IBM_NEW_EMAC_TAH is not set
+# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
+# CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set
+# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
+# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
+# CONFIG_B44 is not set
+# CONFIG_KS8842 is not set
+# CONFIG_KS8851 is not set
+# CONFIG_KS8851_MLL is not set
+# CONFIG_NETDEV_1000 is not set
+# CONFIG_NETDEV_10000 is not set
+CONFIG_WLAN=y
+# CONFIG_WLAN_PRE80211 is not set
+CONFIG_WLAN_80211=y
+CONFIG_LIBERTAS=y
+# CONFIG_LIBERTAS_USB is not set
+CONFIG_LIBERTAS_SDIO=m
+# CONFIG_LIBERTAS_SPI is not set
+# CONFIG_LIBERTAS_DEBUG is not set
+# CONFIG_LIBERTAS_THINFIRM is not set
+# CONFIG_AT76C50X_USB is not set
+# CONFIG_USB_ZD1201 is not set
+# CONFIG_USB_NET_RNDIS_WLAN is not set
+# CONFIG_RTL8187 is not set
+# CONFIG_MAC80211_HWSIM is not set
+# CONFIG_P54_COMMON is not set
+# CONFIG_ATH_COMMON is not set
+# CONFIG_HOSTAP is not set
+# CONFIG_B43 is not set
+# CONFIG_B43LEGACY is not set
+# CONFIG_ZD1211RW is not set
+# CONFIG_RT2X00 is not set
+# CONFIG_WL12XX is not set
+# CONFIG_IWM is not set
+
+#
+# Enable WiMAX (Networking options) to see the WiMAX drivers
+#
+
+#
+# USB Network Adapters
+#
+# CONFIG_USB_CATC is not set
+# CONFIG_USB_KAWETH is not set
+# CONFIG_USB_PEGASUS is not set
+# CONFIG_USB_RTL8150 is not set
+CONFIG_USB_USBNET=y
+# CONFIG_USB_NET_AX8817X is not set
+CONFIG_USB_NET_CDCETHER=y
+# CONFIG_USB_NET_CDC_EEM is not set
+# CONFIG_USB_NET_DM9601 is not set
+# CONFIG_USB_NET_SMSC95XX is not set
+# CONFIG_USB_NET_GL620A is not set
+# CONFIG_USB_NET_NET1080 is not set
+# CONFIG_USB_NET_PLUSB is not set
+CONFIG_USB_NET_MCS7830=y
+# CONFIG_USB_NET_RNDIS_HOST is not set
+# CONFIG_USB_NET_CDC_SUBSET is not set
+# CONFIG_USB_NET_ZAURUS is not set
+# CONFIG_USB_NET_INT51X1 is not set
+# CONFIG_WAN is not set
+# CONFIG_PPP is not set
+# CONFIG_SLIP is not set
+# CONFIG_NETCONSOLE is not set
+# CONFIG_NETPOLL is not set
+# CONFIG_NET_POLL_CONTROLLER is not set
+# CONFIG_ISDN is not set
+# CONFIG_PHONE is not set
+
+#
+# Input device support
+#
+CONFIG_INPUT=y
+# CONFIG_INPUT_FF_MEMLESS is not set
+CONFIG_INPUT_POLLDEV=y
+
+#
+# Userland interfaces
+#
+CONFIG_INPUT_MOUSEDEV=y
+CONFIG_INPUT_MOUSEDEV_PSAUX=y
+CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
+CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
+# CONFIG_INPUT_JOYDEV is not set
+CONFIG_INPUT_EVDEV=y
+# CONFIG_INPUT_EVBUG is not set
+
+#
+# Input Device Drivers
+#
+CONFIG_INPUT_KEYBOARD=y
+# CONFIG_KEYBOARD_ADP5588 is not set
+CONFIG_KEYBOARD_ATKBD=y
+# CONFIG_QT2160 is not set
+# CONFIG_KEYBOARD_LKKBD is not set
+CONFIG_KEYBOARD_GPIO=y
+# CONFIG_KEYBOARD_MATRIX is not set
+# CONFIG_KEYBOARD_LM8323 is not set
+# CONFIG_KEYBOARD_MAX7359 is not set
+# CONFIG_KEYBOARD_NEWTON is not set
+# CONFIG_KEYBOARD_OPENCORES is not set
+# CONFIG_KEYBOARD_PXA27x is not set
+# CONFIG_KEYBOARD_STOWAWAY is not set
+# CONFIG_KEYBOARD_SUNKBD is not set
+# CONFIG_KEYBOARD_XTKBD is not set
+# CONFIG_INPUT_MOUSE is not set
+# CONFIG_INPUT_JOYSTICK is not set
+# CONFIG_INPUT_TABLET is not set
+CONFIG_INPUT_TOUCHSCREEN=y
+# CONFIG_TOUCHSCREEN_ADS7846 is not set
+# CONFIG_TOUCHSCREEN_AD7877 is not set
+# CONFIG_TOUCHSCREEN_AD7879_I2C is not set
+# CONFIG_TOUCHSCREEN_AD7879_SPI is not set
+# CONFIG_TOUCHSCREEN_AD7879 is not set
+CONFIG_TOUCHSCREEN_EETI=m
+# CONFIG_TOUCHSCREEN_FUJITSU is not set
+# CONFIG_TOUCHSCREEN_GUNZE is not set
+# CONFIG_TOUCHSCREEN_ELO is not set
+# CONFIG_TOUCHSCREEN_WACOM_W8001 is not set
+# CONFIG_TOUCHSCREEN_MCS5000 is not set
+# CONFIG_TOUCHSCREEN_MTOUCH is not set
+# CONFIG_TOUCHSCREEN_INEXIO is not set
+# CONFIG_TOUCHSCREEN_MK712 is not set
+# CONFIG_TOUCHSCREEN_PENMOUNT is not set
+# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set
+# CONFIG_TOUCHSCREEN_TOUCHWIN is not set
+# CONFIG_TOUCHSCREEN_USB_COMPOSITE is not set
+# CONFIG_TOUCHSCREEN_TOUCHIT213 is not set
+# CONFIG_TOUCHSCREEN_TSC2007 is not set
+# CONFIG_TOUCHSCREEN_W90X900 is not set
+CONFIG_INPUT_MISC=y
+# CONFIG_INPUT_ATI_REMOTE is not set
+# CONFIG_INPUT_ATI_REMOTE2 is not set
+# CONFIG_INPUT_KEYSPAN_REMOTE is not set
+# CONFIG_INPUT_POWERMATE is not set
+# CONFIG_INPUT_YEALINK is not set
+# CONFIG_INPUT_CM109 is not set
+# CONFIG_INPUT_UINPUT is not set
+CONFIG_INPUT_GPIO_ROTARY_ENCODER=y
+
+#
+# Hardware I/O ports
+#
+CONFIG_SERIO=y
+CONFIG_SERIO_SERPORT=y
+CONFIG_SERIO_LIBPS2=y
+# CONFIG_SERIO_RAW is not set
+# CONFIG_GAMEPORT is not set
+
+#
+# Character devices
+#
+CONFIG_VT=y
+CONFIG_CONSOLE_TRANSLATIONS=y
+CONFIG_VT_CONSOLE=y
+CONFIG_HW_CONSOLE=y
+# CONFIG_VT_HW_CONSOLE_BINDING is not set
+CONFIG_DEVKMEM=y
+# CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+# CONFIG_SERIAL_8250 is not set
+
+#
+# Non-8250 serial port support
+#
+# CONFIG_SERIAL_MAX3100 is not set
+CONFIG_SERIAL_PXA=y
+CONFIG_SERIAL_PXA_CONSOLE=y
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+CONFIG_UNIX98_PTYS=y
+# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set
+CONFIG_LEGACY_PTYS=y
+CONFIG_LEGACY_PTY_COUNT=256
+# CONFIG_IPMI_HANDLER is not set
+CONFIG_HW_RANDOM=y
+# CONFIG_HW_RANDOM_TIMERIOMEM is not set
+# CONFIG_R3964 is not set
+# CONFIG_RAW_DRIVER is not set
+# CONFIG_TCG_TPM is not set
+CONFIG_I2C=y
+CONFIG_I2C_BOARDINFO=y
+CONFIG_I2C_COMPAT=y
+CONFIG_I2C_CHARDEV=y
+CONFIG_I2C_HELPER_AUTO=y
+
+#
+# I2C Hardware Bus support
+#
+
+#
+# I2C system bus drivers (mostly embedded / system-on-chip)
+#
+# CONFIG_I2C_DESIGNWARE is not set
+# CONFIG_I2C_GPIO is not set
+# CONFIG_I2C_OCORES is not set
+CONFIG_I2C_PXA=y
+# CONFIG_I2C_PXA_SLAVE is not set
+# CONFIG_I2C_SIMTEC is not set
+
+#
+# External I2C/SMBus adapter drivers
+#
+# CONFIG_I2C_PARPORT_LIGHT is not set
+# CONFIG_I2C_TAOS_EVM is not set
+# CONFIG_I2C_TINY_USB is not set
+
+#
+# Other I2C/SMBus bus drivers
+#
+# CONFIG_I2C_PCA_PLATFORM is not set
+# CONFIG_I2C_STUB is not set
+
+#
+# Miscellaneous I2C Chip support
+#
+# CONFIG_DS1682 is not set
+# CONFIG_SENSORS_TSL2550 is not set
+# CONFIG_I2C_DEBUG_CORE is not set
+# CONFIG_I2C_DEBUG_ALGO is not set
+# CONFIG_I2C_DEBUG_BUS is not set
+# CONFIG_I2C_DEBUG_CHIP is not set
+CONFIG_SPI=y
+CONFIG_SPI_DEBUG=y
+CONFIG_SPI_MASTER=y
+
+#
+# SPI Master Controller Drivers
+#
+CONFIG_SPI_BITBANG=y
+CONFIG_SPI_GPIO=y
+# CONFIG_SPI_PXA2XX is not set
+
+#
+# SPI Protocol Masters
+#
+CONFIG_SPI_SPIDEV=y
+# CONFIG_SPI_TLE62X0 is not set
+
+#
+# PPS support
+#
+# CONFIG_PPS is not set
+CONFIG_ARCH_REQUIRE_GPIOLIB=y
+CONFIG_GPIOLIB=y
+CONFIG_DEBUG_GPIO=y
+# CONFIG_GPIO_SYSFS is not set
+
+#
+# Memory mapped GPIO expanders:
+#
+
+#
+# I2C GPIO expanders:
+#
+# CONFIG_GPIO_MAX732X is not set
+# CONFIG_GPIO_PCA953X is not set
+# CONFIG_GPIO_PCF857X is not set
+
+#
+# PCI GPIO expanders:
+#
+
+#
+# SPI GPIO expanders:
+#
+# CONFIG_GPIO_MAX7301 is not set
+# CONFIG_GPIO_MCP23S08 is not set
+# CONFIG_GPIO_MC33880 is not set
+
+#
+# AC97 GPIO expanders:
+#
+CONFIG_W1=m
+
+#
+# 1-wire Bus Masters
+#
+# CONFIG_W1_MASTER_DS2490 is not set
+# CONFIG_W1_MASTER_DS2482 is not set
+# CONFIG_W1_MASTER_DS1WM is not set
+CONFIG_W1_MASTER_GPIO=m
+
+#
+# 1-wire Slaves
+#
+# CONFIG_W1_SLAVE_THERM is not set
+# CONFIG_W1_SLAVE_SMEM is not set
+# CONFIG_W1_SLAVE_DS2431 is not set
+# CONFIG_W1_SLAVE_DS2433 is not set
+CONFIG_W1_SLAVE_DS2760=m
+# CONFIG_W1_SLAVE_BQ27000 is not set
+CONFIG_POWER_SUPPLY=y
+# CONFIG_POWER_SUPPLY_DEBUG is not set
+CONFIG_PDA_POWER=y
+# CONFIG_APM_POWER is not set
+CONFIG_BATTERY_DS2760=m
+# CONFIG_BATTERY_DS2782 is not set
+# CONFIG_BATTERY_BQ27x00 is not set
+# CONFIG_BATTERY_MAX17040 is not set
+CONFIG_HWMON=y
+# CONFIG_HWMON_VID is not set
+# CONFIG_HWMON_DEBUG_CHIP is not set
+
+#
+# Native drivers
+#
+# CONFIG_SENSORS_AD7414 is not set
+# CONFIG_SENSORS_AD7418 is not set
+# CONFIG_SENSORS_ADCXX is not set
+# CONFIG_SENSORS_ADM1021 is not set
+# CONFIG_SENSORS_ADM1025 is not set
+# CONFIG_SENSORS_ADM1026 is not set
+# CONFIG_SENSORS_ADM1029 is not set
+# CONFIG_SENSORS_ADM1031 is not set
+# CONFIG_SENSORS_ADM9240 is not set
+# CONFIG_SENSORS_ADT7462 is not set
+# CONFIG_SENSORS_ADT7470 is not set
+# CONFIG_SENSORS_ADT7473 is not set
+# CONFIG_SENSORS_ADT7475 is not set
+# CONFIG_SENSORS_ATXP1 is not set
+# CONFIG_SENSORS_DS1621 is not set
+# CONFIG_SENSORS_F71805F is not set
+# CONFIG_SENSORS_F71882FG is not set
+# CONFIG_SENSORS_F75375S is not set
+# CONFIG_SENSORS_G760A is not set
+# CONFIG_SENSORS_GL518SM is not set
+# CONFIG_SENSORS_GL520SM is not set
+# CONFIG_SENSORS_IT87 is not set
+# CONFIG_SENSORS_LM63 is not set
+# CONFIG_SENSORS_LM70 is not set
+# CONFIG_SENSORS_LM75 is not set
+# CONFIG_SENSORS_LM77 is not set
+# CONFIG_SENSORS_LM78 is not set
+# CONFIG_SENSORS_LM80 is not set
+# CONFIG_SENSORS_LM83 is not set
+# CONFIG_SENSORS_LM85 is not set
+# CONFIG_SENSORS_LM87 is not set
+# CONFIG_SENSORS_LM90 is not set
+# CONFIG_SENSORS_LM92 is not set
+# CONFIG_SENSORS_LM93 is not set
+# CONFIG_SENSORS_LTC4215 is not set
+# CONFIG_SENSORS_LTC4245 is not set
+# CONFIG_SENSORS_LM95241 is not set
+# CONFIG_SENSORS_MAX1111 is not set
+# CONFIG_SENSORS_MAX1619 is not set
+# CONFIG_SENSORS_MAX6650 is not set
+# CONFIG_SENSORS_PC87360 is not set
+# CONFIG_SENSORS_PC87427 is not set
+# CONFIG_SENSORS_PCF8591 is not set
+# CONFIG_SENSORS_SHT15 is not set
+# CONFIG_SENSORS_DME1737 is not set
+# CONFIG_SENSORS_SMSC47M1 is not set
+# CONFIG_SENSORS_SMSC47M192 is not set
+# CONFIG_SENSORS_SMSC47B397 is not set
+# CONFIG_SENSORS_ADS7828 is not set
+# CONFIG_SENSORS_THMC50 is not set
+# CONFIG_SENSORS_TMP401 is not set
+# CONFIG_SENSORS_TMP421 is not set
+# CONFIG_SENSORS_VT1211 is not set
+# CONFIG_SENSORS_W83781D is not set
+# CONFIG_SENSORS_W83791D is not set
+# CONFIG_SENSORS_W83792D is not set
+# CONFIG_SENSORS_W83793 is not set
+# CONFIG_SENSORS_W83L785TS is not set
+# CONFIG_SENSORS_W83L786NG is not set
+# CONFIG_SENSORS_W83627HF is not set
+# CONFIG_SENSORS_W83627EHF is not set
+CONFIG_SENSORS_LIS3_SPI=y
+# CONFIG_THERMAL is not set
+# CONFIG_WATCHDOG is not set
+CONFIG_SSB_POSSIBLE=y
+
+#
+# Sonics Silicon Backplane
+#
+# CONFIG_SSB is not set
+
+#
+# Multifunction device drivers
+#
+# CONFIG_MFD_CORE is not set
+# CONFIG_MFD_SM501 is not set
+# CONFIG_MFD_ASIC3 is not set
+# CONFIG_HTC_EGPIO is not set
+# CONFIG_HTC_PASIC3 is not set
+# CONFIG_TPS65010 is not set
+# CONFIG_TWL4030_CORE is not set
+# CONFIG_MFD_TMIO is not set
+# CONFIG_MFD_T7L66XB is not set
+# CONFIG_MFD_TC6387XB is not set
+# CONFIG_MFD_TC6393XB is not set
+# CONFIG_PMIC_DA903X is not set
+# CONFIG_MFD_WM8400 is not set
+# CONFIG_MFD_WM831X is not set
+# CONFIG_MFD_WM8350_I2C is not set
+# CONFIG_MFD_PCF50633 is not set
+# CONFIG_MFD_MC13783 is not set
+# CONFIG_AB3100_CORE is not set
+# CONFIG_EZX_PCAP is not set
+CONFIG_REGULATOR=y
+CONFIG_REGULATOR_DEBUG=y
+CONFIG_REGULATOR_FIXED_VOLTAGE=y
+# CONFIG_REGULATOR_VIRTUAL_CONSUMER is not set
+# CONFIG_REGULATOR_USERSPACE_CONSUMER is not set
+# CONFIG_REGULATOR_BQ24022 is not set
+# CONFIG_REGULATOR_MAX1586 is not set
+CONFIG_REGULATOR_MAX8660=y
+# CONFIG_REGULATOR_LP3971 is not set
+# CONFIG_REGULATOR_TPS65023 is not set
+# CONFIG_REGULATOR_TPS6507X is not set
+# CONFIG_MEDIA_SUPPORT is not set
+
+#
+# Graphics support
+#
+# CONFIG_VGASTATE is not set
+# CONFIG_VIDEO_OUTPUT_CONTROL is not set
+CONFIG_FB=y
+# CONFIG_FIRMWARE_EDID is not set
+# CONFIG_FB_DDC is not set
+# CONFIG_FB_BOOT_VESA_SUPPORT is not set
+CONFIG_FB_CFB_FILLRECT=y
+CONFIG_FB_CFB_COPYAREA=y
+CONFIG_FB_CFB_IMAGEBLIT=y
+# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set
+# CONFIG_FB_SYS_FILLRECT is not set
+# CONFIG_FB_SYS_COPYAREA is not set
+# CONFIG_FB_SYS_IMAGEBLIT is not set
+# CONFIG_FB_FOREIGN_ENDIAN is not set
+# CONFIG_FB_SYS_FOPS is not set
+# CONFIG_FB_SVGALIB is not set
+# CONFIG_FB_MACMODES is not set
+# CONFIG_FB_BACKLIGHT is not set
+# CONFIG_FB_MODE_HELPERS is not set
+# CONFIG_FB_TILEBLITTING is not set
+
+#
+# Frame buffer hardware drivers
+#
+# CONFIG_FB_S1D13XXX is not set
+CONFIG_FB_PXA=y
+# CONFIG_FB_PXA_OVERLAY is not set
+# CONFIG_FB_PXA_SMARTPANEL is not set
+# CONFIG_FB_PXA_PARAMETERS is not set
+CONFIG_PXA3XX_GCU=y
+# CONFIG_FB_MBX is not set
+# CONFIG_FB_W100 is not set
+# CONFIG_FB_VIRTUAL is not set
+# CONFIG_FB_METRONOME is not set
+# CONFIG_FB_MB862XX is not set
+# CONFIG_FB_BROADSHEET is not set
+CONFIG_BACKLIGHT_LCD_SUPPORT=y
+# CONFIG_LCD_CLASS_DEVICE is not set
+CONFIG_BACKLIGHT_CLASS_DEVICE=y
+# CONFIG_BACKLIGHT_GENERIC is not set
+CONFIG_BACKLIGHT_PWM=y
+
+#
+# Display device support
+#
+# CONFIG_DISPLAY_SUPPORT is not set
+
+#
+# Console display driver support
+#
+# CONFIG_VGA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set
+# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
+# CONFIG_FONTS is not set
+CONFIG_FONT_8x8=y
+CONFIG_FONT_8x16=y
+CONFIG_LOGO=y
+# CONFIG_LOGO_LINUX_MONO is not set
+# CONFIG_LOGO_LINUX_VGA16 is not set
+# CONFIG_LOGO_LINUX_CLUT224 is not set
+CONFIG_LOGO_RAUMFELD_CLUT224=y
+CONFIG_SOUND=y
+# CONFIG_SOUND_OSS_CORE is not set
+CONFIG_SND=y
+CONFIG_SND_TIMER=y
+CONFIG_SND_PCM=y
+CONFIG_SND_JACK=y
+# CONFIG_SND_SEQUENCER is not set
+# CONFIG_SND_MIXER_OSS is not set
+# CONFIG_SND_PCM_OSS is not set
+# CONFIG_SND_DYNAMIC_MINORS is not set
+CONFIG_SND_SUPPORT_OLD_API=y
+CONFIG_SND_VERBOSE_PROCFS=y
+# CONFIG_SND_VERBOSE_PRINTK is not set
+# CONFIG_SND_DEBUG is not set
+# CONFIG_SND_RAWMIDI_SEQ is not set
+# CONFIG_SND_OPL3_LIB_SEQ is not set
+# CONFIG_SND_OPL4_LIB_SEQ is not set
+# CONFIG_SND_SBAWE_SEQ is not set
+# CONFIG_SND_EMU10K1_SEQ is not set
+# CONFIG_SND_DRIVERS is not set
+CONFIG_SND_ARM=y
+CONFIG_SND_PXA2XX_LIB=y
+# CONFIG_SND_PXA2XX_AC97 is not set
+CONFIG_SND_SPI=y
+# CONFIG_SND_USB is not set
+CONFIG_SND_SOC=y
+CONFIG_SND_PXA2XX_SOC=y
+CONFIG_SND_PXA_SOC_SSP=y
+CONFIG_SND_SOC_RAUMFELD=y
+CONFIG_SND_SOC_I2C_AND_SPI=y
+# CONFIG_SND_SOC_ALL_CODECS is not set
+CONFIG_SND_SOC_AK4104=y
+CONFIG_SND_SOC_CS4270=y
+# CONFIG_SOUND_PRIME is not set
+CONFIG_HID_SUPPORT=y
+CONFIG_HID=y
+# CONFIG_HIDRAW is not set
+
+#
+# USB Input Devices
+#
+CONFIG_USB_HID=y
+# CONFIG_HID_PID is not set
+# CONFIG_USB_HIDDEV is not set
+
+#
+# Special HID drivers
+#
+CONFIG_HID_A4TECH=y
+CONFIG_HID_APPLE=y
+CONFIG_HID_BELKIN=y
+CONFIG_HID_CHERRY=y
+CONFIG_HID_CHICONY=y
+CONFIG_HID_CYPRESS=y
+CONFIG_HID_DRAGONRISE=y
+# CONFIG_DRAGONRISE_FF is not set
+CONFIG_HID_EZKEY=y
+CONFIG_HID_KYE=y
+CONFIG_HID_GYRATION=y
+CONFIG_HID_TWINHAN=y
+CONFIG_HID_KENSINGTON=y
+CONFIG_HID_LOGITECH=y
+# CONFIG_LOGITECH_FF is not set
+# CONFIG_LOGIRUMBLEPAD2_FF is not set
+CONFIG_HID_MICROSOFT=y
+CONFIG_HID_MONTEREY=y
+CONFIG_HID_NTRIG=y
+CONFIG_HID_PANTHERLORD=y
+# CONFIG_PANTHERLORD_FF is not set
+CONFIG_HID_PETALYNX=y
+CONFIG_HID_SAMSUNG=y
+CONFIG_HID_SONY=y
+CONFIG_HID_SUNPLUS=y
+CONFIG_HID_GREENASIA=y
+# CONFIG_GREENASIA_FF is not set
+CONFIG_HID_SMARTJOYPLUS=y
+# CONFIG_SMARTJOYPLUS_FF is not set
+CONFIG_HID_TOPSEED=y
+CONFIG_HID_THRUSTMASTER=y
+# CONFIG_THRUSTMASTER_FF is not set
+CONFIG_HID_ZEROPLUS=y
+# CONFIG_ZEROPLUS_FF is not set
+CONFIG_USB_SUPPORT=y
+CONFIG_USB_ARCH_HAS_HCD=y
+CONFIG_USB_ARCH_HAS_OHCI=y
+# CONFIG_USB_ARCH_HAS_EHCI is not set
+CONFIG_USB=y
+CONFIG_USB_DEBUG=y
+CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
+
+#
+# Miscellaneous USB options
+#
+# CONFIG_USB_DEVICEFS is not set
+CONFIG_USB_DEVICE_CLASS=y
+# CONFIG_USB_DYNAMIC_MINORS is not set
+# CONFIG_USB_SUSPEND is not set
+# CONFIG_USB_OTG is not set
+CONFIG_USB_MON=y
+# CONFIG_USB_WUSB is not set
+# CONFIG_USB_WUSB_CBAF is not set
+
+#
+# USB Host Controller Drivers
+#
+# CONFIG_USB_C67X00_HCD is not set
+# CONFIG_USB_OXU210HP_HCD is not set
+# CONFIG_USB_ISP116X_HCD is not set
+# CONFIG_USB_ISP1760_HCD is not set
+# CONFIG_USB_ISP1362_HCD is not set
+CONFIG_USB_OHCI_HCD=y
+# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
+# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set
+CONFIG_USB_OHCI_LITTLE_ENDIAN=y
+# CONFIG_USB_SL811_HCD is not set
+# CONFIG_USB_R8A66597_HCD is not set
+# CONFIG_USB_HWA_HCD is not set
+# CONFIG_USB_MUSB_HDRC is not set
+
+#
+# USB Device Class drivers
+#
+# CONFIG_USB_ACM is not set
+# CONFIG_USB_PRINTER is not set
+# CONFIG_USB_WDM is not set
+# CONFIG_USB_TMC is not set
+
+#
+# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may
+#
+
+#
+# also be needed; see USB_STORAGE Help for more info
+#
+CONFIG_USB_STORAGE=y
+# CONFIG_USB_STORAGE_DEBUG is not set
+# CONFIG_USB_STORAGE_DATAFAB is not set
+CONFIG_USB_STORAGE_FREECOM=y
+CONFIG_USB_STORAGE_ISD200=y
+CONFIG_USB_STORAGE_USBAT=y
+CONFIG_USB_STORAGE_SDDR09=y
+CONFIG_USB_STORAGE_SDDR55=y
+# CONFIG_USB_STORAGE_JUMPSHOT is not set
+# CONFIG_USB_STORAGE_ALAUDA is not set
+# CONFIG_USB_STORAGE_ONETOUCH is not set
+# CONFIG_USB_STORAGE_KARMA is not set
+# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set
+# CONFIG_USB_LIBUSUAL is not set
+
+#
+# USB Imaging devices
+#
+# CONFIG_USB_MDC800 is not set
+# CONFIG_USB_MICROTEK is not set
+
+#
+# USB port drivers
+#
+# CONFIG_USB_SERIAL is not set
+
+#
+# USB Miscellaneous drivers
+#
+# CONFIG_USB_EMI62 is not set
+# CONFIG_USB_EMI26 is not set
+# CONFIG_USB_ADUTUX is not set
+# CONFIG_USB_SEVSEG is not set
+# CONFIG_USB_RIO500 is not set
+# CONFIG_USB_LEGOTOWER is not set
+# CONFIG_USB_LCD is not set
+# CONFIG_USB_BERRY_CHARGE is not set
+# CONFIG_USB_LED is not set
+# CONFIG_USB_CYPRESS_CY7C63 is not set
+# CONFIG_USB_CYTHERM is not set
+# CONFIG_USB_IDMOUSE is not set
+# CONFIG_USB_FTDI_ELAN is not set
+# CONFIG_USB_APPLEDISPLAY is not set
+# CONFIG_USB_LD is not set
+# CONFIG_USB_TRANCEVIBRATOR is not set
+# CONFIG_USB_IOWARRIOR is not set
+# CONFIG_USB_TEST is not set
+# CONFIG_USB_ISIGHTFW is not set
+# CONFIG_USB_VST is not set
+# CONFIG_USB_GADGET is not set
+
+#
+# OTG and related infrastructure
+#
+# CONFIG_USB_GPIO_VBUS is not set
+# CONFIG_NOP_USB_XCEIV is not set
+CONFIG_MMC=y
+# CONFIG_MMC_DEBUG is not set
+# CONFIG_MMC_UNSAFE_RESUME is not set
+
+#
+# MMC/SD/SDIO Card Drivers
+#
+CONFIG_MMC_BLOCK=y
+CONFIG_MMC_BLOCK_BOUNCE=y
+# CONFIG_SDIO_UART is not set
+# CONFIG_MMC_TEST is not set
+
+#
+# MMC/SD/SDIO Host Controller Drivers
+#
+CONFIG_MMC_PXA=m
+# CONFIG_MMC_SDHCI is not set
+# CONFIG_MMC_AT91 is not set
+# CONFIG_MMC_ATMELMCI is not set
+# CONFIG_MMC_SPI is not set
+# CONFIG_MEMSTICK is not set
+CONFIG_NEW_LEDS=y
+CONFIG_LEDS_CLASS=y
+
+#
+# LED drivers
+#
+# CONFIG_LEDS_PCA9532 is not set
+CONFIG_LEDS_GPIO=y
+CONFIG_LEDS_GPIO_PLATFORM=y
+# CONFIG_LEDS_LP3944 is not set
+# CONFIG_LEDS_PCA955X is not set
+# CONFIG_LEDS_DAC124S085 is not set
+# CONFIG_LEDS_PWM is not set
+# CONFIG_LEDS_BD2802 is not set
+CONFIG_LEDS_LT3593=y
+
+#
+# LED Triggers
+#
+CONFIG_LEDS_TRIGGERS=y
+# CONFIG_LEDS_TRIGGER_TIMER is not set
+# CONFIG_LEDS_TRIGGER_HEARTBEAT is not set
+CONFIG_LEDS_TRIGGER_BACKLIGHT=y
+# CONFIG_LEDS_TRIGGER_GPIO is not set
+# CONFIG_LEDS_TRIGGER_DEFAULT_ON is not set
+
+#
+# iptables trigger is under Netfilter config (LED target)
+#
+# CONFIG_ACCESSIBILITY is not set
+CONFIG_RTC_LIB=y
+CONFIG_RTC_CLASS=y
+CONFIG_RTC_HCTOSYS=y
+CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
+# CONFIG_RTC_DEBUG is not set
+
+#
+# RTC interfaces
+#
+CONFIG_RTC_INTF_SYSFS=y
+CONFIG_RTC_INTF_PROC=y
+CONFIG_RTC_INTF_DEV=y
+# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
+# CONFIG_RTC_DRV_TEST is not set
+
+#
+# I2C RTC drivers
+#
+# CONFIG_RTC_DRV_DS1307 is not set
+# CONFIG_RTC_DRV_DS1374 is not set
+# CONFIG_RTC_DRV_DS1672 is not set
+# CONFIG_RTC_DRV_MAX6900 is not set
+# CONFIG_RTC_DRV_RS5C372 is not set
+# CONFIG_RTC_DRV_ISL1208 is not set
+# CONFIG_RTC_DRV_X1205 is not set
+# CONFIG_RTC_DRV_PCF8563 is not set
+# CONFIG_RTC_DRV_PCF8583 is not set
+# CONFIG_RTC_DRV_M41T80 is not set
+# CONFIG_RTC_DRV_S35390A is not set
+# CONFIG_RTC_DRV_FM3130 is not set
+# CONFIG_RTC_DRV_RX8581 is not set
+# CONFIG_RTC_DRV_RX8025 is not set
+
+#
+# SPI RTC drivers
+#
+# CONFIG_RTC_DRV_M41T94 is not set
+# CONFIG_RTC_DRV_DS1305 is not set
+# CONFIG_RTC_DRV_DS1390 is not set
+# CONFIG_RTC_DRV_MAX6902 is not set
+# CONFIG_RTC_DRV_R9701 is not set
+# CONFIG_RTC_DRV_RS5C348 is not set
+# CONFIG_RTC_DRV_DS3234 is not set
+# CONFIG_RTC_DRV_PCF2123 is not set
+
+#
+# Platform RTC drivers
+#
+# CONFIG_RTC_DRV_CMOS is not set
+# CONFIG_RTC_DRV_DS1286 is not set
+# CONFIG_RTC_DRV_DS1511 is not set
+# CONFIG_RTC_DRV_DS1553 is not set
+# CONFIG_RTC_DRV_DS1742 is not set
+# CONFIG_RTC_DRV_STK17TA8 is not set
+# CONFIG_RTC_DRV_M48T86 is not set
+# CONFIG_RTC_DRV_M48T35 is not set
+# CONFIG_RTC_DRV_M48T59 is not set
+# CONFIG_RTC_DRV_BQ4802 is not set
+# CONFIG_RTC_DRV_V3020 is not set
+
+#
+# on-CPU RTC drivers
+#
+# CONFIG_RTC_DRV_SA1100 is not set
+CONFIG_RTC_DRV_PXA=y
+CONFIG_DMADEVICES=y
+
+#
+# DMA Devices
+#
+# CONFIG_AUXDISPLAY is not set
+CONFIG_UIO=y
+# CONFIG_UIO_PDRV is not set
+# CONFIG_UIO_PDRV_GENIRQ is not set
+# CONFIG_UIO_SMX is not set
+# CONFIG_UIO_SERCOS3 is not set
+
+#
+# TI VLYNQ
+#
+# CONFIG_STAGING is not set
+
+#
+# File systems
+#
+CONFIG_EXT2_FS=y
+# CONFIG_EXT2_FS_XATTR is not set
+CONFIG_EXT2_FS_XIP=y
+CONFIG_EXT3_FS=y
+# CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set
+CONFIG_EXT3_FS_XATTR=y
+# CONFIG_EXT3_FS_POSIX_ACL is not set
+# CONFIG_EXT3_FS_SECURITY is not set
+# CONFIG_EXT4_FS is not set
+CONFIG_FS_XIP=y
+CONFIG_JBD=y
+CONFIG_FS_MBCACHE=y
+# CONFIG_REISERFS_FS is not set
+# CONFIG_JFS_FS is not set
+# CONFIG_FS_POSIX_ACL is not set
+# CONFIG_XFS_FS is not set
+# CONFIG_OCFS2_FS is not set
+# CONFIG_BTRFS_FS is not set
+# CONFIG_NILFS2_FS is not set
+CONFIG_FILE_LOCKING=y
+CONFIG_FSNOTIFY=y
+CONFIG_DNOTIFY=y
+CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
+# CONFIG_QUOTA is not set
+# CONFIG_AUTOFS_FS is not set
+# CONFIG_AUTOFS4_FS is not set
+# CONFIG_FUSE_FS is not set
+
+#
+# Caches
+#
+CONFIG_FSCACHE=y
+CONFIG_FSCACHE_STATS=y
+# CONFIG_FSCACHE_HISTOGRAM is not set
+# CONFIG_FSCACHE_DEBUG is not set
+CONFIG_CACHEFILES=y
+# CONFIG_CACHEFILES_DEBUG is not set
+# CONFIG_CACHEFILES_HISTOGRAM is not set
+
+#
+# CD-ROM/DVD Filesystems
+#
+# CONFIG_ISO9660_FS is not set
+# CONFIG_UDF_FS is not set
+
+#
+# DOS/FAT/NT Filesystems
+#
+CONFIG_FAT_FS=y
+CONFIG_MSDOS_FS=y
+CONFIG_VFAT_FS=y
+CONFIG_FAT_DEFAULT_CODEPAGE=437
+CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
+# CONFIG_NTFS_FS is not set
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+CONFIG_PROC_SYSCTL=y
+CONFIG_PROC_PAGE_MONITOR=y
+CONFIG_SYSFS=y
+CONFIG_TMPFS=y
+# CONFIG_TMPFS_POSIX_ACL is not set
+# CONFIG_HUGETLB_PAGE is not set
+# CONFIG_CONFIGFS_FS is not set
+CONFIG_MISC_FILESYSTEMS=y
+# CONFIG_ADFS_FS is not set
+# CONFIG_AFFS_FS is not set
+# CONFIG_HFS_FS is not set
+# CONFIG_HFSPLUS_FS is not set
+# CONFIG_BEFS_FS is not set
+# CONFIG_BFS_FS is not set
+# CONFIG_EFS_FS is not set
+# CONFIG_JFFS2_FS is not set
+CONFIG_UBIFS_FS=y
+# CONFIG_UBIFS_FS_XATTR is not set
+# CONFIG_UBIFS_FS_ADVANCED_COMPR is not set
+CONFIG_UBIFS_FS_LZO=y
+CONFIG_UBIFS_FS_ZLIB=y
+# CONFIG_UBIFS_FS_DEBUG is not set
+# CONFIG_CRAMFS is not set
+# CONFIG_SQUASHFS is not set
+# CONFIG_VXFS_FS is not set
+# CONFIG_MINIX_FS is not set
+# CONFIG_OMFS_FS is not set
+# CONFIG_HPFS_FS is not set
+# CONFIG_QNX4FS_FS is not set
+# CONFIG_ROMFS_FS is not set
+# CONFIG_SYSV_FS is not set
+# CONFIG_UFS_FS is not set
+CONFIG_NETWORK_FILESYSTEMS=y
+CONFIG_NFS_FS=y
+CONFIG_NFS_V3=y
+# CONFIG_NFS_V3_ACL is not set
+# CONFIG_NFS_V4 is not set
+CONFIG_ROOT_NFS=y
+CONFIG_NFS_FSCACHE=y
+# CONFIG_NFSD is not set
+CONFIG_LOCKD=y
+CONFIG_LOCKD_V4=y
+CONFIG_NFS_COMMON=y
+CONFIG_SUNRPC=y
+# CONFIG_RPCSEC_GSS_KRB5 is not set
+# CONFIG_RPCSEC_GSS_SPKM3 is not set
+# CONFIG_SMB_FS is not set
+# CONFIG_CIFS is not set
+# CONFIG_NCP_FS is not set
+# CONFIG_CODA_FS is not set
+# CONFIG_AFS_FS is not set
+
+#
+# Partition Types
+#
+# CONFIG_PARTITION_ADVANCED is not set
+CONFIG_MSDOS_PARTITION=y
+CONFIG_NLS=y
+CONFIG_NLS_DEFAULT="iso8859-1"
+CONFIG_NLS_CODEPAGE_437=y
+CONFIG_NLS_CODEPAGE_737=y
+CONFIG_NLS_CODEPAGE_775=y
+CONFIG_NLS_CODEPAGE_850=y
+CONFIG_NLS_CODEPAGE_852=y
+CONFIG_NLS_CODEPAGE_855=y
+CONFIG_NLS_CODEPAGE_857=y
+CONFIG_NLS_CODEPAGE_860=y
+CONFIG_NLS_CODEPAGE_861=y
+CONFIG_NLS_CODEPAGE_862=y
+CONFIG_NLS_CODEPAGE_863=y
+CONFIG_NLS_CODEPAGE_864=y
+CONFIG_NLS_CODEPAGE_865=y
+CONFIG_NLS_CODEPAGE_866=y
+CONFIG_NLS_CODEPAGE_869=y
+CONFIG_NLS_CODEPAGE_936=y
+CONFIG_NLS_CODEPAGE_950=y
+CONFIG_NLS_CODEPAGE_932=y
+CONFIG_NLS_CODEPAGE_949=y
+CONFIG_NLS_CODEPAGE_874=y
+CONFIG_NLS_ISO8859_8=y
+CONFIG_NLS_CODEPAGE_1250=y
+CONFIG_NLS_CODEPAGE_1251=y
+CONFIG_NLS_ASCII=y
+CONFIG_NLS_ISO8859_1=y
+CONFIG_NLS_ISO8859_2=y
+CONFIG_NLS_ISO8859_3=y
+CONFIG_NLS_ISO8859_4=y
+CONFIG_NLS_ISO8859_5=y
+CONFIG_NLS_ISO8859_6=y
+CONFIG_NLS_ISO8859_7=y
+CONFIG_NLS_ISO8859_9=y
+CONFIG_NLS_ISO8859_13=y
+CONFIG_NLS_ISO8859_14=y
+CONFIG_NLS_ISO8859_15=y
+CONFIG_NLS_KOI8_R=y
+CONFIG_NLS_KOI8_U=y
+CONFIG_NLS_UTF8=y
+# CONFIG_DLM is not set
+
+#
+# Kernel hacking
+#
+CONFIG_PRINTK_TIME=y
+CONFIG_ENABLE_WARN_DEPRECATED=y
+CONFIG_ENABLE_MUST_CHECK=y
+CONFIG_FRAME_WARN=1024
+# CONFIG_MAGIC_SYSRQ is not set
+# CONFIG_STRIP_ASM_SYMS is not set
+# CONFIG_UNUSED_SYMBOLS is not set
+# CONFIG_DEBUG_FS is not set
+# CONFIG_HEADERS_CHECK is not set
+CONFIG_DEBUG_KERNEL=y
+# CONFIG_DEBUG_SHIRQ is not set
+CONFIG_DETECT_SOFTLOCKUP=y
+# CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set
+CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0
+CONFIG_DETECT_HUNG_TASK=y
+# CONFIG_BOOTPARAM_HUNG_TASK_PANIC is not set
+CONFIG_BOOTPARAM_HUNG_TASK_PANIC_VALUE=0
+CONFIG_SCHED_DEBUG=y
+# CONFIG_SCHEDSTATS is not set
+# CONFIG_TIMER_STATS is not set
+# CONFIG_DEBUG_OBJECTS is not set
+# CONFIG_SLUB_DEBUG_ON is not set
+# CONFIG_SLUB_STATS is not set
+# CONFIG_DEBUG_KMEMLEAK is not set
+# CONFIG_DEBUG_RT_MUTEXES is not set
+# CONFIG_RT_MUTEX_TESTER is not set
+# CONFIG_DEBUG_SPINLOCK is not set
+# CONFIG_DEBUG_MUTEXES is not set
+# CONFIG_DEBUG_LOCK_ALLOC is not set
+# CONFIG_PROVE_LOCKING is not set
+# CONFIG_LOCK_STAT is not set
+# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
+# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
+# CONFIG_DEBUG_KOBJECT is not set
+CONFIG_DEBUG_BUGVERBOSE=y
+CONFIG_DEBUG_INFO=y
+# CONFIG_DEBUG_VM is not set
+# CONFIG_DEBUG_WRITECOUNT is not set
+CONFIG_DEBUG_MEMORY_INIT=y
+# CONFIG_DEBUG_LIST is not set
+# CONFIG_DEBUG_SG is not set
+# CONFIG_DEBUG_NOTIFIERS is not set
+# CONFIG_DEBUG_CREDENTIALS is not set
+# CONFIG_BOOT_PRINTK_DELAY is not set
+# CONFIG_RCU_TORTURE_TEST is not set
+# CONFIG_RCU_CPU_STALL_DETECTOR is not set
+# CONFIG_BACKTRACE_SELF_TEST is not set
+# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set
+# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set
+# CONFIG_FAULT_INJECTION is not set
+# CONFIG_LATENCYTOP is not set
+# CONFIG_SYSCTL_SYSCALL_CHECK is not set
+# CONFIG_PAGE_POISONING is not set
+CONFIG_HAVE_FUNCTION_TRACER=y
+CONFIG_TRACING_SUPPORT=y
+CONFIG_FTRACE=y
+# CONFIG_FUNCTION_TRACER is not set
+# CONFIG_IRQSOFF_TRACER is not set
+# CONFIG_SCHED_TRACER is not set
+# CONFIG_ENABLE_DEFAULT_TRACERS is not set
+# CONFIG_BOOT_TRACER is not set
+CONFIG_BRANCH_PROFILE_NONE=y
+# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set
+# CONFIG_PROFILE_ALL_BRANCHES is not set
+# CONFIG_STACK_TRACER is not set
+# CONFIG_KMEMTRACE is not set
+# CONFIG_WORKQUEUE_TRACER is not set
+# CONFIG_BLK_DEV_IO_TRACE is not set
+# CONFIG_SAMPLES is not set
+CONFIG_HAVE_ARCH_KGDB=y
+# CONFIG_KGDB is not set
+CONFIG_ARM_UNWIND=y
+CONFIG_DEBUG_USER=y
+CONFIG_DEBUG_ERRORS=y
+# CONFIG_DEBUG_STACK_USAGE is not set
+CONFIG_DEBUG_LL=y
+# CONFIG_DEBUG_ICEDCC is not set
+
+#
+# Security options
+#
+# CONFIG_KEYS is not set
+# CONFIG_SECURITY is not set
+# CONFIG_SECURITYFS is not set
+# CONFIG_SECURITY_FILE_CAPABILITIES is not set
+CONFIG_CRYPTO=y
+
+#
+# Crypto core or helper
+#
+CONFIG_CRYPTO_ALGAPI=y
+CONFIG_CRYPTO_ALGAPI2=y
+CONFIG_CRYPTO_AEAD2=y
+CONFIG_CRYPTO_BLKCIPHER=y
+CONFIG_CRYPTO_BLKCIPHER2=y
+CONFIG_CRYPTO_HASH2=y
+CONFIG_CRYPTO_RNG2=y
+CONFIG_CRYPTO_PCOMP=y
+CONFIG_CRYPTO_MANAGER=y
+CONFIG_CRYPTO_MANAGER2=y
+# CONFIG_CRYPTO_GF128MUL is not set
+# CONFIG_CRYPTO_NULL is not set
+CONFIG_CRYPTO_WORKQUEUE=y
+# CONFIG_CRYPTO_CRYPTD is not set
+# CONFIG_CRYPTO_AUTHENC is not set
+# CONFIG_CRYPTO_TEST is not set
+
+#
+# Authenticated Encryption with Associated Data
+#
+# CONFIG_CRYPTO_CCM is not set
+# CONFIG_CRYPTO_GCM is not set
+# CONFIG_CRYPTO_SEQIV is not set
+
+#
+# Block modes
+#
+# CONFIG_CRYPTO_CBC is not set
+# CONFIG_CRYPTO_CTR is not set
+# CONFIG_CRYPTO_CTS is not set
+CONFIG_CRYPTO_ECB=y
+# CONFIG_CRYPTO_LRW is not set
+# CONFIG_CRYPTO_PCBC is not set
+# CONFIG_CRYPTO_XTS is not set
+
+#
+# Hash modes
+#
+# CONFIG_CRYPTO_HMAC is not set
+# CONFIG_CRYPTO_XCBC is not set
+# CONFIG_CRYPTO_VMAC is not set
+
+#
+# Digest
+#
+# CONFIG_CRYPTO_CRC32C is not set
+# CONFIG_CRYPTO_GHASH is not set
+# CONFIG_CRYPTO_MD4 is not set
+# CONFIG_CRYPTO_MD5 is not set
+# CONFIG_CRYPTO_MICHAEL_MIC is not set
+# CONFIG_CRYPTO_RMD128 is not set
+# CONFIG_CRYPTO_RMD160 is not set
+# CONFIG_CRYPTO_RMD256 is not set
+# CONFIG_CRYPTO_RMD320 is not set
+# CONFIG_CRYPTO_SHA1 is not set
+# CONFIG_CRYPTO_SHA256 is not set
+# CONFIG_CRYPTO_SHA512 is not set
+# CONFIG_CRYPTO_TGR192 is not set
+# CONFIG_CRYPTO_WP512 is not set
+
+#
+# Ciphers
+#
+CONFIG_CRYPTO_AES=y
+# CONFIG_CRYPTO_ANUBIS is not set
+CONFIG_CRYPTO_ARC4=y
+# CONFIG_CRYPTO_BLOWFISH is not set
+# CONFIG_CRYPTO_CAMELLIA is not set
+# CONFIG_CRYPTO_CAST5 is not set
+# CONFIG_CRYPTO_CAST6 is not set
+# CONFIG_CRYPTO_DES is not set
+# CONFIG_CRYPTO_FCRYPT is not set
+# CONFIG_CRYPTO_KHAZAD is not set
+# CONFIG_CRYPTO_SALSA20 is not set
+# CONFIG_CRYPTO_SEED is not set
+# CONFIG_CRYPTO_SERPENT is not set
+# CONFIG_CRYPTO_TEA is not set
+# CONFIG_CRYPTO_TWOFISH is not set
+
+#
+# Compression
+#
+CONFIG_CRYPTO_DEFLATE=y
+# CONFIG_CRYPTO_ZLIB is not set
+CONFIG_CRYPTO_LZO=y
+
+#
+# Random Number Generation
+#
+# CONFIG_CRYPTO_ANSI_CPRNG is not set
+# CONFIG_CRYPTO_HW is not set
+# CONFIG_BINARY_PRINTF is not set
+
+#
+# Library routines
+#
+CONFIG_BITREVERSE=y
+CONFIG_GENERIC_FIND_LAST_BIT=y
+# CONFIG_CRC_CCITT is not set
+CONFIG_CRC16=y
+# CONFIG_CRC_T10DIF is not set
+# CONFIG_CRC_ITU_T is not set
+CONFIG_CRC32=y
+# CONFIG_CRC7 is not set
+# CONFIG_LIBCRC32C is not set
+CONFIG_ZLIB_INFLATE=y
+CONFIG_ZLIB_DEFLATE=y
+CONFIG_LZO_COMPRESS=y
+CONFIG_LZO_DECOMPRESS=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
+CONFIG_HAS_DMA=y
+CONFIG_NLATTR=y
-- 
1.6.5.2

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

* Re: [PATCH 16/17] ALSA: ARM: add Raumfeld audio support
  2009-11-25 10:42   ` Daniel Mack
@ 2009-11-25 11:02     ` Mark Brown
  -1 siblings, 0 replies; 51+ messages in thread
From: Mark Brown @ 2009-11-25 11:02 UTC (permalink / raw)
  To: Daniel Mack; +Cc: alsa-devel, eric.y.miao, linux-arm-kernel

On Wed, Nov 25, 2009 at 11:42:30AM +0100, Daniel Mack wrote:

> +static struct i2c_board_info max9486_hwmon_info = {
> +	I2C_BOARD_INFO("max9485", 0x63),
> +};

This should be in the board file under arch/arm.

> +extern void raumfeld_enable_audio(bool en);

This should be in a proper header file somewhere.

> +static void raumfeld_cs4270_shutdown(struct snd_pcm_substream *substream)
> +{
> +}
> +

Remove this and the other empty functions.

> +	case 96000:
> +		set_max9485_clk(1);

It might be a bit more legible to have some constants for the arguments
for this function - it's not entirely clear what's going on, the 1 and 0
look like a boolean but that's not what's really going on here.  It may
be better to do this as a proper driver, there was at least one driver I
remember being posted for a TDM clock generator which I think got
merged.

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

* [PATCH 16/17] ALSA: ARM: add Raumfeld audio support
@ 2009-11-25 11:02     ` Mark Brown
  0 siblings, 0 replies; 51+ messages in thread
From: Mark Brown @ 2009-11-25 11:02 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Nov 25, 2009 at 11:42:30AM +0100, Daniel Mack wrote:

> +static struct i2c_board_info max9486_hwmon_info = {
> +	I2C_BOARD_INFO("max9485", 0x63),
> +};

This should be in the board file under arch/arm.

> +extern void raumfeld_enable_audio(bool en);

This should be in a proper header file somewhere.

> +static void raumfeld_cs4270_shutdown(struct snd_pcm_substream *substream)
> +{
> +}
> +

Remove this and the other empty functions.

> +	case 96000:
> +		set_max9485_clk(1);

It might be a bit more legible to have some constants for the arguments
for this function - it's not entirely clear what's going on, the 1 and 0
look like a boolean but that's not what's really going on here.  It may
be better to do this as a proper driver, there was at least one driver I
remember being posted for a TDM clock generator which I think got
merged.

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

* ARM: pxa: add support for Raumfeld audio devices
  2009-11-25 10:42 ARM: pxa: add support for Raumfeld audio devices Daniel Mack
                   ` (16 preceding siblings ...)
  2009-11-25 10:42 ` [PATCH 17/17] ARM: pxa/raumfeld: Add defconfig Daniel Mack
@ 2009-11-25 11:27 ` Mike Rapoport
  2009-11-25 12:14   ` Daniel Mack
  17 siblings, 1 reply; 51+ messages in thread
From: Mike Rapoport @ 2009-11-25 11:27 UTC (permalink / raw)
  To: linux-arm-kernel

Daniel,

Daniel Mack wrote:
> Hi,
> 
> Here is a series of 17 patches to support the multiroom audio devices
> produced and sold by Raumfeld. The kernel is based on mainline, and all
> other pieces needed by these devices have already been submitted over
> the last months.
> 
> What was still missing is the board support code which I would like to
> let it life in the mainline git, too. The series is based on top of
> Eric's pxa-devel tree.
> 
> For more information about the hardware, see http://www.raumfeld.com/en/
> 
> If that's still possible, I'd be happy if they could make it to 2.6.33.
> 
> Please note that one patch depends on the MAX8660 power regulator driver
> which I cherry-picked in my tree. As there's need for a special include
> file, I don't know what the best way would be to avoid build breakage.
> Maybe queue it for 2.6.33-rc2, after the regulator tree has been merged?
> 
> Daniel
> 
> [PATCH 01/17] ARM: pxa/raumfeld: add basic structure for devices
> [PATCH 02/17] ARM: pxa/raumfeld: add GPIO definitions
> [PATCH 03/17] ARM: pxa/raumfeld: add SMSC9220 ethernet support
> [PATCH 04/17] ARM: pxa/raumfeld: add OHCI function
> [PATCH 05/17] ARM: pxa/raumfeld: add rotary encoder support
> [PATCH 06/17] ARM: pxa/raumfeld: add GPIO buttons
> [PATCH 07/17] ARM: pxa/raumfeld: add GPIO connected LEDs
> [PATCH 08/17] ARM: pxa/raumfeld: add one-wire function
> [PATCH 09/17] ARM: pxa/raumfeld: add NAND partitions
> [PATCH 10/17] ARM: pxa/raumfeld: add framebuffer and backlight devices
> [PATCH 11/17] ARM: pxa/raumfeld: add SPI controlled devices
> [PATCH 12/17] ARM: pxa/raumfeld: add audio related functions
> [PATCH 13/17] ARM: pxa/raumfeld: add Marvell Libertas via SDIO
> [PATCH 14/17] ARM: pxa/raumfeld: add power supply framework
> [PATCH 15/17] ARM: pxa/raumfeld: add support for I2C controlled devices
> [PATCH 16/17] ALSA: ARM: add Raumfeld audio support
> [PATCH 17/17] ARM: pxa/raumfeld: Add defconfig

I don't know what about others, but I find it difficult to follow too many small
patches. I'd personally prefer to have
"[PATCH 1/2] ARM: pxa: add raumfeld board support"
"[PATCH 1/2] ARM: pxa/raumfeld: add defconfig"

Once again, it's my personal preference :)

> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
> 

-- 
Sincerely yours,
Mike.

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

* [PATCH 12/17] ARM: pxa/raumfeld: add audio related functions
  2009-11-25 10:42 ` [PATCH 12/17] ARM: pxa/raumfeld: add audio related functions Daniel Mack
@ 2009-11-25 11:41   ` Mark Brown
  2009-11-25 12:28     ` Daniel Mack
  2009-11-25 17:07   ` Russell King - ARM Linux
  1 sibling, 1 reply; 51+ messages in thread
From: Mark Brown @ 2009-11-25 11:41 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Nov 25, 2009 at 11:42:26AM +0100, Daniel Mack wrote:

> +	if (en) {
> +		gpio_set_value(mfp_to_gpio(GPIO_AUDIO_VA_ENABLE), 1);

This looks like you want to add regulator support to the CODEC.

> +		gpio_set_value(mfp_to_gpio(GPIO_MCLK_RESET), 1);
> +
> +		/* wait some time to let VA and the clocks become stable */
> +		schedule_timeout(HZ/10);
> +
> +		gpio_set_value(mfp_to_gpio(GPIO_SPDIF_RESET), 1);
> +		gpio_set_value(mfp_to_gpio(GPIO_CODEC_RESET), 1);

The relevant drivers really need to know about this...  if you are going
to stick with this approach I'd push all this stuff into the audio
driver, splitting it into this separate file isn't really buying
anything since it's all machine specific and nothing except the audio
driver needs to know what's going on.

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

* [PATCH 13/17] ARM: pxa/raumfeld: add Marvell Libertas via SDIO
  2009-11-25 10:42 ` [PATCH 13/17] ARM: pxa/raumfeld: add Marvell Libertas via SDIO Daniel Mack
@ 2009-11-25 11:49   ` Mark Brown
  2009-11-25 13:04     ` Daniel Mack
  0 siblings, 1 reply; 51+ messages in thread
From: Mark Brown @ 2009-11-25 11:49 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Nov 25, 2009 at 11:42:27AM +0100, Daniel Mack wrote:

> +#include <linux/regulator/consumer.h>

The regulator consumer stuff here feels like it'd be better put into the
driver itself since it doesn't seem to be specific to the machine -
other machines could use the same glue with different machine setup.

> +static void raumfeld_mci_setpower(struct device *dev, unsigned int on)
> +{
> +	int ret = 0;
> +	struct regulator *regulator = regulator_get(dev, "vcc_wifi");

Don't do this, take one reference to the regulaor at startup and then
use that throughout the lifetime of the sysetm.  If you don't do that
then the API may decide that the regulator is idle and disable it for
you.

I suspect that supply name might want to be just plain "vcc" unless the
chip really does have a single supply labelled as vcc_wifi - the name
should ideally match that used in the datasheet.

> +
> +	/* bring up V6 for SDIO/WLAN */
> +	if (IS_ERR(regulator)) {
> +		printk(KERN_ERR "%s(): unable to get regulator. err = %ld\n",
> +			__func__, PTR_ERR(regulator));
> +		return;
> +	}
> +
> +	if (on && !regulator_is_enabled(regulator)) {
> +		ret = regulator_enable(regulator);

Nack, if you're doing regulator_get() you should never need to check
regulator_is_enabled() since you can't know if something else is
incrementing or decrementing the reference count independantly of you.
Either use regulator_get_exclusive() (at which point you own the
regulator) or keep track of the on/off switch yourself.

> +		if (!ret)
> +			ret = regulator_set_voltage(regulator,
> +					WIFI_VOLTAGE, WIFI_VOLTAGE);

It'd be better to do this before enabling the regulator to ensure that
the regulator comes up with the appropriate supply voltage set and
doesn't upset the chip.

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

* ARM: pxa: add support for Raumfeld audio devices
  2009-11-25 11:27 ` ARM: pxa: add support for Raumfeld audio devices Mike Rapoport
@ 2009-11-25 12:14   ` Daniel Mack
  0 siblings, 0 replies; 51+ messages in thread
From: Daniel Mack @ 2009-11-25 12:14 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Nov 25, 2009 at 01:27:52PM +0200, Mike Rapoport wrote:
> Daniel Mack wrote:
> > [PATCH 01/17] ARM: pxa/raumfeld: add basic structure for devices
> > [PATCH 02/17] ARM: pxa/raumfeld: add GPIO definitions
> > [PATCH 03/17] ARM: pxa/raumfeld: add SMSC9220 ethernet support
> > [PATCH 04/17] ARM: pxa/raumfeld: add OHCI function
> > [PATCH 05/17] ARM: pxa/raumfeld: add rotary encoder support
> > [PATCH 06/17] ARM: pxa/raumfeld: add GPIO buttons
> > [PATCH 07/17] ARM: pxa/raumfeld: add GPIO connected LEDs
> > [PATCH 08/17] ARM: pxa/raumfeld: add one-wire function
> > [PATCH 09/17] ARM: pxa/raumfeld: add NAND partitions
> > [PATCH 10/17] ARM: pxa/raumfeld: add framebuffer and backlight devices
> > [PATCH 11/17] ARM: pxa/raumfeld: add SPI controlled devices
> > [PATCH 12/17] ARM: pxa/raumfeld: add audio related functions
> > [PATCH 13/17] ARM: pxa/raumfeld: add Marvell Libertas via SDIO
> > [PATCH 14/17] ARM: pxa/raumfeld: add power supply framework
> > [PATCH 15/17] ARM: pxa/raumfeld: add support for I2C controlled devices
> > [PATCH 16/17] ALSA: ARM: add Raumfeld audio support
> > [PATCH 17/17] ARM: pxa/raumfeld: Add defconfig
> 
> I don't know what about others, but I find it difficult to follow too many small
> patches. I'd personally prefer to have
> "[PATCH 1/2] ARM: pxa: add raumfeld board support"
> "[PATCH 1/2] ARM: pxa/raumfeld: add defconfig"
> 
> Once again, it's my personal preference :)

Well, I was told it is a lot easier to review patches when they're
split up in smaller pieces. However, I would be fine if they are
squashed when merged :)

Daniel

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

* Re: [PATCH 16/17] ALSA: ARM: add Raumfeld audio support
  2009-11-25 11:02     ` Mark Brown
@ 2009-11-25 12:24       ` Daniel Mack
  -1 siblings, 0 replies; 51+ messages in thread
From: Daniel Mack @ 2009-11-25 12:24 UTC (permalink / raw)
  To: Mark Brown; +Cc: alsa-devel, eric.y.miao, linux-arm-kernel

On Wed, Nov 25, 2009 at 11:02:18AM +0000, Mark Brown wrote:
> 
> > +static struct i2c_board_info max9486_hwmon_info = {
> > +	I2C_BOARD_INFO("max9485", 0x63),
> > +};
> 
> This should be in the board file under arch/arm.

Well, the problem is that if I do it there, I don't get a handle for the
actual data transfer, which I now get from i2c_new_device(). There is no
driver matching this device (it wasn't taken because it's 'too simple').

How would I get a handle to pass to i2c_master_send() or an equivalent
function?

> > +extern void raumfeld_enable_audio(bool en);
> 
> This should be in a proper header file somewhere.

Hmm, I thought so too, but it would be the only thing to add there.
Hence I decided to not do that. You really prefer that?

> > +static void raumfeld_cs4270_shutdown(struct snd_pcm_substream *substream)
> > +{
> > +}
> > +
> 
> Remove this and the other empty functions.

Hmm, I tried that and it crashed the kernel. I will check again as that
was some month ago.

> > +	case 96000:
> > +		set_max9485_clk(1);
> 
> It might be a bit more legible to have some constants for the arguments
> for this function - it's not entirely clear what's going on, the 1 and 0
> look like a boolean but that's not what's really going on here.  It may
> be better to do this as a proper driver, there was at least one driver I
> remember being posted for a TDM clock generator which I think got
> merged.

No, it wasn't.

  http://marc.info/?l=linux-i2c&m=122457836326525&w=2

Jean Delvare's last comment on this was:

> Honestly I don't see any value in this driver. There's nothing you can
> do with it that you couldn't already do without it.

The driver itself would do the right thing, but I doubt that
resubmitting will help much.

Daniel

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

* [PATCH 16/17] ALSA: ARM: add Raumfeld audio support
@ 2009-11-25 12:24       ` Daniel Mack
  0 siblings, 0 replies; 51+ messages in thread
From: Daniel Mack @ 2009-11-25 12:24 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Nov 25, 2009 at 11:02:18AM +0000, Mark Brown wrote:
> 
> > +static struct i2c_board_info max9486_hwmon_info = {
> > +	I2C_BOARD_INFO("max9485", 0x63),
> > +};
> 
> This should be in the board file under arch/arm.

Well, the problem is that if I do it there, I don't get a handle for the
actual data transfer, which I now get from i2c_new_device(). There is no
driver matching this device (it wasn't taken because it's 'too simple').

How would I get a handle to pass to i2c_master_send() or an equivalent
function?

> > +extern void raumfeld_enable_audio(bool en);
> 
> This should be in a proper header file somewhere.

Hmm, I thought so too, but it would be the only thing to add there.
Hence I decided to not do that. You really prefer that?

> > +static void raumfeld_cs4270_shutdown(struct snd_pcm_substream *substream)
> > +{
> > +}
> > +
> 
> Remove this and the other empty functions.

Hmm, I tried that and it crashed the kernel. I will check again as that
was some month ago.

> > +	case 96000:
> > +		set_max9485_clk(1);
> 
> It might be a bit more legible to have some constants for the arguments
> for this function - it's not entirely clear what's going on, the 1 and 0
> look like a boolean but that's not what's really going on here.  It may
> be better to do this as a proper driver, there was at least one driver I
> remember being posted for a TDM clock generator which I think got
> merged.

No, it wasn't.

  http://marc.info/?l=linux-i2c&m=122457836326525&w=2

Jean Delvare's last comment on this was:

> Honestly I don't see any value in this driver. There's nothing you can
> do with it that you couldn't already do without it.

The driver itself would do the right thing, but I doubt that
resubmitting will help much.

Daniel

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

* [PATCH 12/17] ARM: pxa/raumfeld: add audio related functions
  2009-11-25 11:41   ` Mark Brown
@ 2009-11-25 12:28     ` Daniel Mack
  2009-11-25 13:07       ` Mark Brown
  0 siblings, 1 reply; 51+ messages in thread
From: Daniel Mack @ 2009-11-25 12:28 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Nov 25, 2009 at 11:41:07AM +0000, Mark Brown wrote:
> On Wed, Nov 25, 2009 at 11:42:26AM +0100, Daniel Mack wrote:
> 
> > +	if (en) {
> > +		gpio_set_value(mfp_to_gpio(GPIO_AUDIO_VA_ENABLE), 1);
> 
> This looks like you want to add regulator support to the CODEC.

Well, that's not really a regulator but just a GPIO that drives a FET.
Doesn't using the regulator framework seem a little overdone?

> > +		gpio_set_value(mfp_to_gpio(GPIO_MCLK_RESET), 1);
> > +
> > +		/* wait some time to let VA and the clocks become stable */
> > +		schedule_timeout(HZ/10);
> > +
> > +		gpio_set_value(mfp_to_gpio(GPIO_SPDIF_RESET), 1);
> > +		gpio_set_value(mfp_to_gpio(GPIO_CODEC_RESET), 1);
> 
> The relevant drivers really need to know about this...  if you are going
> to stick with this approach I'd push all this stuff into the audio
> driver, splitting it into this separate file isn't really buying
> anything since it's all machine specific and nothing except the audio
> driver needs to know what's going on.

The idea was to only let the board support file know about GPIO
definitions, so the audio part doesn't need to know about the details.
But I can move that if you like. However, I don't see much benefit - I
would merely just move the whole function over.

Daniel

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

* [PATCH 13/17] ARM: pxa/raumfeld: add Marvell Libertas via SDIO
  2009-11-25 11:49   ` Mark Brown
@ 2009-11-25 13:04     ` Daniel Mack
  2009-11-25 13:36       ` Mark Brown
  0 siblings, 1 reply; 51+ messages in thread
From: Daniel Mack @ 2009-11-25 13:04 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Nov 25, 2009 at 11:49:47AM +0000, Mark Brown wrote:
> On Wed, Nov 25, 2009 at 11:42:27AM +0100, Daniel Mack wrote:
> 
> > +#include <linux/regulator/consumer.h>
> 
> The regulator consumer stuff here feels like it'd be better put into the
> driver itself since it doesn't seem to be specific to the machine -
> other machines could use the same glue with different machine setup.

AH, the pxamci driver already does that. So I'll just name the supply
'vmmc' and that's it. Will test that soon.

> > +static void raumfeld_mci_setpower(struct device *dev, unsigned int on)
> > +{
> > +	int ret = 0;
> > +	struct regulator *regulator = regulator_get(dev, "vcc_wifi");
> 
> Don't do this, take one reference to the regulaor at startup and then
> use that throughout the lifetime of the sysetm.  If you don't do that
> then the API may decide that the regulator is idle and disable it for
> you.
> 
> I suspect that supply name might want to be just plain "vcc" unless the
> chip really does have a single supply labelled as vcc_wifi - the name
> should ideally match that used in the datasheet.
> 
> > +
> > +	/* bring up V6 for SDIO/WLAN */
> > +	if (IS_ERR(regulator)) {
> > +		printk(KERN_ERR "%s(): unable to get regulator. err = %ld\n",
> > +			__func__, PTR_ERR(regulator));
> > +		return;
> > +	}
> > +
> > +	if (on && !regulator_is_enabled(regulator)) {
> > +		ret = regulator_enable(regulator);
> 
> Nack, if you're doing regulator_get() you should never need to check
> regulator_is_enabled() since you can't know if something else is
> incrementing or decrementing the reference count independantly of you.
> Either use regulator_get_exclusive() (at which point you own the
> regulator) or keep track of the on/off switch yourself.

The issue I was facing here was that the mmc power enable callback was
called more than once with the same value for 'on', so the calls were
not balanced and the regulator driver bailed.

Anyway, that will all go away when letting the driver do the regultar
calls. Thanks for explaining that.

Daniel

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

* [PATCH 12/17] ARM: pxa/raumfeld: add audio related functions
  2009-11-25 12:28     ` Daniel Mack
@ 2009-11-25 13:07       ` Mark Brown
  2009-11-25 13:53         ` Daniel Mack
  0 siblings, 1 reply; 51+ messages in thread
From: Mark Brown @ 2009-11-25 13:07 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Nov 25, 2009 at 01:28:57PM +0100, Daniel Mack wrote:
> On Wed, Nov 25, 2009 at 11:41:07AM +0000, Mark Brown wrote:
> > On Wed, Nov 25, 2009 at 11:42:26AM +0100, Daniel Mack wrote:

> > > +	if (en) {
> > > +		gpio_set_value(mfp_to_gpio(GPIO_AUDIO_VA_ENABLE), 1);

> > This looks like you want to add regulator support to the CODEC.

> Well, that's not really a regulator but just a GPIO that drives a FET.
> Doesn't using the regulator framework seem a little overdone?

No, the main goal here is to make sure the CODEC driver knows what's
going on with its power.  In your system it is a trivial GPIO based
regulator that's doing the power control but other systems might have
something different.  Looking at it from the other angle, nothing about
powering on and off the CODEC ought to be board specific.

I do also have a plan in the back of my mind to use the runtime PM
infrastructure to allow ASoC to push things down into BIAS_OFF when
they're idle rather than just BIAS_STANDBY which this won't play well
with.

> > The relevant drivers really need to know about this...  if you are going
> > to stick with this approach I'd push all this stuff into the audio

> The idea was to only let the board support file know about GPIO
> definitions, so the audio part doesn't need to know about the details.

The audio driver is already entirely board specific, knowing about the
GPIOs isn't going to make any odds here.  At the minute reading the
code it looks like part of the audio driver has randomly been lifted out
into a separate file for no particular reason.

> But I can move that if you like. However, I don't see much benefit - I
> would merely just move the whole function over.

If nothing else it'll fix the extern in a .c file issue.

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

* Re: [PATCH 16/17] ALSA: ARM: add Raumfeld audio support
  2009-11-25 12:24       ` Daniel Mack
@ 2009-11-25 13:29         ` Mark Brown
  -1 siblings, 0 replies; 51+ messages in thread
From: Mark Brown @ 2009-11-25 13:29 UTC (permalink / raw)
  To: Daniel Mack; +Cc: alsa-devel, eric.y.miao, linux-arm-kernel

On Wed, Nov 25, 2009 at 01:24:36PM +0100, Daniel Mack wrote:
> On Wed, Nov 25, 2009 at 11:02:18AM +0000, Mark Brown wrote:

> > > +static struct i2c_board_info max9486_hwmon_info = {
> > > +	I2C_BOARD_INFO("max9485", 0x63),
> > > +};

> > This should be in the board file under arch/arm.

> Well, the problem is that if I do it there, I don't get a handle for the
> actual data transfer, which I now get from i2c_new_device(). There is no
> driver matching this device (it wasn't taken because it's 'too simple').

> How would I get a handle to pass to i2c_master_send() or an equivalent
> function?

In the same way as any other I2C driver would?

> > > +extern void raumfeld_enable_audio(bool en);

> > This should be in a proper header file somewhere.

> Hmm, I thought so too, but it would be the only thing to add there.
> Hence I decided to not do that. You really prefer that?

Well, see my other comments once I found the actual implementation of
the function but yes - bad practice is bad practice.

> > Remove this and the other empty functions.

> Hmm, I tried that and it crashed the kernel. I will check again as that
> was some month ago.

If this were required then almost all machine drivers would be buggy...

> > look like a boolean but that's not what's really going on here.  It may
> > be better to do this as a proper driver, there was at least one driver I
> > remember being posted for a TDM clock generator which I think got
> > merged.

> No, it wasn't.

There was at least one unrelated driver for a different part - I
remember the discussion since someone needed to explain to people (Alan
Cox, I think) that this wasn't an RTC but rather a TDM clock generator.

>   http://marc.info/?l=linux-i2c&m=122457836326525&w=2

> Jean Delvare's last comment on this was:

> > Honestly I don't see any value in this driver. There's nothing you can
> > do with it that you couldn't already do without it.

> The driver itself would do the right thing, but I doubt that
> resubmitting will help much.

Looking at the thread in the archive I don't see any effort to answer
Jean's question there - the reply from Jon talks about device tree
binding which is, as Jean says, pretty much irrelevant to the question:

   http://marc.info/?l=linux-i2c&m=122465761327694&w=2

The question seemed to be more about what the driver was supposed to
accomplish - talking about the functionality is provided by the driver
once it's bound to the device should address that.

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

* [PATCH 16/17] ALSA: ARM: add Raumfeld audio support
@ 2009-11-25 13:29         ` Mark Brown
  0 siblings, 0 replies; 51+ messages in thread
From: Mark Brown @ 2009-11-25 13:29 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Nov 25, 2009 at 01:24:36PM +0100, Daniel Mack wrote:
> On Wed, Nov 25, 2009 at 11:02:18AM +0000, Mark Brown wrote:

> > > +static struct i2c_board_info max9486_hwmon_info = {
> > > +	I2C_BOARD_INFO("max9485", 0x63),
> > > +};

> > This should be in the board file under arch/arm.

> Well, the problem is that if I do it there, I don't get a handle for the
> actual data transfer, which I now get from i2c_new_device(). There is no
> driver matching this device (it wasn't taken because it's 'too simple').

> How would I get a handle to pass to i2c_master_send() or an equivalent
> function?

In the same way as any other I2C driver would?

> > > +extern void raumfeld_enable_audio(bool en);

> > This should be in a proper header file somewhere.

> Hmm, I thought so too, but it would be the only thing to add there.
> Hence I decided to not do that. You really prefer that?

Well, see my other comments once I found the actual implementation of
the function but yes - bad practice is bad practice.

> > Remove this and the other empty functions.

> Hmm, I tried that and it crashed the kernel. I will check again as that
> was some month ago.

If this were required then almost all machine drivers would be buggy...

> > look like a boolean but that's not what's really going on here.  It may
> > be better to do this as a proper driver, there was at least one driver I
> > remember being posted for a TDM clock generator which I think got
> > merged.

> No, it wasn't.

There was at least one unrelated driver for a different part - I
remember the discussion since someone needed to explain to people (Alan
Cox, I think) that this wasn't an RTC but rather a TDM clock generator.

>   http://marc.info/?l=linux-i2c&m=122457836326525&w=2

> Jean Delvare's last comment on this was:

> > Honestly I don't see any value in this driver. There's nothing you can
> > do with it that you couldn't already do without it.

> The driver itself would do the right thing, but I doubt that
> resubmitting will help much.

Looking at the thread in the archive I don't see any effort to answer
Jean's question there - the reply from Jon talks about device tree
binding which is, as Jean says, pretty much irrelevant to the question:

   http://marc.info/?l=linux-i2c&m=122465761327694&w=2

The question seemed to be more about what the driver was supposed to
accomplish - talking about the functionality is provided by the driver
once it's bound to the device should address that.

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

* [PATCH 13/17] ARM: pxa/raumfeld: add Marvell Libertas via SDIO
  2009-11-25 13:04     ` Daniel Mack
@ 2009-11-25 13:36       ` Mark Brown
  0 siblings, 0 replies; 51+ messages in thread
From: Mark Brown @ 2009-11-25 13:36 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Nov 25, 2009 at 02:04:35PM +0100, Daniel Mack wrote:
> On Wed, Nov 25, 2009 at 11:49:47AM +0000, Mark Brown wrote:

> > Either use regulator_get_exclusive() (at which point you own the
> > regulator) or keep track of the on/off switch yourself.

> The issue I was facing here was that the mmc power enable callback was
> called more than once with the same value for 'on', so the calls were
> not balanced and the regulator driver bailed.

If you use regulator_get_exclusive() then your usage is OK since other
users can't collide with your usage, otherwise you'd need to remember
the state in your driver if the caller isn't giving you balanced
enable/disable calls.

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

* [PATCH 12/17] ARM: pxa/raumfeld: add audio related functions
  2009-11-25 13:07       ` Mark Brown
@ 2009-11-25 13:53         ` Daniel Mack
  2009-11-25 14:00           ` Mark Brown
  0 siblings, 1 reply; 51+ messages in thread
From: Daniel Mack @ 2009-11-25 13:53 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Nov 25, 2009 at 01:07:23PM +0000, Mark Brown wrote:
> On Wed, Nov 25, 2009 at 01:28:57PM +0100, Daniel Mack wrote:
> > Well, that's not really a regulator but just a GPIO that drives a FET.
> > Doesn't using the regulator framework seem a little overdone?
> 
> No, the main goal here is to make sure the CODEC driver knows what's
> going on with its power.  In your system it is a trivial GPIO based
> regulator that's doing the power control but other systems might have
> something different.  Looking at it from the other angle, nothing about
> powering on and off the CODEC ought to be board specific.

Ok, just to make sure I get you right: the idea would be to add a simple
regulator and label it in a way so that the codec driver will be able
to take control? And then claim that regulator from cs4270.c?

I guess "reg-fixed-voltage" would be the appropriate driver?

> > The idea was to only let the board support file know about GPIO
> > definitions, so the audio part doesn't need to know about the details.
> 
> The audio driver is already entirely board specific, knowing about the
> GPIOs isn't going to make any odds here.  At the minute reading the
> code it looks like part of the audio driver has randomly been lifted out
> into a separate file for no particular reason.

Ok, agreed. I moved it.

Thanks,
Daniel

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

* [PATCH 12/17] ARM: pxa/raumfeld: add audio related functions
  2009-11-25 13:53         ` Daniel Mack
@ 2009-11-25 14:00           ` Mark Brown
  0 siblings, 0 replies; 51+ messages in thread
From: Mark Brown @ 2009-11-25 14:00 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Nov 25, 2009 at 02:53:41PM +0100, Daniel Mack wrote:

> Ok, just to make sure I get you right: the idea would be to add a simple
> regulator and label it in a way so that the codec driver will be able
> to take control? And then claim that regulator from cs4270.c?

> I guess "reg-fixed-voltage" would be the appropriate driver?

Yes, in -next it has support for an enable GPIO.

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

* [PATCH 01/17] ARM: pxa/raumfeld: add basic structure for devices
  2009-11-25 10:42 ` [PATCH 01/17] ARM: pxa/raumfeld: add basic structure for devices Daniel Mack
@ 2009-11-25 15:26   ` Mike Rapoport
  2009-11-25 15:44     ` Daniel Mack
  2009-11-25 16:51     ` Marek Vasut
  0 siblings, 2 replies; 51+ messages in thread
From: Mike Rapoport @ 2009-11-25 15:26 UTC (permalink / raw)
  To: linux-arm-kernel

Daniel,
Below are my comments to the patches. Some of the comments apply to several
patches, but I'm too lazy to copy them into relevant threads :)


Daniel Mack wrote:
> No function yet, just the file skeletons.
> 
> Signed-off-by: Daniel Mack <daniel@caiaq.de>
> ---
>  arch/arm/mach-pxa/Kconfig    |   18 ++++++
>  arch/arm/mach-pxa/Makefile   |    3 +
>  arch/arm/mach-pxa/raumfeld.c |  122 ++++++++++++++++++++++++++++++++++++++++++
>  3 files changed, 143 insertions(+), 0 deletions(-)
>  create mode 100644 arch/arm/mach-pxa/raumfeld.c
> 
> diff --git a/arch/arm/mach-pxa/Kconfig b/arch/arm/mach-pxa/Kconfig
> index 20e645a..f4dd069 100644
> --- a/arch/arm/mach-pxa/Kconfig
> +++ b/arch/arm/mach-pxa/Kconfig
> @@ -399,6 +399,24 @@ config MACH_TREO680
>  	  Say Y here if you intend to run this kernel on Palm Treo 680
>  	  smartphone.
>  
> +config MACH_RAUMFELD_RC
> +	bool "Raumfeld Controller"
> +	select PXA3xx
> +	select CPU_PXA300
> +	select HAVE_PWM
> +
> +config MACH_RAUMFELD_CONNECTOR
> +	bool "Raumfeld Connector"
> +	select PXA3xx
> +	select CPU_PXA300
> +	select PXA_SSP
> +
> +config MACH_RAUMFELD_SPEAKER
> +	bool "Raumfeld Speaker"
> +	select PXA3xx
> +	select CPU_PXA300
> +	select PXA_SSP
> +
>  config PXA_SHARPSL
>  	bool "SHARP Zaurus SL-5600, SL-C7xx and SL-Cxx00 Models"
>  	select SHARP_SCOOP
> diff --git a/arch/arm/mach-pxa/Makefile b/arch/arm/mach-pxa/Makefile
> index b5d29e6..1ed7509 100644
> --- a/arch/arm/mach-pxa/Makefile
> +++ b/arch/arm/mach-pxa/Makefile
> @@ -88,6 +88,9 @@ obj-$(CONFIG_MACH_E740)		+= e740.o
>  obj-$(CONFIG_MACH_E750)		+= e750.o
>  obj-$(CONFIG_MACH_E400)		+= e400.o
>  obj-$(CONFIG_MACH_E800)		+= e800.o
> +obj-$(CONFIG_MACH_RAUMFELD_RC)		+= raumfeld.o
> +obj-$(CONFIG_MACH_RAUMFELD_CONNECTOR)	+= raumfeld.o
> +obj-$(CONFIG_MACH_RAUMFELD_SPEAKER)	+= raumfeld.o
>  
>  # Support for blinky lights
>  led-y := leds.o
> diff --git a/arch/arm/mach-pxa/raumfeld.c b/arch/arm/mach-pxa/raumfeld.c
> new file mode 100644
> index 0000000..89ead5f
> --- /dev/null
> +++ b/arch/arm/mach-pxa/raumfeld.c
> @@ -0,0 +1,122 @@
> +/*
> + * arch/arm/mach-pxa/raumfeld.c
> + *
> + * Support for the following Raumfeld devices:
> + *
> + * 	* Controller
> + *  	* Connector
> + *  	* Speaker S/M
> + *
> + * See http://www.raumfeld.com for details.
> + *
> + * Copyright (c) 2009 Daniel Mack <daniel@caiaq.de>
> + *
> + * 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.
> + */
> +
> +#include <linux/init.h>
> +#include <linux/kernel.h>
> +#include <linux/sysdev.h>
> +#include <linux/interrupt.h>
> +
> +#include <asm/mach-types.h>
> +#include <asm/mach/arch.h>
> +
> +#include <mach/hardware.h>
> +#include <mach/pxa3xx-regs.h>
> +#include <mach/mfp-pxa3xx.h>
> +#include <mach/mfp-pxa300.h>
> +
> +#include "generic.h"
> +#include "devices.h"
> +#include "clock.h"
> +
> +/*
> + * GPIO configuration (common for all hardware platforms)
> + */
> +static mfp_cfg_t raumfeld_pin_config[] __initdata = {
> +	/* UART1 */
> +	GPIO77_UART1_RXD,
> +	GPIO78_UART1_TXD,
> +	GPIO79_UART1_CTS,
> +	GPIO81_UART1_DSR,
> +	GPIO83_UART1_DTR,
> +	GPIO84_UART1_RTS,
> +
> +	/* UART3 */
> +	GPIO110_UART3_RXD,
> +};
> +
> +static void __init raumfeld_common_init(void)
> +{
> +	enable_irq_wake(IRQ_WAKEUP0);
> +	pxa_set_ffuart_info(NULL);
> +
> +	gpio_request(mfp_to_gpio(GPIO_W2W_RESET), "Wi2Wi reset");

gpio_request may fail, thought it's unlikely to happen. Anyway, adding check for
it's return value seems to be a good practice.

> +	gpio_direction_output(mfp_to_gpio(GPIO_W2W_RESET), 0);
> +
> +	gpio_request(mfp_to_gpio(GPIO_W2W_PDN), "Wi2Wi powerup");
> +	gpio_direction_output(mfp_to_gpio(GPIO_W2W_PDN), 0);
> +
> +	/* this can be used to switch off the device */
> +	gpio_request(mfp_to_gpio(GPIO_SHUTDOWN_SUPPLY), "supply shutdown");
> +	gpio_direction_output(mfp_to_gpio(GPIO_SHUTDOWN_SUPPLY), 0);
> +
> +	pxa3xx_mfp_config(ARRAY_AND_SIZE(raumfeld_pin_config));
> +}
> +
> +static void __init raumfeld_controller_init(void)
> +{
> +	raumfeld_common_init();
> +}
> +
> +static void __init raumfeld_connector_init(void)
> +{
> +	raumfeld_common_init();
> +}
> +
> +static void __init raumfeld_speaker_init(void)
> +{
> +	raumfeld_common_init();
> +}

I failed to follow what peripherals are common to what boards, but after
applying all the patches it seems that all three _init functions are really
similar. Have you considered having one _init function for all three machines
and calling machine-specific init based on machine_is_X?

> +/* physical memory regions */
> +#define	RAUMFELD_SDRAM_BASE	0xa0000000	/* SDRAM region */
> +
> +#ifdef CONFIG_MACH_RAUMFELD_RC
> +MACHINE_START(RAUMFELD_RC, "Raumfeld Controller")
> +	.phys_io	= 0x40000000,
> +	.io_pg_offst	= (io_p2v(0x40000000) >> 18) & 0xfffc,
> +	.boot_params	= RAUMFELD_SDRAM_BASE + 0x100,
> +	.init_machine	= raumfeld_controller_init,
> +	.map_io		= pxa_map_io,
> +	.init_irq	= pxa3xx_init_irq,
> +	.timer		= &pxa_timer,
> +MACHINE_END
> +#endif
> +
> +#ifdef CONFIG_MACH_RAUMFELD_CONNECTOR
> +MACHINE_START(RAUMFELD_CONNECTOR, "Raumfeld Connector")
> +	.phys_io	= 0x40000000,
> +	.io_pg_offst	= (io_p2v(0x40000000) >> 18) & 0xfffc,
> +	.boot_params	= RAUMFELD_SDRAM_BASE + 0x100,
> +	.init_machine	= raumfeld_connector_init,
> +	.map_io		= pxa_map_io,
> +	.init_irq	= pxa3xx_init_irq,
> +	.timer		= &pxa_timer,
> +MACHINE_END
> +#endif
> +
> +#ifdef CONFIG_MACH_RAUMFELD_SPEAKER
> +MACHINE_START(RAUMFELD_SPEAKER, "Raumfeld Speaker")
> +	.phys_io	= 0x40000000,
> +	.io_pg_offst	= (io_p2v(0x40000000) >> 18) & 0xfffc,
> +	.boot_params	= RAUMFELD_SDRAM_BASE + 0x100,
> +	.init_machine	= raumfeld_speaker_init,
> +	.map_io		= pxa_map_io,
> +	.init_irq	= pxa3xx_init_irq,
> +	.timer		= &pxa_timer,
> +MACHINE_END
> +#endif

-- 
Sincerely yours,
Mike.

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

* [PATCH 03/17] ARM: pxa/raumfeld: add SMSC9220 ethernet support
  2009-11-25 10:42 ` [PATCH 03/17] ARM: pxa/raumfeld: add SMSC9220 ethernet support Daniel Mack
@ 2009-11-25 15:26   ` Mike Rapoport
  2009-11-25 15:49     ` Daniel Mack
  0 siblings, 1 reply; 51+ messages in thread
From: Mike Rapoport @ 2009-11-25 15:26 UTC (permalink / raw)
  To: linux-arm-kernel



Daniel Mack wrote:
> The 'Connector' and 'Speaker S/M' devices have an SMSC9220 ethernet chip
> onboard.
> 
> Signed-off-by: Daniel Mack <daniel@caiaq.de>
> ---
>  arch/arm/mach-pxa/raumfeld.c |   51 ++++++++++++++++++++++++++++++++++++++++++
>  1 files changed, 51 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/arm/mach-pxa/raumfeld.c b/arch/arm/mach-pxa/raumfeld.c
> index 075e337..82af0dc 100644
> --- a/arch/arm/mach-pxa/raumfeld.c
> +++ b/arch/arm/mach-pxa/raumfeld.c
> @@ -19,7 +19,10 @@
>  #include <linux/init.h>
>  #include <linux/kernel.h>
>  #include <linux/sysdev.h>
> +#include <linux/platform_device.h>
>  #include <linux/interrupt.h>
> +#include <linux/gpio.h>
> +#include <linux/smsc911x.h>
>  
>  #include <asm/mach-types.h>
>  #include <asm/mach/arch.h>
> @@ -92,6 +95,52 @@ static mfp_cfg_t raumfeld_pin_config[] __initdata = {
>  	GPIO110_UART3_RXD,
>  };
>  
> +/*
> + * SMSC LAN9220 Ethernet
> + */
> +
> +static struct resource smc91x_resources[] = {
> +	{
> +		.start	= PXA3xx_CS2_PHYS,
> +		.end	= PXA3xx_CS2_PHYS + 0xfffff,
> +		.flags	= IORESOURCE_MEM,
> +	},
> +	{
> +		.start	= gpio_to_irq(mfp_to_gpio(GPIO_ETH_IRQ)),
> +		.end	= gpio_to_irq(mfp_to_gpio(GPIO_ETH_IRQ)),
> +		.flags	= IORESOURCE_IRQ | IRQF_TRIGGER_FALLING,
> +	}
> +};
> +
> +static struct smsc911x_platform_config raumfeld_smsc911x_config = {
> +	.phy_interface	= PHY_INTERFACE_MODE_MII,
> +	.irq_polarity	= SMSC911X_IRQ_POLARITY_ACTIVE_LOW,
> +	.irq_type	= SMSC911X_IRQ_TYPE_OPEN_DRAIN,
> +	.flags		= SMSC911X_USE_32BIT | SMSC911X_SAVE_MAC_ADDRESS,
> +};
> +
> +static struct platform_device smc91x_device = {
> +	.name		= "smsc911x",
> +	.id		= -1,
> +	.num_resources	= ARRAY_SIZE(smc91x_resources),
> +	.resource	= smc91x_resources,
> +	.dev		= {
> +		.platform_data = &raumfeld_smsc911x_config,
> +	}
> +};
> +
> +static mfp_cfg_t raumfeld_eth_pin_config[] __initdata = {
> +	GPIO1_nCS2,			/* CS */
> +	GPIO40_GPIO | MFP_PULL_HIGH,	/* IRQ */
> +};

Wouldn't it be better to keep mfp tables for common pins and each of board
variants rather than configure mfp for particular interface? This applies for
other patches that have
+	pxa3xx_mfp_config(ARRAY_AND_SIZE(raumfeld_<something>_pin_config));
as well. :)

> +static void __init raumfeld_eth_init(void)
> +{
> +	pxa3xx_mfp_config(ARRAY_AND_SIZE(raumfeld_eth_pin_config));
> +	platform_device_register(&smc91x_device);
> +}
> +
> +
>  static void __init raumfeld_common_init(void)
>  {
>  	enable_irq_wake(IRQ_WAKEUP0);
> @@ -118,11 +167,13 @@ static void __init raumfeld_controller_init(void)
>  static void __init raumfeld_connector_init(void)
>  {
>  	raumfeld_common_init();
> +	raumfeld_eth_init();
>  }
>  
>  static void __init raumfeld_speaker_init(void)
>  {
>  	raumfeld_common_init();
> +	raumfeld_eth_init();
>  }
>  
>  /* physical memory regions */

-- 
Sincerely yours,
Mike.

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

* [PATCH 05/17] ARM: pxa/raumfeld: add rotary encoder support
  2009-11-25 10:42 ` [PATCH 05/17] ARM: pxa/raumfeld: add rotary encoder support Daniel Mack
@ 2009-11-25 15:26   ` Mike Rapoport
  2009-11-25 15:50     ` Daniel Mack
  2009-11-25 16:59     ` Russell King - ARM Linux
  0 siblings, 2 replies; 51+ messages in thread
From: Mike Rapoport @ 2009-11-25 15:26 UTC (permalink / raw)
  To: linux-arm-kernel



Daniel Mack wrote:
> The 'Controller' and 'Speaker S/M' have a rotary encoder device for
> volume control.
> 
> Signed-off-by: Daniel Mack <daniel@caiaq.de>
> ---
>  arch/arm/mach-pxa/raumfeld.c |   35 +++++++++++++++++++++++++++++++++++
>  1 files changed, 35 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/arm/mach-pxa/raumfeld.c b/arch/arm/mach-pxa/raumfeld.c
> index 2d47dc2..a2a2b18 100644
> --- a/arch/arm/mach-pxa/raumfeld.c
> +++ b/arch/arm/mach-pxa/raumfeld.c
> @@ -23,6 +23,8 @@
>  #include <linux/interrupt.h>
>  #include <linux/gpio.h>
>  #include <linux/smsc911x.h>
> +#include <linux/input.h>
> +#include <linux/rotary_encoder.h>
>  
>  #include <asm/mach-types.h>
>  #include <asm/mach/arch.h>
> @@ -153,6 +155,27 @@ static struct pxaohci_platform_data raumfeld_ohci_info = {
>  	.flags		= ENABLE_PORT1,
>  };
>  
> +/**
> + * Rotary encoder input device
> + */
> +static struct rotary_encoder_platform_data raumfeld_rotary_encoder_info = {
> +	.steps		= 24,
> +	.axis		= REL_X,
> +	.relative_axis	= 1,
> +	.gpio_a		= mfp_to_gpio(GPIO_VOLENC_A),
> +	.gpio_b		= mfp_to_gpio(GPIO_VOLENC_B),
> +	.inverted_a	= 1,
> +	.inverted_b	= 0,
> +};
> +
> +static struct platform_device rotary_encoder_device = {
> +	.name		= "rotary-encoder",
> +	.id		= 0,
> +	.dev		= {
> +		.platform_data = &raumfeld_rotary_encoder_info,
> +	}
> +};
> +
>  static void __init raumfeld_common_init(void)
>  {
>  	enable_irq_wake(IRQ_WAKEUP0);
> @@ -174,6 +197,12 @@ static void __init raumfeld_common_init(void)
>  
>  static void __init raumfeld_controller_init(void)
>  {
> +	struct platform_device *raumfeld_controller_devices[] = {
> +		&rotary_encoder_device,
> +	};

Any reason to keep the devices array inside the function? I think it makes the
code less readable.

> +	platform_add_devices(ARRAY_AND_SIZE(raumfeld_controller_devices));
> +
>  	raumfeld_common_init();
>  }
>  
> @@ -185,6 +214,12 @@ static void __init raumfeld_connector_init(void)
>  
>  static void __init raumfeld_speaker_init(void)
>  {
> +	struct platform_device *raumfeld_speaker_devices[] = {
> +		&rotary_encoder_device,
> +	};

ditto

> +	platform_add_devices(ARRAY_AND_SIZE(raumfeld_speaker_devices));
> +
>  	raumfeld_common_init();
>  	raumfeld_eth_init();
>  }

-- 
Sincerely yours,
Mike.

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

* [PATCH 09/17] ARM: pxa/raumfeld: add NAND partitions
  2009-11-25 10:42 ` [PATCH 09/17] ARM: pxa/raumfeld: add NAND partitions Daniel Mack
@ 2009-11-25 15:26   ` Mike Rapoport
  0 siblings, 0 replies; 51+ messages in thread
From: Mike Rapoport @ 2009-11-25 15:26 UTC (permalink / raw)
  To: linux-arm-kernel



Daniel Mack wrote:
> Signed-off-by: Daniel Mack <daniel@caiaq.de>
> ---
>  arch/arm/mach-pxa/raumfeld.c |   36 ++++++++++++++++++++++++++++++++++++
>  1 files changed, 36 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/arm/mach-pxa/raumfeld.c b/arch/arm/mach-pxa/raumfeld.c
> index 5d85f98..66b9af1 100644
> --- a/arch/arm/mach-pxa/raumfeld.c
> +++ b/arch/arm/mach-pxa/raumfeld.c
> @@ -37,6 +37,7 @@
>  #include <mach/pxa3xx-regs.h>
>  #include <mach/mfp-pxa3xx.h>
>  #include <mach/mfp-pxa300.h>
> +#include <mach/pxa3xx_nand.h>
>  #include <mach/ohci.h>
>  
>  #include "generic.h"
> @@ -152,6 +153,40 @@ static void __init raumfeld_eth_init(void)
>  }
>  
>  /**
> + * NAND
> + */
> +static struct mtd_partition raumfeld_nand_partitions[] = {
> +	{
> +		.name		= "Bootloader",
> +		.offset		= 0,
> +		.size		= 0xa0000,
> +		.mask_flags	= MTD_WRITEABLE, /* force read-only */
> +	},
> +	{
> +		.name		= "BootloaderEnvironment",
> +		.offset		= 0xa0000,
> +		.size		= 0x20000,
> +	},
> +	{
> +		.name		= "BootloaderSplashScreen",
> +		.offset		= 0xc0000,
> +		.size		= 0x60000,
> +	},
> +	{
> +		.name		= "UBI",
> +		.offset		= 0x120000,
> +		.size		= MTDPART_SIZ_FULL,
> +	},
> +};
> +
> +static struct pxa3xx_nand_platform_data raumfeld_nand_info = {
> +	.enable_arbiter	= 1,
> +	.keep_config	= 1,
> +	.parts		= raumfeld_nand_partitions,
> +	.nr_parts	= ARRAY_SIZE(raumfeld_nand_partitions),
> +};
> +
> +/**
>   * USB (OHCI) support
>   */
>  static struct pxaohci_platform_data raumfeld_ohci_info = {
> @@ -355,6 +390,7 @@ static void __init raumfeld_common_init(void)
>  	pxa3xx_mfp_config(ARRAY_AND_SIZE(raumfeld_pin_config));
>  	pxa_set_ohci_info(&raumfeld_ohci_info);
>  	platform_add_devices(ARRAY_AND_SIZE(raumfeld_common_devices));
> +	pxa3xx_set_nand_info(&raumfeld_nand_info);

Wouldn't it be nicer to group all the pxa_set_* calls together?

>  }
>  
>  static void __init raumfeld_controller_init(void)

-- 
Sincerely yours,
Mike.

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

* [PATCH 01/17] ARM: pxa/raumfeld: add basic structure for devices
  2009-11-25 15:26   ` Mike Rapoport
@ 2009-11-25 15:44     ` Daniel Mack
  2009-11-25 16:51     ` Marek Vasut
  1 sibling, 0 replies; 51+ messages in thread
From: Daniel Mack @ 2009-11-25 15:44 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Mike,

On Wed, Nov 25, 2009 at 05:26:32PM +0200, Mike Rapoport wrote:
> Below are my comments to the patches. Some of the comments apply to several
> patches, but I'm too lazy to copy them into relevant threads :)

Ok, I squashed most of the commits together for the next round so make
hat easier :)

> Daniel Mack wrote:
> > +static void __init raumfeld_common_init(void)
> > +{
> > +	enable_irq_wake(IRQ_WAKEUP0);
> > +	pxa_set_ffuart_info(NULL);
> > +
> > +	gpio_request(mfp_to_gpio(GPIO_W2W_RESET), "Wi2Wi reset");
> 
> gpio_request may fail, thought it's unlikely to happen. Anyway, adding check for
> it's return value seems to be a good practice.

Ok, I put BUG_ON() around them. I see no reason to care for proper error
handling as this is not a driver. If any of those functions fail in the
low-level code, there is something seriously broken.

> > +static void __init raumfeld_speaker_init(void)
> > +{
> > +	raumfeld_common_init();
> > +}
> 
> I failed to follow what peripherals are common to what boards, but after
> applying all the patches it seems that all three _init functions are really
> similar. Have you considered having one _init function for all three machines
> and calling machine-specific init based on machine_is_X?

Yes, I did consider that. But eventually, they are a) all not big and b)
too different. Doing the way you suggest make it look more messy. Have a
look at the second round and tell me if you stick to your opponion :)

Thanks for your input,
Daniel

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

* [PATCH 03/17] ARM: pxa/raumfeld: add SMSC9220 ethernet support
  2009-11-25 15:26   ` Mike Rapoport
@ 2009-11-25 15:49     ` Daniel Mack
  2009-11-25 16:56       ` Russell King - ARM Linux
  0 siblings, 1 reply; 51+ messages in thread
From: Daniel Mack @ 2009-11-25 15:49 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Nov 25, 2009 at 05:26:36PM +0200, Mike Rapoport wrote:
> Daniel Mack wrote:
> > +static mfp_cfg_t raumfeld_eth_pin_config[] __initdata = {
> > +	GPIO1_nCS2,			/* CS */
> > +	GPIO40_GPIO | MFP_PULL_HIGH,	/* IRQ */
> > +};
> 
> Wouldn't it be better to keep mfp tables for common pins and each of board
> variants rather than configure mfp for particular interface? This applies for
> other patches that have
> +	pxa3xx_mfp_config(ARRAY_AND_SIZE(raumfeld_<something>_pin_config));
> as well. :)

I had it that way, but the idea is to prevent double definitions. What
we have now is a config for all pins needed by the ethernet device, and
each machine which needs that just references it. It looks more straight
forward this way, but eventually that might be a matter of taste :)

Unless anyone has a strong opinion abouth that, I'd like to keep it as
it is now.

Daniel

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

* [PATCH 05/17] ARM: pxa/raumfeld: add rotary encoder support
  2009-11-25 15:26   ` Mike Rapoport
@ 2009-11-25 15:50     ` Daniel Mack
  2009-11-25 16:59     ` Russell King - ARM Linux
  1 sibling, 0 replies; 51+ messages in thread
From: Daniel Mack @ 2009-11-25 15:50 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Nov 25, 2009 at 05:26:38PM +0200, Mike Rapoport wrote:
> Daniel Mack wrote:
> >  static void __init raumfeld_common_init(void)
> >  {
> >  	enable_irq_wake(IRQ_WAKEUP0);
> > @@ -174,6 +197,12 @@ static void __init raumfeld_common_init(void)
> >  
> >  static void __init raumfeld_controller_init(void)
> >  {
> > +	struct platform_device *raumfeld_controller_devices[] = {
> > +		&rotary_encoder_device,
> > +	};
> 
> Any reason to keep the devices array inside the function? I think it makes the
> code less readable.

Ok - changed for the next round.

Thanks,
Daniel

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

* [PATCH 01/17] ARM: pxa/raumfeld: add basic structure for devices
  2009-11-25 15:26   ` Mike Rapoport
  2009-11-25 15:44     ` Daniel Mack
@ 2009-11-25 16:51     ` Marek Vasut
  2009-11-25 17:06       ` Russell King - ARM Linux
  1 sibling, 1 reply; 51+ messages in thread
From: Marek Vasut @ 2009-11-25 16:51 UTC (permalink / raw)
  To: linux-arm-kernel

Dne St 25. listopadu 2009 16:26:32 Mike Rapoport napsal(a):
> Daniel,
> Below are my comments to the patches. Some of the comments apply to several
> patches, but I'm too lazy to copy them into relevant threads :)
> 
> Daniel Mack wrote:
> > No function yet, just the file skeletons.
> >
> > Signed-off-by: Daniel Mack <daniel@caiaq.de>
> > ---
> >  arch/arm/mach-pxa/Kconfig    |   18 ++++++
> >  arch/arm/mach-pxa/Makefile   |    3 +
> >  arch/arm/mach-pxa/raumfeld.c |  122
> > ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 143
> > insertions(+), 0 deletions(-)
> >  create mode 100644 arch/arm/mach-pxa/raumfeld.c
> >
> > diff --git a/arch/arm/mach-pxa/Kconfig b/arch/arm/mach-pxa/Kconfig
> > index 20e645a..f4dd069 100644
> > --- a/arch/arm/mach-pxa/Kconfig
> > +++ b/arch/arm/mach-pxa/Kconfig
> > @@ -399,6 +399,24 @@ config MACH_TREO680
> >  	  Say Y here if you intend to run this kernel on Palm Treo 680
> >  	  smartphone.
> >
> > +config MACH_RAUMFELD_RC
> > +	bool "Raumfeld Controller"
> > +	select PXA3xx
> > +	select CPU_PXA300
> > +	select HAVE_PWM
> > +
> > +config MACH_RAUMFELD_CONNECTOR
> > +	bool "Raumfeld Connector"
> > +	select PXA3xx
> > +	select CPU_PXA300
> > +	select PXA_SSP
> > +
> > +config MACH_RAUMFELD_SPEAKER
> > +	bool "Raumfeld Speaker"
> > +	select PXA3xx
> > +	select CPU_PXA300
> > +	select PXA_SSP
> > +
> >  config PXA_SHARPSL
> >  	bool "SHARP Zaurus SL-5600, SL-C7xx and SL-Cxx00 Models"
> >  	select SHARP_SCOOP
> > diff --git a/arch/arm/mach-pxa/Makefile b/arch/arm/mach-pxa/Makefile
> > index b5d29e6..1ed7509 100644
> > --- a/arch/arm/mach-pxa/Makefile
> > +++ b/arch/arm/mach-pxa/Makefile
> > @@ -88,6 +88,9 @@ obj-$(CONFIG_MACH_E740)		+= e740.o
> >  obj-$(CONFIG_MACH_E750)		+= e750.o
> >  obj-$(CONFIG_MACH_E400)		+= e400.o
> >  obj-$(CONFIG_MACH_E800)		+= e800.o
> > +obj-$(CONFIG_MACH_RAUMFELD_RC)		+= raumfeld.o
> > +obj-$(CONFIG_MACH_RAUMFELD_CONNECTOR)	+= raumfeld.o
> > +obj-$(CONFIG_MACH_RAUMFELD_SPEAKER)	+= raumfeld.o
> >
> >  # Support for blinky lights
> >  led-y := leds.o
> > diff --git a/arch/arm/mach-pxa/raumfeld.c b/arch/arm/mach-pxa/raumfeld.c
> > new file mode 100644
> > index 0000000..89ead5f
> > --- /dev/null
> > +++ b/arch/arm/mach-pxa/raumfeld.c
> > @@ -0,0 +1,122 @@
> > +/*
> > + * arch/arm/mach-pxa/raumfeld.c
> > + *
> > + * Support for the following Raumfeld devices:
> > + *
> > + * 	* Controller
> > + *  	* Connector
> > + *  	* Speaker S/M
> > + *
> > + * See http://www.raumfeld.com for details.
> > + *
> > + * Copyright (c) 2009 Daniel Mack <daniel@caiaq.de>
> > + *
> > + * 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.
> > + */
> > +
> > +#include <linux/init.h>
> > +#include <linux/kernel.h>
> > +#include <linux/sysdev.h>
> > +#include <linux/interrupt.h>
> > +
> > +#include <asm/mach-types.h>
> > +#include <asm/mach/arch.h>
> > +
> > +#include <mach/hardware.h>
> > +#include <mach/pxa3xx-regs.h>
> > +#include <mach/mfp-pxa3xx.h>
> > +#include <mach/mfp-pxa300.h>
> > +
> > +#include "generic.h"
> > +#include "devices.h"
> > +#include "clock.h"
> > +
> > +/*
> > + * GPIO configuration (common for all hardware platforms)
> > + */
> > +static mfp_cfg_t raumfeld_pin_config[] __initdata = {
> > +	/* UART1 */
> > +	GPIO77_UART1_RXD,
> > +	GPIO78_UART1_TXD,
> > +	GPIO79_UART1_CTS,
> > +	GPIO81_UART1_DSR,
> > +	GPIO83_UART1_DTR,
> > +	GPIO84_UART1_RTS,
> > +
> > +	/* UART3 */
> > +	GPIO110_UART3_RXD,
> > +};
> > +
> > +static void __init raumfeld_common_init(void)
> > +{
> > +	enable_irq_wake(IRQ_WAKEUP0);
> > +	pxa_set_ffuart_info(NULL);
> > +
> > +	gpio_request(mfp_to_gpio(GPIO_W2W_RESET), "Wi2Wi reset");
> 
> gpio_request may fail, thought it's unlikely to happen. Anyway, adding
>  check for it's return value seems to be a good practice.

Well if the gpio_request fails here, you are doomed anyway. There's nowhere to 
return to. But it's a good idea to fail and don't try to request other GPIOs.
> 
> > +	gpio_direction_output(mfp_to_gpio(GPIO_W2W_RESET), 0);
> > +
> > +	gpio_request(mfp_to_gpio(GPIO_W2W_PDN), "Wi2Wi powerup");
> > +	gpio_direction_output(mfp_to_gpio(GPIO_W2W_PDN), 0);
> > +
> > +	/* this can be used to switch off the device */
> > +	gpio_request(mfp_to_gpio(GPIO_SHUTDOWN_SUPPLY), "supply shutdown");
> > +	gpio_direction_output(mfp_to_gpio(GPIO_SHUTDOWN_SUPPLY), 0);
> > +
> > +	pxa3xx_mfp_config(ARRAY_AND_SIZE(raumfeld_pin_config));
> > +}
> > +
> > +static void __init raumfeld_controller_init(void)
> > +{
> > +	raumfeld_common_init();
> > +}
> > +
> > +static void __init raumfeld_connector_init(void)
> > +{
> > +	raumfeld_common_init();
> > +}
> > +
> > +static void __init raumfeld_speaker_init(void)
> > +{
> > +	raumfeld_common_init();
> > +}
> 
> I failed to follow what peripherals are common to what boards, but after
> applying all the patches it seems that all three _init functions are really
> similar. Have you considered having one _init function for all three
>  machines and calling machine-specific init based on machine_is_X?
> 
> > +/* physical memory regions */
> > +#define	RAUMFELD_SDRAM_BASE	0xa0000000	/* SDRAM region */
> > +
> > +#ifdef CONFIG_MACH_RAUMFELD_RC
> > +MACHINE_START(RAUMFELD_RC, "Raumfeld Controller")
> > +	.phys_io	= 0x40000000,
> > +	.io_pg_offst	= (io_p2v(0x40000000) >> 18) & 0xfffc,
> > +	.boot_params	= RAUMFELD_SDRAM_BASE + 0x100,
> > +	.init_machine	= raumfeld_controller_init,
> > +	.map_io		= pxa_map_io,
> > +	.init_irq	= pxa3xx_init_irq,
> > +	.timer		= &pxa_timer,
> > +MACHINE_END
> > +#endif
> > +
> > +#ifdef CONFIG_MACH_RAUMFELD_CONNECTOR
> > +MACHINE_START(RAUMFELD_CONNECTOR, "Raumfeld Connector")
> > +	.phys_io	= 0x40000000,
> > +	.io_pg_offst	= (io_p2v(0x40000000) >> 18) & 0xfffc,
> > +	.boot_params	= RAUMFELD_SDRAM_BASE + 0x100,
> > +	.init_machine	= raumfeld_connector_init,
> > +	.map_io		= pxa_map_io,
> > +	.init_irq	= pxa3xx_init_irq,
> > +	.timer		= &pxa_timer,
> > +MACHINE_END
> > +#endif
> > +
> > +#ifdef CONFIG_MACH_RAUMFELD_SPEAKER
> > +MACHINE_START(RAUMFELD_SPEAKER, "Raumfeld Speaker")
> > +	.phys_io	= 0x40000000,
> > +	.io_pg_offst	= (io_p2v(0x40000000) >> 18) & 0xfffc,
> > +	.boot_params	= RAUMFELD_SDRAM_BASE + 0x100,
> > +	.init_machine	= raumfeld_speaker_init,
> > +	.map_io		= pxa_map_io,
> > +	.init_irq	= pxa3xx_init_irq,
> > +	.timer		= &pxa_timer,
> > +MACHINE_END
> > +#endif
> 

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

* [PATCH 03/17] ARM: pxa/raumfeld: add SMSC9220 ethernet support
  2009-11-25 15:49     ` Daniel Mack
@ 2009-11-25 16:56       ` Russell King - ARM Linux
  2009-11-26 17:55         ` Daniel Mack
  0 siblings, 1 reply; 51+ messages in thread
From: Russell King - ARM Linux @ 2009-11-25 16:56 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Nov 25, 2009 at 04:49:47PM +0100, Daniel Mack wrote:
> I had it that way, but the idea is to prevent double definitions. What
> we have now is a config for all pins needed by the ethernet device, and
> each machine which needs that just references it. It looks more straight
> forward this way, but eventually that might be a matter of taste :)
> 
> Unless anyone has a strong opinion abouth that, I'd like to keep it as
> it is now.

How about just having each board setup all MFP configuration at boot time
and be done with it - yes, it'll mean some duplication for the pins which
are common, but at least you know when looking at board N how all the pins
are configured.

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

* [PATCH 05/17] ARM: pxa/raumfeld: add rotary encoder support
  2009-11-25 15:26   ` Mike Rapoport
  2009-11-25 15:50     ` Daniel Mack
@ 2009-11-25 16:59     ` Russell King - ARM Linux
  1 sibling, 0 replies; 51+ messages in thread
From: Russell King - ARM Linux @ 2009-11-25 16:59 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Nov 25, 2009 at 05:26:38PM +0200, Mike Rapoport wrote:
> Daniel Mack wrote:
> > @@ -174,6 +197,12 @@ static void __init raumfeld_common_init(void)
> >  
> >  static void __init raumfeld_controller_init(void)
> >  {
> > +	struct platform_device *raumfeld_controller_devices[] = {
> > +		&rotary_encoder_device,
> > +	};
> 
> Any reason to keep the devices array inside the function? I think it makes the
> code less readable.

Also, non-static initialized structures and arrays inside functions are
a waste of space.  You might as well write it like this, because the
following is exactly what the compiler will be doing for you:

static const struct platform_device *__raumfeld_controller_devices[] = {
	&rotary_encoder_device,
};

static void __init raumfeld_controller_init(void)
{
	struct platform_device *raumfeld_controller_devices[ARRAY_SIZE(__raumfeld_controller_devices)];
	memcpy(raumfeld_controller_devices, __raumfeld_controller_devices, sizeof(__raumfeld_controller_devices));
	...
}

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

* [PATCH 08/17] ARM: pxa/raumfeld: add one-wire function
  2009-11-25 10:42 ` [PATCH 08/17] ARM: pxa/raumfeld: add one-wire function Daniel Mack
@ 2009-11-25 17:02   ` Russell King - ARM Linux
  0 siblings, 0 replies; 51+ messages in thread
From: Russell King - ARM Linux @ 2009-11-25 17:02 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Nov 25, 2009 at 11:42:22AM +0100, Daniel Mack wrote:
> +/**
> + * One-wire (W1 bus) support
> + */
> +static void w1_enable_external_pullup(int enable)
> +{
> +	gpio_set_value(mfp_to_gpio(GPIO_W1_PULLUP_ENABLE), enable);
> +	schedule_timeout(HZ);

Shouldn't you be using msleep() here?  schedule_timeout() can terminate
prematurely, particularly if there's a signal pending.  msleep() will
wait for the full timeout.

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

* [PATCH 01/17] ARM: pxa/raumfeld: add basic structure for devices
  2009-11-25 16:51     ` Marek Vasut
@ 2009-11-25 17:06       ` Russell King - ARM Linux
  0 siblings, 0 replies; 51+ messages in thread
From: Russell King - ARM Linux @ 2009-11-25 17:06 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Nov 25, 2009 at 05:51:40PM +0100, Marek Vasut wrote:
> Dne St 25. listopadu 2009 16:26:32 Mike Rapoport napsal(a):
> > Daniel,
> > Below are my comments to the patches. Some of the comments apply to several
> > patches, but I'm too lazy to copy them into relevant threads :)
> > 
> > Daniel Mack wrote:
> > > +static void __init raumfeld_common_init(void)
> > > +{
> > > +	enable_irq_wake(IRQ_WAKEUP0);
> > > +	pxa_set_ffuart_info(NULL);
> > > +
> > > +	gpio_request(mfp_to_gpio(GPIO_W2W_RESET), "Wi2Wi reset");
> > 
> > gpio_request may fail, thought it's unlikely to happen. Anyway, adding
> >  check for it's return value seems to be a good practice.
> 
> Well if the gpio_request fails here, you are doomed anyway. There's nowhere
> to return to. But it's a good idea to fail and don't try to request other
> GPIOs.

Not entirely true.  If a gpio request fails because somehow it was claimed
by something else, that doesn't mean other stuff will also fail.  Also,
don't think that if a gpio_request in such a function fails you have to
exit from it.

A good idea is to do this:

	ret = gpio_request(gpio, name);
	if (ret)
		printk(KERN_ERR "Myplatform: gpio%u(%s) request failed: %d\n",
			gpio, name, ret);

Even better:

static void claim_gpio_output(int gpio, const char *name, int value)
{
	int ret = gpio_request(gpio, name);
	if (ret) {
		printk(KERN_ERR "Myplatform: gpio%u(%s) request failed: %d\n",
			gpio, name, ret);
	} else {
		gpio_direction_output(gpio, value);
	}
}

and then you're not duplicating the multiple gpio calls.

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

* [PATCH 12/17] ARM: pxa/raumfeld: add audio related functions
  2009-11-25 10:42 ` [PATCH 12/17] ARM: pxa/raumfeld: add audio related functions Daniel Mack
  2009-11-25 11:41   ` Mark Brown
@ 2009-11-25 17:07   ` Russell King - ARM Linux
  1 sibling, 0 replies; 51+ messages in thread
From: Russell King - ARM Linux @ 2009-11-25 17:07 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Nov 25, 2009 at 11:42:26AM +0100, Daniel Mack wrote:
> +	if (en) {
> +		gpio_set_value(mfp_to_gpio(GPIO_AUDIO_VA_ENABLE), 1);
> +		gpio_set_value(mfp_to_gpio(GPIO_MCLK_RESET), 1);
> +
> +		/* wait some time to let VA and the clocks become stable */
> +		schedule_timeout(HZ/10);

Again, msleep() preferred.

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

* Re: [PATCH 16/17] ALSA: ARM: add Raumfeld audio support
  2009-11-25 13:29         ` Mark Brown
@ 2009-11-26 17:51           ` Daniel Mack
  -1 siblings, 0 replies; 51+ messages in thread
From: Daniel Mack @ 2009-11-26 17:51 UTC (permalink / raw)
  To: Mark Brown; +Cc: alsa-devel, eric.y.miao, linux-arm-kernel

On Wed, Nov 25, 2009 at 01:29:13PM +0000, Mark Brown wrote:
> On Wed, Nov 25, 2009 at 01:24:36PM +0100, Daniel Mack wrote:

> > No, it wasn't.
> 
> There was at least one unrelated driver for a different part - I
> remember the discussion since someone needed to explain to people (Alan
> Cox, I think) that this wasn't an RTC but rather a TDM clock generator.
> 
> >   http://marc.info/?l=linux-i2c&m=122457836326525&w=2
> 
> > Jean Delvare's last comment on this was:
> 
> > > Honestly I don't see any value in this driver. There's nothing you can
> > > do with it that you couldn't already do without it.
> 
> > The driver itself would do the right thing, but I doubt that
> > resubmitting will help much.
> 
> Looking at the thread in the archive I don't see any effort to answer
> Jean's question there - the reply from Jon talks about device tree
> binding which is, as Jean says, pretty much irrelevant to the question:
> 
>    http://marc.info/?l=linux-i2c&m=122465761327694&w=2
> 
> The question seemed to be more about what the driver was supposed to
> accomplish - talking about the functionality is provided by the driver
> once it's bound to the device should address that.

Ok, will probably get back to this later. For now, I left the code where
it was but changed the API to make it clearer. The actual implementation
is in one line only, so I see no urgent need to move it to an own driver
immediately. Let me know if you're fine with the new version I'll post
soon.

Thanks,
Daniel

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

* [PATCH 16/17] ALSA: ARM: add Raumfeld audio support
@ 2009-11-26 17:51           ` Daniel Mack
  0 siblings, 0 replies; 51+ messages in thread
From: Daniel Mack @ 2009-11-26 17:51 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Nov 25, 2009 at 01:29:13PM +0000, Mark Brown wrote:
> On Wed, Nov 25, 2009 at 01:24:36PM +0100, Daniel Mack wrote:

> > No, it wasn't.
> 
> There was at least one unrelated driver for a different part - I
> remember the discussion since someone needed to explain to people (Alan
> Cox, I think) that this wasn't an RTC but rather a TDM clock generator.
> 
> >   http://marc.info/?l=linux-i2c&m=122457836326525&w=2
> 
> > Jean Delvare's last comment on this was:
> 
> > > Honestly I don't see any value in this driver. There's nothing you can
> > > do with it that you couldn't already do without it.
> 
> > The driver itself would do the right thing, but I doubt that
> > resubmitting will help much.
> 
> Looking at the thread in the archive I don't see any effort to answer
> Jean's question there - the reply from Jon talks about device tree
> binding which is, as Jean says, pretty much irrelevant to the question:
> 
>    http://marc.info/?l=linux-i2c&m=122465761327694&w=2
> 
> The question seemed to be more about what the driver was supposed to
> accomplish - talking about the functionality is provided by the driver
> once it's bound to the device should address that.

Ok, will probably get back to this later. For now, I left the code where
it was but changed the API to make it clearer. The actual implementation
is in one line only, so I see no urgent need to move it to an own driver
immediately. Let me know if you're fine with the new version I'll post
soon.

Thanks,
Daniel

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

* [PATCH 03/17] ARM: pxa/raumfeld: add SMSC9220 ethernet support
  2009-11-25 16:56       ` Russell King - ARM Linux
@ 2009-11-26 17:55         ` Daniel Mack
  0 siblings, 0 replies; 51+ messages in thread
From: Daniel Mack @ 2009-11-26 17:55 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Nov 25, 2009 at 04:56:54PM +0000, Russell King - ARM Linux wrote:
> On Wed, Nov 25, 2009 at 04:49:47PM +0100, Daniel Mack wrote:
> > I had it that way, but the idea is to prevent double definitions. What
> > we have now is a config for all pins needed by the ethernet device, and
> > each machine which needs that just references it. It looks more straight
> > forward this way, but eventually that might be a matter of taste :)
> > 
> > Unless anyone has a strong opinion abouth that, I'd like to keep it as
> > it is now.
> 
> How about just having each board setup all MFP configuration at boot time
> and be done with it - yes, it'll mean some duplication for the pins which
> are common, but at least you know when looking at board N how all the pins
> are configured.

Ok, thanks. Did that now, and will repost a squashed version of the
series.

Daniel

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

end of thread, other threads:[~2009-11-26 17:55 UTC | newest]

Thread overview: 51+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-25 10:42 ARM: pxa: add support for Raumfeld audio devices Daniel Mack
2009-11-25 10:42 ` [PATCH 01/17] ARM: pxa/raumfeld: add basic structure for devices Daniel Mack
2009-11-25 15:26   ` Mike Rapoport
2009-11-25 15:44     ` Daniel Mack
2009-11-25 16:51     ` Marek Vasut
2009-11-25 17:06       ` Russell King - ARM Linux
2009-11-25 10:42 ` [PATCH 02/17] ARM: pxa/raumfeld: add GPIO definitions Daniel Mack
2009-11-25 10:42 ` [PATCH 03/17] ARM: pxa/raumfeld: add SMSC9220 ethernet support Daniel Mack
2009-11-25 15:26   ` Mike Rapoport
2009-11-25 15:49     ` Daniel Mack
2009-11-25 16:56       ` Russell King - ARM Linux
2009-11-26 17:55         ` Daniel Mack
2009-11-25 10:42 ` [PATCH 04/17] ARM: pxa/raumfeld: add OHCI function Daniel Mack
2009-11-25 10:42 ` [PATCH 05/17] ARM: pxa/raumfeld: add rotary encoder support Daniel Mack
2009-11-25 15:26   ` Mike Rapoport
2009-11-25 15:50     ` Daniel Mack
2009-11-25 16:59     ` Russell King - ARM Linux
2009-11-25 10:42 ` [PATCH 06/17] ARM: pxa/raumfeld: add GPIO buttons Daniel Mack
2009-11-25 10:42 ` [PATCH 07/17] ARM: pxa/raumfeld: add GPIO connected LEDs Daniel Mack
2009-11-25 10:42 ` [PATCH 08/17] ARM: pxa/raumfeld: add one-wire function Daniel Mack
2009-11-25 17:02   ` Russell King - ARM Linux
2009-11-25 10:42 ` [PATCH 09/17] ARM: pxa/raumfeld: add NAND partitions Daniel Mack
2009-11-25 15:26   ` Mike Rapoport
2009-11-25 10:42 ` [PATCH 10/17] ARM: pxa/raumfeld: add framebuffer and backlight devices Daniel Mack
2009-11-25 10:42 ` [PATCH 11/17] ARM: pxa/raumfeld: add SPI controlled devices Daniel Mack
2009-11-25 10:42 ` [PATCH 12/17] ARM: pxa/raumfeld: add audio related functions Daniel Mack
2009-11-25 11:41   ` Mark Brown
2009-11-25 12:28     ` Daniel Mack
2009-11-25 13:07       ` Mark Brown
2009-11-25 13:53         ` Daniel Mack
2009-11-25 14:00           ` Mark Brown
2009-11-25 17:07   ` Russell King - ARM Linux
2009-11-25 10:42 ` [PATCH 13/17] ARM: pxa/raumfeld: add Marvell Libertas via SDIO Daniel Mack
2009-11-25 11:49   ` Mark Brown
2009-11-25 13:04     ` Daniel Mack
2009-11-25 13:36       ` Mark Brown
2009-11-25 10:42 ` [PATCH 14/17] ARM: pxa/raumfeld: add power supply framework Daniel Mack
2009-11-25 10:42 ` [PATCH 15/17] ARM: pxa/raumfeld: add support for I2C controlled devices Daniel Mack
2009-11-25 10:42 ` [PATCH 16/17] ALSA: ARM: add Raumfeld audio support Daniel Mack
2009-11-25 10:42   ` Daniel Mack
2009-11-25 11:02   ` Mark Brown
2009-11-25 11:02     ` Mark Brown
2009-11-25 12:24     ` Daniel Mack
2009-11-25 12:24       ` Daniel Mack
2009-11-25 13:29       ` Mark Brown
2009-11-25 13:29         ` Mark Brown
2009-11-26 17:51         ` Daniel Mack
2009-11-26 17:51           ` Daniel Mack
2009-11-25 10:42 ` [PATCH 17/17] ARM: pxa/raumfeld: Add defconfig Daniel Mack
2009-11-25 11:27 ` ARM: pxa: add support for Raumfeld audio devices Mike Rapoport
2009-11-25 12:14   ` Daniel Mack

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.