Skip to content

Commit

Permalink
264 to 298 patch
Browse files Browse the repository at this point in the history
  • Loading branch information
alsutton committed Jun 12, 2013
1 parent 3cdd760 commit d804779
Show file tree
Hide file tree
Showing 77 changed files with 3,467 additions and 1,731 deletions.
4 changes: 2 additions & 2 deletions arch/arm/configs/tegra3_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,8 @@ CONFIG_BCM4329_FW_PATH="/lib/firmware/bcm4329/fw_bcm4329.bin"
CONFIG_BCM4329_NVRAM_PATH="/lib/firmware/nvram_4329.txt"
CONFIG_BCM4329_WIFI_CONTROL_FUNC=y
CONFIG_BCMDHD=m
CONFIG_BCMDHD_FW_DIR="/lib/firmware"
CONFIG_BCMDHD_NVRAM_DIR="/lib/firmware"
CONFIG_BCMDHD_FW_DIR="/system/vendor/firmware"
CONFIG_BCMDHD_NVRAM_DIR="/etc"
CONFIG_BCMDHD_WEXT=y
CONFIG_BCMDHD_WIFI_CONTROL_FUNC=y
CONFIG_BCMDHD_HW_OOB=y
Expand Down
11 changes: 11 additions & 0 deletions arch/arm/mach-tegra/baseband-xmm-power.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
#include <linux/pm_qos_params.h>
#include <mach/usb_phy.h>
#include <linux/regulator/consumer.h>
#include <linux/irq.h>
#include "board.h"
#include "board-enterprise.h"
#include "devices.h"
Expand Down Expand Up @@ -1084,6 +1085,9 @@ static int xmm_power_driver_resume(struct device *dev)
static int xmm_power_suspend_noirq(struct device *dev)
{
unsigned long flags;
struct platform_device *pdev = to_platform_device(dev);
struct baseband_power_platform_data *data
= pdev->dev.platform_data;

pr_debug("%s\n", __func__);
spin_lock_irqsave(&xmm_lock, flags);
Expand All @@ -1095,12 +1099,19 @@ static int xmm_power_suspend_noirq(struct device *dev)
return -EBUSY;
}
spin_unlock_irqrestore(&xmm_lock, flags);
irq_set_irq_type(gpio_to_irq(data->modem.xmm.ipc_ap_wake)
, IRQF_TRIGGER_FALLING);
return 0;
}

static int xmm_power_resume_noirq(struct device *dev)
{
struct platform_device *pdev = to_platform_device(dev);
struct baseband_power_platform_data *data
= pdev->dev.platform_data;
pr_debug("%s\n", __func__);
irq_set_irq_type(gpio_to_irq(data->modem.xmm.ipc_ap_wake)
, IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING);
return 0;
}

Expand Down
66 changes: 0 additions & 66 deletions arch/arm/mach-tegra/board-cardhu-sensors.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@
#include "board.h"
#include <linux/mpu.h>
#include <media/sh532u.h>
#include <media/ad5816.h>
#include <linux/bq27x00.h>
#include <mach/gpio.h>
#include <mach/edp.h>
Expand Down Expand Up @@ -601,55 +600,6 @@ static struct sh532u_platform_data pm269_sh532u_right_pdata = {
.gpio = pm269_sh532u_right_gpio_pdata,
};

static struct nvc_gpio_pdata ad5816_gpio_pdata[] = {
{ AD5816_GPIO_RESET, TEGRA_GPIO_PBB0, false, 0, },
};

static struct ad5816_platform_data ad5816_left_pdata = {
.cfg = 0,
.num = 1,
.sync = 2,
.dev_name = "focuser",
.gpio_count = ARRAY_SIZE(ad5816_gpio_pdata),
.gpio = ad5816_gpio_pdata,
};

static struct ad5816_platform_data ad5816_right_pdata = {
.cfg = 0,
.num = 2,
.sync = 1,
.dev_name = "focuser",
.gpio_count = ARRAY_SIZE(ad5816_gpio_pdata),
.gpio = ad5816_gpio_pdata,
};

static struct nvc_gpio_pdata pm269_ad5816_left_gpio_pdata[] = {
{ AD5816_GPIO_RESET, CAM1_RST_L_GPIO, false, 0, },
};

