• Robby Cai's avatar
    ENGR00227502-1 csi/v4l2: Implement probe and remove function for csi v4l2 driver · 67b160dd
    Robby Cai authored
    Because csi_v4l2 driver will only be loaded when needed(by assign 'csi' in
    kernel cmdline), we use standard driver framework to easily bind the device and
    driver. Otherwise, we will meet the problem like the crash as below when do
    suspend/resume due to the resource of csi not assigned at all if 'csi' not
    passed in cmdline.
    
    root@freescale ~$ echo mem > /sys/power/state
    PM: Syncing filesystems ... done.
    Freezing user space processes ... (elapsed 0.01 seconds) done.
    Freezing remaining freezable tasks ... (elapsed 0.01 seconds) done.
    Unable to handle kernel NULL pointer dereference at virtual address 00000000
    pgd = 9a8ac000
    [00000000] *pgd=9a783831, *pte=00000000, *ppte=00000000
    Internal error: Oops: 17 [#1] PREEMPT
    Modules linked in:
    CPU: 0    Not tainted  (3.0.35-02115-g08f4436 #233)
    PC is at csi_enable_mclk+0x40/0x68
    LR is at camera_power+0x1c/0x5c
    pc : [<80357f08>]    lr : [<80358154>]    psr: 60000013
    sp : 9a8ebe30  ip : 00000009  fp : 00000006
    r10: 1c6bddf7  r9 : 00000000  r8 : 00000000
    r7 : 00000002  r6 : 804fd0ac  r5 : 9a013000  r4 : 00000000
    r3 : 80aa8bbc  r2 : 00000000  r1 : 00000000  r0 : 00000008
    ...
    Signed-off-by: default avatarRobby Cai <R63905@freescale.com>
    67b160dd
csi_v4l2_capture.c 39.7 KB