All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] ACPI / APD: Add device HID for Vulcan SPI controller
@ 2016-08-09 14:05 kamlakant.patel
       [not found] ` <1470751522-11060-1-git-send-email-kamlakant.patel-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: kamlakant.patel @ 2016-08-09 14:05 UTC (permalink / raw)
  To: Rafael J . Wysocki ", Len Brown
  Cc: Kamlakant Patel, linux-acpi, Jayachandran C, Mark Brown

From: Kamlakant Patel <kamlakant.patel@broadcom.com>

Add device HID for SPI controller on Broadcom Vulcan ARM64.
The default frequency for SPI on Vulcan is 133MHz.

Signed-off-by: Kamlakant Patel <kamlakant.patel@broadcom.com>
---
 drivers/acpi/acpi_apd.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/acpi/acpi_apd.c b/drivers/acpi/acpi_apd.c
index 1daf9c4..c80c8f8 100644
--- a/drivers/acpi/acpi_apd.c
+++ b/drivers/acpi/acpi_apd.c
@@ -87,6 +87,11 @@ static struct apd_device_desc xgene_i2c_desc = {
 	.setup = acpi_apd_setup,
 	.fixed_clk_rate = 100000000,
 };
+
+static struct apd_device_desc vulcan_spi_desc = {
+	.setup = acpi_apd_setup,
+	.fixed_clk_rate = 133000000,
+};
 #endif
 
 #else
@@ -149,6 +154,7 @@ static const struct acpi_device_id acpi_apd_device_ids[] = {
 #endif
 #ifdef CONFIG_ARM64
 	{ "APMC0D0F", APD_ADDR(xgene_i2c_desc) },
+	{ "BRCM900D", APD_ADDR(vulcan_spi_desc) },
 #endif
 	{ }
 };
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 2/2 v2] spi: xlp: Add ACPI support for Vulcan SPI controller
       [not found] ` <1470751522-11060-1-git-send-email-kamlakant.patel-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>
@ 2016-08-09 14:05   ` kamlakant.patel-dY08KVG/lbpWk0Htik3J/w
       [not found]     ` <1470751522-11060-2-git-send-email-kamlakant.patel-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>
  0 siblings, 1 reply; 8+ messages in thread
From: kamlakant.patel-dY08KVG/lbpWk0Htik3J/w @ 2016-08-09 14:05 UTC (permalink / raw)
  To: Mark Brown
  Cc: Kamlakant Patel, linux-spi-u79uwXL29TY76Z2rM5mHXA, Jayachandran C

From: Kamlakant Patel <kamlakant.patel-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>

Add ACPI support for SPI controller on Broadcom Vulcan ARM64.

Signed-off-by: Kamlakant Patel <kamlakant.patel-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>
---
v1 -> v2:
	Fix error return code.

 drivers/spi/spi-xlp.c | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/drivers/spi/spi-xlp.c b/drivers/spi/spi-xlp.c
index 8f04fec..4071a72 100644
--- a/drivers/spi/spi-xlp.c
+++ b/drivers/spi/spi-xlp.c
@@ -11,6 +11,7 @@
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
  */
+#include <linux/acpi.h>
 #include <linux/clk.h>
 #include <linux/kernel.h>
 #include <linux/module.h>
@@ -405,8 +406,9 @@ static int xlp_spi_probe(struct platform_device *pdev)
 	clk = devm_clk_get(&pdev->dev, NULL);
 	if (IS_ERR(clk)) {
 		dev_err(&pdev->dev, "could not get spi clock\n");
-		return -ENODEV;
+		return PTR_ERR(clk);
 	}
+
 	xspi->spi_clk = clk_get_rate(clk);
 
 	master = spi_alloc_master(&pdev->dev, 0);
@@ -437,6 +439,14 @@ static int xlp_spi_probe(struct platform_device *pdev)
 	return 0;
 }
 
