#include <linux/platform_device.h>
extern u32 board_id;
+extern struct sfi_soft_platform_id spid;
extern int intel_mid_pci_init(void);
extern int get_gpio_by_name(const char *name);
extern void *get_oem0_table(void);
#include <linux/scatterlist.h>
#include <linux/init.h>
#include <linux/sfi.h>
+#include <sound/msic_audio_platform.h>
+#include <sound/sn95031_platform.h>
#include <linux/platform_device.h>
#include <linux/mfd/intel_msic.h>
#include <asm/intel-mid.h>
};
+static struct sn95031_platform_data sn95031_pdata = {
+ .spid = &spid,
+};
+
+static struct msic_audio_platform_data msic_audio_pdata = {
+ .spid = &spid,
+};
+
void *msic_audio_platform_data(void *info)
{
int ret;
return NULL;
}
+ ret = platform_device_add_data(pdev, &sn95031_pdata,
+ sizeof(struct sn95031_platform_data));
+ if (ret) {
+ pr_err("failed to add sn95031 platform data\n");
+ platform_device_put(pdev);
+ return NULL;
+ }
+
ret = platform_device_add(pdev);
if (ret) {
pr_err("failed to add sn95031 platform device\n");
if (strncmp(entry->name, "msic_audio", 16) == 0)
handle_ipc_irq_res(entry->irq, ipc_msic_audio_res);
- return NULL;
+ return &msic_audio_pdata;
}
--- /dev/null
+/*
+ * sound/msic_audio_platform.h -- Platform data for MSIC_AUDIO
+ *
+ * (C) Copyright 2012 Intel Corporation
+ * Author:
+ *
+ * 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; version 2
+ * of the License.
+ */
+
+#ifndef __SND_MSIC_AUDIO_PLATFORM_H
+#define __SND_MSIC_AUDIO_PLATFORM_H
+
+
+#include <linux/sfi.h>
+struct msic_audio_platform_data {
+ /* Intel software platform id*/
+ const struct sfi_soft_platform_id *spid;
+};
+
+#endif
--- /dev/null
+/*
+ * sound/sn95031_platform.h -- Platform data for SN95031
+ *
+ * (C) Copyright 2012 Intel Corporation
+ * Author:
+ *
+ * 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; version 2
+ * of the License.
+ */
+
+#ifndef __SND_SN95031_PLATFORM_H
+#define __SND_SN95031_PLATFORM_H
+
+
+#include <linux/sfi.h>
+struct sn95031_platform_data {
+ /* Intel software platform id*/
+ const struct sfi_soft_platform_id *spid;
+};
+
+#endif
unsigned int mfld_jack_lp_flag;
unsigned int hs_switch;
unsigned int sn95031_lo_dac;
+ struct msic_audio_platform_data *pdata;
#ifdef CONFIG_HAS_WAKELOCK
struct wake_lock *jack_wake_lock;
#endif