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 <[email protected]> > ---
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
signature.asc
Description: PGP signature

