From: tony@atomide.com (Tony Lindgren)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 05/16] ARM: omap: fix vc.c PMIC error message
Date: Thu, 9 Feb 2012 09:18:31 -0800 [thread overview]
Message-ID: <20120209171830.GH16877@atomide.com> (raw)
In-Reply-To: <20120209164913.GB19159@n2100.arm.linux.org.uk>
* Russell King - ARM Linux <linux@arm.linux.org.uk> [120209 08:18]:
> On Wed, Feb 08, 2012 at 04:40:27PM -0800, Tony Lindgren wrote:
> > * Kevin Hilman <khilman@ti.com> [120208 15:49]:
> > > Russell King - ARM Linux <linux@arm.linux.org.uk> writes:
> > >
> > > > On Wed, Feb 08, 2012 at 04:09:48PM -0800, Kevin Hilman wrote:
> > > >> Russell King - ARM Linux <linux@arm.linux.org.uk> writes:
> > > >> > Does it fix the other issues I mention in the commit log as well?
> > > >>
> > > >> Like your patches 1 & 5, my series fixes the oops and also makes the
> > > >> error strings simple, non-wrapping ones.
> > > >>
> > > >> The one thing it doesn't fix is the spelling typo you fixed in the
> > > >> comment, but IMO we can leave that out for -rc.
> > > >
> > > > OK, but it would be much better for that simple fix to go with another
> > > > simple patch. On its own it doesn't make sense as a commit.
> > >
> > > Agreed. We'll have some other VC/VP cleanup for v3.4, and I'll add this
> > > into that cleanup.
> >
> > Eek, looking at it, I'd rather stay away from this formatting patch
> > for -rc series because the flaming potential causes me rash!
> >
> > Russell's patch 5 has way better description for the -rc series.
> >
> > So I now suggest that Russell drops patch 1 and updates patch 5 to
> > cover both vp.c and vc.c.
>
> I'm not sure what you want me to update in patch 5. vp.c already
> contains:
>
> if (!voltdm->pmic) {
> pr_err("%s: No PMIC info for vdd_%s\n", __func__, voltdm->name);
> return;
> }
>
> which is where I got the idea for the message I put into vc.c.
OK no need to update patch 5 then.
> > d269914ece0498f31603ecd85ed3d7a586b3cbcd ARM: OMAP2+: PM: only register TWL with voltage layer when device is present
> > af9a2ed9667b49e7e125eac526d8f655183ce53e ARM: OMAP2+: voltage: add check for missing PMIC info in VP init
>
> I'd like at least the first in my tree too, otherwise my stuff becomes
> untestable without patch 1. What's the second doing?
OK. Please use your updated patch 1 as it contains the oops in
the description. Kevin, are you OK with that?
So that leaves me only the second one to queue that adds checks
for the PMIC info for boards that don't have it, see below.
Regards,
Tony
>From d269914ece0498f31603ecd85ed3d7a586b3cbcd Mon Sep 17 00:00:00 2001
From: Kevin Hilman <khilman@ti.com>
Date: Fri, 30 Sep 2011 11:24:04 -0700
Subject: [PATCH] ARM: OMAP2+: PM: only register TWL with voltage layer when device is present
Current code registers voltage layer details for TWL PMIC even when a TWL
has not been registered. Fix this to only register the TWL with voltage
layer when the TWL PMIC is initialized by board-level code.
Tested-by: Abhilash Koyamangalath <abhilash.kv@ti.com>
Signed-off-by: Kevin Hilman <khilman@ti.com>
diff --git a/arch/arm/mach-omap2/pm.c b/arch/arm/mach-omap2/pm.c
index 1e79bdf..00bff46 100644
--- a/arch/arm/mach-omap2/pm.c
+++ b/arch/arm/mach-omap2/pm.c
@@ -24,6 +24,7 @@
#include "powerdomain.h"
#include "clockdomain.h"
#include "pm.h"
+#include "twl-common.h"
static struct omap_device_pm_latency *pm_lats;
@@ -226,11 +227,8 @@ postcore_initcall(omap2_common_pm_init);
static int __init omap2_common_pm_late_init(void)
{
- /* Init the OMAP TWL parameters */
- omap3_twl_init();
- omap4_twl_init();
-
/* Init the voltage layer */
+ omap_pmic_late_init();
omap_voltage_late_init();
/* Initialize the voltages */
diff --git a/arch/arm/mach-omap2/twl-common.c b/arch/arm/mach-omap2/twl-common.c
index 5224357..10b20c6 100644
--- a/arch/arm/mach-omap2/twl-common.c
+++ b/arch/arm/mach-omap2/twl-common.c
@@ -30,6 +30,7 @@
#include <plat/usb.h>
#include "twl-common.h"
+#include "pm.h"
static struct i2c_board_info __initdata pmic_i2c_board_info = {
.addr = 0x48,
@@ -48,6 +49,16 @@ void __init omap_pmic_init(int bus, u32 clkrate,
omap_register_i2c_bus(bus, clkrate, &pmic_i2c_board_info, 1);
}
+void __init omap_pmic_late_init(void)
+{
+ /* Init the OMAP TWL parameters (if PMIC has been registerd) */
+ if (!pmic_i2c_board_info.irq)
+ return;
+
+ omap3_twl_init();
+ omap4_twl_init();
+}
+
#if defined(CONFIG_ARCH_OMAP3)
static struct twl4030_usb_data omap3_usb_pdata = {
.usb_mode = T2_USB_MODE_ULPI,
diff --git a/arch/arm/mach-omap2/twl-common.h b/arch/arm/mach-omap2/twl-common.h
index 5e83a5b..275dde8 100644
--- a/arch/arm/mach-omap2/twl-common.h
+++ b/arch/arm/mach-omap2/twl-common.h
@@ -1,6 +1,8 @@
#ifndef __OMAP_PMIC_COMMON__
#define __OMAP_PMIC_COMMON__
+#include <plat/irqs.h>
+
#define TWL_COMMON_PDATA_USB (1 << 0)
#define TWL_COMMON_PDATA_BCI (1 << 1)
#define TWL_COMMON_PDATA_MADC (1 << 2)
@@ -30,6 +32,7 @@ struct twl4030_platform_data;
void omap_pmic_init(int bus, u32 clkrate, const char *pmic_type, int pmic_irq,
struct twl4030_platform_data *pmic_data);
+void omap_pmic_late_init(void);
static inline void omap2_pmic_init(const char *pmic_type,
struct twl4030_platform_data *pmic_data)
next prev parent reply other threads:[~2012-02-09 17:18 UTC|newest]
Thread overview: 61+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-08 16:35 [PATCH 00/16] rmk's patch series for fixing OMAP Russell King - ARM Linux
2012-02-08 16:36 ` [PATCH 01/16] ARM: omap: fix oops in arch/arm/mach-omap2/vp.c when pmic is not found Russell King - ARM Linux
2012-02-08 18:33 ` Tony Lindgren
2012-02-08 23:46 ` Tony Lindgren
2012-02-09 16:44 ` Russell King - ARM Linux
2012-02-09 16:51 ` Tony Lindgren
2012-02-08 16:37 ` [PATCH 04/16] ARM: omap: fix prm44xx.c OMAP44XX_IRQ_PRCM build error Russell King - ARM Linux
2012-02-08 18:39 ` Tony Lindgren
2012-02-09 18:58 ` Cousson, Benoit
2012-02-08 16:37 ` [PATCH 05/16] ARM: omap: fix vc.c PMIC error message Russell King - ARM Linux
2012-02-08 18:45 ` Tony Lindgren
2012-02-08 23:06 ` Kevin Hilman
2012-02-08 23:53 ` Tony Lindgren
2012-02-08 23:56 ` Russell King - ARM Linux
2012-02-09 0:09 ` Kevin Hilman
2012-02-09 0:11 ` Russell King - ARM Linux
2012-02-09 0:20 ` Kevin Hilman
2012-02-09 0:40 ` Tony Lindgren
2012-02-09 16:49 ` Russell King - ARM Linux
2012-02-09 17:18 ` Tony Lindgren [this message]
2012-02-09 17:27 ` Tony Lindgren
2012-02-09 17:59 ` Russell King - ARM Linux
2012-02-09 18:06 ` Tony Lindgren
2012-02-09 18:46 ` Tony Lindgren
2012-02-08 23:57 ` Tony Lindgren
2012-02-09 0:11 ` Kevin Hilman
2012-02-08 16:37 ` [PATCH 06/16] ARM: omap: fix uninformative vc/i2c configuration " Russell King - ARM Linux
2012-02-08 18:46 ` Tony Lindgren
2012-02-08 23:07 ` Kevin Hilman
2012-02-08 16:38 ` [PATCH 08/16] ARM: omap: fix section mismatch warning in mux.c Russell King - ARM Linux
2012-02-08 18:47 ` Tony Lindgren
2012-02-08 16:38 ` [PATCH 09/16] ARM: omap: preemptively fix section mismatch in omap4_sdp4430_wifi_mux_init() Russell King - ARM Linux
2012-02-08 18:48 ` Tony Lindgren
2012-02-08 16:39 ` [PATCH 10/16] ARM: omap: fix section mismatch warning for omap_secondary_startup() Russell King - ARM Linux
2012-02-08 18:48 ` Tony Lindgren
2012-02-08 16:39 ` [PATCH 11/16] ARM: omap: fix section mismatch error for omap_4430sdp_display_init() Russell King - ARM Linux
2012-02-08 18:48 ` Tony Lindgren
2012-02-08 16:39 ` [PATCH 12/16] ARM: omap: fix section mismatch warning for sdp3430_twl_gpio_setup() Russell King - ARM Linux
2012-02-08 18:49 ` Tony Lindgren
2012-02-08 16:40 ` [PATCH 13/16] ARM: omap: fix section mismatch warnings in mux.c caused by hsmmc.c Russell King - ARM Linux
2012-02-08 18:50 ` Tony Lindgren
2012-02-08 16:40 ` [PATCH 14/16] ARM: omap: fix wrapped error messages in omap_hwmod.c Russell King - ARM Linux
2012-02-08 17:40 ` Paul Walmsley
2012-02-08 18:54 ` Tony Lindgren
2012-02-08 19:25 ` Paul Walmsley
2012-02-08 19:31 ` Tony Lindgren
2012-02-08 16:40 ` [PATCH 15/16] ARM: omap: resolve nebulous 'Error setting wl12xx data' Russell King - ARM Linux
2012-02-08 18:56 ` Tony Lindgren
2012-02-08 16:41 ` [PATCH 16/16] ARM: omap: disable cpuidle for OMAP3 platforms Russell King - ARM Linux
2012-02-08 18:59 ` Tony Lindgren
2012-02-08 22:59 ` Russell King - ARM Linux
2012-02-08 23:09 ` Kevin Hilman
2012-02-08 23:30 ` Kevin Hilman
2012-02-08 19:06 ` [PATCH 00/16] rmk's patch series for fixing OMAP Tony Lindgren
2012-02-08 20:31 ` Florian Tobias Schandinat
2012-02-09 0:53 ` Russell King - ARM Linux
2012-02-09 7:02 ` Tomi Valkeinen
2012-02-09 8:30 ` Teresa Gamez
2012-02-09 10:24 ` Tomi Valkeinen
2012-02-09 18:00 ` [PATCH 01] ARM: omap: fix oops in arch/arm/mach-omap2/vp.c when pmic is not found Russell King - ARM Linux
2012-02-09 18:01 ` [PATCH 05] ARM: omap: fix vc.c PMIC error message Russell King - ARM Linux
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=20120209171830.GH16877@atomide.com \
--to=tony@atomide.com \
--cc=linux-arm-kernel@lists.infradead.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).