From: Kalle Valo <kvalo@kernel.org>
To: Vincent Tremblay <vincent@vtremblay.dev>
Cc: ath10k@lists.infradead.org, linux-wireless@vger.kernel.org
Subject: Re: [PATCH v2] wifi: ath10k: read qcom,coexist-support as a u32
Date: Mon, 13 Mar 2023 08:39:17 +0200 [thread overview]
Message-ID: <873569p33e.fsf@kernel.org> (raw)
In-Reply-To: <CA+RD57MwUfAzF2u31Ews4uT0+A6uhjwwd40O=9uyZihap4nxdA@mail.gmail.com> (Vincent Tremblay's message of "Sun, 12 Mar 2023 15:42:47 -0400")
Vincent Tremblay <vincent@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@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
_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k
WARNING: multiple messages have this Message-ID (diff)
From: Kalle Valo <kvalo@kernel.org>
To: Vincent Tremblay <vincent@vtremblay.dev>
Cc: ath10k@lists.infradead.org, linux-wireless@vger.kernel.org
Subject: Re: [PATCH v2] wifi: ath10k: read qcom,coexist-support as a u32
Date: Mon, 13 Mar 2023 08:39:17 +0200 [thread overview]
Message-ID: <873569p33e.fsf@kernel.org> (raw)
In-Reply-To: <CA+RD57MwUfAzF2u31Ews4uT0+A6uhjwwd40O=9uyZihap4nxdA@mail.gmail.com> (Vincent Tremblay's message of "Sun, 12 Mar 2023 15:42:47 -0400")
Vincent Tremblay <vincent@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@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
next prev parent reply other threads:[~2023-03-13 6:40 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-12 19:42 [PATCH v2] wifi: ath10k: read qcom,coexist-support as a u32 Vincent Tremblay
2023-03-12 19:42 ` Vincent Tremblay
2023-03-13 6:39 ` Kalle Valo [this message]
2023-03-13 6:39 ` Kalle Valo
2023-03-13 18:28 ` Kalle Valo
2023-03-13 18:28 ` Kalle Valo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=873569p33e.fsf@kernel.org \
--to=kvalo@kernel.org \
--cc=ath10k@lists.infradead.org \
--cc=linux-wireless@vger.kernel.org \
--cc=vincent@vtremblay.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.