Skip to content

Commit

Permalink
ARM: S3C64XX: Update configuration for WM5102 module on Cragganmore
Browse files Browse the repository at this point in the history
SPI is also connected on the board, use that instead of I2C as it's much
faster. Also define platform data now the core driver is in mainline.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
[kgene.kim@samsung.com: fixed build error by inclusion missed header]
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
  • Loading branch information
Mark Brown authored and Kukjin Kim committed Aug 10, 2012
1 parent 0d7614f commit 853b1eb
Showing 1 changed file with 31 additions and 5 deletions.
36 changes: 31 additions & 5 deletions arch/arm/mach-s3c64xx/mach-crag6410-module.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#include <linux/mfd/wm831x/irq.h>
#include <linux/mfd/wm831x/gpio.h>
#include <linux/mfd/wm8994/pdata.h>
#include <linux/mfd/arizona/pdata.h>

#include <linux/regulator/machine.h>

Expand Down Expand Up @@ -181,9 +182,33 @@ static const struct i2c_board_info wm1277_devs[] = {
},
};

static const struct i2c_board_info wm5102_devs[] = {
{ I2C_BOARD_INFO("wm5102", 0x1a),
.irq = GLENFARCLAS_PMIC_IRQ_BASE + WM831X_IRQ_GPIO_2, },
static struct arizona_pdata wm5102_pdata = {
.ldoena = S3C64XX_GPN(7),
.gpio_base = CODEC_GPIO_BASE,
.irq_active_high = true,
.micd_pol_gpio = CODEC_GPIO_BASE + 4,
.gpio_defaults = {
[2] = 0x10000, /* AIF3TXLRCLK */
[3] = 0x4, /* OPCLK */
},
};

static struct s3c64xx_spi_csinfo wm5102_spi_csinfo = {
.line = S3C64XX_GPN(5),
};

static struct spi_board_info wm5102_spi_devs[] = {
[0] = {
.modalias = "wm5102",
.max_speed_hz = 10 * 1000 * 1000,
.bus_num = 0,
.chip_select = 0,
.mode = SPI_MODE_0,
.irq = GLENFARCLAS_PMIC_IRQ_BASE +
WM831X_IRQ_GPIO_2,
.controller_data = &wm5102_spi_csinfo,
.platform_data = &wm5102_pdata,
},
};

static const struct i2c_board_info wm6230_i2c_devs[] = {
Expand Down Expand Up @@ -223,8 +248,9 @@ static __devinitdata const struct {
{ .id = 0x3c, .name = "1273-EV1 Longmorn" },
{ .id = 0x3d, .name = "1277-EV1 Littlemill",
.i2c_devs = wm1277_devs, .num_i2c_devs = ARRAY_SIZE(wm1277_devs) },
{ .id = 0x3e, .name = "WM5102-6271-EV1-CS127",
.i2c_devs = wm5102_devs, .num_i2c_devs = ARRAY_SIZE(wm5102_devs) },
{ .id = 0x3e, .name = "WM5102-6271-EV1-CS127 Amrut",
.spi_devs = wm5102_spi_devs,
.num_spi_devs = ARRAY_SIZE(wm5102_spi_devs) },
};

static __devinit int wlf_gf_module_probe(struct i2c_client *i2c,
Expand Down

0 comments on commit 853b1eb

Please sign in to comment.