On Tue, Jan 14, 2025 at 02:05:25PM +0100, Andreas Kemnade wrote:
Am Tue, 14 Jan 2025 13:14:45 +0100
schrieb Johan Hovold [off-list ref]:
quoted
quoted
GNSS support is available through
channel 9 whilst FM is through channel 8. Add a platform subdevice for
GNSS so that a driver for that functionality can be build.
quoted
To avoid having
useless GNSS devices, do it only when the devicetree node name contains
gnss.
That's seems like an unorthodox use of device tree. These devices are
primarily (WiFi and) Bluetooth controllers so should probably not have
gone about and updated the node names to 'bluetooth-gnss' as you did,
for example, here:
yes, the matching of the node name is a bit unorthodox. How do you
define primary? The old design with ti-st driver and bluetooth and
other functions on top does not look like anything primary. If you look
at the current situation with the GNSS stuff sitting on to of
bluetooth, the picture is different, but that is implementation.
I call it primary based on (my understanding of) the architecture,
protocol and chip family. It look to me like the FM, GPS and NFC
functionality is bolted on top of the Bluetooth one for which a protocol
already existed (and which is also used by standalone non-wilink
Bluetooth controllers).
As the
devicetree is describing hardware, having the nodenames describe things
seems like the right way to do.
We have serial controllers which also implements a gpio controller, but
no one would expect those to be named 'serial-gpio' for example. But we
can still describe that with a 'gpio-controller' property (and the
compatible string indicates what the device is capable of).
Since these chips do not come without Bluetooth (e.g. only wifi + gps)
and the Bluetooth protocol is used to access the GPS function I think
it makes perfect sense to just leave them named 'bluetooth'. That also
avoids having to add all the permutations of
bluetooth-gnss-fmradio-nfc
etc. (and having to name them such also when there is no gnss antenna
connected).
But I agree with you that the driver should not care about the node
name, but use a boolean property.
Johan