Re: [PATCH v4 1/2] gnss: ubx: customize serial device open to set U-Blox Zed-F9P baud

From: Krzysztof Kozlowski
Date: Mon May 08 2023 - 04:02:34 EST


On 08/05/2023 03:11, alison@xxxxxxxxxxxxx wrote:
> From: Alison Chaiken <achaiken@xxxxxxxxxxx>
>
> Add support for setting the baud rate of U-Blox Zed-F9P GNSS devices.
> Provide functions that support writing of arbitrary configuration
> messages to the device plus one that specifically configures the baud
> rate. Override the default gnss_serial_open() with a new method that
> writes the configuration message to the GNSS if the devicetree declares
> it to be a Zed F9P and requests a non-default baud. Add a boolean flag
> to the ubx_data private data of the GNSS driver in order to track
> whether the configuration message has already been written. Set the Zed
> F9P to its default port speed if the devicetree does not specify a
> value.
>
> Signed-off-by: Alison Chaiken <achaiken@xxxxxxxxxxx>
> ---
>
> V5 -> V4 Compile out the changes if CONFIG_OF is not set.

Judging by the number of kernel test robot failures, I am not sure if
you tested the patch.

Anyway, don't add more #ifdefs, that's not a correct approach. Depending
on the case, you either remove if entirely or add __maybe_unused. Why
did you need to add the #ifdefs?



Best regards,
Krzysztof