public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/6] omap3: pm: Update TRITON power scripts and making it generic
@ 2010-01-19 17:29 Lesly A M
  2010-01-21 21:19 ` Kevin Hilman
  2010-01-22  0:12 ` Kevin Hilman
  0 siblings, 2 replies; 3+ messages in thread
From: Lesly A M @ 2010-01-19 17:29 UTC (permalink / raw)
  To: linux-omap; +Cc: Lesly A M

map3: pm: Update TRITON power scripts and making it generic

This series of patch implements a updated TRITON power scripts.
Also moving the sleep, wakeup & warm_reset sequence to a generic script file,
which can be used by different OMAP3 board with the power companion chip TWL4030.

V1: Initial Patch Series

V2: Incorporated comments

 arch/arm/mach-omap2/Makefile                  |   12 ++-
 arch/arm/mach-omap2/board-3430sdp.c           |  124 ++++++++-----------------
 arch/arm/mach-omap2/board-3630sdp.c           |   25 +++++-
 arch/arm/mach-omap2/board-zoom-peripherals.c  |   43 +++++++++-
 arch/arm/mach-omap2/board-zoom2.c             |   25 +++++-
 arch/arm/mach-omap2/board-zoom3.c             |   25 +++++-
 arch/arm/mach-omap2/include/mach/board-zoom.h |    2 +-
 arch/arm/mach-omap2/pm.h                      |   11 ++-
 arch/arm/mach-omap2/pm34xx.c                  |   60 ++++++++++--
 drivers/mfd/twl4030-power.c                   |   30 +++++--
 include/linux/i2c/twl.h                       |    4 +
 11 files changed, 245 insertions(+), 116 deletions(-)


Tested on top of Kevins PM branch commit id:
ad4776c4207a376961372752fe0a0ae3814990b3


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v2 0/6] omap3: pm: Update TRITON power scripts and making it generic
  2010-01-19 17:29 [PATCH v2 0/6] omap3: pm: Update TRITON power scripts and making it generic Lesly A M
@ 2010-01-21 21:19 ` Kevin Hilman
  2010-01-22  0:12 ` Kevin Hilman
  1 sibling, 0 replies; 3+ messages in thread
From: Kevin Hilman @ 2010-01-21 21:19 UTC (permalink / raw)
  To: Lesly A M; +Cc: linux-omap

Lesly A M <x0080970@ti.com> writes:

> map3: pm: Update TRITON power scripts and making it generic
>
> This series of patch implements a updated TRITON power scripts.
> Also moving the sleep, wakeup & warm_reset sequence to a generic script file,
> which can be used by different OMAP3 board with the power companion chip TWL4030.
>
> V1: Initial Patch Series
>
> V2: Incorporated comments
>
>  arch/arm/mach-omap2/Makefile                  |   12 ++-
>  arch/arm/mach-omap2/board-3430sdp.c           |  124 ++++++++-----------------
>  arch/arm/mach-omap2/board-3630sdp.c           |   25 +++++-
>  arch/arm/mach-omap2/board-zoom-peripherals.c  |   43 +++++++++-
>  arch/arm/mach-omap2/board-zoom2.c             |   25 +++++-
>  arch/arm/mach-omap2/board-zoom3.c             |   25 +++++-
>  arch/arm/mach-omap2/include/mach/board-zoom.h |    2 +-
>  arch/arm/mach-omap2/pm.h                      |   11 ++-
>  arch/arm/mach-omap2/pm34xx.c                  |   60 ++++++++++--
>  drivers/mfd/twl4030-power.c                   |   30 +++++--
>  include/linux/i2c/twl.h                       |    4 +
>  11 files changed, 245 insertions(+), 116 deletions(-)
>
>
> Tested on top of Kevins PM branch commit id:
> ad4776c4207a376961372752fe0a0ae3814990b3

Lesly,

Could you also report what platforms this was tested on, and what
exactly was tested?  RET, OFF in suspend?  RET & OFF while idle? etc.

Thanks,

Kevin


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v2 0/6] omap3: pm: Update TRITON power scripts and making it generic
  2010-01-19 17:29 [PATCH v2 0/6] omap3: pm: Update TRITON power scripts and making it generic Lesly A M
  2010-01-21 21:19 ` Kevin Hilman
@ 2010-01-22  0:12 ` Kevin Hilman
  1 sibling, 0 replies; 3+ messages in thread
From: Kevin Hilman @ 2010-01-22  0:12 UTC (permalink / raw)
  To: Lesly A M; +Cc: linux-omap

Lesly A M <x0080970@ti.com> writes:

> map3: pm: Update TRITON power scripts and making it generic
>
> This series of patch implements a updated TRITON power scripts.
> Also moving the sleep, wakeup & warm_reset sequence to a generic script file,
> which can be used by different OMAP3 board with the power companion chip TWL4030.

Hi Lesly,

Overall, I like the overall direction you're going.  I appreciate your
efforts to combine the common code and simplify things.  Thank you
very much for your efforts.

I may have some specific comments on some of the patches, but rather
than comment in detail on each patch, I have some comments/opinions on
the overall approach.

First, I think the series should be done in a slightly different
order.  Currently, you create the common twl4030-script file at the
end of series.  I'd rather see this done earlier on.

In other words, rather than create/update the scripts/setuptimes for
Z2 and 3630SDP in their board files and then remove them in following
patches, why not create the common code earlier in the series and
do minimal changes to the board files?  That would cause a lot fewer
lines changed, and make the series as a whole more understandable.

Second, your series is making it clear we need some common VC init.
And this common VC init should be probably be separated from PMIC
init/setup.  So before we go much further with this, I think it's time
for some common VC infrastructure.

So here's a proposal off the top of my head:

- create new file(s): vc34xx.c, vc.h (or something like that)
- move the common prm_setup_times init and structs there
- move VC init from pm34xx.c (omap3_pm_init_vc, configure_vc, etc.)

We'll then have all the VC init/setup in a single place.  

Also, along the lines of keeping PMIC and VC details separated, I
think there should be separate calls to get the T2 scripts and the VC
values from T2.  IOW, board code should call one function to get T2
scripts, and a separate one to override the VC values with PMIC
specifics.  This will scale better to other PMICs as well. Something
like:

        int twl_get_scripts(struct twl4030_power_data *);
        int twl_get_vc_timings(struct prm_setup_vc *);

The common VC init code could have the default prm_setup_vc values for
34xx and 36xx as well (the ones that are not overridden by the PMIC),
so these values to no have to be defined/duplicated in the various
board files.

Ideally, a board file that just wants the defaults and is not doing
any overrides should not have to define its own prm_setup_vc.  The
defaults should come from vc.c with the PMIC related values coming
from the PMIC init.

Sorry to get so long winded on this one...

We've been needing some cleanup in this area for some time, so before
I merge any more changes in this area, I'd like to see some
reorg/cleanup along the lines above.  

Kevin





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-01-22  0:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-19 17:29 [PATCH v2 0/6] omap3: pm: Update TRITON power scripts and making it generic Lesly A M
2010-01-21 21:19 ` Kevin Hilman
2010-01-22  0:12 ` Kevin Hilman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox