AnsweredAssumed Answered

AD7606: Reset causes kernel crash during probe

Question asked by simba on Aug 29, 2014
Latest reply on Sep 9, 2014 by simba

Hi,

I am able to build the AD7606 in Linux kernel 3.8.7 as an in built system. I am using Intel Galileo board for interfacing.

 

In the AD7606 driver probe sequence though ad7606_request_gpios() is successfull, setting values to gpio's through gpio_set_value(st->pdata->gpio_reset, 1); causes the kernel to crash in function ad7606_reset(st);

 

I tried reading the in_voltage0_raw, but there was no code output.

I even tried setting up the trigger [not sure if I followed the proper steps for this] even this didn't give any output, instead there was a kernel crash associated with yet again with gpio_set_value() for CONVST

AD7606: ad7606_scan_direct() setting convst.

 

Need help in

1. Fixing the kernel crash issue.

2. To read the continuous sample values in linux environment.

 

Regards,

Simba

 

 

Below shown is the excerpt of the kernel logs showing these error logs:

 

[   14.377899] GAL_QRK: intel_qrk_gpio_restrict_probe.

[   14.382921] AD7606: INT gpio line request in restrict probe.

[   14.388618] AD7606: Requesting INT gpio line.

[   14.393070] AD7606: Valid 30 15 INT gpio line.

[   14.461243] AD7606: Allocating INT gpio line SUCCESS GPIO 15 IRQ 63. // For BUSY Signal

[   14.467746] AD7606: spi registration request in restrict probe.

[   14.473776] AD7606: SPI registration.

[   14.487241] spi spi1.1: 500000 Hz actual, PIO

[   14.487306] spi spi1.1: setup mode 3, 8 bits/w, 4000000 Hz max --> 0

[   14.492795] AD7606: Registering AD7606 as a SPI platform device.

[   14.498958] AD7606: Driver Probe.

[   14.502387] AD7606: ad7606 Requesting GPIOs.

[   14.575720] AD7606: GPIO's allocation succeded.

[   14.580452] AD7606: Calling Reset.

[   14.583908] AD7606: Apply Reset to GPIO 28. // custom print before executing gpio_set_value(st->pdata->gpio_reset, 1);

// CRASH during the reset

[   14.588112] ------------[ cut here ]------------

[   14.592870] WARNING: at /home/vikram/Galileo/meta-clanton_v1.0.0/yocto_build/tmp/work/clanton-poky-linux/linux-yocto-clanton/3.8-r0/linux/drivers/gpio/gpiolib.c:1921 __gpio_set_value+0x8d/0xa0()

[   14.610306] Hardware name: QUARK

[   14.613566] Modules linked in: cy8c9540a at24 spi_pxa2xx gpio_sch intel_qrk_gip uio spi_pxa2xx_pci evdev mmc_block ehci_pci ehci_hcd ohci_hcd sdhci_pci sdhci led_class stmmac usbcore usb_common mmc_core

[   14.632060] Pid: 6, comm: kworker/u:0 Not tainted 3.8.7-yocto-standard #22

[   14.638967] Call Trace:

[   14.641547]  [<c1029d2d>] warn_slowpath_common+0x6d/0xa0

[   14.646926]  [<c116275d>] ? __gpio_set_value+0x8d/0xa0

[   14.652197]  [<c116275d>] ? __gpio_set_value+0x8d/0xa0

[   14.657404]  [<c1029d7d>] warn_slowpath_null+0x1d/0x20

[   14.662680]  [<c116275d>] __gpio_set_value+0x8d/0xa0

[   14.667704]  [<c1232a96>] ad7606_reset+0x36/0x70

[   14.672453]  [<c12331e3>] ad7606_probe+0x483/0x530

[   14.677306]  [<c1233699>] ad7606_spi_probe+0x39/0x60

[   14.682401]  [<c1212835>] spi_drv_probe+0x15/0x20

[   14.687164]  [<c11e68a6>] driver_probe_device+0x56/0x1e0

[   14.692608]  [<c121355a>] ? spi_match_device+0x3a/0x90

[   14.697805]  [<c11e6ac0>] ? __driver_attach+0x90/0x90

[   14.702987]  [<c11e6af9>] __device_attach+0x39/0x50

[   14.707939]  [<c11e51f4>] bus_for_each_drv+0x34/0x70

[   14.713038]  [<c11e681b>] device_attach+0x7b/0x90

[   14.717797]  [<c11e6ac0>] ? __driver_attach+0x90/0x90

[   14.722976]  [<c11e5ec7>] bus_probe_device+0x67/0x90

