2019-11-15 16:52:05

by Mohammad Rasim

[permalink] [raw]
Subject: [RFC PATCH 1/2] Add entry for BCM4335A0 UART bluetooth

Signed-off-by: Mohammad Rasim <[email protected]>
---
drivers/bluetooth/btbcm.c | 1 +
drivers/bluetooth/hci_bcm.c | 1 +
2 files changed, 2 insertions(+)

diff --git a/drivers/bluetooth/btbcm.c b/drivers/bluetooth/btbcm.c
index 2d2e6d862068..22464bf8cda3 100644
--- a/drivers/bluetooth/btbcm.c
+++ b/drivers/bluetooth/btbcm.c
@@ -339,6 +339,7 @@ static const struct bcm_subver_table bcm_uart_subver_table[] = {
{ 0x220e, "BCM20702A1" }, /* 001.002.014 */
{ 0x4217, "BCM4329B1" }, /* 002.002.023 */
{ 0x6106, "BCM4359C0" }, /* 003.001.006 */
+ { 0x4106, "BCM4335A0" }, /* 002.001.006 */
{ }
};

diff --git a/drivers/bluetooth/hci_bcm.c b/drivers/bluetooth/hci_bcm.c
index 7646636f2d18..7b4bb5dbea1d 100644
--- a/drivers/bluetooth/hci_bcm.c
+++ b/drivers/bluetooth/hci_bcm.c
@@ -1422,6 +1422,7 @@ static const struct of_device_id bcm_bluetooth_of_match[] = {
{ .compatible = "brcm,bcm4345c5" },
{ .compatible = "brcm,bcm4330-bt" },
{ .compatible = "brcm,bcm43438-bt" },
+ { .compatible = "brcm,bcm4335A0" },
{ },
};
MODULE_DEVICE_TABLE(of, bcm_bluetooth_of_match);
--
2.23.0


2019-11-16 09:45:19

by Andreas Färber

[permalink] [raw]
Subject: Re: [RFC PATCH 1/2] Add entry for BCM4335A0 UART bluetooth

Am 15.11.19 um 17:50 schrieb Mohammad Rasim:
> Signed-off-by: Mohammad Rasim <[email protected]>

Lacking a commit description. Please add a sentence.

> ---
> drivers/bluetooth/btbcm.c | 1 +
> drivers/bluetooth/hci_bcm.c | 1 +
> 2 files changed, 2 insertions(+)
>
> diff --git a/drivers/bluetooth/btbcm.c b/drivers/bluetooth/btbcm.c
> index 2d2e6d862068..22464bf8cda3 100644
> --- a/drivers/bluetooth/btbcm.c
> +++ b/drivers/bluetooth/btbcm.c
> @@ -339,6 +339,7 @@ static const struct bcm_subver_table bcm_uart_subver_table[] = {
> { 0x220e, "BCM20702A1" }, /* 001.002.014 */
> { 0x4217, "BCM4329B1" }, /* 002.002.023 */
> { 0x6106, "BCM4359C0" }, /* 003.001.006 */
> + { 0x4106, "BCM4335A0" }, /* 002.001.006 */
> { }
> };

Beyond this patch: There appears to be no order in this table at all?
Not alphabetically, not numerically, not by comment.

>
> diff --git a/drivers/bluetooth/hci_bcm.c b/drivers/bluetooth/hci_bcm.c
> index 7646636f2d18..7b4bb5dbea1d 100644
> --- a/drivers/bluetooth/hci_bcm.c
> +++ b/drivers/bluetooth/hci_bcm.c
> @@ -1422,6 +1422,7 @@ static const struct of_device_id bcm_bluetooth_of_match[] = {
> { .compatible = "brcm,bcm4345c5" },
> { .compatible = "brcm,bcm4330-bt" },
> { .compatible = "brcm,bcm43438-bt" },
> + { .compatible = "brcm,bcm4335A0" },

You can't use compatible strings without defining the binding first. Why
do you need it? If you do, use lowercase names.

> { },
> };
> MODULE_DEVICE_TABLE(of, bcm_bluetooth_of_match);

Regards,
Andreas

--
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Felix Imendörffer
HRB 36809 (AG Nürnberg)

2019-11-18 17:37:08

by Mohammad Rasim

[permalink] [raw]
Subject: Re: [RFC PATCH 1/2] Add entry for BCM4335A0 UART bluetooth

On 19/11/16 10:43AM, Andreas F?rber wrote:
> Am 15.11.19 um 17:50 schrieb Mohammad Rasim:
> > Signed-off-by: Mohammad Rasim <[email protected]>
>
> Lacking a commit description. Please add a sentence.
>
> > ---
> > drivers/bluetooth/btbcm.c | 1 +
> > drivers/bluetooth/hci_bcm.c | 1 +
> > 2 files changed, 2 insertions(+)
> >
> > diff --git a/drivers/bluetooth/btbcm.c b/drivers/bluetooth/btbcm.c
> > index 2d2e6d862068..22464bf8cda3 100644
> > --- a/drivers/bluetooth/btbcm.c
> > +++ b/drivers/bluetooth/btbcm.c
> > @@ -339,6 +339,7 @@ static const struct bcm_subver_table bcm_uart_subver_table[] = {
> > { 0x220e, "BCM20702A1" }, /* 001.002.014 */
> > { 0x4217, "BCM4329B1" }, /* 002.002.023 */
> > { 0x6106, "BCM4359C0" }, /* 003.001.006 */
> > + { 0x4106, "BCM4335A0" }, /* 002.001.006 */
> > { }
> > };
>
> Beyond this patch: There appears to be no order in this table at all?
> Not alphabetically, not numerically, not by comment.
>
> >
> > diff --git a/drivers/bluetooth/hci_bcm.c b/drivers/bluetooth/hci_bcm.c
> > index 7646636f2d18..7b4bb5dbea1d 100644
> > --- a/drivers/bluetooth/hci_bcm.c
> > +++ b/drivers/bluetooth/hci_bcm.c
> > @@ -1422,6 +1422,7 @@ static const struct of_device_id bcm_bluetooth_of_match[] = {
> > { .compatible = "brcm,bcm4345c5" },
> > { .compatible = "brcm,bcm4330-bt" },
> > { .compatible = "brcm,bcm43438-bt" },
> > + { .compatible = "brcm,bcm4335A0" },
>
> You can't use compatible strings without defining the binding first. Why
> do you need it? If you do, use lowercase names.
>
I don't really need it per se, I can use any compatible (i've used bcm43438-bt before) but I thought I'd add a compatible so that the device dts can describe the exact model of the module, if that is ok I will update the broadcom-bluetooth.txt binding in the next version

> > { },
> > };
> > MODULE_DEVICE_TABLE(of, bcm_bluetooth_of_match);
>
> Regards,
> Andreas
>
> --
> SUSE Software Solutions Germany GmbH
> Maxfeldstr. 5, 90409 N?rnberg, Germany
> GF: Felix Imend?rffer
> HRB 36809 (AG N?rnberg)