[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87y5ptkl0u.fsf@ti.com>
Date: Wed, 18 Apr 2012 10:27:45 -0700
From: Kevin Hilman <khilman@...com>
To: jean.pihet@...oldbits.com
Cc: linux-omap@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
"Rafael J. Wysocki" <rjw@...k.pl>,
LKML <linux-kernel@...r.kernel.org>, Jean Pihet <j-pihet@...com>
Subject: Re: [PATCH 1/9] ARM: OMAP3+: voltage: export functions to plat/voltage.h
Hi Jean,
jean.pihet@...oldbits.com writes:
> From: Jean Pihet <j-pihet@...com>
>
> Move some functions from mach-omap2/ dir to the plat/ dir.
> The SmartReflex class driver is a user of the basic voltage domains
> functions (enable, disable, reset).
>
> Signed-off-by: Jean Pihet <j-pihet@...com>
> Cc: Kevin Hilman <khilman@...com>
Rather than expose the VP functions directly, how about adding a new API
at the voltdm layer to start/stop AVS. Maybe something like:
voltdm_avs_start(struct voltagedomain *voltdm)
voltdm_avs_stop(struct voltagedomain *voltdm)
These will internally just call VP enable/disable for now, but we may
have more to add to these in the future to support other SR classes.
Kevin
> ---
> arch/arm/mach-omap2/smartreflex-class3.c | 1 +
> arch/arm/mach-omap2/smartreflex.h | 2 +-
> arch/arm/mach-omap2/voltage.h | 1 -
> arch/arm/mach-omap2/vp.h | 2 --
> arch/arm/plat-omap/include/plat/voltage.h | 3 +++
> 5 files changed, 5 insertions(+), 4 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/smartreflex-class3.c b/arch/arm/mach-omap2/smartreflex-class3.c
> index 955566e..e12c51e 100644
> --- a/arch/arm/mach-omap2/smartreflex-class3.c
> +++ b/arch/arm/mach-omap2/smartreflex-class3.c
> @@ -12,6 +12,7 @@
> */
>
> #include "smartreflex.h"
> +#include "voltage.h"
>
> static int sr_class3_enable(struct voltagedomain *voltdm)
> {
> diff --git a/arch/arm/mach-omap2/smartreflex.h b/arch/arm/mach-omap2/smartreflex.h
> index 5809141..c4e8530 100644
> --- a/arch/arm/mach-omap2/smartreflex.h
> +++ b/arch/arm/mach-omap2/smartreflex.h
> @@ -22,7 +22,7 @@
>
> #include <linux/platform_device.h>
>
> -#include "voltage.h"
> +#include <plat/voltage.h>
>
> /*
> * Different Smartreflex IPs version. The v1 is the 65nm version used in
> diff --git a/arch/arm/mach-omap2/voltage.h b/arch/arm/mach-omap2/voltage.h
> index 16a1b09..a81dea8 100644
> --- a/arch/arm/mach-omap2/voltage.h
> +++ b/arch/arm/mach-omap2/voltage.h
> @@ -167,6 +167,5 @@ int voltdm_for_each_pwrdm(struct voltagedomain *voltdm,
> int (*fn)(struct voltagedomain *voltdm,
> struct powerdomain *pwrdm));
> int voltdm_scale(struct voltagedomain *voltdm, unsigned long target_volt);
> -void voltdm_reset(struct voltagedomain *voltdm);
> unsigned long voltdm_get_voltage(struct voltagedomain *voltdm);
> #endif
> diff --git a/arch/arm/mach-omap2/vp.h b/arch/arm/mach-omap2/vp.h
> index 7c155d2..837cb8d 100644
> --- a/arch/arm/mach-omap2/vp.h
> +++ b/arch/arm/mach-omap2/vp.h
> @@ -118,8 +118,6 @@ extern struct omap_vp_instance omap4_vp_iva;
> extern struct omap_vp_instance omap4_vp_core;
>
> void omap_vp_init(struct voltagedomain *voltdm);
> -void omap_vp_enable(struct voltagedomain *voltdm);
> -void omap_vp_disable(struct voltagedomain *voltdm);
> int omap_vp_forceupdate_scale(struct voltagedomain *voltdm,
> unsigned long target_volt);
> int omap_vp_update_errorgain(struct voltagedomain *voltdm,
> diff --git a/arch/arm/plat-omap/include/plat/voltage.h b/arch/arm/plat-omap/include/plat/voltage.h
> index 0a6a482..1842709 100644
> --- a/arch/arm/plat-omap/include/plat/voltage.h
> +++ b/arch/arm/plat-omap/include/plat/voltage.h
> @@ -16,5 +16,8 @@ struct voltagedomain;
> struct voltagedomain *voltdm_lookup(const char *name);
> int voltdm_scale(struct voltagedomain *voltdm, unsigned long target_volt);
> unsigned long voltdm_get_voltage(struct voltagedomain *voltdm);
> +void voltdm_reset(struct voltagedomain *voltdm);
>
> +void omap_vp_enable(struct voltagedomain *voltdm);
> +void omap_vp_disable(struct voltagedomain *voltdm);
> #endif
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists