Re: [PATCHv7 3/9] OMAP2+: hwmod: Add API to check IO PAD wakeup status

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Tero, Govindraj,

On Thu, Sep 8, 2011 at 5:22 PM, Tero Kristo <t-kristo@xxxxxx> wrote:
> From: R, Govindraj <govindraj.raja@xxxxxx>
>
> Add API to determine IO-PAD wakeup event status for a given
> hwmod dynamic_mux pad.
>
> Signed-off-by: Govindraj.R <govindraj.raja@xxxxxx>
> ---
>  arch/arm/mach-omap2/mux.c                    |   30 ++++++++++++++++++++++++++
>  arch/arm/mach-omap2/mux.h                    |   13 +++++++++++
>  arch/arm/mach-omap2/omap_hwmod.c             |    7 ++++++
>  arch/arm/plat-omap/include/plat/omap_hwmod.h |    1 +
>  4 files changed, 51 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/mux.c b/arch/arm/mach-omap2/mux.c
> index c7fb22a..50ee806 100644
> --- a/arch/arm/mach-omap2/mux.c
> +++ b/arch/arm/mach-omap2/mux.c
> @@ -351,6 +351,36 @@ err1:
>        return NULL;
>  }
>
> +/**
> + * omap_hwmod_mux_get_wake_status - omap hwmod check pad wakeup
> + * @hmux:              Pads for a hwmod
> + *
> + * Gets the wakeup status of given pad from omap-hwmod.
> + * Returns true if wakeup event is set for pad else false
> + * if wakeup is not occured or pads are not avialable.
> + */
This comment is unclear wrt the code below.
IMO the code says:
Returns true if the wake-up capability is enabled and a wake-up event
occured on the pad; returns false otherwise.

> +bool omap_hwmod_mux_get_wake_status(struct omap_hwmod_mux_info *hmux)
> +{
> +       int i;
> +       unsigned int val;
> +       u8 ret = false;
> +
> +       for (i = 0; i < hmux->nr_pads; i++) {
> +               struct omap_device_pad *pad = &hmux->pads[i];
> +
> +               if (pad->flags & OMAP_DEVICE_PAD_WAKEUP) {
> +                       val = omap_mux_read(pad->partition,
> +                                       pad->mux->reg_offset);
> +                       if (val & OMAP_WAKEUP_EVENT) {
> +                               ret = true;
> +                               break;
> +                       }
> +               }
> +       }
> +
> +       return ret;
> +}
> +

Regards,
Jean
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux