From: Steve Sakoman <sakoman@gmail.com> To: "J, KEERTHY" <j-keerthy@ti.com> Cc: lm-sensors@lm-sensors.org, guenter.roeck@ericsson.com, mikko.k.ylinen@nokia.com, amit.kucheria@canonical.com, linux-omap@vger.kernel.org, Samuel Ortiz <sameo@linux.intel.com> Subject: Re: [PATCH 0/2 v5] twl4030-madc driver Date: Wed, 4 May 2011 07:31:58 -0700 [thread overview] Message-ID: <BANLkTik=DkTud2Fj0zNAKPXcr1AVAvPTAg@mail.gmail.com> (raw) In-Reply-To: <BANLkTimyxpfBLUTPUostFjHkCUSW7wzyVA@mail.gmail.com> On Tue, May 3, 2011 at 9:23 PM, J, KEERTHY <j-keerthy@ti.com> wrote: > On Wed, May 4, 2011 at 9:41 AM, Steve Sakoman <sakoman@gmail.com> wrote: >> On Tue, May 3, 2011 at 12:49 PM, J, KEERTHY <j-keerthy@ti.com> wrote: >>> Hello Steve, >>> >>> Can you try adding this patch? >> >> Thanks! >> >> I tried the patch and it did indeed fix the issue. We should try to >> get this in mainline since the hwmon driver won't work without it. >> > > Yes Steve. I am posting a patch today. I've also found that the madc clock needs to be enabled: From: Steve Sakoman <steve@sakoman.com> Date: Sat, 23 Jan 2010 14:26:54 +0000 (-0800) Subject: mfd: twl-core: enable madc clock X-Git-Url: http://www.sakoman.com/cgi-bin/gitweb.cgi?p=linux-omap-2.6.git;a=commitdiff_plain;h=a1f1a1a6420f15e8351a0c5d63a81aa2444874f4 mfd: twl-core: enable madc clock Now that the madc driver has been merged it is also necessary to enable the clock to the madc block Signed-off-by: Steve Sakoman <steve@sakoman.com> --- diff --git a/drivers/mfd/twl-core.c b/drivers/mfd/twl-core.c index d9435e4..9096d7d 100644 --- a/drivers/mfd/twl-core.c +++ b/drivers/mfd/twl-core.c @@ -222,6 +222,11 @@ /* Few power values */ #define R_CFG_BOOT 0x05 +#define R_GPBR1 0x0C + +/* MADC clock values for R_GPBR1 */ +#define MADC_HFCLK_EN 0x80 +#define DEFAULT_MADC_CLK_EN 0x10 /* some fields in R_CFG_BOOT */ #define HFCLK_FREQ_19p2_MHZ (1 << 0) @@ -992,6 +997,9 @@ static void clocks_init(struct device *dev, e |= unprotect_pm_master(); /* effect->MADC+USB ck en */ + if (twl_has_madc()) + e |= twl_i2c_write_u8(TWL_MODULE_INTBR, + MADC_HFCLK_EN | DEFAULT_MADC_CLK_EN, R_GPBR1); e |= twl_i2c_write_u8(TWL_MODULE_PM_MASTER, ctrl, R_CFG_BOOT); e |= protect_pm_master(); diff --git a/include/linux/i2c/twl.h b/include/linux/i2c/twl.h index 0c0d1ae..cbbf3b3 100644 --- a/include/linux/i2c/twl.h +++ b/include/linux/i2c/twl.h @@ -74,6 +74,7 @@ #define TWL_MODULE_USB TWL4030_MODULE_USB #define TWL_MODULE_AUDIO_VOICE TWL4030_MODULE_AUDIO_VOICE +#define TWL_MODULE_INTBR TWL4030_MODULE_INTBR #define TWL_MODULE_PIH TWL4030_MODULE_PIH #define TWL_MODULE_MADC TWL4030_MODULE_MADC #define TWL_MODULE_MAIN_CHARGE TWL4030_MODULE_MAIN_CHARGE I'll submit this patch separately. Steve -- 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
WARNING: multiple messages have this Message-ID (diff)
From: Steve Sakoman <sakoman@gmail.com> To: "J, KEERTHY" <j-keerthy@ti.com> Cc: lm-sensors@lm-sensors.org, guenter.roeck@ericsson.com, mikko.k.ylinen@nokia.com, amit.kucheria@canonical.com, linux-omap@vger.kernel.org, Samuel Ortiz <sameo@linux.intel.com> Subject: Re: [lm-sensors] [PATCH 0/2 v5] twl4030-madc driver Date: Wed, 04 May 2011 14:31:58 +0000 [thread overview] Message-ID: <BANLkTik=DkTud2Fj0zNAKPXcr1AVAvPTAg@mail.gmail.com> (raw) In-Reply-To: <BANLkTimyxpfBLUTPUostFjHkCUSW7wzyVA@mail.gmail.com> On Tue, May 3, 2011 at 9:23 PM, J, KEERTHY <j-keerthy@ti.com> wrote: > On Wed, May 4, 2011 at 9:41 AM, Steve Sakoman <sakoman@gmail.com> wrote: >> On Tue, May 3, 2011 at 12:49 PM, J, KEERTHY <j-keerthy@ti.com> wrote: >>> Hello Steve, >>> >>> Can you try adding this patch? >> >> Thanks! >> >> I tried the patch and it did indeed fix the issue. We should try to >> get this in mainline since the hwmon driver won't work without it. >> > > Yes Steve. I am posting a patch today. I've also found that the madc clock needs to be enabled: From: Steve Sakoman <steve@sakoman.com> Date: Sat, 23 Jan 2010 14:26:54 +0000 (-0800) Subject: mfd: twl-core: enable madc clock X-Git-Url: http://www.sakoman.com/cgi-bin/gitweb.cgi?p=linux-omap-2.6.git;a=commitdiff_plain;h¡f1a1a6420f15e8351a0c5d63a81aa2444874f4 mfd: twl-core: enable madc clock Now that the madc driver has been merged it is also necessary to enable the clock to the madc block Signed-off-by: Steve Sakoman <steve@sakoman.com> --- diff --git a/drivers/mfd/twl-core.c b/drivers/mfd/twl-core.c index d9435e4..9096d7d 100644 --- a/drivers/mfd/twl-core.c +++ b/drivers/mfd/twl-core.c @@ -222,6 +222,11 @@ /* Few power values */ #define R_CFG_BOOT 0x05 +#define R_GPBR1 0x0C + +/* MADC clock values for R_GPBR1 */ +#define MADC_HFCLK_EN 0x80 +#define DEFAULT_MADC_CLK_EN 0x10 /* some fields in R_CFG_BOOT */ #define HFCLK_FREQ_19p2_MHZ (1 << 0) @@ -992,6 +997,9 @@ static void clocks_init(struct device *dev, e |= unprotect_pm_master(); /* effect->MADC+USB ck en */ + if (twl_has_madc()) + e |= twl_i2c_write_u8(TWL_MODULE_INTBR, + MADC_HFCLK_EN | DEFAULT_MADC_CLK_EN, R_GPBR1); e |= twl_i2c_write_u8(TWL_MODULE_PM_MASTER, ctrl, R_CFG_BOOT); e |= protect_pm_master(); diff --git a/include/linux/i2c/twl.h b/include/linux/i2c/twl.h index 0c0d1ae..cbbf3b3 100644 --- a/include/linux/i2c/twl.h +++ b/include/linux/i2c/twl.h @@ -74,6 +74,7 @@ #define TWL_MODULE_USB TWL4030_MODULE_USB #define TWL_MODULE_AUDIO_VOICE TWL4030_MODULE_AUDIO_VOICE +#define TWL_MODULE_INTBR TWL4030_MODULE_INTBR #define TWL_MODULE_PIH TWL4030_MODULE_PIH #define TWL_MODULE_MADC TWL4030_MODULE_MADC #define TWL_MODULE_MAIN_CHARGE TWL4030_MODULE_MAIN_CHARGE I'll submit this patch separately. Steve _______________________________________________ lm-sensors mailing list lm-sensors@lm-sensors.org http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
next prev parent reply other threads:[~2011-05-04 14:32 UTC|newest] Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top 2011-03-01 13:42 [PATCH 0/2 v5] twl4030-madc driver Keerthy 2011-03-01 13:54 ` [lm-sensors] " Keerthy 2011-03-02 10:15 ` Samuel Ortiz 2011-03-02 10:15 ` [lm-sensors] " Samuel Ortiz 2011-05-03 15:14 ` Steve Sakoman 2011-05-03 15:14 ` [lm-sensors] " Steve Sakoman 2011-05-03 19:49 ` J, KEERTHY 2011-05-03 19:51 ` [lm-sensors] " J, KEERTHY 2011-05-04 4:11 ` Steve Sakoman 2011-05-04 4:11 ` [lm-sensors] " Steve Sakoman 2011-05-04 4:23 ` J, KEERTHY 2011-05-04 4:35 ` [lm-sensors] " J, KEERTHY 2011-05-04 14:31 ` Steve Sakoman [this message] 2011-05-04 14:31 ` Steve Sakoman
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='BANLkTik=DkTud2Fj0zNAKPXcr1AVAvPTAg@mail.gmail.com' \ --to=sakoman@gmail.com \ --cc=amit.kucheria@canonical.com \ --cc=guenter.roeck@ericsson.com \ --cc=j-keerthy@ti.com \ --cc=linux-omap@vger.kernel.org \ --cc=lm-sensors@lm-sensors.org \ --cc=mikko.k.ylinen@nokia.com \ --cc=sameo@linux.intel.com \ /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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.