[   14.728011]  [<c11e4896>] device_add+0x556/0x600

[   14.732769]  [<c121324e>] spi_add_device+0xee/0x1c0

[   14.737709]  [<c1213b56>] spi_new_device+0x76/0xa0

[   14.742638]  [<c1213bb9>] spi_match_master_to_boardinfo+0x39/0x60

[   14.748793]  [<c1213fcd>] ? spi_register_board_info+0x1d/0x130

[   14.754765]  [<c1214091>] spi_register_board_info+0xe1/0x130

[   14.760573]  [<c123444f>] intel_qrk_gpio_restrict_probe+0xff/0x320

[   14.766825]  [<c11e82c2>] platform_drv_probe+0x32/0x60

[   14.772104]  [<c11e68a6>] driver_probe_device+0x56/0x1e0

[   14.777480]  [<c11e8239>] ? platform_match+0x29/0x80

[   14.782581]  [<c11e6ac0>] ? __driver_attach+0x90/0x90

[   14.787688]  [<c11e6af9>] __device_attach+0x39/0x50

[   14.792713]  [<c11e51f4>] bus_for_each_drv+0x34/0x70

[   14.797743]  [<c11e681b>] device_attach+0x7b/0x90

[   14.802577]  [<c11e6ac0>] ? __driver_attach+0x90/0x90

[   14.807692]  [<c11e5ec7>] bus_probe_device+0x67/0x90

[   14.812791]  [<c11e632b>] deferred_probe_work_func+0x5b/0x90

[   14.818516]  [<c103db1e>] process_one_work+0x10e/0x370

[   14.823795]  [<c1035095>] ? internal_add_timer+0x15/0x40

[   14.829178]  [<c103e9f1>] worker_thread+0x101/0x330

[   14.834198]  [<c103e8f0>] ? busy_worker_rebind_fn+0xb0/0xb0

[   14.839843]  [<c104248e>] kthread+0x8e/0xa0

[   14.844179]  [<c12c957b>] ret_from_kernel_thread+0x1b/0x30

[   14.849743]  [<c1042400>] ? kthread_create_on_node+0xa0/0xa0

[   14.855521] ---[ end trace 9f8a8a16f6b3e7c2 ]---

[   14.865754] ------------[ cut here ]------------

[   14.870624] WARNING: at /home/vikram/Galileo/meta-clanton_v1.0.0/yocto_build/tmp/work/clanton-poky-linux/linux-yocto-clanton/3.8-r0/linux/drivers/gpio/gpiolib.c:1921 __gpio_set_value+0x8d/0xa0()

[   14.888057] Hardware name: QUARK

[   14.891369] Modules linked in: cy8c9540a at24 spi_pxa2xx gpio_sch intel_qrk_gip uio spi_pxa2xx_pci evdev mmc_block ehci_pci ehci_hcd ohci_hcd sdhci_pci sdhci led_class stmmac usbcore usb_common mmc_core

[   14.909831] Pid: 6, comm: kworker/u:0 Tainted: G        W    3.8.7-yocto-standard #22

[   14.917763] Call Trace:

[   14.920336]  [<c1029d2d>] warn_slowpath_common+0x6d/0xa0

[   14.925714]  [<c116275d>] ? __gpio_set_value+0x8d/0xa0

[   14.930985]  [<c116275d>] ? __gpio_set_value+0x8d/0xa0

[   14.936193]  [<c1029d7d>] warn_slowpath_null+0x1d/0x20

[   14.941469]  [<c116275d>] __gpio_set_value+0x8d/0xa0

[   14.946493]  [<c1232aad>] ad7606_reset+0x4d/0x70

[   14.951240]  [<c12331e3>] ad7606_probe+0x483/0x530

[   14.956093]  [<c1233699>] ad7606_spi_probe+0x39/0x60

[   14.961189]  [<c1212835>] spi_drv_probe+0x15/0x20

[   14.965952]  [<c11e68a6>] driver_probe_device+0x56/0x1e0

[   14.971399]  [<c121355a>] ? spi_match_device+0x3a/0x90

[   14.976597]  [<c11e6ac0>] ? __driver_attach+0x90/0x90

[   14.981778]  [<c11e6af9>] __device_attach+0x39/0x50

[   14.986731]  [<c11e51f4>] bus_for_each_drv+0x34/0x70

[   14.991832]  [<c11e681b>] device_attach+0x7b/0x90

[   14.996591]  [<c11e6ac0>] ? __driver_attach+0x90/0x90

[   15.001780]  [<c11e5ec7>] bus_probe_device+0x67/0x90