static struct ad5816_platform_data pm269_ad5816_left_pdata = {
.cfg = NVC_CFG_NODEV,
.num = 1,
.sync = 2,
.dev_name = "focuser",
.gpio_count = ARRAY_SIZE(pm269_ad5816_left_gpio_pdata),
.gpio = pm269_ad5816_left_gpio_pdata,
};

static struct nvc_gpio_pdata pm269_ad5816_right_gpio_pdata[] = {
{ AD5816_GPIO_RESET, CAM2_RST_L_GPIO, false, 0, },
};

static struct ad5816_platform_data pm269_ad5816_right_pdata = {
.cfg = NVC_CFG_NODEV,
.num = 2,
.sync = 1,
.dev_name = "focuser",
.gpio_count = ARRAY_SIZE(pm269_ad5816_right_gpio_pdata),
.gpio = pm269_ad5816_right_gpio_pdata,
};


static struct nvc_torch_pin_state cardhu_tps61050_pinstate = {
.mask = 0x0008, /*VGP3*/
.values = 0x0008,
Expand All @@ -676,10 +626,6 @@ static struct i2c_board_info cardhu_i2c6_board_info[] = {
I2C_BOARD_INFO("sh532u", 0x72),
.platform_data = &sh532u_left_pdata,
},
{
I2C_BOARD_INFO("ad5816", 0x0E),
.platform_data = &ad5816_left_pdata,
},
};

static struct i2c_board_info cardhu_i2c7_board_info[] = {
Expand All @@ -691,10 +637,6 @@ static struct i2c_board_info cardhu_i2c7_board_info[] = {
I2C_BOARD_INFO("sh532u", 0x72),
.platform_data = &sh532u_right_pdata,
},
{
I2C_BOARD_INFO("ad5816", 0x0E),
.platform_data = &ad5816_right_pdata,
},
};

static struct i2c_board_info pm269_i2c6_board_info[] = {
Expand All @@ -706,10 +648,6 @@ static struct i2c_board_info pm269_i2c6_board_info[] = {
I2C_BOARD_INFO("sh532u", 0x72),
.platform_data = &pm269_sh532u_left_pdata,
},
{
I2C_BOARD_INFO("ad5816", 0x0E),
.platform_data = &pm269_ad5816_left_pdata,
},
};

static struct i2c_board_info pm269_i2c7_board_info[] = {
Expand All @@ -721,10 +659,6 @@ static struct i2c_board_info pm269_i2c7_board_info[] = {
I2C_BOARD_INFO("sh532u", 0x72),
.platform_data = &pm269_sh532u_right_pdata,
},
{
I2C_BOARD_INFO("ad5816", 0x0E),
.platform_data = &pm269_ad5816_right_pdata,
},
};

