diff mbox

[3/6] ARM: OMAP: voltage: move voltdm_reset to platform_data header

Message ID 1352127734-30103-5-git-send-email-nm@ti.com (mailing list archive)
State New, archived
Headers show

Commit Message

Nishanth Menon Nov. 5, 2012, 3:02 p.m. UTC
Move voltdm_reset to include/linux/platform_data/voltage-omap.h

Acked-by: Jean Pihet <j-pihet@ti.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
---
 arch/arm/mach-omap2/voltage.h              |    1 -
 include/linux/platform_data/voltage-omap.h |    1 +
 2 files changed, 1 insertion(+), 1 deletion(-)

Comments

Tony Lindgren Nov. 6, 2012, 6:49 p.m. UTC | #1
* Nishanth Menon <nm@ti.com> [121105 07:04]:
> Move voltdm_reset to include/linux/platform_data/voltage-omap.h
> 
> Acked-by: Jean Pihet <j-pihet@ti.com>
> Signed-off-by: Nishanth Menon <nm@ti.com>
> ---
>  arch/arm/mach-omap2/voltage.h              |    1 -
>  include/linux/platform_data/voltage-omap.h |    1 +
>  2 files changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/arm/mach-omap2/voltage.h b/arch/arm/mach-omap2/voltage.h
> index af9d469..0665f21 100644
> --- a/arch/arm/mach-omap2/voltage.h
> +++ b/arch/arm/mach-omap2/voltage.h
> @@ -149,5 +149,4 @@ int voltdm_for_each(int (*fn)(struct voltagedomain *voltdm, void *user),
>  int voltdm_for_each_pwrdm(struct voltagedomain *voltdm,
>  			  int (*fn)(struct voltagedomain *voltdm,
>  				    struct powerdomain *pwrdm));
> -void voltdm_reset(struct voltagedomain *voltdm);
>  #endif
> diff --git a/include/linux/platform_data/voltage-omap.h b/include/linux/platform_data/voltage-omap.h
> index 5be4d5d..4eb3d43 100644
> --- a/include/linux/platform_data/voltage-omap.h
> +++ b/include/linux/platform_data/voltage-omap.h
> @@ -36,4 +36,5 @@ int voltdm_scale(struct voltagedomain *voltdm, unsigned long target_volt);
>  unsigned long voltdm_get_voltage(struct voltagedomain *voltdm);
>  struct omap_volt_data *omap_voltage_get_voltdata(struct voltagedomain *voltdm,
>  		unsigned long volt);
> +void voltdm_reset(struct voltagedomain *voltdm);
>  #endif

The include/linux/platform_data/voltage-omap.h should only contain
pure platform_data, these should internal defines to the driver.

Looks like there are other things there too that's not platform data:

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);
struct omap_volt_data *omap_voltage_get_voltdata(struct voltagedomain *voltdm,
		unsigned long volt);

Can you please add a patch fixing that ASAP?

Thanks,

Tony
--
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
Nishanth Menon Nov. 6, 2012, 9:48 p.m. UTC | #2
On 10:49-20121106, Tony Lindgren wrote:
> * Nishanth Menon <nm@ti.com> [121105 07:04]:
> > Move voltdm_reset to include/linux/platform_data/voltage-omap.h
> > 
> > Acked-by: Jean Pihet <j-pihet@ti.com>
> > Signed-off-by: Nishanth Menon <nm@ti.com>
> > ---
> >  arch/arm/mach-omap2/voltage.h              |    1 -
> >  include/linux/platform_data/voltage-omap.h |    1 +
> >  2 files changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/arch/arm/mach-omap2/voltage.h b/arch/arm/mach-omap2/voltage.h
> > index af9d469..0665f21 100644
> > --- a/arch/arm/mach-omap2/voltage.h
> > +++ b/arch/arm/mach-omap2/voltage.h
> > @@ -149,5 +149,4 @@ int voltdm_for_each(int (*fn)(struct voltagedomain *voltdm, void *user),
> >  int voltdm_for_each_pwrdm(struct voltagedomain *voltdm,
> >  			  int (*fn)(struct voltagedomain *voltdm,
> >  				    struct powerdomain *pwrdm));
> > -void voltdm_reset(struct voltagedomain *voltdm);
> >  #endif
> > diff --git a/include/linux/platform_data/voltage-omap.h b/include/linux/platform_data/voltage-omap.h
> > index 5be4d5d..4eb3d43 100644
> > --- a/include/linux/platform_data/voltage-omap.h
> > +++ b/include/linux/platform_data/voltage-omap.h
> > @@ -36,4 +36,5 @@ int voltdm_scale(struct voltagedomain *voltdm, unsigned long target_volt);
> >  unsigned long voltdm_get_voltage(struct voltagedomain *voltdm);
> >  struct omap_volt_data *omap_voltage_get_voltdata(struct voltagedomain *voltdm,
> >  		unsigned long volt);
> > +void voltdm_reset(struct voltagedomain *voltdm);
> >  #endif
> 
> The include/linux/platform_data/voltage-omap.h should only contain
> pure platform_data, these should internal defines to the driver.
considering the move took place as part of:
commit 2203747c97712975accc5e69bdaf1ad38a691635
(ARM: omap: move platform_data definitions)
I suppose we should clean up the following as well
include/linux/platform_data/dsp-omap.h - has function - reserve
include/linux/platform_data/mtd-nand-omap2.h - has function -init
include/linux/platform_data/mtd-onenand-omap2.h - has function -init
include/linux/platform_data/remoteproc-omap.h - has function - reserve
> 
> Looks like there are other things there too that's not platform data:
> 
> 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);
> struct omap_volt_data *omap_voltage_get_voltdata(struct voltagedomain *voltdm,
> 		unsigned long volt);
> 
> Can you please add a patch fixing that ASAP?