+#ifdef CONFIG_ACPI
+static const struct acpi_device_id xlp_spi_acpi_match[] = {
+	{ "BRCM900D", 0 },
+	{ },
+};
+MODULE_DEVICE_TABLE(acpi, xlp_spi_acpi_match);
+#endif
+
 static const struct of_device_id xlp_spi_dt_id[] = {
 	{ .compatible = "netlogic,xlp832-spi" },
 	{ },
@@ -447,6 +457,7 @@ static struct platform_driver xlp_spi_driver = {
 	.driver = {
 		.name	= "xlp-spi",
 		.of_match_table = xlp_spi_dt_id,
+		.acpi_match_table = ACPI_PTR(xlp_spi_acpi_match),
 	},
 };
 module_platform_driver(xlp_spi_driver);
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Applied "spi: xlp: Add ACPI support for Vulcan SPI controller" to the spi tree
       [not found]     ` <1470751522-11060-2-git-send-email-kamlakant.patel-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>
@ 2016-08-10 20:04       ` Mark Brown
  0 siblings, 0 replies; 8+ messages in thread
From: Mark Brown @ 2016-08-10 20:04 UTC (permalink / raw)
  To: Kamlakant Patel
  Cc: Mark Brown, Mark Brown, linux-spi-u79uwXL29TY76Z2rM5mHXA, Jayachandran C

The patch

   spi: xlp: Add ACPI support for Vulcan SPI controller

has been applied to the spi tree at

   git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git 

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.  

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

>From 097d06192caf6db29ff6b8a9117cfaf7a514821f Mon Sep 17 00:00:00 2001
From: Kamlakant Patel <kamlakant.patel-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>
Date: Tue, 9 Aug 2016 19:35:22 +0530
Subject: [PATCH] spi: xlp: Add ACPI support for Vulcan SPI controller

Add ACPI support for SPI controller on Broadcom Vulcan ARM64.

Signed-off-by: Kamlakant Patel <kamlakant.patel-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>
Signed-off-by: Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
---
 drivers/spi/spi-xlp.c | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/drivers/spi/spi-xlp.c b/drivers/spi/spi-xlp.c
index 8f04feca6ee3..4071a729eb2f 100644
--- a/drivers/spi/spi-xlp.c
+++ b/drivers/spi/spi-xlp.c
@@ -11,6 +11,7 @@
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
  */
+#include <linux/acpi.h>
 #include <linux/clk.h>
 #include <linux/kernel.h>
 #include <linux/module.h>
@@ -405,8 +406,9 @@ static int xlp_spi_probe(struct platform_device *pdev)
 	clk = devm_clk_get(&pdev->dev, NULL);
 	if (IS_ERR(clk)) {
 		dev_err(&pdev->dev, "could not get spi clock\n");
-		return -ENODEV;
+		return PTR_ERR(clk);
 	}
+
 	xspi->spi_clk = clk_get_rate(clk);
 
 	master = spi_alloc_master(&pdev->dev, 0);
@@ -437,6 +439,14 @@ static int xlp_spi_probe(struct platform_device *pdev)
 	return 0;
 }
 
+#ifdef CONFIG_ACPI
+static const struct acpi_device_id xlp_spi_acpi_match[] = {
+	{ "BRCM900D", 0 },
+	{ },
+};
+MODULE_DEVICE_TABLE(acpi, xlp_spi_acpi_match);
+#endif
+
 static const struct of_device_id xlp_spi_dt_id[] = {
 	{ .compatible = "netlogic,xlp832-spi" },
 	{ },
@@ -447,6 +457,7 @@ static struct platform_driver xlp_spi_driver = {
 	.driver = {
 		.name	= "xlp-spi",
 		.of_match_table = xlp_spi_dt_id,
+		.acpi_match_table = ACPI_PTR(xlp_spi_acpi_match),
 	},
 };
 module_platform_driver(xlp_spi_driver);
-- 
2.8.1

--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/2] ACPI / APD: Add device HID for Vulcan SPI controller
  2016-08-09 14:05 [PATCH 1/2] ACPI / APD: Add device HID for Vulcan SPI controller kamlakant.patel
       [not found] ` <1470751522-11060-1-git-send-email-kamlakant.patel-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>
@ 2016-08-29 12:35 ` Kamlakant Patel
  2016-08-30 12:06   ` Rafael J. Wysocki
  2016-08-30 10:57 ` Mika Westerberg
  2 siblings, 1 reply; 8+ messages in thread
From: Kamlakant Patel @ 2016-08-29 12:35 UTC (permalink / raw)
  To: Rafael J . Wysocki, Len Brown
  Cc: Kamlakant Patel, linux-acpi, Jayachandran C, Mark Brown

Hi,

