Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge Y300-J1 release (19/11/2013)
  • Loading branch information
Daz Jones committed Nov 24, 2013
1 parent c25d029 commit 9a4809f
Show file tree
Hide file tree
Showing 67 changed files with 2,960 additions and 1,275 deletions.
7 changes: 3 additions & 4 deletions arch/arm/configs/hw_msm7x27a_defconfig
Expand Up @@ -79,7 +79,7 @@ CONFIG_PREEMPT_RCU=y
# CONFIG_RCU_BOOST is not set
CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y
CONFIG_LOG_BUF_SHIFT=17
CONFIG_LOG_BUF_SHIFT=21
CONFIG_CGROUPS=y
# CONFIG_CGROUP_DEBUG is not set
CONFIG_CGROUP_FREEZER=y
Expand Down Expand Up @@ -500,7 +500,7 @@ CONFIG_HUAWEI_SETTING_TIMER_FOR_VIBRATOR_OFF=y
CONFIG_HUAWEI_FEATURE_OEMINFO=y
CONFIG_HUAWEI_MTK6252_MODEM=y
CONFIG_HUAWEI_POWER_DOWN_CHARGE=y
# CONFIG_HUAWEI_RPC_CRASH_DEBUG is not set
CONFIG_HUAWEI_RPC_CRASH_DEBUG=y
CONFIG_HUAWEI_KEY_TEST=y
CONFIG_HUAWEI_SMEM_SLEEP_LOG=y
# CONFIG_HUAWEI_KERNEL_DEBUG is not set
Expand Down Expand Up @@ -3165,8 +3165,7 @@ CONFIG_HAVE_ARCH_KGDB=y
# CONFIG_KGDB is not set
# CONFIG_TEST_KSTRTOX is not set
CONFIG_SUPPORT_SYSTEMTAP=y
# CONFIG_SRECORDER_MSM is not set
# CONFIG_SRECORDER_POWERCOLLAPS is not set
CONFIG_SRECORDER_MSM=y
CONFIG_DEVICE_CHECK=y
# CONFIG_STRICT_DEVMEM is not set
CONFIG_ARM_UNWIND=y
Expand Down
86 changes: 44 additions & 42 deletions arch/arm/configs/hw_msm8x25_defconfig
Expand Up @@ -370,6 +370,7 @@ CONFIG_MACH_MSM8X25_U8950D=y
CONFIG_MACH_MSM8X25_U8950=y
CONFIG_MACH_MSM8X25_C8812P=y
CONFIG_MACH_MSM8X25_C8833D=y
CONFIG_MACH_MSM8X25_Y300_J1=y
CONFIG_MACH_MSM8X25_C8813=y
CONFIG_MACH_MSM8X25_H881C=y
CONFIG_MACH_MSM8X25_Y301_A1=y
Expand Down Expand Up @@ -2173,6 +2174,7 @@ CONFIG_HUAWEI_CAMERA_SENSOR_HI542=y
# CONFIG_OV8825 is not set
CONFIG_MSM_CAMERA_FLASH=y
CONFIG_HUAWEI_FEATURE_TPS61310=y
CONFIG_HUAWEI_FEATURE_LM3642=y
CONFIG_HW_TORCH=y
CONFIG_MSM_CAMERA_SENSOR=y
CONFIG_MSM_ACTUATOR=y
Expand Down Expand Up @@ -2488,53 +2490,53 @@ CONFIG_USB_HID=y
#
# Special HID drivers
#
# CONFIG_HID_A4TECH is not set
# CONFIG_HID_ACRUX is not set
CONFIG_HID_A4TECH=y
CONFIG_HID_ACRUX=y
CONFIG_HID_APPLE=y
# CONFIG_HID_BELKIN is not set
# CONFIG_HID_CHERRY is not set
# CONFIG_HID_CHICONY is not set
# CONFIG_HID_PRODIKEYS is not set
# CONFIG_HID_CYPRESS is not set
# CONFIG_HID_DRAGONRISE is not set
# CONFIG_HID_EMS_FF is not set
# CONFIG_HID_ELECOM is not set
# CONFIG_HID_EZKEY is not set
# CONFIG_HID_HOLTEK is not set
# CONFIG_HID_KEYTOUCH is not set
# CONFIG_HID_KYE is not set
# CONFIG_HID_UCLOGIC is not set
# CONFIG_HID_WALTOP is not set
# CONFIG_HID_GYRATION is not set
# CONFIG_HID_TWINHAN is not set
# CONFIG_HID_KENSINGTON is not set
# CONFIG_HID_LCPOWER is not set
CONFIG_HID_BELKIN=y
CONFIG_HID_CHERRY=y
CONFIG_HID_CHICONY=y
CONFIG_HID_PRODIKEYS=y
CONFIG_HID_CYPRESS=y
CONFIG_HID_DRAGONRISE=y
CONFIG_HID_EMS_FF=y
CONFIG_HID_ELECOM=y
CONFIG_HID_EZKEY=y
CONFIG_HID_HOLTEK=y
CONFIG_HID_KEYTOUCH=y
CONFIG_HID_KYE=y
CONFIG_HID_UCLOGIC=y
CONFIG_HID_WALTOP=y
CONFIG_HID_GYRATION=y
CONFIG_HID_TWINHAN=y
CONFIG_HID_KENSINGTON=y
CONFIG_HID_LCPOWER=y
# CONFIG_HID_LOGITECH is not set
CONFIG_HID_MAGICMOUSE=y
CONFIG_HID_MICROSOFT=y
# CONFIG_HID_MONTEREY is not set
# CONFIG_HID_MULTITOUCH is not set
# CONFIG_HID_NTRIG is not set
# CONFIG_HID_ORTEK is not set
# CONFIG_HID_PANTHERLORD is not set
# CONFIG_HID_PETALYNX is not set
# CONFIG_HID_PICOLCD is not set
# CONFIG_HID_PRIMAX is not set
# CONFIG_HID_ROCCAT is not set
# CONFIG_HID_SAITEK is not set
# CONFIG_HID_SAMSUNG is not set
# CONFIG_HID_SONY is not set
# CONFIG_HID_SPEEDLINK is not set
# CONFIG_HID_SUNPLUS is not set
# CONFIG_HID_GREENASIA is not set
# CONFIG_HID_SMARTJOYPLUS is not set
# CONFIG_HID_TIVO is not set
# CONFIG_HID_TOPSEED is not set
# CONFIG_HID_THRUSTMASTER is not set
# CONFIG_HID_WACOM is not set
CONFIG_HID_MONTEREY=y
CONFIG_HID_MULTITOUCH=y
CONFIG_HID_NTRIG=y
CONFIG_HID_ORTEK=y
CONFIG_HID_PANTHERLORD=y
CONFIG_HID_PETALYNX=y
CONFIG_HID_PICOLCD=y
CONFIG_HID_PRIMAX=y
CONFIG_HID_ROCCAT=y
CONFIG_HID_SAITEK=y
CONFIG_HID_SAMSUNG=y
CONFIG_HID_SONY=y
CONFIG_HID_SPEEDLINK=y
CONFIG_HID_SUNPLUS=y
CONFIG_HID_GREENASIA=y
CONFIG_HID_SMARTJOYPLUS=y
CONFIG_HID_TIVO=y
CONFIG_HID_TOPSEED=y
CONFIG_HID_THRUSTMASTER=y
CONFIG_HID_WACOM=y
# CONFIG_HID_WIIMOTE is not set
# CONFIG_HID_ZEROPLUS is not set
# CONFIG_HID_ZYDACRON is not set
CONFIG_HID_ZEROPLUS=y
CONFIG_HID_ZYDACRON=y
# CONFIG_USB_ARCH_HAS_OHCI is not set
CONFIG_USB_ARCH_HAS_EHCI=y
# CONFIG_USB_ARCH_HAS_XHCI is not set
Expand Down
8 changes: 7 additions & 1 deletion arch/arm/mach-msm/Kconfig
Expand Up @@ -1036,7 +1036,13 @@ config MACH_MSM8X25_C8833D
bool "MSM8X25_C8833D SURF"
help
Support for the HUAWEI 8x25 C8833D board.

