This repository has been archived by the owner on Feb 11, 2024. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
techpack: display: Make sure the gpio is valid before direction input
This fixes the following warning: [ 2.481219] invalid GPIO -2 [ 2.481252] WARNING: CPU: 3 PID: 1 at drivers/gpio/gpiolib.c:128 gpio_to_desc+0xa8/0xb8 [ 2.481259] CPU: 3 PID: 1 Comm: swapper/0 Tainted: G S 4.19.157-Horizon-04171159 #4 [ 2.481264] Hardware name: Qualcomm Technologies, Inc. kona MTP 19805 (DT) [ 2.481269] pstate: 60800005 (nZCv daif -PAN +UAO) [ 2.481274] pc : gpio_to_desc+0xa8/0xb8 [ 2.481279] lr : gpio_to_desc+0xa4/0xb8 [ 2.481283] pc : ffffffad27c09f88 [ 2.481286] lr : ffffffad27c09f84 [ 2.481289] sp : ffffff800805b7c0 [ 2.481293] x29: ffffff800805b7c0 x28: 0000000000000000 [ 2.481298] x27: ffffffe97f8e4800 x26: 0000000000000001 [ 2.481303] x25: 0000000000000002 x24: 0000000000000002 [ 2.481308] x23: 0000000000000050 x22: 0000000000000002 [ 2.481313] x21: 0000000000000000 x20: ffffffad2a68f860 [ 2.481318] x19: 00000000fffffffe x18: ffffffad2b25b000 [ 2.481323] x17: 00000000007c12a0 x16: 00000000000000c4 [ 2.481328] x15: ffffffad29243bbc x14: 0000000000003139 [ 2.481332] x13: 0000000000000348 x12: 0000000000000000 [ 2.481337] x11: 0000000000000000 x10: ffffffffffffffff [ 2.481342] x9 : 198684d2b1dd3700 x8 : 198684d2b1dd3700 [ 2.481347] x7 : 323138342e322020 x6 : ffffffe959576883 [ 2.481352] x5 : 0000000000000000 x4 : 0000000000000003 [ 2.481356] x3 : 000000000000001f x2 : 0000000000000001 [ 2.481361] x1 : 0000000000000000 x0 : 0000000000000000 [ 2.481367] Call trace: [ 2.481372] gpio_to_desc+0xa8/0xb8 [ 2.481377] dsi_panel_drv_init+0x4e8/0x734 [ 2.481383] dsi_display_bind+0xa70/0xc88 [ 2.481390] component_bind_all+0x128/0x254 [ 2.481396] msm_drm_bind+0x154/0x884 [ 2.481401] try_to_bring_up_master+0x13c/0x184 [ 2.481405] component_add+0xd0/0x184 [ 2.481412] dp_display_probe+0x2f8/0x43c [ 2.481418] platform_drv_probe+0x7c/0xb4 [ 2.481422] really_probe+0x270/0x2f4 [ 2.481427] driver_probe_device+0x60/0xf8 [ 2.481431] __driver_attach+0xe8/0x124 [ 2.481436] bus_for_each_dev+0x78/0xc0 [ 2.481440] driver_attach+0x20/0x28 [ 2.481444] bus_add_driver+0x128/0x20c [ 2.481449] driver_register+0x74/0x108 [ 2.481454] __platform_driver_register+0x40/0x48 [ 2.481460] dp_display_init+0x1c/0x54 [ 2.481465] do_one_initcall+0xd0/0x210 [ 2.481470] do_initcall_level+0x13c/0x164 [ 2.481474] do_basic_setup+0x48/0x94 [ 2.481478] kernel_init_freeable+0xac/0x144 [ 2.481486] kernel_init+0x14/0x2b0 [ 2.481492] ret_from_fork+0x10/0x18 [ 2.481497] ---[ end trace ac7e091c9f24763b ]--- Change-Id: Ic83f9a2f7192a97e1cd53f8cc89cc94b06acf55b Signed-off-by: LibXZR <[email protected]>
- Loading branch information