TI中文支持网
TI专业的中文技术问题搜集分享网站

请教最新的bq25708充电芯片的Linux驱动程序。基于imx6平台的。

Hi TI 专家

你好。

我们基于imx6平台采用了bq25708充电管理芯片,但驱动用的是上任工程师集成的,现在存在null pointer的bug如下:

[ 2.300418] [bq25700] bq25700_init_device: Charger Enabled Successfully!
[ 2.311822] [bq25700] bq25700_init_device: ADC start successfully
[ 2.326844] [bq25700] bq25700_charger_probe: bq25700 probe successfully, ManufactureID:124
[ 2.326844] !
[ 2.329721] Unable to handle kernel NULL pointer dereference at virtual address 000001f4

完整的log和dts我回附件发上来。

请教TI专家有没有最新的bq25708的充电芯片驱动啊?

谢谢

user1598930:

[2.300418] [bq25700] bq25700_init_device: Charger Enabled Successfully!
[2.311822] [bq25700] bq25700_init_device: ADC start successfully
[2.326844] [bq25700] bq25700_charger_probe: bq25700 probe successfully, ManufactureID:124
[2.326844] !
[2.329721] Unable to handle kernel NULL pointer dereference at virtual address 000001f4
[2.348694] imx2-honeywell-wdt 20bc000.honeywell-wdog: timeout 18 sec
[2.357740] device-mapper: ioctl: 4.37.0-ioctl (2017-09-20) initialised: dm-devel@redhat.com
[2.366299] pgd = 80004000
[2.369344] [000001f4] *pgd=00000000
[2.374698] sdhci: Secure Digital Host Controller Interface driver
[2.381037] Internal error: Oops: 5 [#1] PREEMPT ARM
[2.386019] Modules linked in:
[2.389093] CPU: 0 PID: 72 Comm: kworker/0:2 Not tainted 4.14.174+g2d1a9ec6b47d #1
[2.396666] Hardware name: Freescale i.MX6 SoloX (Device Tree)
[2.402523] Workqueue: events power_supply_changed_work
[2.407759] task: b5457700 task.stack: b53e8000
[2.412306] PC is at strlen+0x0/0x2c
[2.415893] LR is at power_supply_uevent+0xfc/0x1e0
[2.420773] pc : [<808d1dd0>]lr : [<806768c4>]psr: a00d0113
[2.427041] sp : b53e9e68ip : b53e9da7fp : 014000c0
[2.432267] r10: b562d000r9 : 80d52518r8 : 000001f4
[2.437494] r7 : b5665828r6 : 00000042r5 : b5671000r4 : 00000002
[2.444023] r3 : 00000000r2 : 0000000ar1 : 0000000ar0 : 000001f4
[2.450555] Flags: NzCvIRQs onFIQs onMode SVC_32ISA ARMSegment none
[2.457693] Control: 10c53c7dTable: b5668059DAC: 00000051
[2.463442] Process kworker/0:2 (pid: 72, stack limit = 0xb53e8208)
[2.469711] Stack: (0xb53e9e68 to 0xb53ea000)
[2.474076] 9e60:809a819c b5665800 80b3f7d8 00000000 ffffff04 b5665830
[2.482258] 9e80: b562d000 b5665828 8050eca0 b562d000 8095c118 b40276c0 80b2fed8 8050ed60
[2.490440] 9ea0: 80b2fed8 808c9ac0 00000000 b53e9ec0 b5665830 b5665830 b5665830 00000002
[2.498622] 9ec0: 00000000 808c9d50 80d0c930 806c5a50 b5665800 00000000 80b3f724 b566ed80
[2.506805] 9ee0: 80d0c8ec 00000000 80d0c8ec 806c5abc 80dd22f4 00000000 b5665800 b56659a8
[2.514988] 9f00: 80dd22f0 b5665800 600d0113 80d0c8ec 00000000 80d0c8ec 80d0c930 8067598c
[2.523169] 9f20: b56659a8 b53e6880 bf4a2100 00000000 80d0c8ec 8013f390 80d12640 80d0c900
[2.531351] 9f40: b53e6880 80d0c8ec b53e6898 80d12640 80d0c900 b53e8000 80d0c8ec 8013f618
[2.539533] 9f60: b5457700 b53f5d80 b4fd0980 00000000 b53e8000 b53e6880 8013f5e4 b53f5d98
[2.547715] 9f80: b406bee4 80144cfc b53e8000 b4fd0980 80144be0 00000000 00000000 00000000
[2.555896] 9fa0: 00000000 00000000 00000000 80107768 00000000 00000000 00000000 00000000
[2.564077] 9fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[2.572258] 9fe0: 00000000 00000000 00000000 00000000 00000013 00000000 00000000 00000000
[2.580467] [<808d1dd0>] (strlen) from [<806768c4>] (power_supply_uevent+0xfc/0x1e0)
[2.588232] [<806768c4>] (power_supply_uevent) from [<8050ed60>] (dev_uevent+0xc0/0x1c8)
[2.596338] [<8050ed60>] (dev_uevent) from [<808c9d50>] (kobject_uevent_env+0x204/0x594)
[2.604439] [<808c9d50>] (kobject_uevent_env) from [<8067598c>] (power_supply_changed_work+0x98/0x110)
[2.613766] [<8067598c>] (power_supply_changed_work) from [<8013f390>] (process_one_work+0x1a0/0x3f4)
[2.622997] [<8013f390>] (process_one_work) from [<8013f618>] (worker_thread+0x34/0x590)
[2.631098] [<8013f618>] (worker_thread) from [<80144cfc>] (kthread+0x11c/0x14c)
[2.638508] [<80144cfc>] (kthread) from [<80107768>] (ret_from_fork+0x14/0x2c)
[2.645739] Code: e7d23003 e3130020 1afffffb e12fff1e (e5d03000)
[2.651974] sdhci: Copyright(c) Pierre Ossman

这是完整的log,驱动里出现了一个空指针,但是系统无法启动。

user1598930:

回复 user1598930:

下面是dts的配置:
&i2c1 {pinctrl-names = "default";pinctrl-0 = <&pinctrl_i2c1>;status = "okay";
bq25700: bq25700@09 {//09 for SMBUS,6a for I2Ccompatible = "ti,bq25700";reg = <0x09>;ti,bq25700,minimum-system-voltage = <10500>; // 0x3e 10500mvti,bq25700,input-volt-limit = <10880>; // 0x3d 10880mvti,bq25700,input-curr-limit = <3250>; // 0x3f 3250mati,bq25700,charge-volt = <14500>; // 0x15 14500mvti,bq25700,charge-current = <1024>; // 0x14 1024mastatus = "okay";};
};
i2c1 {pinctrl_i2c1: i2c1grp {fsl,pins = <MX6SX_PAD_GPIO1_IO01__I2C1_SDA0x4001b8b1MX6SX_PAD_GPIO1_IO00__I2C1_SCL0x4001b8b1>;};};

Star Xu:

回复 user1598930:

您好,非常抱歉没有找到sample code,由于问题比较复杂,我需要询问更了解这款芯片的TI工程师,再帮您解答,稍后回复

user1598930:

回复 Star Xu:

感谢

Star Xu:

回复 user1598930:

您好,非常抱歉,无法为您自己编写的驱动程序调试bug提供进一步支持。

user1598930:

回复 Star Xu:

谢谢。这个bug我们已经解决了。是我们新添加的sys文件属性的数量与power_supply.h里的定义是数量不一致导致的数组越界。

Star Xu:

回复 user1598930:

您好,很高兴您的问题已经解决,感谢分享经验

赞(0)
未经允许不得转载:TI中文支持网 » 请教最新的bq25708充电芯片的Linux驱动程序。基于imx6平台的。
分享到: 更多 (0)