All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hema Kalliguddi <hemahk@ti.com>
To: Rajendra Nayak <rnayak@ti.com>, linux-omap@vger.kernel.org
Cc: paul@pwsan.com, Benoit Cousson <b-cousson@ti.com>
Subject: RE: [RFC 3/3] OMAP3: omap_device: Add support to associate a device with an initiator
Date: Mon, 21 Mar 2011 18:42:06 +0530	[thread overview]
Message-ID: <87b33eb07d8878f33aabba63d6730548@mail.gmail.com> (raw)
In-Reply-To: <1300705823-12784-4-git-send-email-rnayak@ti.com>

Rajendra,

>-----Original Message-----
>From: linux-omap-owner@vger.kernel.org
>[mailto:linux-omap-owner@vger.kernel.org] On Behalf Of Rajendra Nayak
>Sent: Monday, March 21, 2011 4:40 PM
>To: linux-omap@vger.kernel.org
>Cc: paul@pwsan.com; b-cousson@ti.com; Rajendra Nayak
>Subject: [RFC 3/3] OMAP3: omap_device: Add support to
>associate a device with an initiator
>
>These api's are meant to to used by drivers to
>associate/disassociate a device from a given initiator.
>
>Signed-off-by: Rajendra Nayak <rnayak@ti.com>
>---
> arch/arm/plat-omap/omap_device.c |   54
>++++++++++++++++++++++++++++++++++++++
> 1 files changed, 54 insertions(+), 0 deletions(-)
>
>diff --git a/arch/arm/plat-omap/omap_device.c
>b/arch/arm/plat-omap/omap_device.c
>index 9bbda9a..0cd05d2 100644
>--- a/arch/arm/plat-omap/omap_device.c
>+++ b/arch/arm/plat-omap/omap_device.c
>@@ -662,6 +662,60 @@ int omap_device_shutdown(struct
>platform_device *pdev)
> 	return ret;
> }
>
>+static int omap_device_add_initiator_user(struct
>platform_device *pdev,
>+					  u8 init_id)
>+{
>+	int i;
>+	struct omap_device *od;
>+
>+	od = _find_by_pdev(pdev);
>+
>+	if (od->_state != OMAP_DEVICE_STATE_ENABLED)
>+		return -EINVAL;
>+
>+	for (i = 0; i < od->hwmods_cnt; i++)
>+		omap_hwmod_add_initiator_user(od->hwmods[i], init_id);

Not checking for return value.

>+
>+	return 0;
>+}
>+
>+inline int omap_device_add_mpu_user(struct platform_device *pdev)
>+{
>+	return omap_device_add_initiator_user(pdev, OMAP_INIT_MPU);
>+}
>+
>+inline int omap_device_add_iva_user(struct platform_device *pdev)
>+{
>+	return omap_device_add_initiator_user(pdev, OMAP_INIT_IVA);

Ditto..

>+}
>+
>+static int omap_device_del_initiator_user(struct
>platform_device *pdev,
>+					  u8 init_id)
>+{
>+	int i;
>+	struct omap_device *od;
>+
>+	od = _find_by_pdev(pdev);
>+
>+	if (od->_state == OMAP_DEVICE_STATE_ENABLED)
>+		return -EINVAL;
>+
>+	for (i = 0; i < od->hwmods_cnt; i++)
>+		omap_hwmod_del_initiator_user(od->hwmods[i], init_id);
>+
>+	return 0;
>+}
>+
>+inline int omap_device_del_mpu_user(struct platform_device *pdev)
>+{
>+	return omap_device_del_initiator_user(pdev, OMAP_INIT_MPU);
>+}
>+
>+inline int omap_device_del_iva_user(struct platform_device *pdev)
>+{
>+	return omap_device_del_initiator_user(pdev, OMAP_INIT_IVA);
>+}
>+
> /**
>  * omap_device_align_pm_lat - activate/deactivate device to
>match wakeup lat lim
>  * @od: struct omap_device *
>--
>1.7.0.4
>
>--
>To unsubscribe from this list: send the line "unsubscribe
>linux-omap" in
>the body of a message to majordomo@vger.kernel.org
>More majordomo info at  http://vger.kernel.org/majordomo-info.html
>

  reply	other threads:[~2011-03-21 13:12 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-21 11:10 [RFC 0/3] OMAP3: Support processor group selection by a peripheral Rajendra Nayak
2011-03-21 11:10 ` [RFC 1/3] OMAP3: PRM: Add grpsel programming support Rajendra Nayak
2011-03-21 11:10   ` [RFC 2/3] OMAP3: hwmod: Add support to associate an initiator with a hwmod Rajendra Nayak
2011-03-21 11:10     ` [RFC 3/3] OMAP3: omap_device: Add support to associate a device with an initiator Rajendra Nayak
2011-03-21 13:12       ` Hema Kalliguddi [this message]
2011-03-22  8:28         ` Rajendra Nayak
2011-03-21 13:08     ` [RFC 2/3] OMAP3: hwmod: Add support to associate an initiator with a hwmod Hema Kalliguddi
2011-03-22  8:28       ` Rajendra Nayak
2011-03-22  8:31         ` Hema Kalliguddi
2011-03-21 13:08   ` [RFC 1/3] OMAP3: PRM: Add grpsel programming support Hema Kalliguddi

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=87b33eb07d8878f33aabba63d6730548@mail.gmail.com \
    --to=hemahk@ti.com \
    --cc=b-cousson@ti.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=paul@pwsan.com \
    --cc=rnayak@ti.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.