All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paul Walmsley <paul@pwsan.com>
To: Omar Ramirez Luna <omar.luna@linaro.org>
Cc: Benoit Cousson <b-cousson@ti.com>,
	Tony Lindgren <tony@atomide.com>,
	Russell King <linux@arm.linux.org.uk>,
	Kevin Hilman <khilman@ti.com>, Ohad Ben-Cohen <ohad@wizery.com>,
	Tomi Valkeinen <tomi.valkeinen@ti.com>,
	linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/3] ARM: OMAP: omap_device: expose hwmod assert/deassert to omap devices
Date: Thu, 2 Aug 2012 01:43:45 -0600 (MDT)	[thread overview]
Message-ID: <alpine.DEB.2.00.1208020141140.4177@utopia.booyaka.com> (raw)
In-Reply-To: <1342466485-1050-4-git-send-email-omar.luna@linaro.org>

Hi Omar

On Mon, 16 Jul 2012, Omar Ramirez Luna wrote:

> This APIs are meant to be an interface to hwmod assert/deassert
> function, omap devices can call them through their platform data
> to control their reset lines, they are expected to know the name
> of the reset line they are trying to control.
> 
> Signed-off-by: Omar Ramirez Luna <omar.luna@linaro.org>

This one has been queued for 3.7 with a few changes. Some more detail was 
added to the function documentationrovement.  Also the multiple 
assignments were removed per Documentation/CodingStyle chapter 1:

"Don't put multiple assignments on a single line either."

Please let me know if you have any comments.


- Paul

From: Omar Ramirez Luna <omar.luna@linaro.org>
Date: Mon, 16 Jul 2012 14:21:25 -0500
Subject: [PATCH] ARM: OMAP2+: omap_device: expose hwmod assert/deassert to
 omap devices

This API is meant to be an interface to hwmod assert/deassert
function, omap devices can call them through their platform data to
control their reset lines, they are expected to know the name of the
reset line they are trying to control.

Signed-off-by: Omar Ramirez Luna <omar.luna@linaro.org>
[paul@pwsan.com: tweaked some documentation; fixed CodingStyle issue]
Signed-off-by: Paul Walmsley <paul@pwsan.com>
---
 arch/arm/plat-omap/include/plat/omap_device.h |    4 ++
 arch/arm/plat-omap/omap_device.c              |   55 +++++++++++++++++++++++++
 2 files changed, 59 insertions(+)

diff --git a/arch/arm/plat-omap/include/plat/omap_device.h b/arch/arm/plat-omap/include/plat/omap_device.h
index 4327b2c..27bcc24 100644
--- a/arch/arm/plat-omap/include/plat/omap_device.h
+++ b/arch/arm/plat-omap/include/plat/omap_device.h
@@ -118,6 +118,10 @@ int omap_device_get_context_loss_count(struct platform_device *pdev);
 
 /* Other */
 
+int omap_device_assert_hardreset(struct platform_device *pdev,
+				 const char *name);
+int omap_device_deassert_hardreset(struct platform_device *pdev,
+				 const char *name);
 int omap_device_idle_hwmods(struct omap_device *od);
 int omap_device_enable_hwmods(struct omap_device *od);
 
