Re: [PATCH 2/4] ARM: tegra: nyan: Use external control for bq24735 charger

From: Paul Kocialkowski
Date: Wed Sep 21 2016 - 07:04:39 EST


Le mercredi 21 septembre 2016 Ã 11:10 +0100, Jon Hunter a ÃcritÂ:
> On 21/09/16 08:56, Paul Kocialkowski wrote:
>
> ...
>
> > Sure, this is exported at: /sys/class/power_supply/bq24735@5-0009
> > Also, note that the power-supply next branch[2] has some more fixes for the
> > bq24735 driver.
>
> I tested the bq24735 on next-20160919 without any of your changes andÂ
> when connecting or disconnecting the charger I see the following panic.
> Do you see this?

I have not encountered that, but have been basing my work off the latest rc, not
linux-next.

> / # [ÂÂÂ30.120384] Unable to handle kernel NULL pointer dereference at virtual
> address 00000004
> [ÂÂÂ30.128489] pgd = c0004000
> [ÂÂÂ30.131187] [00000004] *pgd=00000000
> [ÂÂÂ30.134759] Internal error: Oops: 17 [#1] PREEMPT SMP ARM
> [ÂÂÂ30.140141] Modules linked in:
> [ÂÂÂ30.143192] CPU: 1 PID: 71 Comm: kworker/1:1 Not tainted 4.8.0-rc6-next-
> 20160919-00002-gbc9771827865-dirty #574
> [ÂÂÂ30.153254] Hardware name: NVIDIA Tegra SoC (Flattened Device Tree)
> [ÂÂÂ30.159509] Workqueue: events power_supply_changed_work
> [ÂÂÂ30.164723] task: ee19f880 task.stack: ee1a0000
> [ÂÂÂ30.169239] PC is at sbs_external_power_changed+0x50/0x5c
> [ÂÂÂ30.174624] LR is at mod_timer+0x194/0x270
> [ÂÂÂ30.178705] pc : [<c05b0c58>]ÂÂÂÂlr : [<c017cda0>]ÂÂÂÂpsr: 60000113
> [ÂÂÂ30.178705] sp : ee1a1eb8ÂÂip : 80000000ÂÂfp : ee8e3680
> [ÂÂÂ30.190155] r10: eef98580ÂÂr9 : 00000000ÂÂr8 : 00000000
> [ÂÂÂ30.195363] r7 : ee303000ÂÂr6 : c05afef8ÂÂr5 : ee3e03f8ÂÂr4 : ee3e03d0
> [ÂÂÂ30.201872] r3 : 00000000ÂÂr2 : 00000000ÂÂr1 : 40000193ÂÂr0 : 00000001
> [ÂÂÂ30.208382] Flags: nZCvÂÂIRQs onÂÂFIQs onÂÂMode SVC_32ÂÂISA ARMÂÂSegment
> none
> [ÂÂÂ30.215497] Control: 10c5387dÂÂTable: adcf006aÂÂDAC: 00000051
> [ÂÂÂ30.221226] Process kworker/1:1 (pid: 71, stack limit = 0xee1a0210)
> [ÂÂÂ30.227474] Stack: (0xee1a1eb8 to 0xee1a2000)
> [ÂÂÂ30.231816]
> 1ea0:ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂedc0bc00 ee303000
> [ÂÂÂ30.239973] 1ec0: c05afef8 c05aff2c edc0bc20 c045ec1c eef95c80 eef95c80
> 00000001 eea82d5c
> [ÂÂÂ30.248136] 1ee0: edc0bd98 00000000 ee3031c0 ee303218 c0eab740 c05afcc4
> ee8e3680 ee3031c0
> [ÂÂÂ30.256296] 1f00: eef9b800 00000000 eef98580 c0135824 eef98598 c0e02100
> eef98580 ee8e3698
> [ÂÂÂ30.264453] 1f20: 00000008 eef98598 c0e02100 ee1a0000 eef98580 c0135a74
> ee840f80 ee8e3680
> [ÂÂÂ30.272610] 1f40: c0135a3c 00000000 ee840f80 ee8e3680 c0135a3c 00000000
> 00000000 00000000
> [ÂÂÂ30.280766] 1f60: 00000000 c013af18 00000000 00000000 00000000 ee8e3680
> 00000000 00000000
> [ÂÂÂ30.288922] 1f80: ee1a1f80 ee1a1f80 00000000 00000000 ee1a1f90 ee1a1f90
> ee1a1fac ee840f80
> [ÂÂÂ30.297078] 1fa0: c013ae3c 00000000 00000000 c01078b8 00000000 00000000
> 00000000 00000000
> [ÂÂÂ30.305234] 1fc0: 00000000 00000000 00000000 00000000 00000000 00000000
> 00000000 00000000
> [ÂÂÂ30.313389] 1fe0: 00000000 00000000 00000000 00000000 00000013 00000000
> 00000000 00000000
> [ÂÂÂ30.321555] [<c05b0c58>] (sbs_external_power_changed) from [<c05aff2c>]
> (__power_supply_changed_work+0x34/0x3c)
> [ÂÂÂ30.331623] [<c05aff2c>] (__power_supply_changed_work) from [<c045ec1c>]
> (class_for_each_device+0x4c/0xb4)
> [ÂÂÂ30.341254] [<c045ec1c>] (class_for_each_device) from [<c05afcc4>]
> (power_supply_changed_work+0x5c/0xb0)
> [ÂÂÂ30.350713] [<c05afcc4>] (power_supply_changed_work) from [<c0135824>]
> (process_one_work+0x124/0x33c)
> [ÂÂÂ30.359912] [<c0135824>] (process_one_work) from [<c0135a74>]
> (worker_thread+0x38/0x4d4)
> [ÂÂÂ30.367983] [<c0135a74>] (worker_thread) from [<c013af18>]
> (kthread+0xdc/0xf4)
> [ÂÂÂ30.375187] [<c013af18>] (kthread) from [<c01078b8>]
> (ret_from_fork+0x14/0x3c)
> [ÂÂÂ30.382391] Code: e5911000 e3a00004 ebee0b88 e5943008 (e5933004)Â
> [ÂÂÂ30.388504] ---[ end trace 083d55597e9a2254 ]---
> [ÂÂÂ30.393140] Unable to handle kernel paging request at virtual address
> ffffffec
> [ÂÂÂ30.400342] pgd = c0004000
> [ÂÂÂ30.403038] [ffffffec] *pgd=afffd861, *pte=00000000, *ppte=00000000
> [ÂÂÂ30.409309] Internal error: Oops: 37 [#2] PREEMPT SMP ARM
> [ÂÂÂ30.414690] Modules linked in:
> [ÂÂÂ30.417738] CPU: 1 PID: 71 Comm: kworker/1:1 Tainted:
> GÂÂÂÂÂÂDÂÂÂÂÂÂÂÂÂ4.8.0-rc6-next-20160919-00002-gbc9771827865-dirty #574
> [ÂÂÂ30.429013] Hardware name: NVIDIA Tegra SoC (Flattened Device Tree)
> [ÂÂÂ30.435265] task: ee19f880 task.stack: ee1a0000
> [ÂÂÂ30.439782] PC is at kthread_data+0x4/0xc
> [ÂÂÂ30.443779] LR is at wq_worker_sleeping+0x8/0xc8
> [ÂÂÂ30.448381] pc : [<c013b8a8>]ÂÂÂÂlr : [<c01366e0>]ÂÂÂÂpsr: 20000193
> [ÂÂÂ30.448381] sp : ee1a1c58ÂÂip : eef98f28ÂÂfp : ee1a1cb4
> [ÂÂÂ30.459836] r10: eef98a00ÂÂr9 : c0e5f000ÂÂr8 : c0d9ea00
> [ÂÂÂ30.465048] r7 : ee19fcc8ÂÂr6 : c0e02e08ÂÂr5 : ee19f880ÂÂr4 : eef98a00
> [ÂÂÂ30.471556] r3 : 00000000ÂÂr2 : 00000020ÂÂr1 : 00000000ÂÂr0 : ee19f880
> [ÂÂÂ30.478066] Flags: nzCvÂÂIRQs offÂÂFIQs onÂÂMode SVC_32ÂÂISA ARMÂÂSegment
> none
> [ÂÂÂ30.485268] Control: 10c5387dÂÂTable: adcf006aÂÂDAC: 00000051
> [ÂÂÂ30.490998] Process kworker/1:1 (pid: 71, stack limit = 0xee1a0210)
> [ÂÂÂ30.497247] Stack: (0xee1a1c58 to 0xee1a2000)
> [ÂÂÂ30.501590]
> 1c40:ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂeef98a00 c0833a68
> [ÂÂÂ30.509747] 1c60: 00000001 ee117a44 c0d99280 a0000193 00000000 c0833d4c
> 00000001 ee117a44
> [ÂÂÂ30.517904] 1c80: 00000000 ee117540 ee19f880 c01faf3c 00000000 ee1a0000
> ee1a18ec 00000001
> [ÂÂÂ30.526060] 1ca0: ee1a1cc8 ee19fc40 c05b0c5c 00000001 ee1a1cc4 c0833d4c
> ee19f880 ee1a18ec
> [ÂÂÂ30.534217] 1cc0: ee85d3c0 c012277c ee1a1cc8 ee1a1cc8 00000000 c0e5e2c4
> c0e07638 ee1a1e68
> [ÂÂÂ30.542374] 1ce0: 60000113 0000000b c05b0c5c 00000001 c05b0c5a c010b6f8
> ee1a0210 0000000b
> [ÂÂÂ30.550530] 1d00: c0e07638 ee1a0000 bf000000 00000008 65000000 31313935
> 20303030 30613365
> [ÂÂÂ30.558687] 1d20: 34303030 65626520 38623065 35652038 30333439 28203830
> 33393565 34303033
> [ÂÂÂ30.566843] 1d40: 00002029 c01b63c4 c0004000 00000004 ee1a1e68 00000017
> 00000000 00000017
> [ÂÂÂ30.575000] 1d60: 00000004 eef98580 ee8e3680 c011a424 00000004 c0115c20
> ee19f880 00000000
> [ÂÂÂ30.583156] 1d80: ee19f900 ee2ecd80 ee19f880 c014a55c c014a460 ee19f880
> eef98a00 00000000
> [ÂÂÂ30.591312] 1da0: a0000193 c0e07efc 00000017 c0115888 00000004 ee1a1e68
> ee1a0000 eef98580
> [ÂÂÂ30.599469] 1dc0: ee8e3680 c01012ac 1514622a 00000000 ee19f900 c0149578
> eef98a00 ee19f900
> [ÂÂÂ30.607626] 1de0: 00000001 00000000 eef98a38 00000000 000043e1 c014e11c
> ee2ecd00 ee19f900
> [ÂÂÂ30.615781] 1e00: 00000010 00000000 00000006 00000000 00000000 edc45440
> c0d992c4 00000000
> [ÂÂÂ30.623938] 1e20: 00000001 00000000 00000000 00000001 00004b4e 00000000
> 00000001 c0e5f000
> [ÂÂÂ30.632095] 1e40: 00000000 00000000 ee19f900 ee19f900 c05b0c58 60000113
> ffffffff ee1a1e9c
> [ÂÂÂ30.640251] 1e60: 00000000 c010bd78 00000001 40000193 00000000 00000000
> ee3e03d0 ee3e03f8
> [ÂÂÂ30.648408] 1e80: c05afef8 ee303000 00000000 00000000 eef98580 ee8e3680
> 80000000 ee1a1eb8
> [ÂÂÂ30.656566] 1ea0: c017cda0 c05b0c58 60000113 ffffffff 00000051 00000000
> edc0bc00 ee303000
> [ÂÂÂ30.664722] 1ec0: c05afef8 c05aff2c edc0bc20 c045ec1c eef95c80 eef95c80
> 00000001 eea82d5c
> [ÂÂÂ30.672886] 1ee0: edc0bd98 00000000 ee3031c0 ee303218 c0eab740 c05afcc4
> ee8e3680 ee3031c0
> [ÂÂÂ30.681045] 1f00: eef9b800 00000000 eef98580 c0135824 eef98598 c0e02100
> eef98580 ee8e3698
> [ÂÂÂ30.689202] 1f20: 00000008 eef98598 c0e02100 ee1a0000 eef98580 c0135a74
> ee840f80 ee8e3680
> [ÂÂÂ30.697358] 1f40: c0135a3c 00000000 ee840f80 ee8e3680 c0135a3c 00000000
> 00000000 00000000
> [ÂÂÂ30.705515] 1f60: 00000000 c013af18 00000000 00000000 00000000 ee8e3680
> 00000000 00000000
> [ÂÂÂ30.713672] 1f80: ee1a1f80 ee1a1f80 00000001 00010001 ee1a1f90 ee1a1f90
> ee1a1fac ee840f80
> [ÂÂÂ30.721827] 1fa0: c013ae3c 00000000 00000000 c01078b8 00000000 00000000
> 00000000 00000000
> [ÂÂÂ30.729983] 1fc0: 00000000 00000000 00000000 00000000 00000000 00000000
> 00000000 00000000
> [ÂÂÂ30.738140] 1fe0: 00000000 00000000 00000000 00000000 00000013 00000000
> 00000000 00000000
> [ÂÂÂ30.746304] [<c013b8a8>] (kthread_data) from [<c01366e0>]
> (wq_worker_sleeping+0x8/0xc8)
> [ÂÂÂ30.754292] [<c01366e0>] (wq_worker_sleeping) from [<c0833a68>]
> (__schedule+0x45c/0x6f0)
> [ÂÂÂ30.762364] [<c0833a68>] (__schedule) from [<c0833d4c>]
> (schedule+0x50/0xb4)
> [ÂÂÂ30.769394] [<c0833d4c>] (schedule) from [<c012277c>] (do_exit+0x6e8/0xa90)
> [ÂÂÂ30.776340] [<c012277c>] (do_exit) from [<c010b6f8>] (die+0x470/0x488)
> [ÂÂÂ30.782853] [<c010b6f8>] (die) from [<c011a424>]
> (__do_kernel_fault.part.0+0x64/0x1e4)
> [ÂÂÂ30.790751] [<c011a424>] (__do_kernel_fault.part.0) from [<c0115c20>]
> (do_page_fault+0x398/0x3a4)
> [ÂÂÂ30.799601] [<c0115c20>] (do_page_fault) from [<c01012ac>]
> (do_DataAbort+0x38/0xb8)
> [ÂÂÂ30.807238] [<c01012ac>] (do_DataAbort) from [<c010bd78>]
> (__dabt_svc+0x58/0x80)
> [ÂÂÂ30.814613] Exception stack(0xee1a1e68 to 0xee1a1eb0)
> [ÂÂÂ30.819650] 1e60:ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ00000001 40000193 00000000 00000000
> ee3e03d0 ee3e03f8
> [ÂÂÂ30.827807] 1e80: c05afef8 ee303000 00000000 00000000 eef98580 ee8e3680
> 80000000 ee1a1eb8
> [ÂÂÂ30.835962] 1ea0: c017cda0 c05b0c58 60000113 ffffffff
> [ÂÂÂ30.841002] [<c010bd78>] (__dabt_svc) from [<c05b0c58>]
> (sbs_external_power_changed+0x50/0x5c)
> [ÂÂÂ30.849593] [<c05b0c58>] (sbs_external_power_changed) from [<c05aff2c>]
> (__power_supply_changed_work+0x34/0x3c)
> [ÂÂÂ30.859660] [<c05aff2c>] (__power_supply_changed_work) from [<c045ec1c>]
> (class_for_each_device+0x4c/0xb4)
> [ÂÂÂ30.869291] [<c045ec1c>] (class_for_each_device) from [<c05afcc4>]
> (power_supply_changed_work+0x5c/0xb0)
> [ÂÂÂ30.878762] [<c05afcc4>] (power_supply_changed_work) from [<c0135824>]
> (process_one_work+0x124/0x33c)
> [ÂÂÂ30.887963] [<c0135824>] (process_one_work) from [<c0135a74>]
> (worker_thread+0x38/0x4d4)
> [ÂÂÂ30.896034] [<c0135a74>] (worker_thread) from [<c013af18>]
> (kthread+0xdc/0xf4)
> [ÂÂÂ30.903240] [<c013af18>] (kthread) from [<c01078b8>]
> (ret_from_fork+0x14/0x3c)
> [ÂÂÂ30.910443] Code: e34c00a4 ebff90d2 eafffff2 e5903418 (e5130014)Â
> [ÂÂÂ30.916520] ---[ end trace 083d55597e9a2255 ]---
> [ÂÂÂ30.921122] Fixing recursive fault but reboot is needed!
>
>
--
Paul Kocialkowski, developer of low-level free software for embedded devices

Website: https://www.paulk.fr/
Coding blog: https://code.paulk.fr/
Git repositories: https://git.paulk.fr/ https://git.code.paulk.fr/

Attachment: signature.asc
Description: This is a digitally signed message part