Skip to content

Commit

Permalink
add support for bluetooth AVRCP
Browse files Browse the repository at this point in the history
fix i2c rates
  • Loading branch information
r3d4 committed Apr 9, 2012
1 parent fb2df25 commit dfeb559
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 69 deletions.
2 changes: 1 addition & 1 deletion arch/arm/configs/omap_nowplus_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -993,7 +993,7 @@ CONFIG_INPUT_NOWPLUS_POWER_KEY=y
# CONFIG_INPUT_YEALINK is not set
# CONFIG_INPUT_CM109 is not set
# CONFIG_INPUT_TWL4030_PWRBUTTON is not set
# CONFIG_INPUT_UINPUT is not set

This comment has been minimized.

Copy link
@nei4

nei4 Apr 20, 2012

BUGS found here for normal touch screen:
after I update this commit and compiled kernel, many users found the touch screen can't work, but a little works ; then

then I roll back to your nand mtd commit , touch screen work's well , please check it , thanks

Bug found on commit dfeb559

CONFIG_INPUT_UINPUT=y
# CONFIG_INPUT_GPIO is not set
# CONFIG_INPUT_GPIO_ROTARY_ENCODER is not set
# CONFIG_INPUT_HALLEFFECT_BU52014HV is not set
Expand Down
24 changes: 19 additions & 5 deletions arch/arm/mach-omap2/board-nowplus.c
Original file line number Diff line number Diff line change
Expand Up @@ -1330,7 +1330,7 @@ static struct regulator_init_data nowplus_vaux2 = {
.min_uV = 2800000,
.max_uV = 2800000,
.apply_uV = true,
.always_on = true,
//.always_on = true,
.valid_modes_mask = REGULATOR_MODE_NORMAL
| REGULATOR_MODE_STANDBY,
.valid_ops_mask = REGULATOR_CHANGE_MODE
Expand Down Expand Up @@ -1565,7 +1565,16 @@ static struct twl4030_script wakeup_p3_script __initdata = {
.size = ARRAY_SIZE(wakeup_p3_seq),
.flags = TWL4030_WAKEUP3_SCRIPT,
};
/* warm reset sequence:
> omap_prcm_arch_reset: set OMAP_RST_GS Global Warm Reset
> OMAP drive SYS_nRESWARM(=TWL nRESWARM) 1>0
> TWL start wrst sequence
struct twl4030_ins {
u16 pmb_message;
u8 delay;
};
*/
static struct twl4030_ins wrst_seq[] __initdata = {
/*
* Reset twl4030.
Expand Down Expand Up @@ -1810,13 +1819,18 @@ static struct i2c_board_info __initdata nowplus_i2c3_boardinfo[] = {

static int __init nowplus_i2c_init(void)
{
omap_register_i2c_bus(2, 200, nowplus_i2c2_boardinfo,
ARRAY_SIZE(nowplus_i2c2_boardinfo));
/* TWL4030-USB module had a dependency on FSA9480 USB Switch device which is
* connected to I2C2 channel, so I2C channel 2 will get
* registered first and then followed by I2C1 channel. */

//peripherie
omap_register_i2c_bus(2, 400, nowplus_i2c2_boardinfo,
ARRAY_SIZE(nowplus_i2c2_boardinfo));
//pmic
omap_register_i2c_bus(1, 400, nowplus_i2c1_boardinfo,
ARRAY_SIZE(nowplus_i2c1_boardinfo));

omap_register_i2c_bus(3, 100, nowplus_i2c3_boardinfo,
// tsp
omap_register_i2c_bus(3, 400, nowplus_i2c3_boardinfo,
ARRAY_SIZE(nowplus_i2c3_boardinfo));
return 0;
}
Expand Down
87 changes: 24 additions & 63 deletions drivers/i2c/chips/twl4030-poweroff.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,23 @@ void twl4030_poweroff(void)
{
u8 uninitialized_var(val);
int err;
#if 0
/* Make sure SEQ_OFFSYNC is set so that all the res goes to wait-on */
err = twl_i2c_read_u8(TWL4030_MODULE_PM_MASTER, &val,
CFG_P123_TRANSITION);
if (err) {
pr_warning("I2C error %d while reading TWL4030 PM_MASTER CFG_P123_TRANSITION\n", err);
return;
}


val |= SEQ_OFFSYNC;
err = twl_i2c_write_u8(TWL4030_MODULE_PM_MASTER, val,
CFG_P123_TRANSITION);
if (err) {
pr_warning("I2C error %d while writing TWL4030 PM_MASTER CFG_P123_TRANSITION\n", err);
return;
}
#endif
err = twl_i2c_read_u8(TWL4030_MODULE_PM_MASTER, &val,
PWR_P1_SW_EVENTS);
if (err) {
Expand All @@ -63,7 +78,7 @@ void twl4030_poweroff(void)
}

// val |= PWR_STOPON_POWERON | PWR_DEVOFF;
val |= PWR_DEVOFF; //no backup, real power off
val |= PWR_DEVOFF;

err = twl_i2c_write_u8(TWL4030_MODULE_PM_MASTER, val,
PWR_P1_SW_EVENTS);
Expand Down Expand Up @@ -125,69 +140,15 @@ static void nowplus_poweroff(void)
};



static void zeus_poweroff(void)
static int __init twl4030_poweroff_init(void)
{
/* int n_usbic_state; */

printk("\nZEUS BOARD GOING TO SHUTDOWN!!!\n");

#if defined(CONFIG_USB_ANDROID)
android_usb_set_connected(0);
#endif

/* get_real_usbic_state(); */
//gpio_direction_output(GPIO_MSM_RST,0);
//gpio_direction_output(GPIO_FONE_ACTIVE, 0);
// if (GPIO_TA_CONNECTED_N is LOW)

tl2796_lcd_poweroff();

#if 0
if (__do_forced_modemoff != NULL)
{
printk("__do_forced_modemoff\n\n");
__do_forced_modemoff();
}

msleep(2000);
#endif
if ( get_real_usbic_state() )
{
printk("Warmreset by TA or USB or Jtag\n\n");

preempt_disable();
local_irq_disable();
local_fiq_disable();
/*PS HOLD*/
if(gpio_request(OMAP_GPIO_PS_HOLD_PU, "OMAP_GPIO_PS_HOLD_PU") < 0 ){
printk(KERN_ERR "\n FAILED TO REQUEST GPIO %d \n",OMAP_GPIO_PS_HOLD_PU);
return 1;
}
gpio_direction_output(OMAP_GPIO_PS_HOLD_PU, 1);

#if 1

/* using watchdog reset */
omap_watchdog_reset();
/* machine_restart("ta_inserted"); */
#else
/* using core_dpll_warmreset with global reset */
//omap3_configure_core_dpll_warmreset();
//machine_restart("ta_inserted");
#endif

while(1);
}
else
{
printk("Power Off !\n\n");
gpio_set_value(OMAP_GPIO_PS_HOLD_PU, 0);
twl4030_poweroff();
while(1);
}

return;
}



static int __init twl4030_poweroff_init(void)
{
pm_power_off = nowplus_poweroff;

return 0;
Expand Down

1 comment on commit dfeb559

@nei4
Copy link

@nei4 nei4 commented on dfeb559 Apr 19, 2012

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BUGS found here for normal touch screen:
after I update this commit and compiled kernel, many users found the touch screen can't work, but a little works ; then
then I roll back to your nand mtd commit , touch screen work's well , please check it , thanks

Please sign in to comment.