On Tue, Aug 9, 2016 at 7:35 PM,  <kamlakant.patel@broadcom.com> wrote:
> From: Kamlakant Patel <kamlakant.patel@broadcom.com>
>
> Add device HID for SPI controller on Broadcom Vulcan ARM64.
> The default frequency for SPI on Vulcan is 133MHz.
>
> Signed-off-by: Kamlakant Patel <kamlakant.patel@broadcom.com>
> ---
>  drivers/acpi/acpi_apd.c | 6 ++++++
>  1 file changed, 6 insertions(+)
>
> diff --git a/drivers/acpi/acpi_apd.c b/drivers/acpi/acpi_apd.c
> index 1daf9c4..c80c8f8 100644
> --- a/drivers/acpi/acpi_apd.c
> +++ b/drivers/acpi/acpi_apd.c
> @@ -87,6 +87,11 @@ static struct apd_device_desc xgene_i2c_desc = {
>         .setup = acpi_apd_setup,
>         .fixed_clk_rate = 100000000,
>  };
> +
> +static struct apd_device_desc vulcan_spi_desc = {
> +       .setup = acpi_apd_setup,
> +       .fixed_clk_rate = 133000000,
> +};
>  #endif
>
>  #else
> @@ -149,6 +154,7 @@ static const struct acpi_device_id acpi_apd_device_ids[] = {
>  #endif
>  #ifdef CONFIG_ARM64
>         { "APMC0D0F", APD_ADDR(xgene_i2c_desc) },
> +       { "BRCM900D", APD_ADDR(vulcan_spi_desc) },
>  #endif
>         { }
>  };

Could you please review and apply this patch.
This patch is provides default frequency to the SPI controller, if not
set by firmware.
(Patch "spi: xlp: Add ACPI support for Vulcan SPI controller" is
already applied).

Thanks,
Kamlakant Patel

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/2] ACPI / APD: Add device HID for Vulcan SPI controller
  2016-08-09 14:05 [PATCH 1/2] ACPI / APD: Add device HID for Vulcan SPI controller kamlakant.patel
       [not found] ` <1470751522-11060-1-git-send-email-kamlakant.patel-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>
  2016-08-29 12:35 ` [PATCH 1/2] ACPI / APD: Add device HID for Vulcan SPI controller Kamlakant Patel
@ 2016-08-30 10:57 ` Mika Westerberg
  2 siblings, 0 replies; 8+ messages in thread
From: Mika Westerberg @ 2016-08-30 10:57 UTC (permalink / raw)
  To: kamlakant.patel
  Cc: Rafael J . Wysocki ",
	Len Brown, linux-acpi, Jayachandran C, Mark Brown

On Tue, Aug 09, 2016 at 07:35:21PM +0530, kamlakant.patel@broadcom.com wrote:
> From: Kamlakant Patel <kamlakant.patel@broadcom.com>
> 
> Add device HID for SPI controller on Broadcom Vulcan ARM64.
> The default frequency for SPI on Vulcan is 133MHz.
> 
> Signed-off-by: Kamlakant Patel <kamlakant.patel@broadcom.com>

Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/2] ACPI / APD: Add device HID for Vulcan SPI controller
  2016-08-29 12:35 ` [PATCH 1/2] ACPI / APD: Add device HID for Vulcan SPI controller Kamlakant Patel
@ 2016-08-30 12:06   ` Rafael J. Wysocki
  0 siblings, 0 replies; 8+ messages in thread
From: Rafael J. Wysocki @ 2016-08-30 12:06 UTC (permalink / raw)
  To: Kamlakant Patel; +Cc: Len Brown, linux-acpi, Jayachandran C, Mark Brown

On Monday, August 29, 2016 06:05:16 PM Kamlakant Patel wrote:
> Hi,
> 
> On Tue, Aug 9, 2016 at 7:35 PM,  <kamlakant.patel@broadcom.com> wrote:
> > From: Kamlakant Patel <kamlakant.patel@broadcom.com>
> >
> > Add device HID for SPI controller on Broadcom Vulcan ARM64.
> > The default frequency for SPI on Vulcan is 133MHz.
> >
> > Signed-off-by: Kamlakant Patel <kamlakant.patel@broadcom.com>
> > ---
> >  drivers/acpi/acpi_apd.c | 6 ++++++
> >  1 file changed, 6 insertions(+)
> >
> > diff --git a/drivers/acpi/acpi_apd.c b/drivers/acpi/acpi_apd.c
> > index 1daf9c4..c80c8f8 100644
> > --- a/drivers/acpi/acpi_apd.c
> > +++ b/drivers/acpi/acpi_apd.c
> > @@ -87,6 +87,11 @@ static struct apd_device_desc xgene_i2c_desc = {
> >         .setup = acpi_apd_setup,
> >         .fixed_clk_rate = 100000000,
> >  };
> > +
> > +static struct apd_device_desc vulcan_spi_desc = {
> > +       .setup = acpi_apd_setup,
> > +       .fixed_clk_rate = 133000000,
> > +};
> >  #endif
> >
> >  #else
> > @@ -149,6 +154,7 @@ static const struct acpi_device_id acpi_apd_device_ids[] = {
> >  #endif
> >  #ifdef CONFIG_ARM64
> >         { "APMC0D0F", APD_ADDR(xgene_i2c_desc) },
> > +       { "BRCM900D", APD_ADDR(vulcan_spi_desc) },
> >  #endif
> >         { }
> >  };
> 
> Could you please review and apply this patch.

It's been queued up for 4.9 already.

Thanks,
Rafael


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/2] ACPI / APD: Add device HID for Vulcan SPI controller
       [not found] ` <1470658708-8203-1-git-send-email-kamlakant.patel-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>