config MACH_MSM8X25_Y300_J1
depends on ARCH_MSM8625
depends on !MSM_STACKED_MEMORY
default n
bool "MSM8X25_Y300_J1 SURF"
help
Support for the HUAWEI 8x25 Y300_J1 board.
config MACH_MSM8X25_C8813
depends on ARCH_MSM8625
depends on !MSM_STACKED_MEMORY
Expand Down
24 changes: 16 additions & 8 deletions arch/arm/mach-msm/audio-7627a-devices.c
Expand Up @@ -238,14 +238,22 @@ static struct cad_endpoint cad_endpoints_list[] = {
CAD(MTK_HANDSET_MUSIC_TX, 38, (SNDDEV_CAP_TX | SNDDEV_CAP_VOICE)),
CAD(MTK_HEADSET_MUSIC_TX, 39, (SNDDEV_CAP_TX | SNDDEV_CAP_VOICE)),
CAD(MTK_SPEAKER_MUSIC_TX, 40, (SNDDEV_CAP_TX | SNDDEV_CAP_VOICE)),
CAD(WIFI_CALL_HANDSET_RX, 41, (SNDDEV_CAP_RX | SNDDEV_CAP_VOICE)),
CAD(WIFI_CALL_HEADSET_RX, 42, (SNDDEV_CAP_RX | SNDDEV_CAP_VOICE)),
CAD(WIFI_CALL_SPEAKER_RX, 43, (SNDDEV_CAP_RX | SNDDEV_CAP_VOICE)),
CAD(WIFI_CALL_HANDSET_TX, 44, (SNDDEV_CAP_TX | SNDDEV_CAP_VOICE)),
CAD(WIFI_CALL_HEADSET_TX, 45, (SNDDEV_CAP_TX | SNDDEV_CAP_VOICE)),
CAD(WIFI_CALL_SPEAKER_TX, 46, (SNDDEV_CAP_TX | SNDDEV_CAP_VOICE)),
CAD(WIFI_CALL_BT_SCO_RX, 47, (SNDDEV_CAP_RX | SNDDEV_CAP_VOICE)),
CAD(WIFI_CALL_BT_SCO_TX, 48, (SNDDEV_CAP_TX | SNDDEV_CAP_VOICE)),
/*
* NOTE: based on SBA 20301C patch, modify the index of audio path.
*/
CAD(SPEAKER_RINGTONE_RX, 41, (SNDDEV_CAP_RX | SNDDEV_CAP_VOICE)),

CAD(HANDSET_SLOWTALK_RX, 42, (SNDDEV_CAP_RX | SNDDEV_CAP_VOICE)),
CAD(HANDSET_SLOWTALK_TX, 43, (SNDDEV_CAP_RX | SNDDEV_CAP_VOICE)),
CAD(HANDSET_RVE_RX, 44, (SNDDEV_CAP_RX | SNDDEV_CAP_VOICE)),
CAD(HANDSET_RVE_TX, 45, (SNDDEV_CAP_RX | SNDDEV_CAP_VOICE)),
CAD(HANDSET_SLOWTALK_AND_RVE_RX, 46, (SNDDEV_CAP_RX | SNDDEV_CAP_VOICE)),
CAD(HANDSET_SLOWTALK_AND_RVE_TX, 47, (SNDDEV_CAP_RX | SNDDEV_CAP_VOICE)),
CAD(HEADSET_SLOWTALK_RX, 48, (SNDDEV_CAP_RX | SNDDEV_CAP_VOICE)),
CAD(HEADSET_SLOWTALK_TX, 49, (SNDDEV_CAP_RX | SNDDEV_CAP_VOICE)),
CAD(SPEAKER_SLOWTALK_RX, 50, (SNDDEV_CAP_RX | SNDDEV_CAP_VOICE)),
CAD(SPEAKER_SLOWTALK_TX, 51, (SNDDEV_CAP_RX | SNDDEV_CAP_VOICE)),

CAD(MAX, 80, SNDDEV_CAP_NONE),
};
#undef CAD
Expand Down
83 changes: 61 additions & 22 deletions arch/arm/mach-msm/board-msm7627a-io.c
Expand Up @@ -426,36 +426,40 @@ static int power_switch(int pm)
/* use gpio free to release */
static int set_touch_interrupt_gpio(void)
{
int gpio_config = 0;
int ret = 0;
int gpio_config = 0;
int ret = 0;

gpio_config = GPIO_CFG(MSM_7X27A_TOUCH_INT_PIN,0, GPIO_CFG_INPUT, GPIO_CFG_PULL_UP,GPIO_CFG_2MA);
ret = gpio_tlmm_config(gpio_config, GPIO_CFG_ENABLE);
ret = gpio_request(MSM_7X27A_TOUCH_INT_PIN, "TOUCH_INT");
if (ret)
{
pr_err("%s:touch int gpio config failed\n", __func__);
pr_err("%s:touch int gpio %d request failed\n", __func__, MSM_7X27A_TOUCH_INT_PIN);
return ret;
}
ret = gpio_request(MSM_7X27A_TOUCH_INT_PIN, "TOUCH_INT");

gpio_config = GPIO_CFG(MSM_7X27A_TOUCH_INT_PIN,0, GPIO_CFG_INPUT, GPIO_CFG_PULL_UP,GPIO_CFG_2MA);
ret = gpio_tlmm_config(gpio_config, GPIO_CFG_ENABLE);
if (ret)
{
pr_err("%s:touch int gpio request failed\n", __func__);
pr_err("%s:touch int gpio %d config failed\n", __func__, MSM_7X27A_TOUCH_INT_PIN);
gpio_free(MSM_7X27A_TOUCH_INT_PIN);
return ret;
}

ret = gpio_direction_input(MSM_7X27A_TOUCH_INT_PIN);
if (ret)
{
pr_err("%s:touch int gpio input failed\n", __func__);
pr_err("%s:touch int gpio %d input failed\n", __func__, MSM_7X27A_TOUCH_INT_PIN);
gpio_free(MSM_7X27A_TOUCH_INT_PIN);
return ret;
}

gpio_free(MSM_7X27A_TOUCH_INT_PIN);
gpio_free(MSM_7X27A_TOUCH_INT_PIN);
return ret;
}
/*we use this to detect the probe is detected*/
static void set_touch_probe_flag(int detected)
{
if(detected >= 0)
if(detected > 0)
{
atomic_set(&touch_detected_yet, 1);
}
Expand All @@ -478,27 +482,48 @@ static int read_touch_probe_flag(void)
static int touch_reset(void)
{
int ret = 0;
int gpio_config = 0;
gpio_config = GPIO_CFG(MSM_7x27A_TOUCH_RESET_PIN,0, GPIO_CFG_OUTPUT, GPIO_CFG_PULL_UP,GPIO_CFG_2MA);
ret = gpio_tlmm_config(gpio_config, GPIO_CFG_ENABLE);
int gpio_config = 0;

ret = gpio_request(MSM_7x27A_TOUCH_RESET_PIN, "TOUCH_RESET");
if (ret)
{
pr_err("%s:touch int gpio config failed\n", __func__);
pr_err("%s:touch reset gpio %d request failed\n", __func__, MSM_7x27A_TOUCH_RESET_PIN);
return ret;
}
ret = gpio_request(MSM_7x27A_TOUCH_RESET_PIN, "TOUCH_RESET");

gpio_config = GPIO_CFG(MSM_7x27A_TOUCH_RESET_PIN,0, GPIO_CFG_OUTPUT, GPIO_CFG_PULL_UP,GPIO_CFG_2MA);
ret = gpio_tlmm_config(gpio_config, GPIO_CFG_ENABLE);
if (ret)
{
pr_err("%s:touch int gpio request failed\n", __func__);
pr_err("%s:touch reset gpio %d config failed\n", __func__, MSM_7x27A_TOUCH_RESET_PIN);
gpio_free(MSM_7x27A_TOUCH_RESET_PIN);
return ret;
}

ret = gpio_direction_output(MSM_7x27A_TOUCH_RESET_PIN, 1);
if (ret)
{
pr_err("%s:touch reset gpio %d output failed\n", __func__, MSM_7x27A_TOUCH_RESET_PIN);
gpio_free(MSM_7x27A_TOUCH_RESET_PIN);
return ret;
}
mdelay(5);
ret = gpio_direction_output(MSM_7x27A_TOUCH_RESET_PIN, 0);
if (ret)
{
pr_err("%s:touch reset gpio %d output failed\n", __func__, MSM_7x27A_TOUCH_RESET_PIN);
gpio_free(MSM_7x27A_TOUCH_RESET_PIN);
return ret;
}
mdelay(10);
ret = gpio_direction_output(MSM_7x27A_TOUCH_RESET_PIN, 1);
mdelay(50);//must more than 10ms.
if (ret)
{
pr_err("%s:touch reset gpio %d output failed\n", __func__, MSM_7x27A_TOUCH_RESET_PIN);
gpio_free(MSM_7x27A_TOUCH_RESET_PIN);
return ret;
}
msleep(50);//must more than 10ms.

gpio_free(MSM_7x27A_TOUCH_RESET_PIN);
return ret;
Expand All @@ -522,7 +547,8 @@ static int get_touch_resolution(struct tp_resolution_conversion *tp_resolution_t
|| machine_is_msm8x25_U8833()
|| machine_is_msm8x25_H881C()
|| machine_is_msm8x25_C8812P()
|| machine_is_msm8x25_Y301_A1())
|| machine_is_msm8x25_Y301_A1()
|| machine_is_msm8x25_Y300_J1())
{
tp_resolution_type->lcd_x = LCD_X_WVGA;
tp_resolution_type->lcd_y = LCD_Y_WVGA;
Expand Down Expand Up @@ -563,15 +589,19 @@ static int get_touch_resolution(struct tp_resolution_conversion *tp_resolution_t
}

/*If product has independent button ,return 1*/
static int read_button_flag(void)
static buttonflag read_button_flag(void)
{
if(machine_is_msm8x25_Y301_A1())
{
return 1 ;
return TOUCH_INDEPENDENT_BUTTON;
}
else if(machine_is_msm8x25_Y300_J1())
{
return TOUCH_NO_BUTTON;
}
else
{
return 0 ;
return TOUCH_VIRTUAL_KEY;
}
}

Expand Down Expand Up @@ -894,6 +924,12 @@ static struct i2c_board_info huawei_i2c_board_info[] __initdata =
},
#endif

/*Add new i2c information for flash lm3642*/
#ifdef CONFIG_HUAWEI_FEATURE_LM3642
{
I2C_BOARD_INFO("lm3642" , 0x63),
},
#endif
/* -------------------- huawei nfc -------------------- */
#ifdef CONFIG_HUAWEI_NFC_PN544
{
Expand Down Expand Up @@ -1358,7 +1394,10 @@ void __init msm7627a_add_io_devices(void)
/* keypad */
platform_device_register(&kp_pdev);
#else
platform_device_register(&keypad_device_default);
if(machine_is_msm8x25_Y300_J1())
platform_device_register(&keypad_device_y300j1);
else
platform_device_register(&keypad_device_default);
#endif
/* headset */
platform_device_register(&hs_pdev);
Expand Down

2 comments on commit 9a4809f

@dazjo
Copy link
Owner

@dazjo dazjo commented on 9a4809f Nov 24, 2013

Choose a reason for hiding this comment

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

There's also an A1 and A2 release. The A2 release seems to be based on a different CAF tag and the device itself seems to be MSM8930 based.

Unsure if we can move to that release, but it's significantly different. Unsure if we can move to this tbh.

@Fagulhas
Copy link
Contributor

Choose a reason for hiding this comment

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

Compiled and merged the kernel just fine last couple of days. The Y301-A2 has no support for u8815 or even u8833. They completely rewrote the kernel for newer models. It does have a few share of similar drivers that maybe we can use. Y301-A1 and Y300-J1 are 100% identical.

Please sign in to comment.