Web lists-archives.com

Re: [PATCH v2 3/3] Bluetooth: hci_qca: Add serdev support




On Tue, Mar 13, 2018 at 6:44 PM, Thierry Escande
<thierry.escande@xxxxxxxxxx> wrote:
> Add support for Qualcomm serial slave devices. Probe the serial device,
> retrieve its maximum speed and register a new hci uart device.

> +#include <linux/of.h>

What exactly this is used for?

> +       qcadev->bt_en = devm_gpiod_get(&serdev->dev, "bt-disable-n",
> +                                      GPIOD_OUT_LOW);
> +       if (IS_ERR(qcadev->bt_en)) {
> +               dev_err(&serdev->dev, "failed to acquire bt-disable-n gpio\n");
> +               return PTR_ERR(qcadev->bt_en);
> +       }

> +       gpiod_set_value(qcadev->bt_en, 0);

Redundant.

> +       clk_set_rate(qcadev->divclk4, DIVCLK4_RATE_32KHZ);

> +       clk_prepare_enable(qcadev->divclk4);

This may fail.

> +       return hci_uart_register_device(&qcadev->serdev_hu, &qca_proto);
> +}

> +       clk_disable(qcadev->divclk4);
> +       clk_unprepare(qcadev->divclk4);

One call.

> +}

> +static const struct of_device_id qca_bluetooth_of_match[] = {
> +       { .compatible = "qcom,qca6174-bt" },

> +       { },

No comma.

> +};

-- 
With Best Regards,
Andy Shevchenko