[   15.006815]  [<c11e4896>] device_add+0x556/0x600

[   15.011574]  [<c121324e>] spi_add_device+0xee/0x1c0

[   15.016513]  [<c1213b56>] spi_new_device+0x76/0xa0

[   15.021441]  [<c1213bb9>] spi_match_master_to_boardinfo+0x39/0x60

[   15.027596]  [<c1213fcd>] ? spi_register_board_info+0x1d/0x130

[   15.033568]  [<c1214091>] spi_register_board_info+0xe1/0x130

[   15.039299]  [<c123444f>] intel_qrk_gpio_restrict_probe+0xff/0x320

[   15.045628]  [<c11e82c2>] platform_drv_probe+0x32/0x60

[   15.050934]  [<c11e68a6>] driver_probe_device+0x56/0x1e0

[   15.056312]  [<c11e8239>] ? platform_match+0x29/0x80

[   15.061436]  [<c11e6ac0>] ? __driver_attach+0x90/0x90

[   15.066544]  [<c11e6af9>] __device_attach+0x39/0x50

[   15.071573]  [<c11e51f4>] bus_for_each_drv+0x34/0x70

[   15.076602]  [<c11e681b>] device_attach+0x7b/0x90

[   15.081437]  [<c11e6ac0>] ? __driver_attach+0x90/0x90

[   15.086550]  [<c11e5ec7>] bus_probe_device+0x67/0x90

[   15.091647]  [<c11e632b>] deferred_probe_work_func+0x5b/0x90

[   15.097372]  [<c103db1e>] process_one_work+0x10e/0x370

[   15.102651]  [<c1035095>] ? internal_add_timer+0x15/0x40

[   15.108034]  [<c103e9f1>] worker_thread+0x101/0x330

[   15.113066]  [<c103e8f0>] ? busy_worker_rebind_fn+0xb0/0xb0

[   15.118713]  [<c104248e>] kthread+0x8e/0xa0

[   15.123049]  [<c12c957b>] ret_from_kernel_thread+0x1b/0x30

[   15.128613]  [<c1042400>] ? kthread_create_on_node+0xa0/0xa0

[   15.134393] ---[ end trace 9f8a8a16f6b3e7c3 ]---

[   15.147330] EFI Variables Facility v0.08 2004-May-17

[   15.159464] AD7606: IRQ 63 req.

[   15.171959] AD7606: Probe succeded 0xCE6BEC00.

[   15.199578] pxa2xx-spi pxa2xx-spi.1: registered child spi1.1

[   15.199620] GAL_QRK: intel_qrk_gpio_restrict_probe() END 0.

// AD7606 probe shown as successful with out other errors.

[   17.673959] eth0: device MAC address 98:4f:ee:00:88:54

[   19.670199] libphy: stmmac-1:01 - Link is Up - 100/Half

[   25.720865] NET: Registered protocol family 10

[   27.768874] eth0: device MAC address 98:4f:ee:00:88:54

[   27.835222] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready

[   29.810321] libphy: stmmac-1:01 - Link is Up - 100/Half

[   29.815623] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready

root@clanton:~#

root@clanton:~#

root@clanton:~# cat /proc/kmsg

<4>[ 1269.919841] AD7606: ad7606_scan_direct() setting convst.

<4>[ 1269.925310] ------------[ cut here ]------------

<4>[ 1269.930013] WARNING: at /home/vikram/Galileo/meta-clanton_v1.0.0/yocto_build/tmp/work/clanton-poky-linux/linux-yocto-clanton/3.8-r0/linux/drivers/gpio/gpiolib.c:1921 __gpio_set_value+0x8d/0xa0()

<4>[ 1269.947590] Hardware name: QUARK

<4>[ 1269.950925] Modules linked in: ipv6 efivars cy8c9540a at24 spi_pxa2xx gpio_sch intel_qrk_gip uio spi_pxa2xx_pci evdev mmc_block ehci_pci ehci_hcd ohci_hcd sdhci_pci sdhci led_class stmmac usbcore usb_common mmc_core

<4>[ 1269.970618] Pid: 1448, comm: cat Tainted: G        W    3.8.7-yocto-standard #22

<4>[ 1269.978047] Call Trace:

<4>[ 1269.980633]  [<c1029d2d>] warn_slowpath_common+0x6d/0xa0

<4>[ 1269.986012]  [<c116275d>] ? __gpio_set_value+0x8d/0xa0

<4>[ 1269.991293]  [<c116275d>] ? __gpio_set_value+0x8d/0xa0