diff --git a/arch/arm/plat-omap/omap_device.c b/arch/arm/plat-omap/omap_device.c
index c490240..3b02312 100644
--- a/arch/arm/plat-omap/omap_device.c
+++ b/arch/arm/plat-omap/omap_device.c
@@ -925,6 +925,61 @@ int omap_device_shutdown(struct platform_device *pdev)
 }
 
 /**
+ * omap_device_assert_hardreset - set a device's hardreset line
+ * @pdev: struct platform_device * to reset
+ * @name: const char * name of the reset line
+ *
+ * Set the hardreset line identified by @name on the IP blocks
+ * associated with the hwmods backing the platform_device @pdev.  All
+ * of the hwmods associated with @pdev must have the same hardreset
+ * line linked to them for this to work.  Passes along the return value
+ * of omap_hwmod_assert_hardreset() in the event of any failure, or
+ * returns 0 upon success.
+ */
+int omap_device_assert_hardreset(struct platform_device *pdev, const char *name)
+{
+	struct omap_device *od = to_omap_device(pdev);
+	int ret = 0;
+	int i;
+
+	for (i = 0; i < od->hwmods_cnt; i++) {
+		ret = omap_hwmod_assert_hardreset(od->hwmods[i], name);
+		if (ret)
+			break;
+	}
+
+	return ret;
+}
+
+/**
+ * omap_device_deassert_hardreset - release a device's hardreset line
+ * @pdev: struct platform_device * to reset
+ * @name: const char * name of the reset line
+ *
+ * Release the hardreset line identified by @name on the IP blocks
+ * associated with the hwmods backing the platform_device @pdev.  All
+ * of the hwmods associated with @pdev must have the same hardreset
+ * line linked to them for this to work.  Passes along the return
+ * value of omap_hwmod_deassert_hardreset() in the event of any
+ * failure, or returns 0 upon success.
+ */
+int omap_device_deassert_hardreset(struct platform_device *pdev,
+				   const char *name)
+{
+	struct omap_device *od = to_omap_device(pdev);
+	int ret = 0;
+	int i;
+
+	for (i = 0; i < od->hwmods_cnt; i++) {
+		ret = omap_hwmod_deassert_hardreset(od->hwmods[i], name);
+		if (ret)
+			break;
+	}
+
+	return ret;
+}
+
+/**
  * omap_device_align_pm_lat - activate/deactivate device to match wakeup lat lim
  * @od: struct omap_device *
  *
-- 
1.7.10.4


WARNING: multiple messages have this Message-ID (diff)
From: paul@pwsan.com (Paul Walmsley)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 3/3] ARM: OMAP: omap_device: expose hwmod assert/deassert to omap devices
Date: Thu, 2 Aug 2012 01:43:45 -0600 (MDT)	[thread overview]
Message-ID: <alpine.DEB.2.00.1208020141140.4177@utopia.booyaka.com> (raw)
In-Reply-To: <1342466485-1050-4-git-send-email-omar.luna@linaro.org>

Hi Omar

On Mon, 16 Jul 2012, Omar Ramirez Luna wrote:

> This APIs are meant to be an interface to hwmod assert/deassert
> function, omap devices can call them through their platform data
> to control their reset lines, they are expected to know the name
> of the reset line they are trying to control.
> 
> Signed-off-by: Omar Ramirez Luna <omar.luna@linaro.org>

This one has been queued for 3.7 with a few changes. Some more detail was 
added to the function documentationrovement.  Also the multiple 
assignments were removed per Documentation/CodingStyle chapter 1:

"Don't put multiple assignments on a single line either."

Please let me know if you have any comments.


- Paul

From: Omar Ramirez Luna <omar.luna@linaro.org>
Date: Mon, 16 Jul 2012 14:21:25 -0500
Subject: [PATCH] ARM: OMAP2+: omap_device: expose hwmod assert/deassert to
 omap devices

This API is meant to be an interface to hwmod assert/deassert
function, omap devices can call them through their platform data to
control their reset lines, they are expected to know the name of the
reset line they are trying to control.

Signed-off-by: Omar Ramirez Luna <omar.luna@linaro.org>
[paul at pwsan.com: tweaked some documentation; fixed CodingStyle issue]
Signed-off-by: Paul Walmsley <paul@pwsan.com>
---
 arch/arm/plat-omap/include/plat/omap_device.h |    4 ++
 arch/arm/plat-omap/omap_device.c              |   55 +++++++++++++++++++++++++
 2 files changed, 59 insertions(+)

diff --git a/arch/arm/plat-omap/include/plat/omap_device.h b/arch/arm/plat-omap/include/plat/omap_device.h
index 4327b2c..27bcc24 100644
--- a/arch/arm/plat-omap/include/plat/omap_device.h
+++ b/arch/arm/plat-omap/include/plat/omap_device.h
@@ -118,6 +118,10 @@ int omap_device_get_context_loss_count(struct platform_device *pdev);
 
 /* Other */
 
+int omap_device_assert_hardreset(struct platform_device *pdev,
+				 const char *name);
+int omap_device_deassert_hardreset(struct platform_device *pdev,
+				 const char *name);
 int omap_device_idle_hwmods(struct omap_device *od);
 int omap_device_enable_hwmods(struct omap_device *od);
 
