[Galaxy Tab 8.9 Android Development] C-o-M:
Mmh. From what I've read, on N8xx they have the problem that it reboots when the dock is connected?

There is another tab with keydock support: P62xx (Galaxy Tab Plus). According to the changelog, they introduced sec_keyboard last week. No reboot issues posted yet. So I dived in their source code and saw that the have a slightly different sec_keyboard driver and a completely reworked 30pin driver. Since this part of the kernel is unchanged since the initial commit, I downloaded the latest JB samsung sources I found (GT-I9300_JB_Opensource_Update5.zip) as well as the first S3 Sources (ICS) and compared what happened between. The latest version is pretty much the same as in P62xx's github.

I took those sources (and removed some platform specific parts) and built a new kernel. That breaks everything (no USB connection, no OTG, ...). sec_keyboard is running and still kills the tab on suspending. But - CPU1 is going to sleep, no tty error. Though I don't know what's happening afterwards because I don't get no_console_suspend working. How does it work? Is it set in BoardConfig.mk? When I set it there, it doesn't boot anymore.

Here is the kmsg:

[ 122.390841] request_suspend_state: sleep (3->3) at 122387003002 (2012-10-13 10:14:57.960135000 UTC)
[ 122.393135] [TSP] melfas_ts_early_suspend
[ 122.394236] melfas_touch_power_enable off
[ 122.397657] acc_con_early_suspend
[ 122.398307] dhd_early_suspend: enter
[ 122.399280] dhd_set_suspend: enter, value = 1 in_suspend=1
[ 122.399911] CFGP2P-INFO2) wl_cfgp2p_p2p_listen_suspend : enter
[ 122.401114] dhd_set_suspend: force extra Suspend setting
[ 122.420081] + cmc623_suspend
[ 122.497459] Unknown PRIVATE command SETSUSPENDMODE 1 - ignored
[ 122.833945] - cmc623_suspend
[ 123.145706] sync_system +
[ 123.274732] sync_system -
[ 138.126689] setclr gpio 9 at reg add 13
[ 138.127673] stmpe1801_write_reg wr:0x13 0x0(c:4)
[ 138.129225] Set GPIO_GPS_PWR_EN to low.
[ 138.131572] GPS_LNA LDO turned off
[ 138.337106] PM: Syncing filesystems ... done.
[ 138.345565] Tegra cpufreq suspend: setting frequency to 216000 kHz
[ 138.369521] Freezing user space processes ...
[ 138.377157] [Keyboard] sec_keyboard_disconnect
[ 138.388055] ------------[ cut here ]------------
[ 138.389804] WARNING: at ../../../../../../kernel/samsung/p5/drivers/tty/tty_ldisc.c:474 tty_ldisc_close+0x24/0x50()
[ 138.391296] Modules linked in: dhd
[ 138.393541] [<c001331c>] (unwind_backtrace+0x0/0xe0) from [<c0048bd0>] (warn_slowpath_common+0x4c/0x64)
[ 138.397602] [<c0048bd0>] (warn_slowpath_common+0x4c/0x64) from [<c0048c00>] (warn_slowpath_null+0x18/0x1c)
[ 138.399099] [<c0048c00>] (warn_slowpath_null+0x18/0x1c) from [<c026378c>] (tty_ldisc_close+0x24/0x50)
[ 138.400496] [<c026378c>] (tty_ldisc_close+0x24/0x50) from [<c0263a34>] (tty_ldisc_reinit+0x34/0x6c)
[ 138.401835] [<c0263a34>] (tty_ldisc_reinit+0x34/0x6c) from [<c02640d8>] (tty_ldisc_hangup+0x1c4/0x280)
[ 138.403161] [<c02640d8>] (tty_ldisc_hangup+0x1c4/0x280) from [<c025d338>] (__tty_hangup+0x100/0x328)
[ 138.407196] [<c025d338>] (__tty_hangup+0x100/0x328) from [<c025eabc>] (disassociate_ctty+0x74/0x1fc)
[ 138.408767] [<c025eabc>] (disassociate_ctty+0x74/0x1fc) from [<c004c310>] (do_exit+0x204/0x63c)
[ 138.410225] [<c004c310>] (do_exit+0x204/0x63c) from [<c004ca00>] (do_group_exit+0x90/0xc0)
[ 138.411697] [<c004ca00>] (do_group_exit+0x90/0xc0) from [<c004ca40>] (__wake_up_parent+0x0/0x18)
[ 138.412732] ---[ end trace df5e01ec211be030 ]---
[ 138.424794] (elapsed 0.05 seconds) done.
[ 138.426167] Freezing remaining freezable tasks ... (elapsed 0.01 seconds) done.
[ 138.446232] Suspending console(s) (use no_console_suspend to debug)
[ 138.447528] bat suspend
[ 138.447570] Charger Status : Battery.
[ 138.448158] tegradc tegradc.0: prepare
[ 138.448216] tegradc tegradc.1: prepare
[ 138.466897] vi vi: suspend status: 0
[ 138.467017] isp isp: suspend status: 0
[ 138.467158] gr2d gr2d: suspend status: 0
[ 138.467260] dsi dsi: suspend status: 0
[ 138.470958] gr3d gr3d01: suspend status: 0
[ 138.471085] mpe mpe01: suspend status: 0
[ 138.475354] setclr gpio 16 at reg add 13
[ 138.475395] stmpe1801_write_reg wr:0x13 0x0(c:4)
[ 138.476084] set gpio 16 to 1 at reg add 19
[ 138.476809] stmpe1801_write_reg wr:0x19 0xf8(c:4)
[ 138.478517] stmpe811_adc_get_value: Confirmed new data in channel(6)
[ 138.494489] stmpe811_adc_get_value: ADC_DATA_CH(6) = 0x208, 520.
[ 138.500837] host1x host1x: suspend status: 0
[ 138.524384] bcmsdh_sdmmc_suspend Enter
[ 138.524461] Wake13 for irq=390
[ 138.524489] Enabling wake13
[ 138.524525] gpio bank wake found: wake13 for irq=121
[ 138.524550] Enabling wake13
[ 138.527371] [ CONNECTOR_DRIVER (acc_con_suspend,698) ]
[ 138.527584] tegra_avp_suspend()+
[ 138.572965] avp_suspend: resume_addr=100344
[ 138.572992] tegra_avp_suspend()-
[ 138.573217] Wake5 for irq=192
[ 138.573241] Enabling wake5
[ 138.573570] tegra_dma_dequeue_req: No Entry
[ 138.574632] PM: suspend of devices complete after 121.600 msecs
[ 138.579392] PM: late suspend of devices complete after 4.689 msecs
[ 138.579443] Disabling non-boot CPUs ...
[ 138.585415] CPU1: shutdown
[ 138.593492] vfp_pm_suspend: saving vfp state
[ 138.615663] Wake[31-0] level=0x28
[ 138.615694] Wake[31-0] enable=0x846aa8
[ 138.615731] Entering suspend state LP0
[ 138.615830] tegra_gpio_enable : Invalid gpio ID - 232
[ 138.615830] partition 3d0 is left on before suspend
[ 138.615830] partition ve is left on before suspend
[ 138.615830] partition vde is left on before suspend
[ 138.615830] partition mpe is left on before suspend
[ 138.615980] Exited suspend state LP0
[ 138.616016] legacy wake status=0x40000
[ 138.616046] Resume caused by WAKE18, tps6586x
[ 138.633217] Suspended for 13.733 seconds
[ 138.633610] Enabling non-boot CPUs ...
[ 138.653775] CPU1: Booted secondary processor
[ 138.657176] CPU1 is up
[ 138.663484] Switched to NOHz mode on CPU #1
[ 138.663604] PM: early resume of devices complete after 6.376 msecs
[ 138.665946] Wake5 for irq=192
[ 138.665973] Disabling wake5
[ 138.666007] input: [sec_power_key] R
[ 138.666343] tegra_avp_resume()+
[ 138.666383] avp_reset: Resetting AVP: reset_addr=100344
[ 138.676384] wakeup wake lock: alarm_rtc
[ 138.685806] tegra_avp_resume()-
[ 138.685907] [ CONNECTOR_DRIVER (acc_con_resume,709) ]
[ 138.686037] [ CONNECTOR_DRIVER (acc_ID_interrupt,469) ]
[ 138.686292] spdif_set_sample_rate: spdif_clk rate 5644800
[ 138.747137] bcmsdh_sdmmc_resume Enter
[ 138.747175] Wake13 for irq=390
[ 138.747199] Disabling wake13
[ 138.747228] gpio bank wake found: wake13 for irq=121
[ 138.747253] Disabling wake13
[ 138.748010] Board P4 : tegra_usb_ldo_en=1 instance=0 present regulator=0
[ 138.751040] Board P4 : tegra_usb_ldo_en=0 instance=0 present regulator=1
[ 138.751457] host1x host1x: resuming
[ 138.754439] stmpe811_adc_get_value: Confirmed new data in channel(6)
[ 138.774120] stmpe811_adc_get_value: ADC_DATA_CH(6) = 0x20b, 523.
[ 138.774710] setclr gpio 16 at reg add 10
[ 138.774747] stmpe1801_write_reg wr:0x10 0x0(c:4)
[ 138.775389] set gpio 16 to 1 at reg add 19
[ 138.776110] stmpe1801_write_reg wr:0x19 0xf8(c:4)
[ 138.808303] mpe mpe01: resuming
[ 138.808373] gr3d gr3d01: resuming
[ 138.808440] dsi dsi: resuming
[ 138.808503] gr2d gr2d: resuming
[ 138.808564] isp isp: resuming
[ 138.808623] vi vi: resuming
[ 138.812058] [Keyboard] sec_keyboard_event, capslock on led value=0
[ 138.816176] PM: resume of devices complete after 151.813 msecs
[ 138.819038] tegradc tegradc.1: complete
[ 138.819087] [HDMI] tegra_dc_hdmi_resume() calls tegra_dc_hdmi_hpd
[ 138.819130] [HDMI] tegra_dc_hpd() flag = -1()
[ 138.819187] tegradc tegradc.0: complete
[ 138.833627] tegra-otg tegra-otg: SUSPEND --> SUSPEND
[ 138.863527] [HDMI] tegra_dc_hdmi_detect() calls tegra_dc_hdmi_hpd
[ 138.863567] [HDMI] tegra_dc_hpd() flag = -1()
[ 138.863600] tegradc tegradc.1: hpd pin low
[ 138.863809] tegra-otg tegra-otg: tegra_recover_register reg_val=1073742149
[ 138.864084] bat resume start
[ 138.869661] bat resume end
[ 138.924440] [ CONNECTOR_DRIVER (acc_dwork_accessory_detect,434) ]
[ 138.924486] [ CONNECTOR_DRIVER (acc_dwork_accessory_detect,437) ] IRQ_DOCK_GPIO is 1
[ 138.924523] [ CONNECTOR_DRIVER (acc_dwork_accessory_detect,442) ] Accessory detached
[ 138.924934] [ CONNECTOR_DRIVER (acc_notified,422) ] ACCESSORY=unknown : STATE=offline
[ 138.928355] Restarting tasks ... done.
[ 138.959339] Tegra cpufreq resume: restoring frequency to 1000000 kHz
[ 138.972875] suspend: exit suspend, ret = 0 (2012-10-13 10:15:28.235586998 UTC)
[ 138.997559] PM: Syncing filesystems ... done.
[ 138.999039] Tegra cpufreq suspend: setting frequency to 216000 kHz
[ 139.035274] Freezing user space processes ... (elapsed 0.03 seconds) done.
[ 139.076423] Freezing remaining freezable tasks ... (elapsed 0.01 seconds) done.
[ 139.096242] Suspending console(s) (use no_console_suspend to debug)
[ 139.097926] bat suspend
[ 139.097966] Charger Status : Battery.
[ 139.098574] tegradc tegradc.0: prepare
[ 139.098630] tegradc tegradc.1: prepare
[ 139.117109] vi vi: suspend status: 0
[ 139.117216] isp isp: suspend status: 0
[ 139.117351] gr2d gr2d: suspend status: 0
[ 139.117455] dsi dsi: suspend status: 0
[ 139.117573] gr3d gr3d01: suspend status: 0
[ 139.117667] mpe mpe01: suspend status: 0
[ 139.121674] setclr gpio 16 at reg add 13
[ 139.121712] stmpe1801_write_reg wr:0x13 0x0(c:4)
[ 139.122388] set gpio 16 to 1 at reg add 19
[ 139.123107] stmpe1801_write_reg wr:0x19 0xf8(c:4)
[ 139.124889] stmpe811_adc_get_value: Confirmed new data in channel(6)
[ 139.144139] stmpe811_adc_get_value: ADC_DATA_CH(6) = 0x206, 518.
[ 139.147770] host1x host1x: suspend status: 0
[ 139.174130] bcmsdh_sdmmc_suspend Enter
[ 139.174200] Wake13 for irq=390
[ 139.174227] Enabling wake13
[ 139.174263] gpio bank wake found: wake13 for irq=121
[ 139.174288] Enabling wake13
[ 139.176921] [ CONNECTOR_DRIVER (acc_con_suspend,698) ]
[ 139.177130] tegra_avp_suspend()+
[ 139.220553] avp_suspend: resume_addr=100344
[ 139.220581] tegra_avp_suspend()-
[ 139.220793] Wake5 for irq=192
[ 139.220816] Enabling wake5
[ 139.221138] tegra_dma_dequeue_req: No Entry
[ 139.222255] PM: suspend of devices complete after 118.881 msecs
[ 139.226983] active wake lock wlan_rx_wake, time left 86
[ 139.227154] pm_noirq_op(): platform_pm_suspend_noirq+0x0/0x40 returns -11
[ 139.227201] PM: Device power.0 failed to suspend late: error -11
[ 139.233392] PM: early resume of devices complete after 6.138 msecs
[ 139.234501] PM: Some devices failed to power down
[ 139.236383] Wake5 for irq=192
[ 139.236411] Disabling wake5
[ 139.236459] input: [sec_power_key] R
[ 139.236831] tegra_avp_resume()+
[ 139.236883] avp_reset: Resetting AVP: reset_addr=100344
[ 139.289343] tegra_avp_resume()-
[ 139.289450] [ CONNECTOR_DRIVER (acc_con_resume,709) ]
[ 139.289878] spdif_set_sample_rate: spdif_clk rate 5644800
[ 139.347372] bcmsdh_sdmmc_resume Enter
[ 139.347413] Wake13 for irq=390
[ 139.347441] Disabling wake13
[ 139.347469] gpio bank wake found: wake13 for irq=121
[ 139.347494] Disabling wake13
[ 139.348289] Board P4 : tegra_usb_ldo_en=1 instance=0 present regulator=0
[ 139.351317] Board P4 : tegra_usb_ldo_en=0 instance=0 present regulator=1
[ 139.351724] host1x host1x: resuming
[ 139.354648] stmpe811_adc_get_value: Confirmed new data in channel(6)
[ 139.374122] stmpe811_adc_get_value: ADC_DATA_CH(6) = 0x209, 521.
[ 139.374690] setclr gpio 16 at reg add 10
[ 139.374725] stmpe1801_write_reg wr:0x10 0x0(c:4)
[ 139.375365] set gpio 16 to 1 at reg add 19
[ 139.376078] stmpe1801_write_reg wr:0x19 0xf8(c:4)
[ 139.408087] mpe mpe01: resuming
[ 139.408152] gr3d gr3d01: resuming
[ 139.408214] dsi dsi: resuming
[ 139.408268] gr2d gr2d: resuming
[ 139.408324] isp isp: resuming
[ 139.408380] vi vi: resuming
[ 139.411705] [Keyboard] sec_keyboard_event, capslock on led value=0
[ 139.416024] PM: resume of devices complete after 181.451 msecs
[ 139.418934] tegradc tegradc.1: complete
[ 139.418984] [HDMI] tegra_dc_hdmi_resume() calls tegra_dc_hdmi_hpd
[ 139.419027] [HDMI] tegra_dc_hpd() flag = -1()
[ 139.419083] tegradc tegradc.0: complete
[ 139.463549] [HDMI] tegra_dc_hdmi_detect() calls tegra_dc_hdmi_hpd
[ 139.463588] [HDMI] tegra_dc_hpd() flag = -1()
[ 139.463619] tegradc tegradc.1: hpd pin low
[ 139.463827] tegra-otg tegra-otg: tegra_recover_register reg_val=1073742149
[ 139.464120] bat resume start
[ 139.469741] bat resume end
[ 139.514210] Restarting tasks ... done.
[ 139.548255] Tegra cpufreq resume: restoring frequency to 1000000 kHz
[ 139.561681] suspend: exit suspend, ret = -11 (2012-10-13 10:15:28.824391998 UTC)
[ 139.561854] active wake lock wlan_rx_wake, time left 53
[ 140.095290] PM: Syncing filesystems ... done.
[ 140.103087] Tegra cpufreq suspend: setting frequency to 216000 kHz
[ 140.126450] Freezing user space processes ... (elapsed 0.03 seconds) done.
[ 140.166181] Freezing remaining freezable tasks ... (elapsed 0.01 seconds) done.
[ 140.185621] Suspending console(s) (use no_console_suspend to debug)