[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Sun, 11 Nov 2018 03:46:48 +0100
From: Sebastian Reichel <sebastian.reichel@...labora.com>
To: Andreas Kemnade <andreas@...nade.info>
Cc: marcel@...tmann.org, johan.hedberg@...il.com,
linux-bluetooth@...r.kernel.org, linux-kernel@...r.kernel.org,
devicetree@...r.kernel.org, letux-kernel@...nphoenux.org
Subject: Re: [PATCH RFC] bluetooth: add uart h4 devices via serdev/devicetree
Hi,
On Sun, Nov 11, 2018 at 12:20:34AM +0100, Andreas Kemnade wrote:
> This is a first try to be able to use h4 devices specified in
> the devicetree, so you do not need to call hciattach and
> it can be automatically probed.
>
> Of course, proper devicetree bindings documentation is
> missing. And also you would extend that by regulator/
> enable gpio settings.
>
> But before proceeding further it should be checked if the
> general way of doing things is right.
>
> Signed-off-by: Andreas Kemnade <andreas@...nade.info>
> ---
Patch looks good to me, just one note
> drivers/bluetooth/hci_h4.c | 78 ++++++++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 78 insertions(+)
>
[...]
> + return hci_uart_register_device(hu, &h4p);
> +}
> +
> +static void hci_h4_remove(struct serdev_device *serdev)
> +{
> + struct h4_device *h4dev = serdev_device_get_drvdata(serdev);
> +
> + hci_uart_unregister_device(&h4dev->hu);
> +}
I suggest to add a patch introducing
devm_hci_uart_register_device()
All existing users of hci_uart_register_device() could use it
(your driver, hci_bcm, hci_h5, hci_ll, hci_nokia and hci_qca)
and all drivers but hci_qca can drop their remove function.
-- Sebastian
Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)
Powered by blists - more mailing lists