From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: MIME-Version: 1.0 In-Reply-To: References: <1504699898-28011-1-git-send-email-loic.poulain@linaro.org> <1504699898-28011-3-git-send-email-loic.poulain@linaro.org> From: Loic Poulain Date: Fri, 8 Sep 2017 09:04:15 +0200 Message-ID: Subject: Re: [PATCH v6 3/3] Bluetooth: btqcomsmd: retrieve BD address from DT property Content-Type: multipart/alternative; boundary="94eb2c0867b6be0df30558a831ec" To: Marcel Holtmann Cc: Rob Herring , Johan Hedberg , Bluez mailing list , linux-arm-msm@vger.kernel.org, devicetree , Bjorn Andersson List-ID: --94eb2c0867b6be0df30558a831ec Content-Type: text/plain; charset="UTF-8" Hi Marcel, > > > + /* The local-bd-address property is usually injected by the > > + * bootloader which has access to the allocated BD address. > > + */ > > + if (!of_property_read_u8_array(pdev->dev.of_node, > "local-bd-address", > > + (u8 *)&btq->bdaddr, > sizeof(bdaddr_t))) { > > + BT_INFO("BD address %pMR retrieved from device-tree", > > + &btq->bdaddr); > > + } > > any reason you are not using bt_dev_info here? I think it would be > important to print the device information prefix. > Yes, hdev does not have any allocated name/number before being registered. I can move this after hci_register_dev if you prefer. Regards, Loic --94eb2c0867b6be0df30558a831ec Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Marcel,

>
> +=C2=A0 =C2=A0 =C2=A0/* The local-bd-address property is usually injec= ted by the
> +=C2=A0 =C2=A0 =C2=A0 * bootloader which has access to the allocated B= D address.
> +=C2=A0 =C2=A0 =C2=A0 */
> +=C2=A0 =C2=A0 =C2=A0if (!of_property_read_u8_array(pdev->dev.= of_node, "local-bd-address",
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (u8 *)&btq->= ;bdaddr, sizeof(bdaddr_t))) {
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0BT_INFO("BD addr= ess %pMR retrieved from device-tree",
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0&btq->bdaddr);
> +=C2=A0 =C2=A0 =C2=A0}

any reason you are not using bt_dev_info here? I think it would be importan= t to print the device information prefix.

Yes, = hdev does not have any allocated name/number before being registered.
I can move this after hci_register_dev if you prefer.

Regards,
Loic
--94eb2c0867b6be0df30558a831ec--