@ 2016-08-08 13:14   ` Mark Brown
  0 siblings, 0 replies; 8+ messages in thread
From: Mark Brown @ 2016-08-08 13:14 UTC (permalink / raw)
  To: kamlakant.patel-dY08KVG/lbpWk0Htik3J/w
  Cc: linux-spi-u79uwXL29TY76Z2rM5mHXA, Jayachandran C

[-- Attachment #1: Type: text/plain, Size: 429 bytes --]

On Mon, Aug 08, 2016 at 05:48:27PM +0530, kamlakant.patel-dY08KVG/lbpWk0Htik3J/w@public.gmane.org wrote:
> From: Kamlakant Patel <kamlakant.patel-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>
> 
> Add device HID for SPI controller on Broadcom Vulcan ARM64.
> The default frequency for SPI on Vulcan is 133MHz.

As covered in SubmittingPatches you need to send patches to the relevant
maintainers and lists for them to review.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH 1/2] ACPI / APD: Add device HID for Vulcan SPI controller
@ 2016-08-08 12:18 kamlakant.patel-dY08KVG/lbpWk0Htik3J/w
       [not found] ` <1470658708-8203-1-git-send-email-kamlakant.patel-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>
  0 siblings, 1 reply; 8+ messages in thread
From: kamlakant.patel-dY08KVG/lbpWk0Htik3J/w @ 2016-08-08 12:18 UTC (permalink / raw)
  To: Mark Brown
  Cc: Kamlakant Patel, linux-spi-u79uwXL29TY76Z2rM5mHXA, Jayachandran C

From: Kamlakant Patel <kamlakant.patel-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>

Add device HID for SPI controller on Broadcom Vulcan ARM64.
The default frequency for SPI on Vulcan is 133MHz.

Signed-off-by: Kamlakant Patel <kamlakant.patel-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>
---
 drivers/acpi/acpi_apd.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/drivers/acpi/acpi_apd.c b/drivers/acpi/acpi_apd.c
index 1daf9c4..c80c8f8 100644
--- a/drivers/acpi/acpi_apd.c
+++ b/drivers/acpi/acpi_apd.c
@@ -87,6 +87,11 @@ static struct apd_device_desc xgene_i2c_desc = {
 	.setup = acpi_apd_setup,
 	.fixed_clk_rate = 100000000,
 };
+
+static struct apd_device_desc vulcan_spi_desc = {
+	.setup = acpi_apd_setup,
+	.fixed_clk_rate = 133000000,
+};
 #endif
 
 #else
@@ -149,6 +154,7 @@ static const struct acpi_device_id acpi_apd_device_ids[] = {
 #endif
 #ifdef CONFIG_ARM64
 	{ "APMC0D0F", APD_ADDR(xgene_i2c_desc) },
+	{ "BRCM900D", APD_ADDR(vulcan_spi_desc) },
 #endif
 	{ }
 };
-- 
1.7.1

--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2016-08-30 12:00 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-09 14:05 [PATCH 1/2] ACPI / APD: Add device HID for Vulcan SPI controller kamlakant.patel
     [not found] ` <1470751522-11060-1-git-send-email-kamlakant.patel-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>
2016-08-09 14:05   ` [PATCH 2/2 v2] spi: xlp: Add ACPI support " kamlakant.patel-dY08KVG/lbpWk0Htik3J/w
     [not found]     ` <1470751522-11060-2-git-send-email-kamlakant.patel-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>
2016-08-10 20:04       ` Applied "spi: xlp: Add ACPI support for Vulcan SPI controller" to the spi tree Mark Brown
2016-08-29 12:35 ` [PATCH 1/2] ACPI / APD: Add device HID for Vulcan SPI controller Kamlakant Patel
2016-08-30 12:06   ` Rafael J. Wysocki
2016-08-30 10:57 ` Mika Westerberg
  -- strict thread matches above, loose matches on Subject: below --
2016-08-08 12:18 kamlakant.patel-dY08KVG/lbpWk0Htik3J/w
     [not found] ` <1470658708-8203-1-git-send-email-kamlakant.patel-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>
2016-08-08 13:14   ` Mark Brown

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.