Agreed include/linux/platform_data/voltage-omap.h has more functions as well.
Considering it did:
rename arch/arm/plat-omap/include/plat/voltage.h =>
include/linux/platform_data/voltage-omap.h

Where do we move these functions to?

drivers/power/avs/smartreflex.c needs:
omap_voltage_get_voltdata
and
drivers/power/avs/smartreflex-class3.c
will need voltdm_reset and voltdm_get_voltage
Tony Lindgren Nov. 7, 2012, 1:18 a.m. UTC | #3
* Nishanth Menon <nm@ti.com> [121106 13:50]:
> On 10:49-20121106, Tony Lindgren wrote:
> > 
> > Looks like there are other things there too that's not platform data:
> > 
> > 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);
> > struct omap_volt_data *omap_voltage_get_voltdata(struct voltagedomain *voltdm,
> > 		unsigned long volt);
> > 
> > Can you please add a patch fixing that ASAP?
> 
> Agreed include/linux/platform_data/voltage-omap.h has more functions as well.
> Considering it did:
> rename arch/arm/plat-omap/include/plat/voltage.h =>
> include/linux/platform_data/voltage-omap.h
> 
> Where do we move these functions to?
> 
> drivers/power/avs/smartreflex.c needs:
> omap_voltage_get_voltdata
> and
> drivers/power/avs/smartreflex-class3.c
> will need voltdm_reset and voltdm_get_voltage

How about something local drivers/power/avs/smartreflex.h?

Regards,

