Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 78d9b805 authored by Olof Johansson's avatar Olof Johansson
Browse files

Merge tag 'omap-for-v3.9/twl-signed-v2' of...

Merge tag 'omap-for-v3.9/twl-signed-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/boards

From Tony Lidgren:
OMAP TWL updates from Peter Ujfalusi <peter.ujfalusi@ti.com>:

Update for audio support via omap-twl4030 and pwm updates in board level,
and zoom-peripherals update to not request the TWL GPIO7.

* tag 'omap-for-v3.9/twl-signed-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
  ARM: OMAP2+: Fix twl section warnings related to omap_twl4030_audio_init
  ARM: board-zoom: Do not request LCD panel enable GPIO from twl4030
  ARM: OMAP: omap3beagle: Use the pwm_leds driver to control the PMU_STAT led
  ARM: OMAP: board-4430sdp: Proper support for TWL6030 PWM LED/Backlight
  ARM: OMAP: sdp3430: Audio support via the common omap-twl4030 machine driver
  ARM: OMAP: zoom: Audio support via the common omap-twl4030 machine driver
  ARM: OMAP2+: twl-common: Allow boards to customize the twl4030 audio setup
  ARM: OMAP2+: twl-common: Add default twl4030 audio configuration
  ARM: OMAP: zoom: Zoom2 does not have extmute functionality
  ARM: OMAP: 3430sdp: Enable extmute functionality for audio
parents 61cfd873 6689c875
Loading
Loading
Loading
Loading
+20 −0
Original line number Diff line number Diff line
@@ -25,6 +25,7 @@
#include <linux/gpio.h>
#include <linux/mmc/host.h>
#include <linux/platform_data/spi-omap2-mcspi.h>
#include <linux/platform_data/omap-twl4030.h>

#include <asm/mach-types.h>
#include <asm/mach/arch.h>
@@ -209,6 +210,19 @@ static struct omap2_hsmmc_info mmc[] = {
	{}	/* Terminator */
};

static struct omap_tw4030_pdata omap_twl4030_audio_data = {
	.voice_connected = true,
	.custom_routing	= true,

	.has_hs		= OMAP_TWL4030_LEFT | OMAP_TWL4030_RIGHT,
	.has_hf		= OMAP_TWL4030_LEFT | OMAP_TWL4030_RIGHT,

	.has_mainmic	= true,
	.has_submic	= true,
	.has_hsmic	= true,
	.has_linein	= OMAP_TWL4030_LEFT | OMAP_TWL4030_RIGHT,
};

