Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 7521

Device Tree • Re: Overlay for adc-joystick crashes my boot process

$
0
0
Isn't it defines as boolean in https://github.com/raspberrypi/linux/bl ... k.yaml#L34

Code:

poll-interval: true
Nope, that just means it is allowed to be present. YAML is a swine of a thing, and is even worse when needing to write the bindings from scratch. I haven't found a good guide so far.
If in doubt, log it. Extra log messages throughout adc_joystick_probe to find out where it errored. Then drop into that function and add log all error paths there. Repeat until you get bored, or find the condition that is failing. If you can understand the failure condition then great, otherwise give up.
I could have set up kgdb, but often find that takes longer.
..
Replace it with

Code:

poll-interval = <60>;
as all the 13 users in the tree do, the driver loads fine, and evtest shows the device (I have nothing connected to my ADC, so I get noise in the readings).

It would be nice if the bindings said what impact poll-interval had as it obviously changes the behaviour of the driver, but looking at the other examples is always a good route to go.
looks like I need to make use of https://elixir.bootlin.com/linux/v6.12.12/source more frequent
"git grep" is the better bet for this kind of searching in the kernel repo.
"git grep adc-joystick arch" to list all users (restrict it to the arch subdirectory as we don't want the bindings or the driver).
"git grep adc-joystick arch | wc -l" to count the number of instances.
"git grep -A8 adc-joystick arch | grep poll-interval | wc -l" to count the number of instances that specify poll-interval too.

Statistics: Posted by 6by9 — Tue Feb 04, 2025 9:24 am



Viewing all articles
Browse latest Browse all 7521

Trending Articles