[Letux-kernel] weird problem with pwm_bl on omap3
H. Nikolaus Schaller
hns at goldelico.com
Wed May 30 23:33:31 CEST 2018
Hi,
I thought that I have almost "solved" it...
By adding to a minimally patched mainline:
diff --git a/drivers/power/supply/generic-adc-battery.c b/drivers/power/supply/generic-adc-battery.c
index 359cc8dac245..140e5a171290 100644
--- a/drivers/power/supply/generic-adc-battery.c
+++ b/drivers/power/supply/generic-adc-battery.c
@@ -135,8 +135,11 @@ static int read_channel(struct gab *adc_bat, enum power_supply_property psp,
int chan_index;
chan_index = gab_prop_to_chan(psp);
- ret = iio_read_channel_processed(adc_bat->channel[chan_index],
- result);
+
+// ret = iio_read_channel_processed(adc_bat->channel[chan_index],
+// result);
+ ret = 0;
+
if (ret == -EINVAL && chan_index == GAB_TEMPERATURE) {
/* Palmas gpadc1 does not return processed values */
*result=20000;
But applying the same patch to letux-4.17-rc5 and booting on second attempt:
[ 6.533294] wwan_on_off_init: wwan_on_off_init
[ 6.550750] pwm_get
[ 6.568176] of_pwm_get
[ 6.570648] of_node_to_pwmchip
[ 6.573852] of_node_to_pwmchip not found
[ 6.579223] pps_core: LinuxPPS API ver. 1 registered
[ 6.584411] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti at linux.it>
[ 6.617980] of_pwm_get 1 -517
[ 6.626007] of_pwm_get 3 -517
[ 6.629119] devm_pwm_get err=-517
[ 6.632568] pwm_backlight_probe 4 err=-517
[ 6.650085] pwm_backlight_probe err=-517
[ 6.654876] (NULL device *): hwmon: 'gta04-battery' is not a valid name attribute, please fix
[ 6.677185] iio_charge:0
[ 6.682647] Unable to handle kernel NULL pointer dereference at virtual address 00000000
[ 6.702911] pgd = (ptrval)
[ 6.705932] [00000000] *pgd=00000000
[ 6.709686] Internal error: Oops: 17 [#1] PREEMPT SMP ARM
[ 6.715332] Modules linked in: pps_gpio(+) snd_soc_simple_card(+) snd_soc_simple_card_utils snd_soc_omap_twl4030(+) pps_core encoder_opa362 wwan_on_off(+) snd_soc_gtm601 connector_analog_tv pwm_omap_dmtimer omapdss_base generic_adc_battery pwm_bl bq27xxx_battery_hdq bq27xxx_battery bmp280_spi wlcore_sdio ov9655 omap_hdq v4l2_fwnode v4l2_common omap2430 bmp280_i2c videodev bmp280 at24 tsc2007 bmc150_accel_i2c leds_tca6507 bmc150_magn_i2c bmc150_magn media bmc150_accel_core industrialio_triggered_buffer kfifo_buf phy_twl4030_usb snd_soc_omap_mcbsp snd_soc_omap snd_pcm_dmaengine gpio_twl4030 musb_hdrc gnss_w2sg0004 snd_soc_twl4030 twl4030_charger twl4030_vibra twl4030_pwrbutton twl4030_madc industrialio gnss w2cbw003_bluetooth ehci_omap
[ 6.783294] CPU: 0 PID: 1178 Comm: kworker/0:3 Not tainted 4.17.0-rc5-letux+ #2365
[ 6.791198] Hardware name: Generic OMAP36xx (Flattened Device Tree)
[ 6.797729] Workqueue: events deferred_probe_work_func
[ 6.803100] PC is at strcmp+0x0/0x34
[ 6.806854] LR is at pinctrl_get_group_selector+0x44/0x78
[ 6.812469] pc : [<c070d24c>] lr : [<c0429aac>] psr: a0070013
[ 6.819030] sp : ed0dfe10 ip : ed1c8850 fp : 0000001d
[ 6.824462] r10: 0000001a r9 : ed219840 r8 : 0000001d
[ 6.829925] r7 : c074dce8 r6 : ef7c4a20 r5 : ee3ee600 r4 : 0000001a
[ 6.836730] r3 : c0427cf0 r2 : 00000000 r1 : ef7c4a20 r0 : 00000000
[ 6.843536] Flags: NzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment none
[ 6.850952] Control: 10c5387d Table: ae7f8019 DAC: 00000051
[ 6.856964] Process kworker/0:3 (pid: 1178, stack limit = 0x(ptrval))
[ 6.863677] Stack: (0xed0dfe10 to 0xed0e0000)
[ 6.868225] fe00: ee3ee600 ef7c4a20 00000000 ed13a390
[ 6.876770] fe20: 00000000 c042aa6c ed1c8990 00000001 00000002 ed219c00 ed219880 ed2198c0
[ 6.885314] fe40: ed13a390 00000000 00000000 ed219840 00000000 c04292d4 00000014 ee26ea80
[ 6.893829] fe60: c0a58e30 c0880994 ee26c010 00000000 ed219cd0 ee26c010 c0aca944 fffffdfb
[ 6.902374] fe80: bf1c3014 0000002a c0a94490 c042949c 00000000 ee26c010 ed219990 c04bbc80
[ 6.910888] fea0: ee26c010 00000000 c0aca948 c049ff78 00000000 ed0dfee8 c04a0284 ee26c044
[ 6.919433] fec0: ef7baf00 c0a02d00 00000000 c049e7d8 ee01be6c ed1cebb8 ee26c010 c0a632d0
[ 6.927978] fee0: 00000001 c049fdf8 ee26c010 00000001 00000000 ee26c010 c0a632d0 ee26c010
[ 6.936523] ff00: c0a9dce0 c049f3b4 ee26c010 c0a630bc c0a630d8 c049f8c4 c049f7d8 ed0a4580
[ 6.945068] ff20: c0a630f0 ef7b7c40 00000000 ef7baf00 c0a02d00 c0145ef0 ed0a4580 c0a630f0
[ 6.953582] ff40: ffff8d6b ed0a4580 ef7b7c40 ef7b7c40 ed0de000 ef7b7c58 c0a02d00 ed0a4598
[ 6.962127] ff60: 00000008 c01466c4 00000000 ed0ba8c0 ed0b74c0 00000000 ed0a4580 c0146404
[ 6.970642] ff80: ee0b5ef0 ed0ba8dc 00000000 c014a6dc ed0b74c0 c014a5a8 00000000 00000000
[ 6.979187] ffa0: 00000000 00000000 00000000 c01010e8 00000000 00000000 00000000 00000000
[ 6.987701] ffc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 6.996246] ffe0: 00000000 00000000 00000000 00000000 00000013 00000000 00000000 00000000
[ 7.004791] [<c070d24c>] (strcmp) from [<c0429aac>] (pinctrl_get_group_selector+0x44/0x78)
[ 7.013427] [<c0429aac>] (pinctrl_get_group_selector) from [<c042aa6c>] (pinmux_map_to_setting+0x158/0x1a0)
[ 7.023590] [<c042aa6c>] (pinmux_map_to_setting) from [<c04292d4>] (create_pinctrl+0x1f0/0x2f8)
[ 7.032684] [<c04292d4>] (create_pinctrl) from [<c042949c>] (devm_pinctrl_get+0x2c/0x6c)
[ 7.041137] [<c042949c>] (devm_pinctrl_get) from [<c04bbc80>] (pinctrl_bind_pins+0x3c/0x138)
[ 7.049957] [<c04bbc80>] (pinctrl_bind_pins) from [<c049ff78>] (driver_probe_device+0xe8/0x318)
[ 7.059051] [<c049ff78>] (driver_probe_device) from [<c049e7d8>] (bus_for_each_drv+0x84/0x94)
[ 7.067932] [<c049e7d8>] (bus_for_each_drv) from [<c049fdf8>] (__device_attach+0x88/0xfc)
[ 7.076477] [<c049fdf8>] (__device_attach) from [<c049f3b4>] (bus_probe_device+0x28/0x80)
[ 7.084991] [<c049f3b4>] (bus_probe_device) from [<c049f8c4>] (deferred_probe_work_func+0xec/0x120)
[ 7.094451] [<c049f8c4>] (deferred_probe_work_func) from [<c0145ef0>] (process_one_work+0x244/0x464)
[ 7.103973] [<c0145ef0>] (process_one_work) from [<c01466c4>] (worker_thread+0x2c0/0x3ec)
[ 7.112518] [<c01466c4>] (worker_thread) from [<c014a6dc>] (kthread+0x134/0x150)
[ 7.120208] [<c014a6dc>] (kthread) from [<c01010e8>] (ret_from_fork+0x14/0x2c)
[ 7.127746] Exception stack(0xed0dffb0 to 0xed0dfff8)
[ 7.133026] ffa0: 00000000 00000000 00000000 00000000
[ 7.141571] ffc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 7.150085] ffe0: 00000000 00000000 00000000 00000000 00000013 00000000
[ 7.157012] Code: e3520000 e5e32001 1afffffb e12fff1e (e4d03001)
[ 7.634613] ---[ end trace f9c51fb3f5e8d7eb ]---
[ 8.300231] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[ 8.337310] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[ 8.369934] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
[ 8.388122] cfg80211: failed to load regulatory.db
New ideas?
BR,
Nikolaus
More information about the Letux-kernel
mailing list