* [PATCH v1] Bluetooth: hci_bcm: Support platform enumeration
@ 2017-03-10 12:28 Andy Shevchenko
2017-03-26 12:28 ` Andy Shevchenko
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Andy Shevchenko @ 2017-03-10 12:28 UTC (permalink / raw)
To: Marcel Holtmann, Gustavo Padovan, Johan Hedberg, linux-bluetooth
Cc: Andy Shevchenko, Jarkko Nikula
Until now the driver supports only ACPI enumeration. Nevertheless
Intel Edison SoM has Broadcom Wi-Fi + BT chip and neither ACPI nor DT
enumeration mechanism.
Enable pure platform driver in order to support Intel Edison SoM.
Cc: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/bluetooth/hci_bcm.c | 50 ++++++++++++++++++++++++++++++---------------
1 file changed, 33 insertions(+), 17 deletions(-)
diff --git a/drivers/bluetooth/hci_bcm.c b/drivers/bluetooth/hci_bcm.c
index 5262a2077d7a..a26a4ca6968b 100644
--- a/drivers/bluetooth/hci_bcm.c
+++ b/drivers/bluetooth/hci_bcm.c
@@ -697,28 +697,14 @@ static int bcm_resource(struct acpi_resource *ares, void *data)
/* Always tell the ACPI core to skip this resource */
return 1;
}
+#endif /* CONFIG_ACPI */
-static int bcm_acpi_probe(struct bcm_device *dev)
+static int bcm_platform_probe(struct bcm_device *dev)
{
struct platform_device *pdev = dev->pdev;
- LIST_HEAD(resources);
- const struct dmi_system_id *dmi_id;
- const struct acpi_gpio_mapping *gpio_mapping = acpi_bcm_int_last_gpios;
- const struct acpi_device_id *id;
- int ret;
dev->name = dev_name(&pdev->dev);
- /* Retrieve GPIO data */
- id = acpi_match_device(pdev->dev.driver->acpi_match_table, &pdev->dev);
- if (id)
- gpio_mapping = (const struct acpi_gpio_mapping *) id->driver_data;
-
- ret = acpi_dev_add_driver_gpios(ACPI_COMPANION(&pdev->dev),
- gpio_mapping);
- if (ret)
- return ret;
-
dev->clk = devm_clk_get(&pdev->dev, NULL);
dev->device_wakeup = devm_gpiod_get_optional(&pdev->dev,
@@ -755,6 +741,33 @@ static int bcm_acpi_probe(struct bcm_device *dev)
return -EINVAL;
}
+ return 0;
+}
+
+#ifdef CONFIG_ACPI
+static int bcm_acpi_probe(struct bcm_device *dev)
+{
+ struct platform_device *pdev = dev->pdev;
+ LIST_HEAD(resources);
+ const struct dmi_system_id *dmi_id;
+ const struct acpi_gpio_mapping *gpio_mapping = acpi_bcm_int_last_gpios;
+ const struct acpi_device_id *id;
+ int ret;
+
+ /* Retrieve GPIO data */
+ id = acpi_match_device(pdev->dev.driver->acpi_match_table, &pdev->dev);
+ if (id)
+ gpio_mapping = (const struct acpi_gpio_mapping *) id->driver_data;
+
+ ret = acpi_dev_add_driver_gpios(ACPI_COMPANION(&pdev->dev),
+ gpio_mapping);
+ if (ret)
+ return ret;
+
+ ret = bcm_platform_probe(dev);
+ if (ret)
+ return ret;
+
/* Retrieve UART ACPI info */
ret = acpi_dev_get_resources(ACPI_COMPANION(&dev->pdev->dev),
&resources, bcm_resource, dev);
@@ -789,7 +802,10 @@ static int bcm_probe(struct platform_device *pdev)
dev->pdev = pdev;
- ret = bcm_acpi_probe(dev);
+ if (has_acpi_companion(&pdev->dev))
+ ret = bcm_acpi_probe(dev);
+ else
+ ret = bcm_platform_probe(dev);
if (ret)
return ret;
--
2.11.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH v1] Bluetooth: hci_bcm: Support platform enumeration
2017-03-10 12:28 [PATCH v1] Bluetooth: hci_bcm: Support platform enumeration Andy Shevchenko
@ 2017-03-26 12:28 ` Andy Shevchenko
2017-03-27 14:01 ` Marcel Holtmann
2017-03-28 11:11 ` Marcel Holtmann
2 siblings, 0 replies; 8+ messages in thread
From: Andy Shevchenko @ 2017-03-26 12:28 UTC (permalink / raw)
To: Marcel Holtmann, Gustavo Padovan, Johan Hedberg, linux-bluetooth
Cc: Jarkko Nikula
On Fri, 2017-03-10 at 14:28 +0200, Andy Shevchenko wrote:
> Until now the driver supports only ACPI enumeration. Nevertheless
> Intel Edison SoM has Broadcom Wi-Fi + BT chip and neither ACPI nor DT
> enumeration mechanism.
>
> Enable pure platform driver in order to support Intel Edison SoM.
>
Any comment on this?
> Cc: Jarkko Nikula <jarkko.nikula@linux.intel.com>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
> drivers/bluetooth/hci_bcm.c | 50 ++++++++++++++++++++++++++++++----
> -----------
> 1 file changed, 33 insertions(+), 17 deletions(-)
>
> diff --git a/drivers/bluetooth/hci_bcm.c b/drivers/bluetooth/hci_bcm.c
> index 5262a2077d7a..a26a4ca6968b 100644
> --- a/drivers/bluetooth/hci_bcm.c
> +++ b/drivers/bluetooth/hci_bcm.c
> @@ -697,28 +697,14 @@ static int bcm_resource(struct acpi_resource
> *ares, void *data)
> /* Always tell the ACPI core to skip this resource */
> return 1;
> }
> +#endif /* CONFIG_ACPI */
>
> -static int bcm_acpi_probe(struct bcm_device *dev)
> +static int bcm_platform_probe(struct bcm_device *dev)
> {
> struct platform_device *pdev = dev->pdev;
> - LIST_HEAD(resources);
> - const struct dmi_system_id *dmi_id;
> - const struct acpi_gpio_mapping *gpio_mapping =
> acpi_bcm_int_last_gpios;
> - const struct acpi_device_id *id;
> - int ret;
>
> dev->name = dev_name(&pdev->dev);
>
> - /* Retrieve GPIO data */
> - id = acpi_match_device(pdev->dev.driver->acpi_match_table,
> &pdev->dev);
> - if (id)
> - gpio_mapping = (const struct acpi_gpio_mapping *) id-
> >driver_data;
> -
> - ret = acpi_dev_add_driver_gpios(ACPI_COMPANION(&pdev->dev),
> - gpio_mapping);
> - if (ret)
> - return ret;
> -
> dev->clk = devm_clk_get(&pdev->dev, NULL);
>
> dev->device_wakeup = devm_gpiod_get_optional(&pdev->dev,
> @@ -755,6 +741,33 @@ static int bcm_acpi_probe(struct bcm_device *dev)
> return -EINVAL;
> }
>
> + return 0;
> +}
> +
> +#ifdef CONFIG_ACPI
> +static int bcm_acpi_probe(struct bcm_device *dev)
> +{
> + struct platform_device *pdev = dev->pdev;
> + LIST_HEAD(resources);
> + const struct dmi_system_id *dmi_id;
> + const struct acpi_gpio_mapping *gpio_mapping =
> acpi_bcm_int_last_gpios;
> + const struct acpi_device_id *id;
> + int ret;
> +
> + /* Retrieve GPIO data */
> + id = acpi_match_device(pdev->dev.driver->acpi_match_table,
> &pdev->dev);
> + if (id)
> + gpio_mapping = (const struct acpi_gpio_mapping *) id-
> >driver_data;
> +
> + ret = acpi_dev_add_driver_gpios(ACPI_COMPANION(&pdev->dev),
> + gpio_mapping);
> + if (ret)
> + return ret;
> +
> + ret = bcm_platform_probe(dev);
> + if (ret)
> + return ret;
> +
> /* Retrieve UART ACPI info */
> ret = acpi_dev_get_resources(ACPI_COMPANION(&dev->pdev->dev),
> &resources, bcm_resource, dev);
> @@ -789,7 +802,10 @@ static int bcm_probe(struct platform_device
> *pdev)
>
> dev->pdev = pdev;
>
> - ret = bcm_acpi_probe(dev);
> + if (has_acpi_companion(&pdev->dev))
> + ret = bcm_acpi_probe(dev);
> + else
> + ret = bcm_platform_probe(dev);
> if (ret)
> return ret;
>
--
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Intel Finland Oy
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v1] Bluetooth: hci_bcm: Support platform enumeration
2017-03-10 12:28 [PATCH v1] Bluetooth: hci_bcm: Support platform enumeration Andy Shevchenko
2017-03-26 12:28 ` Andy Shevchenko
@ 2017-03-27 14:01 ` Marcel Holtmann
2017-03-27 17:18 ` Andy Shevchenko
2017-03-28 11:11 ` Marcel Holtmann
2 siblings, 1 reply; 8+ messages in thread
From: Marcel Holtmann @ 2017-03-27 14:01 UTC (permalink / raw)
To: Andy Shevchenko
Cc: Gustavo F. Padovan, Johan Hedberg, linux-bluetooth, Jarkko Nikula
Hi Andy,
> Until now the driver supports only ACPI enumeration. Nevertheless
> Intel Edison SoM has Broadcom Wi-Fi + BT chip and neither ACPI nor DT
> enumeration mechanism.
>
> Enable pure platform driver in order to support Intel Edison SoM.
explain to me what this the case. Didn’t we enabled also DT for Edison? And I assumed in general we planned to move away from platform drivers in favour of DT.
Regards
Marcel
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v1] Bluetooth: hci_bcm: Support platform enumeration
2017-03-27 14:01 ` Marcel Holtmann
@ 2017-03-27 17:18 ` Andy Shevchenko
2017-03-27 18:00 ` Marcel Holtmann
0 siblings, 1 reply; 8+ messages in thread
From: Andy Shevchenko @ 2017-03-27 17:18 UTC (permalink / raw)
To: Marcel Holtmann
Cc: Gustavo F. Padovan, Johan Hedberg, linux-bluetooth, Jarkko Nikula
On Mon, 2017-03-27 at 16:01 +0200, Marcel Holtmann wrote:
> Hi Andy,
>
> > Until now the driver supports only ACPI enumeration. Nevertheless
> > Intel Edison SoM has Broadcom Wi-Fi + BT chip and neither ACPI nor
> > DT
> > enumeration mechanism.
> >
> > Enable pure platform driver in order to support Intel Edison SoM.
>
> explain to me what this the case. Didn’t we enabled also DT for
> Edison? And I assumed in general we planned to move away from platform
> drivers in favour of DT.
Nope. It's SFI based device which basically means platform data only.
--
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Intel Finland Oy
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v1] Bluetooth: hci_bcm: Support platform enumeration
2017-03-27 17:18 ` Andy Shevchenko
@ 2017-03-27 18:00 ` Marcel Holtmann
2017-03-28 8:19 ` Andy Shevchenko
0 siblings, 1 reply; 8+ messages in thread
From: Marcel Holtmann @ 2017-03-27 18:00 UTC (permalink / raw)
To: Andy Shevchenko
Cc: Gustavo F. Padovan, Johan Hedberg, Bluez mailing list, Jarkko Nikula
Hi Andy,
>>> Until now the driver supports only ACPI enumeration. Nevertheless
>>> Intel Edison SoM has Broadcom Wi-Fi + BT chip and neither ACPI nor
>>> DT
>>> enumeration mechanism.
>>>
>>> Enable pure platform driver in order to support Intel Edison SoM.
>>
>> explain to me what this the case. Didn’t we enabled also DT for
>> Edison? And I assumed in general we planned to move away from platform
>> drivers in favour of DT.
>
> Nope. It's SFI based device which basically means platform data only.
hold on, but SFI can be enumerated like ACPI. What am I missing here?
Regards
Marcel
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v1] Bluetooth: hci_bcm: Support platform enumeration
2017-03-27 18:00 ` Marcel Holtmann
@ 2017-03-28 8:19 ` Andy Shevchenko
2017-03-28 11:11 ` Marcel Holtmann
0 siblings, 1 reply; 8+ messages in thread
From: Andy Shevchenko @ 2017-03-28 8:19 UTC (permalink / raw)
To: Marcel Holtmann
Cc: Gustavo F. Padovan, Johan Hedberg, Bluez mailing list, Jarkko Nikula
On Mon, 2017-03-27 at 20:00 +0200, Marcel Holtmann wrote:
> Hi Andy,
>
> > > > Until now the driver supports only ACPI enumeration.
> > > > Nevertheless
> > > > Intel Edison SoM has Broadcom Wi-Fi + BT chip and neither ACPI
> > > > nor
> > > > DT
> > > > enumeration mechanism.
> > > >
> > > > Enable pure platform driver in order to support Intel Edison
> > > > SoM.
> > >
> > > explain to me what this the case. Didn’t we enabled also DT for
> > > Edison? And I assumed in general we planned to move away from
> > > platform
> > > drivers in favour of DT.
> >
> > Nope. It's SFI based device which basically means platform data
> > only.
>
> hold on, but SFI can be enumerated like ACPI. What am I missing here?
You missed a whole point. :-)
SFI so useless that you may just forget about it.
--
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Intel Finland Oy
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v1] Bluetooth: hci_bcm: Support platform enumeration
2017-03-10 12:28 [PATCH v1] Bluetooth: hci_bcm: Support platform enumeration Andy Shevchenko
2017-03-26 12:28 ` Andy Shevchenko
2017-03-27 14:01 ` Marcel Holtmann
@ 2017-03-28 11:11 ` Marcel Holtmann
2 siblings, 0 replies; 8+ messages in thread
From: Marcel Holtmann @ 2017-03-28 11:11 UTC (permalink / raw)
To: Andy Shevchenko
Cc: Gustavo F. Padovan, Johan Hedberg, Bluez mailing list, Jarkko Nikula
Hi Andy,
> Until now the driver supports only ACPI enumeration. Nevertheless
> Intel Edison SoM has Broadcom Wi-Fi + BT chip and neither ACPI nor DT
> enumeration mechanism.
>
> Enable pure platform driver in order to support Intel Edison SoM.
>
> Cc: Jarkko Nikula <jarkko.nikula@linux.intel.com>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
> drivers/bluetooth/hci_bcm.c | 50 ++++++++++++++++++++++++++++++---------------
> 1 file changed, 33 insertions(+), 17 deletions(-)
patch has been applied to bluetooth-next tree.
Regards
Marcel
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v1] Bluetooth: hci_bcm: Support platform enumeration
2017-03-28 8:19 ` Andy Shevchenko
@ 2017-03-28 11:11 ` Marcel Holtmann
0 siblings, 0 replies; 8+ messages in thread
From: Marcel Holtmann @ 2017-03-28 11:11 UTC (permalink / raw)
To: Andy Shevchenko
Cc: Gustavo F. Padovan, Johan Hedberg, Bluez mailing list, Jarkko Nikula
Hi Andy,
>>>>> Until now the driver supports only ACPI enumeration.
>>>>> Nevertheless
>>>>> Intel Edison SoM has Broadcom Wi-Fi + BT chip and neither ACPI
>>>>> nor
>>>>> DT
>>>>> enumeration mechanism.
>>>>>
>>>>> Enable pure platform driver in order to support Intel Edison
>>>>> SoM.
>>>>
>>>> explain to me what this the case. Didn’t we enabled also DT for
>>>> Edison? And I assumed in general we planned to move away from
>>>> platform
>>>> drivers in favour of DT.
>>>
>>> Nope. It's SFI based device which basically means platform data
>>> only.
>>
>> hold on, but SFI can be enumerated like ACPI. What am I missing here?
>
> You missed a whole point. :-)
>
> SFI so useless that you may just forget about it.
my memory of MRST is still present ;)
Regards
Marcel
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2017-03-28 11:11 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-10 12:28 [PATCH v1] Bluetooth: hci_bcm: Support platform enumeration Andy Shevchenko
2017-03-26 12:28 ` Andy Shevchenko
2017-03-27 14:01 ` Marcel Holtmann
2017-03-27 17:18 ` Andy Shevchenko
2017-03-27 18:00 ` Marcel Holtmann
2017-03-28 8:19 ` Andy Shevchenko
2017-03-28 11:11 ` Marcel Holtmann
2017-03-28 11:11 ` Marcel Holtmann
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.