Commit f242e50e authored by Ola Lilja's avatar Ola Lilja Committed by Mark Brown

mfd/ab8500: Move platform-data for ab8500-codec into mfd-driver

The platform-data used by the Ux500 ASoC-driver is moved from the
machine-driver context into the codec-driver context. This means
adding the platform-data for 'ab8500-codec' into the main AB8500
platform-data.
Signed-off-by: default avatarOla Lilja <ola.o.lilja@stericsson.com>
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
parent cfaf0251
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
#include <linux/mfd/tc3589x.h> #include <linux/mfd/tc3589x.h>
#include <linux/mfd/tps6105x.h> #include <linux/mfd/tps6105x.h>
#include <linux/mfd/abx500/ab8500-gpio.h> #include <linux/mfd/abx500/ab8500-gpio.h>
#include <linux/mfd/abx500/ab8500-codec.h>
#include <linux/leds-lp5521.h> #include <linux/leds-lp5521.h>
#include <linux/input.h> #include <linux/input.h>
#include <linux/smsc911x.h> #include <linux/smsc911x.h>
...@@ -97,6 +98,18 @@ static struct ab8500_gpio_platform_data ab8500_gpio_pdata = { ...@@ -97,6 +98,18 @@ static struct ab8500_gpio_platform_data ab8500_gpio_pdata = {
0x7A, 0x00, 0x00}, 0x7A, 0x00, 0x00},
}; };
/* ab8500-codec */
static struct ab8500_codec_platform_data ab8500_codec_pdata = {
.amics = {
.mic1_type = AMIC_TYPE_DIFFERENTIAL,
.mic2_type = AMIC_TYPE_DIFFERENTIAL,
.mic1a_micbias = AMIC_MICBIAS_VAMIC1,
.mic1b_micbias = AMIC_MICBIAS_VAMIC1,
.mic2_micbias = AMIC_MICBIAS_VAMIC2
},
.ear_cmv = EAR_CMV_0_95V
};
static struct gpio_keys_button snowball_key_array[] = { static struct gpio_keys_button snowball_key_array[] = {
{ {
.gpio = 32, .gpio = 32,
...@@ -195,6 +208,7 @@ static struct ab8500_platform_data ab8500_platdata = { ...@@ -195,6 +208,7 @@ static struct ab8500_platform_data ab8500_platdata = {
.regulator = ab8500_regulators, .regulator = ab8500_regulators,
.num_regulator = ARRAY_SIZE(ab8500_regulators), .num_regulator = ARRAY_SIZE(ab8500_regulators),
.gpio = &ab8500_gpio_pdata, .gpio = &ab8500_gpio_pdata,
.codec = &ab8500_codec_pdata,
}; };
static struct resource ab8500_resources[] = { static struct resource ab8500_resources[] = {
......
/*
* Copyright (C) ST-Ericsson SA 2012
*
* Author: Ola Lilja <ola.o.lilja@stericsson.com>
* for ST-Ericsson.
*
* License terms:
*
* 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.
*/
#ifndef AB8500_CORE_CODEC_H
#define AB8500_CORE_CODEC_H
/* Mic-types */
enum amic_type {
AMIC_TYPE_SINGLE_ENDED,
AMIC_TYPE_DIFFERENTIAL
};
/* Mic-biases */
enum amic_micbias {
AMIC_MICBIAS_VAMIC1,
AMIC_MICBIAS_VAMIC2
};
/* Bias-voltage */
enum ear_cm_voltage {
EAR_CMV_0_95V,
EAR_CMV_1_10V,
EAR_CMV_1_27V,
EAR_CMV_1_58V
};
/* Analog microphone settings */
struct amic_settings {
enum amic_type mic1_type;
enum amic_type mic2_type;
enum amic_micbias mic1a_micbias;
enum amic_micbias mic1b_micbias;
enum amic_micbias mic2_micbias;
};
/* Platform data structure for the audio-parts of the AB8500 */
struct ab8500_codec_platform_data {
struct amic_settings amics;
enum ear_cm_voltage ear_cmv;
};
#endif
...@@ -266,6 +266,7 @@ struct ab8500 { ...@@ -266,6 +266,7 @@ struct ab8500 {
struct regulator_reg_init; struct regulator_reg_init;
struct regulator_init_data; struct regulator_init_data;
struct ab8500_gpio_platform_data; struct ab8500_gpio_platform_data;
struct ab8500_codec_platform_data;
/** /**
* struct ab8500_platform_data - AB8500 platform data * struct ab8500_platform_data - AB8500 platform data
...@@ -284,6 +285,7 @@ struct ab8500_platform_data { ...@@ -284,6 +285,7 @@ struct ab8500_platform_data {
int num_regulator; int num_regulator;
struct regulator_init_data *regulator; struct regulator_init_data *regulator;
struct ab8500_gpio_platform_data *gpio; struct ab8500_gpio_platform_data *gpio;
struct ab8500_codec_platform_data *codec;
}; };
extern int __devinit ab8500_init(struct ab8500 *ab8500, extern int __devinit ab8500_init(struct ab8500 *ab8500,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment