[PATCH v2] wifi: ath10k: read qcom,coexist-support as a u32

Kalle Valo kvalo at kernel.org
Sun Mar 12 23:39:17 PDT 2023


Vincent Tremblay <vincent at vtremblay.dev> writes:

> Read qcom,coexist-support as a u32 instead of a u8
>
> When we set the property to <1> in the DT (as specified in the doc),
> "of_property_read_u8" read 0 instead of 1. This is because of the data format.
>
> By default <1> is written with 32 bits.
> The problem is that the driver is trying to read a u8.
>
> The difference can be visualized using hexdump in a running device:
> Default 32 bits output:
> =======================
> 0000000 0000 0100
> 0000004
>
> 8 bits output:
> ==============
> 0000000 0001
> 0000001
>
> By changing "of_property_read_u8" by "of_property_read_u32", the driver
> is aligned with the documentation and is able to read the value without
> modifying the DT.
>
> The other solution would be to force the value in the DT to be saved as
> an 8 bits value (qcom,coexist-support = /bits/ 8 <1>),
> which is against the doc and less intuitive.
>
> Validation:
> ===========
> The patch was tested on a real device and we can see in the debug logs
> that the feature is properly initialized:
>
> [  109.102097] ath10k_ahb a000000.wifi: boot coex_support 1 coex_gpio_pin 52
>
> Signed-off-by: Vincent Tremblay <vincent at vtremblay.dev>

What are the changes in v2? Please always include a list of changes,
more info in the wiki below.

-- 
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches



More information about the ath10k mailing list