static int sdp3430_twl_gpio_setup(struct device *dev,
		unsigned gpio, unsigned ngpio)
{
@@ -225,6 +239,9 @@ static int sdp3430_twl_gpio_setup(struct device *dev,
	/* gpio + 15 is "sub_lcd_nRST" (output) */
	gpio_request_one(gpio + 15, GPIOF_OUT_INIT_LOW, "sub_lcd_nRST");

	omap_twl4030_audio_data.jack_detect = gpio + 2;
	omap_twl4030_audio_init("SDP3430", &omap_twl4030_audio_data);

	return 0;
}

@@ -382,6 +399,9 @@ static int __init omap3430_i2c_init(void)
	sdp3430_twldata.vpll2->constraints.apply_uV = true;
	sdp3430_twldata.vpll2->constraints.name = "VDVI";

	sdp3430_twldata.audio->codec->hs_extmute = 1;
	sdp3430_twldata.audio->codec->hs_extmute_gpio = -EINVAL;

	omap3_pmic_init("twl4030", &sdp3430_twldata);

	/* i2c2 on camera connector (for sensor control) and optional isp1301 */
+29 −1
Original line number Diff line number Diff line
@@ -24,8 +24,10 @@
#include <linux/gpio_keys.h>
#include <linux/regulator/machine.h>
#include <linux/regulator/fixed.h>
#include <linux/pwm.h>
#include <linux/leds.h>
#include <linux/leds_pwm.h>
#include <linux/pwm_backlight.h>
#include <linux/platform_data/omap4-keypad.h>
#include <linux/usb/musb.h>

@@ -256,10 +258,20 @@ static struct gpio_led_platform_data sdp4430_led_data = {
	.num_leds	= ARRAY_SIZE(sdp4430_gpio_leds),
};

static struct pwm_lookup sdp4430_pwm_lookup[] = {
	PWM_LOOKUP("twl-pwm", 0, "leds_pwm", "omap4::keypad"),
	PWM_LOOKUP("twl-pwm", 1, "pwm-backlight", NULL),
	PWM_LOOKUP("twl-pwmled", 0, "leds_pwm", "omap4:green:chrg"),
};

static struct led_pwm sdp4430_pwm_leds[] = {
	{
		.name		= "omap4::keypad",
		.max_brightness	= 127,
		.pwm_period_ns	= 7812500,
	},
	{
		.name		= "omap4:green:chrg",
		.pwm_id		= 1,
		.max_brightness	= 255,
		.pwm_period_ns	= 7812500,
	},
@@ -278,6 +290,20 @@ static struct platform_device sdp4430_leds_pwm = {
	},
};

static struct platform_pwm_backlight_data sdp4430_backlight_data = {
	.max_brightness = 127,
	.dft_brightness = 127,
	.pwm_period_ns = 7812500,
};

static struct platform_device sdp4430_backlight_pwm = {
	.name   = "pwm-backlight",
	.id     = -1,
	.dev    = {
		.platform_data = &sdp4430_backlight_data,
	},
};

static int omap_prox_activate(struct device *dev)
{
	gpio_set_value(OMAP4_SFH7741_ENABLE_GPIO , 1);
@@ -412,6 +438,7 @@ static struct platform_device *sdp4430_devices[] __initdata = {
	&sdp4430_gpio_keys_device,
	&sdp4430_leds_gpio,
	&sdp4430_leds_pwm,
	&sdp4430_backlight_pwm,
	&sdp4430_vbat,
	&sdp4430_dmic_codec,
	&sdp4430_abe_audio,
@@ -707,6 +734,7 @@ static void __init omap_4430sdp_init(void)
				ARRAY_SIZE(sdp4430_spi_board_info));
	}

	pwm_add_table(sdp4430_pwm_lookup, ARRAY_SIZE(sdp4430_pwm_lookup));
	status = omap4_keyboard_init(&sdp4430_keypad_data, &keypad_data);
	if (status)
		pr_err("Keypad initialization failed: %d\n", status);
+1 −1
Original line number Diff line number Diff line
@@ -722,7 +722,7 @@ static void __init cm_t3x_common_init(void)
	cm_t35_init_ethernet();
	cm_t35_init_led();
	cm_t35_init_display();
	omap_twl4030_audio_init("cm-t3x");
	omap_twl4030_audio_init("cm-t3x", NULL);

	usb_musb_init(NULL);
	cm_t35_init_usbh();
+1 −1
Original line number Diff line number Diff line
@@ -627,7 +627,7 @@ static void __init devkit8000_init(void)
	board_nand_init(devkit8000_nand_partitions,
			ARRAY_SIZE(devkit8000_nand_partitions), NAND_CS,
			NAND_BUSWIDTH_16, NULL);
	omap_twl4030_audio_init("omap3beagle");
	omap_twl4030_audio_init("omap3beagle", NULL);

	/* Ensure SDRC pins are mux'd for self-refresh */
	omap_mux_init_signal("sdrc_cke0", OMAP_PIN_OUTPUT);
+1 −1
Original line number Diff line number Diff line
@@ -629,7 +629,7 @@ static void __init igep_init(void)

	igep_flash_init();
	igep_leds_init();
	omap_twl4030_audio_init("igep2");
	omap_twl4030_audio_init("igep2", NULL);

	/*
	 * WLAN-BT combo module from MuRata which has a Marvell WLAN
Loading