[Letux-kernel] exact meaning of pinctrl-single masks and when and why are submasks invalid?

H. Nikolaus Schaller hns at goldelico.com
Fri Jun 1 16:28:35 CEST 2018


Hi,

> Am 01.06.2018 um 16:14 schrieb Tony Lindgren <tony at atomide.com>:
> 
> * H. Nikolaus Schaller <hns at goldelico.com> [180601 12:41]:
>> Hi,
>> I think I have found the issue. It is not the pinctrl-single masks, but a typo in our DT:
> 
> Ah OK :)
> 
>>>> &control_devconf1 {
>>>> 	pinctrl-name = "default";
>> 
>> ^^^ here is the bug: this property must also be called "pinctrl-names".
> 
> OK yeah those are hard to notice. Sorry no idea why another instance would
> not work also.

Indeed.

Seems that we are lacking a tool like compiler + linker which checks exported
and referenced symbols...

Hm. Not easy to develop. Maybe a grep over the whole kernel tree could try to
identify all code that references properties and collect the property names.

And flag any use of a property that does not exist in the kernel.

But this would sill miss a lot of potential bugs, e.g. a driver not using
some property but another one. And not to forget that property names are
sometimes dynamically constructed.

So it would need some mechanism like the EXPORT_SYMBOL(). Then, it would be
possible to scan for .compatible strings in each driver and the exported
symbols. And check a DT source against that so that a property name that
is nowhere referenced by a driver is found.

But this is only useful if *all* drivers do that. I don't expect people are
willing to add an EXPORT_OF_PROPERTY() to all drivers. Not unless Linus
requires that.

Anyways it works now! Maybe I'll now find some time to test the omap5-4gb code
and locate the pwm_bl issue.

BR,
Nikolaus



More information about the Letux-kernel mailing list