<4>[ 1269.996499]  [<c1029d7d>] warn_slowpath_null+0x1d/0x20

<4>[ 1270.001784]  [<c116275d>] __gpio_set_value+0x8d/0xa0

<4>[ 1270.006807]  [<c1232bb4>] ad7606_read_raw+0xe4/0x290

<4>[ 1270.011944]  [<c1237702>] iio_read_channel_info+0x32/0x1f0

<4>[ 1270.017502]  [<c12376d0>] ? iio_read_const_attr+0x20/0x20

<4>[ 1270.023060]  [<c11e3c4a>] dev_attr_show+0x1a/0x50

<4>[ 1270.027828]  [<c10f294a>] sysfs_read_file+0x7a/0x110

<4>[ 1270.032942]  [<c10a8066>] ? rw_verify_area+0x66/0x130

<4>[ 1270.038058]  [<c10f28d0>] ? sysfs_write_file+0xf0/0xf0

<4>[ 1270.043347]  [<c10a8300>] vfs_read+0x80/0x150

<4>[ 1270.047774]  [<c107f38a>] ? sys_fadvise64_64+0x1a/0x250

<4>[ 1270.053145]  [<c10f28d0>] ? sysfs_write_file+0xf0/0xf0

<4>[ 1270.058355]  [<c10a8412>] sys_read+0x42/0x80

<4>[ 1270.062780]  [<c12c8f18>] syscall_call+0x7/0xb

<4>[ 1270.067271] ---[ end trace 9f8a8a16f6b3e7c4 ]---

 

 

<4>[ 1297.526353] ------------[ cut here ]------------

<4>[ 1297.531176] WARNING: at /home/vikram/Galileo/meta-clanton_v1.0.0/yocto_build/tmp/work/clanton-poky-linux/linux-yocto-clanton/3.8-r0/linux/drivers/gpio/gpiolib.c:1921 __gpio_set_value+0x8d/0xa0()

<4>[ 1297.548615] Hardware name: QUARK

<4>[ 1297.551923] Modules linked in: ipv6 efivars cy8c9540a at24 spi_pxa2xx gpio_sch intel_qrk_gip uio spi_pxa2xx_pci evdev mmc_block ehci_pci ehci_hcd ohci_hcd sdhci_pci sdhci led_class stmmac usbcore usb_common mmc_core

<4>[ 1297.571732] Pid: 1448, comm: cat Tainted: G        W    3.8.7-yocto-standard #22

<4>[ 1297.579161] Call Trace:

<4>[ 1297.581750]  [<c1029d2d>] warn_slowpath_common+0x6d/0xa0

<4>[ 1297.587129]  [<c116275d>] ? __gpio_set_value+0x8d/0xa0

<4>[ 1297.592412]  [<c116275d>] ? __gpio_set_value+0x8d/0xa0

<4>[ 1297.597619]  [<c1029d7d>] warn_slowpath_null+0x1d/0x20

<4>[ 1297.602927]  [<c116275d>] __gpio_set_value+0x8d/0xa0

<4>[ 1297.607951]  [<c1232d1e>] ad7606_read_raw+0x24e/0x290

<4>[ 1297.613161]  [<c1042a70>] ? abort_exclusive_wait+0x60/0x60

<4>[ 1297.618720]  [<c1237702>] iio_read_channel_info+0x32/0x1f0

<4>[ 1297.624364]  [<c12376d0>] ? iio_read_const_attr+0x20/0x20

<4>[ 1297.629838]  [<c11e3c4a>] dev_attr_show+0x1a/0x50

<4>[ 1297.634688]  [<c10f294a>] sysfs_read_file+0x7a/0x110

<4>[ 1297.639724]  [<c10a8066>] ? rw_verify_area+0x66/0x130

<4>[ 1297.644925]  [<c10f28d0>] ? sysfs_write_file+0xf0/0xf0

<4>[ 1297.650215]  [<c10a8300>] vfs_read+0x80/0x150

<4>[ 1297.654643]  [<c107f38a>] ? sys_fadvise64_64+0x1a/0x250

<4>[ 1297.659923]  [<c10f28d0>] ? sysfs_write_file+0xf0/0xf0

<4>[ 1297.665218]  [<c10a8412>] sys_read+0x42/0x80

<4>[ 1297.669560]  [<c12c8f18>] syscall_call+0x7/0xb

<4>[ 1297.674126] ---[ end trace 9f8a8a16f6b3e7c5 ]---

<6>[ 1355.435581] Buffer not started:buffer parameter update failed

 

- Simba

Outcomes