From 38a457d3a2aca39b0110ce101a95d92304a8f8c0 Mon Sep 17 00:00:00 2001
From: z3deverp <z3@vmsv-debian.(none)>
Date: Sat, 6 Dec 2008 23:04:03 +0900
Subject: [PATCH] camera parameter, etc.

---
 arch/arm/mach-pxa/Kconfig      |   32 ++++++++++++++++++++++++++------
 arch/arm/mach-pxa/Makefile     |    2 +-
 arch/arm/mach-pxa/sha_pon.c    |   15 ++++++++++-----
 drivers/input/keyboard/Kconfig |    2 +-
 4 files changed, 38 insertions(+), 13 deletions(-)

diff --git a/arch/arm/mach-pxa/Kconfig b/arch/arm/mach-pxa/Kconfig
index b11a26e..60dae61 100755
--- a/arch/arm/mach-pxa/Kconfig
+++ b/arch/arm/mach-pxa/Kconfig
@@ -293,18 +293,38 @@ config MACH_EZX_E2
 	default y
 	depends on PXA_EZX
 
-config ARCH_SHA_PON
+config PXA_SHA_PON
 	bool "Sharp W-ZERO3 WS0xxSH series smartphone"
 	select PXA27x
-	select MACH_SHA_PON003
-	select MACH_SHA_PON004
-	select MACH_SHA_PON007
-	select MACH_SHA_PON011
-	select MACH_SHA_PON020
 	help
 	  Say Y here if you intend to run this kernel on a
 	  Sharp W-ZERO3 WS0xxSH series(Sha_pon0xx) smartphone.
 
+config MACH_SHA_PON003
+        bool "Sharp W-ZERO3 WS003SH"
+        default y
+        depends on PXA_SHA_PON
+
+config MACH_SHA_PON004
+        bool "Sharp W-ZERO3 WS004SH"
+        default y
+        depends on PXA_SHA_PON
+
+config MACH_SHA_PON007
+        bool "Sharp W-ZERO3[es] WS007SH"
+        default y
+        depends on PXA_SHA_PON
+
+config MACH_SHA_PON011
+        bool "Sharp Advanced/W-ZERO3[es] WS011SH"
+        default y
+        depends on PXA_SHA_PON
+
+config MACH_SHA_PON020
+        bool "Sharp WILLCOM 03 WS020SH"
+        default y
+        depends on PXA_SHA_PON
+
 endmenu
 
 config PXA25x
diff --git a/arch/arm/mach-pxa/Makefile b/arch/arm/mach-pxa/Makefile
index 44854d4..b489a5c 100755
--- a/arch/arm/mach-pxa/Makefile
+++ b/arch/arm/mach-pxa/Makefile
@@ -55,7 +55,7 @@ obj-$(CONFIG_MACH_SAAR)		+= saar.o
 
 obj-$(CONFIG_MACH_ARMCORE)      += cm-x270.o
 obj-$(CONFIG_PXA_EZX)           += ezx.o
-obj-$(CONFIG_ARCH_SHA_PON)      += sha_pon.o
+obj-$(CONFIG_PXA_SHA_PON)	+= sha_pon.o
 
 # Support for blinky lights
 led-y := leds.o
diff --git a/arch/arm/mach-pxa/sha_pon.c b/arch/arm/mach-pxa/sha_pon.c
index 4e221ab..fc30e88 100755
--- a/arch/arm/mach-pxa/sha_pon.c
+++ b/arch/arm/mach-pxa/sha_pon.c
@@ -321,19 +321,20 @@ static struct pxaficp_platform_data sha_pon_irda_info = {
 
 /* Camera */
 static struct pxacamera_platform_data sha_pon_camera_info = {
+	.flags		= PXA_CAMERA_MASTER | PXA_CAMERA_DATAWIDTH_8 | 
+				PXA_CAMERA_PCLK_EN | PXA_CAMERA_MCLK_EN | 
+				PXA_CAMERA_PCP,		/*  */
+	.mclk_10khz	= 1000,		/* FIXME: test value */
 #if 0
 	int (*init)(struct device *);
 	int (*power)(struct device *, int);
 	int (*reset)(struct device *, int);
-
-	unsigned long flags;
-	unsigned long mclk_10khz;
 #endif
 };
 
 
 /* Audio */
-pxa2xx_audio_ops_t sha_pon_audio_info = {
+static pxa2xx_audio_ops_t sha_pon_audio_info = {
 #if 0
 	int (*startup)(struct snd_pcm_substream *, void *);
 	void (*shutdown)(struct snd_pcm_substream *, void *);
@@ -390,7 +391,9 @@ static void __init sha_pon003_init(void)
 #endif
 	pxa_set_mci_info(&sha_pon_mmc_info);
 	pxa_set_camera_info(&sha_pon_camera_info);
+/*
 	pxa_set_ac97_info(&sha_pon_audio_info);
+*/
 	platform_add_devices(devices003, ARRAY_SIZE(devices003));
 }
 
@@ -409,7 +412,9 @@ static void __init sha_pon007_init(void)
 #endif
 	pxa_set_mci_info(&sha_pon_mmc_info);
 	pxa_set_camera_info(&sha_pon_camera_info);
+/*
 	pxa_set_ac97_info(&sha_pon_audio_info);
+*/
 	platform_add_devices(devices007, ARRAY_SIZE(devices007));
 }
 
@@ -427,8 +432,8 @@ static void __init sha_pon011_init(void)
 #endif
 	pxa_set_mci_info(&sha_pon_mmc_info);
 	pxa_set_camera_info(&sha_pon_camera_info);
-	pxa_set_ac97_info(&sha_pon_audio_info);
 /*
+	pxa_set_ac97_info(&sha_pon_audio_info);
 	pxa_set_ficp_info(&sha_pon_irda_info);
 */
 	platform_add_devices(devices011, ARRAY_SIZE(devices011));
diff --git a/drivers/input/keyboard/Kconfig b/drivers/input/keyboard/Kconfig
index ff823f3..c144b66 100755
--- a/drivers/input/keyboard/Kconfig
+++ b/drivers/input/keyboard/Kconfig
@@ -326,7 +326,7 @@ config KEYBOARD_SH_KEYSC
 
 config KEYBOARD_SHA_PON
 	tristate "Sha_pon keyboard"
-	depends on ARCH_SHA_PON
+	depends on PXA_SHA_PON
 	default y
 	help
 	  Say Y here to enable the keyboard on the Sharp W-ZERO3 series
-- 
1.4.4.4