static struct i2c_board_info cardhu_i2c8_board_info[] = {
Expand Down
97 changes: 97 additions & 0 deletions arch/arm/mach-tegra/board-cardhu.c
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,50 @@ static struct balanced_throttle throttle_list[] = {
#endif
};

#ifdef CONFIG_TEGRA_SKIN_THROTTLE
/* Skin timer trips */
static struct tegra_thermal_timer_trip skin_therm_timer_trips[] = {
/* duration, temp, hysteresis */
{ 600, 48000, 5000 },
{ 1800, 45000, 5000 },
{ -1, 43000, 8000 }, /* The duration -1 equals infinity. */
};

/* Skin active throttle size must be one. */
static struct throttle_table throttle_freqs_tskin_active_0[] = {
/* CPU, CBUS, SCLK, EMC */
{ 1200000, NO_CAP, NO_CAP, NO_CAP },
};

static struct throttle_table throttle_freqs_tskin_active_1[] = {
/* CPU, CBUS, SCLK, EMC */
{ 1000000, NO_CAP, NO_CAP, NO_CAP },
};

static struct skin_therm_active_throttle skin_therm_actives[] = {
{
.bthrot = {
.id = BALANCED_THROTTLE_ID_SKIN + 1,
.throt_tab_size =
ARRAY_SIZE(throttle_freqs_tskin_active_0),
.throt_tab = throttle_freqs_tskin_active_0,
},
.trip_temp = 33000,
.hysteresis = 0,
},
{
.bthrot = {
.id = BALANCED_THROTTLE_ID_SKIN + 2,
.throt_tab_size =
ARRAY_SIZE(throttle_freqs_tskin_active_1),
.throt_tab = throttle_freqs_tskin_active_1,
},
.trip_temp = 38000,
.hysteresis = 0,
},
};
#endif

/* All units are in millicelsius */
static struct tegra_thermal_data thermal_data = {
.shutdown_device_id = THERMAL_DEVICE_ID_NCT_EXT,
Expand All @@ -155,6 +199,10 @@ static struct tegra_thermal_data thermal_data = {
#ifdef CONFIG_TEGRA_SKIN_THROTTLE
.skin_device_id = THERMAL_DEVICE_ID_SKIN,
.temp_throttle_skin = 43000,
.skin_timer_trip_data = {
.trips = skin_therm_timer_trips,
.trip_size = ARRAY_SIZE(skin_therm_timer_trips),
},
.tc1_skin = 5,
.tc2_skin = 1,
.passive_delay_skin = 5000,
Expand Down Expand Up @@ -187,6 +235,7 @@ static struct tegra_thermal_data thermal_data = {
#endif
};

#ifdef CONFIG_BT_BLUESLEEP
static struct rfkill_gpio_platform_data cardhu_bt_rfkill_pdata[] = {
{
.name = "bt_rfkill",
Expand Down Expand Up @@ -237,6 +286,48 @@ static noinline void __init cardhu_setup_bluesleep(void)
platform_device_register(&cardhu_bluesleep_device);
return;
}
#elif defined CONFIG_BLUEDROID_PM
static struct resource cardhu_bluedroid_pm_resources[] = {
[0] = {
.name = "shutdown_gpio",
.start = TEGRA_GPIO_PU0,
.end = TEGRA_GPIO_PU0,
.flags = IORESOURCE_IO,
},
[1] = {
.name = "host_wake",
.flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE,
},
[2] = {
.name = "gpio_ext_wake",
.start = TEGRA_GPIO_PU1,
.end = TEGRA_GPIO_PU1,
.flags = IORESOURCE_IO,
},
[3] = {
.name = "gpio_host_wake",
.start = TEGRA_GPIO_PU6,
.end = TEGRA_GPIO_PU6,
.flags = IORESOURCE_IO,
},
};

static struct platform_device cardhu_bluedroid_pm_device = {
.name = "bluedroid_pm",
.id = 0,
.num_resources = ARRAY_SIZE(cardhu_bluedroid_pm_resources),
.resource = cardhu_bluedroid_pm_resources,
};

static noinline void __init cardhu_setup_bluedroid_pm(void)
{
cardhu_bluedroid_pm_resources[1].start =
cardhu_bluedroid_pm_resources[1].end =
gpio_to_irq(TEGRA_GPIO_PU6);
platform_device_register(&cardhu_bluedroid_pm_device);
return;
}
#endif

static __initdata struct tegra_clk_init_table cardhu_clk_init_table[] = {
/* name parent rate enabled */
Expand Down Expand Up @@ -918,7 +1009,9 @@ static struct platform_device *cardhu_devices[] __initdata = {
&spdif_dit_device,
&bluetooth_dit_device,
&baseband_dit_device,
#ifdef CONFIG_BT_BLUESLEEP
&cardhu_bt_rfkill_device,
#endif
&tegra_pcm_device,
&cardhu_audio_wm8903_device,
#if 0
Expand Down Expand Up @@ -1524,7 +1617,11 @@ if (0) cardhu_scroll_init();
cardhu_panel_init();
if (0) cardhu_pmon_init();
cardhu_sensors_init();
#ifdef CONFIG_BT_BLUESLEEP
cardhu_setup_bluesleep();
#elif defined CONFIG_BLUEDROID_PM
cardhu_setup_bluedroid_pm();
#endif
cardhu_sata_init();
//audio_wired_jack_init();
cardhu_pins_state_init();
Expand Down
9 changes: 9 additions & 0 deletions arch/arm/mach-tegra/board-enterprise-baseband.c
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,14 @@ static void baseband_reset(void)
gpio_set_value(MODEM_PWR_ON, 1);
}

static void baseband_stop(void)
{
/* Baseband power off */
pr_info("%s\n", __func__);
gpio_set_value(MODEM_PWR_ON, 0);
mdelay(1);
}

static int baseband_init(void)
{
int ret;
Expand All @@ -135,6 +143,7 @@ static const struct tegra_modem_operations baseband_operations = {
.init = baseband_init,
.start = baseband_start,
.reset = baseband_reset,
.stop = baseband_stop,
};

static struct tegra_usb_modem_power_platform_data baseband_pdata = {
Expand Down
Loading

0 comments on commit d804779

Please sign in to comment.