All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lee Jones <lee.jones@linaro.org>
To: linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, sameo@linux.intel.com
Cc: arnd@arndb.de, linus.walleij@stericsson.com,
	Rabin Vincent <rabin.vincent@stericsson.com>,
	Lee Jones <lee.jones@linaro.org>
Subject: [PATCH 26/35] mfd: ab8500-sysctrl: AB8505 doesn't have SYSCLKREQ5..8
Date: Fri, 15 Feb 2013 12:56:57 +0000	[thread overview]
Message-ID: <1360933026-30325-27-git-send-email-lee.jones@linaro.org> (raw)
In-Reply-To: <1360933026-30325-1-git-send-email-lee.jones@linaro.org>

From: Rabin Vincent <rabin.vincent@stericsson.com>

So we're removing support for it.

Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Tested-by: Marcus COOPER <marcus.xm.cooper@stericsson.com>
---
 drivers/mfd/ab8500-sysctrl.c |   37 ++++++++++++++++++++++---------------
 1 file changed, 22 insertions(+), 15 deletions(-)

diff --git a/drivers/mfd/ab8500-sysctrl.c b/drivers/mfd/ab8500-sysctrl.c
index f43c42b..272479c 100644
--- a/drivers/mfd/ab8500-sysctrl.c
+++ b/drivers/mfd/ab8500-sysctrl.c
@@ -182,9 +182,9 @@ EXPORT_SYMBOL(ab8500_sysctrl_write);
 
 static int ab8500_sysctrl_probe(struct platform_device *pdev)
 {
+	struct ab8500 *ab8500 = dev_get_drvdata(pdev->dev.parent);
 	struct ab8500_platform_data *plat;
 	struct ab8500_sysctrl_platform_data *pdata;
-	int ret, i, j;
 
 	plat = dev_get_platdata(pdev->dev.parent);
 
@@ -196,20 +196,27 @@ static int ab8500_sysctrl_probe(struct platform_device *pdev)
 
 	pdata = plat->sysctrl;
 
-
-	for (i = AB8500_SYSCLKREQ1RFCLKBUF;
-	     i <= AB8500_SYSCLKREQ8RFCLKBUF; i++) {
-		j = i - AB8500_SYSCLKREQ1RFCLKBUF;
-		ret = ab8500_sysctrl_write(i, 0xff,
-				pdata->initial_req_buf_config[j]);
-		dev_dbg(&pdev->dev,
-				"Setting SysClkReq%dRfClkBuf 0x%X\n",
-				j + 1,
-				pdata->initial_req_buf_config[j]);
-		if (ret < 0) {
-			dev_err(&pdev->dev,
-				"unable to set sysClkReq%dRfClkBuf: "
-				"%d\n", j + 1, ret);
+	if (pdata) {
+		int last, ret, i, j;
+
+		if (is_ab8505(ab8500))
+			last = AB8500_SYSCLKREQ4RFCLKBUF;
+		else
+			last = AB8500_SYSCLKREQ8RFCLKBUF;
+
+		for (i = AB8500_SYSCLKREQ1RFCLKBUF; i <= last; i++) {
+			j = i - AB8500_SYSCLKREQ1RFCLKBUF;
+			ret = ab8500_sysctrl_write(i, 0xff,
+					pdata->initial_req_buf_config[j]);
+			dev_dbg(&pdev->dev,
+					"Setting SysClkReq%dRfClkBuf 0x%X\n",
+					j + 1,
+					pdata->initial_req_buf_config[j]);
+			if (ret < 0) {
+				dev_err(&pdev->dev,
+					"unable to set sysClkReq%dRfClkBuf: "
+					"%d\n", j + 1, ret);
+			}
 		}
 	}
 
-- 
1.7.10.4


WARNING: multiple messages have this Message-ID (diff)
From: lee.jones@linaro.org (Lee Jones)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 26/35] mfd: ab8500-sysctrl: AB8505 doesn't have SYSCLKREQ5..8
Date: Fri, 15 Feb 2013 12:56:57 +0000	[thread overview]
Message-ID: <1360933026-30325-27-git-send-email-lee.jones@linaro.org> (raw)
In-Reply-To: <1360933026-30325-1-git-send-email-lee.jones@linaro.org>

From: Rabin Vincent <rabin.vincent@stericsson.com>

So we're removing support for it.

Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Tested-by: Marcus COOPER <marcus.xm.cooper@stericsson.com>
---
 drivers/mfd/ab8500-sysctrl.c |   37 ++++++++++++++++++++++---------------
 1 file changed, 22 insertions(+), 15 deletions(-)

diff --git a/drivers/mfd/ab8500-sysctrl.c b/drivers/mfd/ab8500-sysctrl.c
index f43c42b..272479c 100644
--- a/drivers/mfd/ab8500-sysctrl.c
+++ b/drivers/mfd/ab8500-sysctrl.c
@@ -182,9 +182,9 @@ EXPORT_SYMBOL(ab8500_sysctrl_write);
 
 static int ab8500_sysctrl_probe(struct platform_device *pdev)
 {
+	struct ab8500 *ab8500 = dev_get_drvdata(pdev->dev.parent);
 	struct ab8500_platform_data *plat;
 	struct ab8500_sysctrl_platform_data *pdata;
-	int ret, i, j;
 
 	plat = dev_get_platdata(pdev->dev.parent);
 
@@ -196,20 +196,27 @@ static int ab8500_sysctrl_probe(struct platform_device *pdev)
 
 	pdata = plat->sysctrl;
 
-
-	for (i = AB8500_SYSCLKREQ1RFCLKBUF;
-	     i <= AB8500_SYSCLKREQ8RFCLKBUF; i++) {
-		j = i - AB8500_SYSCLKREQ1RFCLKBUF;
-		ret = ab8500_sysctrl_write(i, 0xff,
-				pdata->initial_req_buf_config[j]);
-		dev_dbg(&pdev->dev,
-				"Setting SysClkReq%dRfClkBuf 0x%X\n",
-				j + 1,
-				pdata->initial_req_buf_config[j]);
-		if (ret < 0) {
-			dev_err(&pdev->dev,
-				"unable to set sysClkReq%dRfClkBuf: "
-				"%d\n", j + 1, ret);
+	if (pdata) {
+		int last, ret, i, j;
+
+		if (is_ab8505(ab8500))
+			last = AB8500_SYSCLKREQ4RFCLKBUF;
+		else
+			last = AB8500_SYSCLKREQ8RFCLKBUF;
+
+		for (i = AB8500_SYSCLKREQ1RFCLKBUF; i <= last; i++) {
+			j = i - AB8500_SYSCLKREQ1RFCLKBUF;
+			ret = ab8500_sysctrl_write(i, 0xff,
+					pdata->initial_req_buf_config[j]);
+			dev_dbg(&pdev->dev,
+					"Setting SysClkReq%dRfClkBuf 0x%X\n",
+					j + 1,
+					pdata->initial_req_buf_config[j]);
+			if (ret < 0) {
+				dev_err(&pdev->dev,
+					"unable to set sysClkReq%dRfClkBuf: "
+					"%d\n", j + 1, ret);
+			}
 		}
 	}
 
-- 
1.7.10.4

  parent reply	other threads:[~2013-02-15 12:58 UTC|newest]

Thread overview: 108+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-15 12:56 [PATCH 00/35] mfd: ab8500: Internal development push Lee Jones
2013-02-15 12:56 ` Lee Jones
2013-02-15 12:56 ` [PATCH 01/35] mfd: ab8500-gpadc: Implemented suspend/resume Lee Jones
2013-02-15 12:56   ` Lee Jones
2013-02-20 13:19   ` Mark Brown
2013-02-20 13:19     ` Mark Brown
2013-02-21 22:45     ` Ulf Hansson
2013-02-21 22:45       ` Ulf Hansson
2013-02-22  7:55       ` Lee Jones
2013-02-22  7:55         ` Lee Jones
2013-02-22 10:38       ` Mark Brown
2013-02-22 10:38         ` Mark Brown
2013-02-25  9:27         ` Ulf Hansson
2013-02-25  9:27           ` Ulf Hansson
2013-02-25 13:51           ` Mark Brown
2013-02-25 13:51             ` Mark Brown
2013-02-25 14:52             ` Ulf Hansson
2013-02-25 14:52               ` Ulf Hansson
2013-02-15 12:56 ` [PATCH 02/35] mfd: ab8500-gpadc: Allow tvout regulator to be missing Lee Jones
2013-02-15 12:56   ` Lee Jones
2013-02-20 13:23   ` Mark Brown
2013-02-20 13:23     ` Mark Brown
2013-02-20 16:38     ` Lee Jones
2013-02-20 16:38       ` Lee Jones
2013-02-15 12:56 ` [PATCH 03/35] mfd: ab8500-gpadc: Reread on failure Lee Jones
2013-02-15 12:56   ` Lee Jones
2013-02-15 12:56 ` [PATCH 04/35] mfd: ab8500-gpadc: Add gpadc hw conversion Lee Jones
2013-02-15 12:56   ` Lee Jones
2013-02-15 12:56 ` [PATCH 05/35] mfd: ab8500-core: APE Interrupts are not cleared Lee Jones
2013-02-15 12:56   ` Lee Jones
2013-02-15 12:56 ` [PATCH 06/35] mfd: ab8500-core: Sysfs chip id modification Lee Jones
2013-02-15 12:56   ` Lee Jones
2013-02-19 22:04   ` Arnd Bergmann
2013-02-19 22:04     ` Arnd Bergmann
2013-02-20  8:13     ` Lee Jones
2013-02-20  8:13       ` Lee Jones
2013-02-20  8:53       ` Marcus Cooper
2013-02-20  8:53         ` Marcus Cooper
2013-02-20 10:43         ` Lee Jones
2013-02-20 10:43           ` Lee Jones
2013-02-15 12:56 ` [PATCH 07/35] mfd: ab8500-debug: Print banks in hex Lee Jones
2013-02-15 12:56   ` Lee Jones
2013-02-15 12:56 ` [PATCH 08/35] mfd: ab8500-debug: Function to save all ABB registers to mem Lee Jones
2013-02-15 12:56   ` Lee Jones
2013-02-15 12:56 ` [PATCH 09/35] mfd: ab8500-core: Add ADC support for ab8540 Lee Jones
2013-02-15 12:56   ` Lee Jones
2013-02-15 12:56 ` [PATCH 10/35] mfd: ab8500-core: Rework MFD sub-device initialisation structures Lee Jones
2013-02-15 12:56   ` Lee Jones
2013-02-19 22:07   ` Arnd Bergmann
2013-02-19 22:07     ` Arnd Bergmann
2013-02-20  8:09     ` Lee Jones
2013-02-20  8:09       ` Lee Jones
2013-02-15 12:56 ` [PATCH 11/35] mfd: ab8500-core: Add Interrupt support for ab8540 Lee Jones
2013-02-15 12:56   ` Lee Jones
2013-02-15 12:56 ` [PATCH 12/35] mfd: ab8500-debug: Better error handling on crash Lee Jones
2013-02-15 12:56   ` Lee Jones
2013-02-15 12:56 ` [PATCH 13/35] mfd: ab8500-debug: Add wake-up info Lee Jones
2013-02-15 12:56   ` Lee Jones
2013-02-15 12:56 ` [PATCH 14/35] mfd: ab8500-sysctrl: Error check clean up Lee Jones
2013-02-15 12:56   ` Lee Jones
2013-02-15 12:56 ` [PATCH 15/35] mfd: ab8500-debugfs: Add tests for ab8540 based platform initialisations Lee Jones
2013-02-15 12:56   ` Lee Jones
2013-02-15 12:56 ` [PATCH 16/35] mfd: ab8500: Add more platform checks Lee Jones
2013-02-15 12:56   ` Lee Jones
2013-02-15 12:56 ` [PATCH 17/35] mfd: ab8500: Introduce AB8540 cuts definition Lee Jones
2013-02-15 12:56   ` Lee Jones
2013-02-15 12:56 ` [PATCH 18/35] mfd: ab8500-sysctrl: Update correct turn on status Lee Jones
2013-02-15 12:56   ` Lee Jones
2013-02-15 12:56 ` [PATCH 19/35] mfd: ab8500-debug: Add support for ab8505 and ab9540 Lee Jones
2013-02-15 12:56   ` Lee Jones
2013-02-15 12:56 ` [PATCH 20/35] mfd: ab8500-sysctrl: Add new reset function Lee Jones
2013-02-15 12:56   ` Lee Jones
2013-02-15 12:56 ` [PATCH 21/35] mfd: ab8500-gpadc: Add support for the AB8540 Lee Jones
2013-02-15 12:56   ` Lee Jones
2013-02-15 12:56 ` [PATCH 22/35] mfd: ab8500-debug: " Lee Jones
2013-02-15 12:56   ` Lee Jones
2013-02-15 12:56 ` [PATCH 23/35] mfd: ab8500-gpadc: Optimise GPADC driver Lee Jones
2013-02-15 12:56   ` Lee Jones
2013-02-15 12:56 ` [PATCH 24/35] mfd: ab8500: Remove unnecessary 'struct device' declaration Lee Jones
2013-02-15 12:56   ` Lee Jones
2013-02-25 14:33   ` Arnd Bergmann
2013-02-25 14:33     ` Arnd Bergmann
2013-02-25 14:49     ` Lee Jones
2013-02-25 14:49       ` Lee Jones
2013-02-25 16:27       ` Arnd Bergmann
2013-02-25 16:27         ` Arnd Bergmann
2013-02-15 12:56 ` [PATCH 25/35] mfd: ab8500-core: Add additional resources to ab8505_iddet_resources Lee Jones
2013-02-15 12:56   ` Lee Jones
2013-02-15 12:56 ` Lee Jones [this message]
2013-02-15 12:56   ` [PATCH 26/35] mfd: ab8500-sysctrl: AB8505 doesn't have SYSCLKREQ5..8 Lee Jones
2013-02-15 12:56 ` [PATCH 27/35] mfd: ab8500-debugfs: Dump sim registers Lee Jones
2013-02-15 12:56   ` Lee Jones
2013-02-15 12:56 ` [PATCH 28/35] mfd: ab8500-debug: Add ADC input channel usb_id in debugfs Lee Jones
2013-02-15 12:56   ` Lee Jones
2013-02-15 12:57 ` [PATCH 29/35] mfd: ab8500-core: Show turn on status at boot Lee Jones
2013-02-15 12:57   ` Lee Jones
2013-02-15 12:57 ` [PATCH 30/35] mfd: ab8500-debugfs: Change AB8500 debug permissions Lee Jones
2013-02-15 12:57   ` Lee Jones
2013-02-15 12:57 ` [PATCH 31/35] mfd: ab8500-debug: Add register map for ab8540 Lee Jones
2013-02-15 12:57   ` Lee Jones
2013-02-15 12:57 ` [PATCH 32/35] mfd: ab8500-core: Add abx500-clk as an mfd child device Lee Jones
2013-02-15 12:57   ` Lee Jones
2013-02-15 12:57 ` [PATCH 33/35] mfd: ab8500-debug: Add explicit dependencies Lee Jones
2013-02-15 12:57   ` Lee Jones
2013-02-15 12:57 ` [PATCH 34/35] mfd: ab8500-debug: Convert to kstrtoul_from_user Lee Jones
2013-02-15 12:57   ` Lee Jones
2013-02-15 12:57 ` [PATCH 35/35] mfd: ab8500-core: Hierarchical interrupt registers Lee Jones
2013-02-15 12:57   ` Lee Jones

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1360933026-30325-27-git-send-email-lee.jones@linaro.org \
    --to=lee.jones@linaro.org \
    --cc=arnd@arndb.de \
    --cc=linus.walleij@stericsson.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rabin.vincent@stericsson.com \
    --cc=sameo@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.