tracking-2.6.29-rc2-soc-card-vs-machine-struct.patch
authorAndy Green <andy@openmoko.com>
Tue, 27 Jan 2009 14:39:18 +0000 (14:39 +0000)
committerAndy Green <agreen@octopus.localdomain>
Tue, 27 Jan 2009 14:39:18 +0000 (14:39 +0000)
Signed-off-by: Andy Green <andy@openmoko.com>

arch/arm/plat-s3c24xx/neo1973_pm_gsm.c
drivers/misc/neo1973_pm_host.c
drivers/misc/neo1973_pm_resume_reason.c
sound/soc/s3c24xx/neo1973_gta02_wm8753.c

index 7dd2891..08cdf77 100644 (file)
@@ -29,7 +29,7 @@
 
 /* For GTA02 */
 #include <mach/gta02.h>
-#include <linux/pcf50633.h>
+#include <linux/mfd/pcf50633/gpio.h>
 #include <mach/regs-gpio.h>
 #include <mach/regs-gpioj.h>
 
@@ -117,7 +117,7 @@ static ssize_t gsm_write(struct device *dev, struct device_attribute *attr,
                                case GTA02v4_SYSTEM_REV:
                                case GTA02v5_SYSTEM_REV:
                                case GTA02v6_SYSTEM_REV:
-                                       pcf50633_gpio_set(pcf50633_global,
+                                       pcf50633_gpio_set(gta02_pcf,
                                                          PCF50633_GPIO2, 1);
                                        break;
                                }
@@ -134,7 +134,7 @@ static ssize_t gsm_write(struct device *dev, struct device_attribute *attr,
                                case GTA02v4_SYSTEM_REV:
                                case GTA02v5_SYSTEM_REV:
                                case GTA02v6_SYSTEM_REV:
-                                       pcf50633_gpio_set(pcf50633_global,
+                                       pcf50633_gpio_set(gta02_pcf,
                                                          PCF50633_GPIO2, 0);
                                        break;
                                }
index bb25acd..b82a29c 100644 (file)
 
 #ifdef CONFIG_MACH_NEO1973_GTA02
 #include <mach/gta02.h>
-#include <linux/pcf50633.h>
+#include <linux/mfd/pcf50633/gpio.h>
 
 static ssize_t pm_host_read(struct device *dev, struct device_attribute *attr,
                            char *buf)
 {
        return sprintf(buf, "%d\n",
-                      pcf50633_gpio_get(pcf50633_global, PCF50633_GPO));
+                      pcf50633_gpio_get(gta02_pcf, PCF50633_GPO)
+                                               == PCF50633_GPOCFG_GPOSEL_1);
 }
 
 static ssize_t pm_host_write(struct device *dev, struct device_attribute *attr,
                             const char *buf, size_t count)
 {
        unsigned long on = simple_strtoul(buf, NULL, 10);
+       u8 val;
 
-       pcf50633_gpio_set(pcf50633_global, PCF50633_GPO, on);
+       if (on)
+               val = PCF50633_GPOCFG_GPOSEL_1;
+       else
+               val = PCF50633_GPOCFG_GPOSEL_0;
+
+
+       pcf50633_gpio_set(gta02_pcf, PCF50633_GPO, val);
 
        return count;
 }
index c7730b6..62984a5 100644 (file)
@@ -22,7 +22,7 @@
 
 #ifdef CONFIG_MACH_NEO1973_GTA02
 #include <mach/gta02.h>
-#include <linux/pcf50633.h>
+#include <linux/mfd/pcf50633/core.h>
 #endif
 
 static unsigned int *gstatus4_mapped;
@@ -79,8 +79,8 @@ static ssize_t resume_reason_read(struct device *dev,
                        end += sprintf(end, "  %s\n", resume_reasons[gta][bit]);
 
 #ifdef CONFIG_MACH_NEO1973_GTA02
-               if ((gta) && (bit == 9)) /* PMU */
-                       end += pcf50633_report_resumers(pcf50633_global, end);
+               if ((gta) && (bit == 9)); /* PMU */
+//                     end += pcf50633_report_resumers(gta02_pcf_pdata.pcf, end);
 #endif
        }
 
index dba635e..79b6b6c 100644 (file)
@@ -56,7 +56,7 @@
 #define NEO_CAPTURE_BLUETOOTH          8
 #define NEO_STEREO_TO_HANDSET_SPK      9
 
-static struct snd_soc_machine neo1973_gta02;
+static struct snd_soc_card neo1973_gta02;
 
 static int neo1973_gta02_hifi_hw_params(struct snd_pcm_substream *substream,
        struct snd_pcm_hw_params *params)
@@ -550,7 +550,6 @@ static int neo1973_gta02_wm8753_init(struct snd_soc_codec *codec)
 static struct snd_soc_dai bt_dai =
 {      .name = "Bluetooth",
        .id = 0,
-       .type = SND_SOC_DAI_PCM,
        .playback = {
                .channels_min = 1,
                .channels_max = 1,
@@ -601,8 +600,9 @@ int neo1973_gta02_resume(struct platform_device *pdev)
 #define neo1973_gta02_resume NULL
 #endif
 
-static struct snd_soc_machine neo1973_gta02 = {
+static struct snd_soc_card neo1973_gta02 = {
        .name = "neo1973-gta02",
+       .platform = &s3c24xx_soc_platform,
        .suspend_pre = neo1973_gta02_suspend,
        .resume_post = neo1973_gta02_resume,
        .dai_link = neo1973_gta02_dai,
@@ -618,8 +618,7 @@ static struct wm8753_setup_data soc_codec_data_wm8753_gta02 = {
 };
 
 static struct snd_soc_device neo1973_gta02_snd_devdata = {
-       .machine = &neo1973_gta02,
-       .platform = &s3c24xx_soc_platform,
+       .card = &neo1973_gta02,
        .codec_dev = &soc_codec_dev_wm8753,
        .codec_data = &soc_codec_data_wm8753_gta02,
 };