Tony
--
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
Nishanth Menon Nov. 7, 2012, 1:28 a.m. UTC | #4
On 17:18-20121106, Tony Lindgren wrote:
> * Nishanth Menon <nm@ti.com> [121106 13:50]:
> > On 10:49-20121106, Tony Lindgren wrote:
> > > 
> > > Looks like there are other things there too that's not platform data:
> > > 
> > > 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);
> > > struct omap_volt_data *omap_voltage_get_voltdata(struct voltagedomain *voltdm,
> > > 		unsigned long volt);
> > > 
> > > Can you please add a patch fixing that ASAP?
> > 
> > Agreed include/linux/platform_data/voltage-omap.h has more functions as well.
> > Considering it did:
> > rename arch/arm/plat-omap/include/plat/voltage.h =>
> > include/linux/platform_data/voltage-omap.h
> > 
> > Where do we move these functions to?
> > 
> > drivers/power/avs/smartreflex.c needs:
> > omap_voltage_get_voltdata
> > and
> > drivers/power/avs/smartreflex-class3.c
> > will need voltdm_reset and voltdm_get_voltage
> 
> How about something local drivers/power/avs/smartreflex.h?
These APIs are exposed by voltage layer, not smartreflex :(
stuff like voltdm_scale will have to be used by regulator logic
eventually, so moving to AVS driver header is probably not right.
Tony Lindgren Nov. 7, 2012, 1:46 a.m. UTC | #5
* Nishanth Menon <nm@ti.com> [121106 17:30]:
> On 17:18-20121106, Tony Lindgren wrote:
> > * Nishanth Menon <nm@ti.com> [121106 13:50]:
> > > On 10:49-20121106, Tony Lindgren wrote:
> > > > 
> > > > Looks like there are other things there too that's not platform data:
> > > > 
> > > > 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);
> > > > struct omap_volt_data *omap_voltage_get_voltdata(struct voltagedomain *voltdm,
> > > > 		unsigned long volt);
> > > > 
> > > > Can you please add a patch fixing that ASAP?
> > > 
> > > Agreed include/linux/platform_data/voltage-omap.h has more functions as well.
> > > Considering it did:
> > > rename arch/arm/plat-omap/include/plat/voltage.h =>
> > > include/linux/platform_data/voltage-omap.h
> > > 
> > > Where do we move these functions to?
> > > 
> > > drivers/power/avs/smartreflex.c needs:
> > > omap_voltage_get_voltdata
> > > and
> > > drivers/power/avs/smartreflex-class3.c
> > > will need voltdm_reset and voltdm_get_voltage
> > 
> > How about something local drivers/power/avs/smartreflex.h?
> These APIs are exposed by voltage layer, not smartreflex :(
> stuff like voltdm_scale will have to be used by regulator logic
> eventually, so moving to AVS driver header is probably not right.

Well ideally you'd have some generic API doing it rather than
these omap specifc exported functions.

Meanwhile, I guess you need to find some suitable location
for the header file that works for Rafael.

Regards,

Tony
--
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
Nishanth Menon Nov. 8, 2012, 4:52 a.m. UTC | #6
On 17:46-20121106, Tony Lindgren wrote:
> * Nishanth Menon <nm@ti.com> [121106 17:30]:
> > On 17:18-20121106, Tony Lindgren wrote:
> > > * Nishanth Menon <nm@ti.com> [121106 13:50]:
> > > > On 10:49-20121106, Tony Lindgren wrote:
> > > > > 
> > > > > Looks like there are other things there too that's not platform data:
> > > > > 
> > > > > 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);
> > > > > struct omap_volt_data *omap_voltage_get_voltdata(struct voltagedomain *voltdm,
> > > > > 		unsigned long volt);
> > > > > 
> > > > > Can you please add a patch fixing that ASAP?
> > > > 
> > > > Agreed include/linux/platform_data/voltage-omap.h has more functions as well.
> > > > Considering it did:
> > > > rename arch/arm/plat-omap/include/plat/voltage.h =>
> > > > include/linux/platform_data/voltage-omap.h
> > > > 
> > > > Where do we move these functions to?
> > > > 
> > > > drivers/power/avs/smartreflex.c needs:
> > > > omap_voltage_get_voltdata
> > > > and
> > > > drivers/power/avs/smartreflex-class3.c
> > > > will need voltdm_reset and voltdm_get_voltage
> > > 
> > > How about something local drivers/power/avs/smartreflex.h?
> > These APIs are exposed by voltage layer, not smartreflex :(
> > stuff like voltdm_scale will have to be used by regulator logic
> > eventually, so moving to AVS driver header is probably not right.
> 
> Well ideally you'd have some generic API doing it rather than
> these omap specifc exported functions.
> 
> Meanwhile, I guess you need to find some suitable location
> for the header file that works for Rafael.
I wonder if including mach/voltage.h is acceptable here? if Kevin could
suggest an option as well, it will be great.
diff mbox

Patch

diff --git a/arch/arm/mach-omap2/voltage.h b/arch/arm/mach-omap2/voltage.h
index af9d469..0665f21 100644
--- a/arch/arm/mach-omap2/voltage.h
+++ b/arch/arm/mach-omap2/voltage.h
@@ -149,5 +149,4 @@  int voltdm_for_each(int (*fn)(struct voltagedomain *voltdm, void *user),
 int voltdm_for_each_pwrdm(struct voltagedomain *voltdm,
 			  int (*fn)(struct voltagedomain *voltdm,
 				    struct powerdomain *pwrdm));
-void voltdm_reset(struct voltagedomain *voltdm);
 #endif
diff --git a/include/linux/platform_data/voltage-omap.h b/include/linux/platform_data/voltage-omap.h
index 5be4d5d..4eb3d43 100644
--- a/include/linux/platform_data/voltage-omap.h
+++ b/include/linux/platform_data/voltage-omap.h
@@ -36,4 +36,5 @@  int voltdm_scale(struct voltagedomain *voltdm, unsigned long target_volt);
 unsigned long voltdm_get_voltage(struct voltagedomain *voltdm);
 struct omap_volt_data *omap_voltage_get_voltdata(struct voltagedomain *voltdm,
 		unsigned long volt);
+void voltdm_reset(struct voltagedomain *voltdm);
 #endif