diff --git a/arch/arm/plat-omap/omap_device.c b/arch/arm/plat-omap/omap_device.c
index c490240..3b02312 100644
--- a/arch/arm/plat-omap/omap_device.c
+++ b/arch/arm/plat-omap/omap_device.c
@@ -925,6 +925,61 @@ int omap_device_shutdown(struct platform_device *pdev)
 }
 
 /**
+ * omap_device_assert_hardreset - set a device's hardreset line
+ * @pdev: struct platform_device * to reset
+ * @name: const char * name of the reset line
+ *
+ * Set the hardreset line identified by @name on the IP blocks
+ * associated with the hwmods backing the platform_device @pdev.  All
+ * of the hwmods associated with @pdev must have the same hardreset
+ * line linked to them for this to work.  Passes along the return value
+ * of omap_hwmod_assert_hardreset() in the event of any failure, or
+ * returns 0 upon success.
+ */
+int omap_device_assert_hardreset(struct platform_device *pdev, const char *name)
+{
+	struct omap_device *od = to_omap_device(pdev);
+	int ret = 0;
+	int i;
+
+	for (i = 0; i < od->hwmods_cnt; i++) {
+		ret = omap_hwmod_assert_hardreset(od->hwmods[i], name);
+		if (ret)
+			break;
+	}
+
+	return ret;
+}
+
+/**
+ * omap_device_deassert_hardreset - release a device's hardreset line
+ * @pdev: struct platform_device * to reset
+ * @name: const char * name of the reset line
+ *
+ * Release the hardreset line identified by @name on the IP blocks
+ * associated with the hwmods backing the platform_device @pdev.  All
+ * of the hwmods associated with @pdev must have the same hardreset
+ * line linked to them for this to work.  Passes along the return
+ * value of omap_hwmod_deassert_hardreset() in the event of any
+ * failure, or returns 0 upon success.
+ */
+int omap_device_deassert_hardreset(struct platform_device *pdev,
+				   const char *name)
+{
+	struct omap_device *od = to_omap_device(pdev);
+	int ret = 0;
+	int i;
+
+	for (i = 0; i < od->hwmods_cnt; i++) {
+		ret = omap_hwmod_deassert_hardreset(od->hwmods[i], name);
+		if (ret)
+			break;
+	}
+
+	return ret;
+}
+
+/**
  * omap_device_align_pm_lat - activate/deactivate device to match wakeup lat lim
  * @od: struct omap_device *
  *
-- 
1.7.10.4

  reply	other threads:[~2012-08-02  7:43 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-16 19:21 [PATCH 0/3] OMAP: hwmod: reset API proposal Omar Ramirez Luna
2012-07-16 19:21 ` Omar Ramirez Luna
2012-07-16 19:21 ` [PATCH 1/3] ARM: OMAP: hwmod: partially un-reset hwmods might not be properly enabled Omar Ramirez Luna
2012-07-16 19:21   ` Omar Ramirez Luna
2012-08-20 14:49   ` Benoit Cousson
2012-08-20 14:49     ` Benoit Cousson
2012-08-20 14:49     ` Benoit Cousson
2012-08-21  1:13     ` Omar Ramirez Luna
2012-08-21  1:13       ` Omar Ramirez Luna
2012-08-21 17:48     ` Omar Ramirez Luna
2012-08-21 17:48       ` Omar Ramirez Luna
2012-07-16 19:21 ` [PATCH 2/3] ARM: OMAP: hwmod: revise deassert sequence Omar Ramirez Luna
2012-07-16 19:21   ` Omar Ramirez Luna
2012-08-02  7:52   ` Paul Walmsley
2012-08-02  7:52     ` Paul Walmsley
2012-08-02 22:20     ` Omar Ramirez Luna
2012-08-02 22:20       ` Omar Ramirez Luna
2012-08-03  5:24       ` Vaibhav Hiremath
2012-08-03  5:24         ` Vaibhav Hiremath
2012-08-03  5:24         ` Vaibhav Hiremath
2012-08-03 15:52         ` Omar Ramirez Luna
2012-08-03 15:52           ` Omar Ramirez Luna
2012-08-20 10:21           ` Benoit Cousson
2012-08-20 10:21             ` Benoit Cousson
2012-08-20 10:21             ` Benoit Cousson
2012-08-21  1:15             ` Omar Ramirez Luna
2012-08-21  1:15               ` Omar Ramirez Luna
2012-07-16 19:21 ` [PATCH 3/3] ARM: OMAP: omap_device: expose hwmod assert/deassert to omap devices Omar Ramirez Luna
2012-07-16 19:21   ` Omar Ramirez Luna
2012-08-02  7:43   ` Paul Walmsley [this message]
2012-08-02  7:43     ` Paul Walmsley
2012-08-02 17:56     ` Omar Ramirez Luna
2012-08-02 17:56       ` Omar Ramirez Luna
  -- strict thread matches above, loose matches on Subject: below --
2012-06-16  1:54 [PATCH 0/3] OMAP: hwmod: reset API proposal Omar Ramirez Luna
2012-06-16  1:54 ` [PATCH 3/3] ARM: OMAP: omap_device: expose hwmod assert/deassert to omap devices Omar Ramirez Luna
2012-06-16  1:54   ` Omar Ramirez Luna

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=alpine.DEB.2.00.1208020141140.4177@utopia.booyaka.com \
    --to=paul@pwsan.com \
    --cc=b-cousson@ti.com \
    --cc=khilman@ti.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=ohad@wizery.com \
    --cc=omar.luna@linaro.org \
    --cc=tomi.valkeinen@ti.com \
    --cc=tony@atomide.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.