* [PATCH] mfd: fix TWL4030 COR bit polarity for BCI SIH block
@ 2010-09-28 13:22 Grazvydas Ignotas
2010-10-05 15:52 ` Tony Lindgren
2010-10-18 23:37 ` Samuel Ortiz
0 siblings, 2 replies; 3+ messages in thread
From: Grazvydas Ignotas @ 2010-09-28 13:22 UTC (permalink / raw)
To: Samuel Ortiz; +Cc: linux-omap, David Brownell, Grazvydas Ignotas
The chip TRM documentation contradicts itself about this bit, page 174
of swcu050e says bit should be 0 for clear-on-read behavior, while
page 487 says it should be 1. Testing shows it should be 1, so set
the .set_cor flag accordingly. This is needed for upcoming BCI
charging driver to function.
Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
---
drivers/mfd/twl4030-irq.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/mfd/twl4030-irq.c b/drivers/mfd/twl4030-irq.c
index 097f24d..5b5a559 100644
--- a/drivers/mfd/twl4030-irq.c
+++ b/drivers/mfd/twl4030-irq.c
@@ -144,6 +144,7 @@ static const struct sih sih_modules_twl4030[6] = {
.name = "bci",
.module = TWL4030_MODULE_INTERRUPTS,
.control_offset = TWL4030_INTERRUPTS_BCISIHCTRL,
+ .set_cor = true,
.bits = 12,
.bytes_ixr = 2,
.edr_offset = TWL4030_INTERRUPTS_BCIEDR1,
@@ -408,7 +409,7 @@ static int twl4030_init_sih_modules(unsigned line)
* set Clear-On-Read (COR) bit.
*
* NOTE that sometimes COR polarity is documented as being
- * inverted: for MADC and BCI, COR=1 means "clear on write".
+ * inverted: for MADC, COR=1 means "clear on write".
* And for PWR_INT it's not documented...
*/
if (sih->set_cor) {
--
1.6.3.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] mfd: fix TWL4030 COR bit polarity for BCI SIH block
2010-09-28 13:22 [PATCH] mfd: fix TWL4030 COR bit polarity for BCI SIH block Grazvydas Ignotas
@ 2010-10-05 15:52 ` Tony Lindgren
2010-10-18 23:37 ` Samuel Ortiz
1 sibling, 0 replies; 3+ messages in thread
From: Tony Lindgren @ 2010-10-05 15:52 UTC (permalink / raw)
To: Grazvydas Ignotas; +Cc: Samuel Ortiz, linux-omap, David Brownell
* Grazvydas Ignotas <notasas@gmail.com> [100928 06:14]:
> The chip TRM documentation contradicts itself about this bit, page 174
> of swcu050e says bit should be 0 for clear-on-read behavior, while
> page 487 says it should be 1. Testing shows it should be 1, so set
> the .set_cor flag accordingly. This is needed for upcoming BCI
> charging driver to function.
>
> Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Acked-by: Tony Lindgren <tony@atomide.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] mfd: fix TWL4030 COR bit polarity for BCI SIH block
2010-09-28 13:22 [PATCH] mfd: fix TWL4030 COR bit polarity for BCI SIH block Grazvydas Ignotas
2010-10-05 15:52 ` Tony Lindgren
@ 2010-10-18 23:37 ` Samuel Ortiz
1 sibling, 0 replies; 3+ messages in thread
From: Samuel Ortiz @ 2010-10-18 23:37 UTC (permalink / raw)
To: Grazvydas Ignotas; +Cc: linux-omap, David Brownell
Hi Grazvydas,
On Tue, Sep 28, 2010 at 04:22:19PM +0300, Grazvydas Ignotas wrote:
> The chip TRM documentation contradicts itself about this bit, page 174
> of swcu050e says bit should be 0 for clear-on-read behavior, while
> page 487 says it should be 1. Testing shows it should be 1, so set
> the .set_cor flag accordingly. This is needed for upcoming BCI
> charging driver to function.
Patch applied, thanks.
Cheers,
Samuel.
> Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
> ---
> drivers/mfd/twl4030-irq.c | 3 ++-
> 1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/mfd/twl4030-irq.c b/drivers/mfd/twl4030-irq.c
> index 097f24d..5b5a559 100644
> --- a/drivers/mfd/twl4030-irq.c
> +++ b/drivers/mfd/twl4030-irq.c
> @@ -144,6 +144,7 @@ static const struct sih sih_modules_twl4030[6] = {
> .name = "bci",
> .module = TWL4030_MODULE_INTERRUPTS,
> .control_offset = TWL4030_INTERRUPTS_BCISIHCTRL,
> + .set_cor = true,
> .bits = 12,
> .bytes_ixr = 2,
> .edr_offset = TWL4030_INTERRUPTS_BCIEDR1,
> @@ -408,7 +409,7 @@ static int twl4030_init_sih_modules(unsigned line)
> * set Clear-On-Read (COR) bit.
> *
> * NOTE that sometimes COR polarity is documented as being
> - * inverted: for MADC and BCI, COR=1 means "clear on write".
> + * inverted: for MADC, COR=1 means "clear on write".
> * And for PWR_INT it's not documented...
> */
> if (sih->set_cor) {
> --
> 1.6.3.3
>
--
Intel Open Source Technology Centre
http://oss.intel.com/
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-10-18 23:38 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-28 13:22 [PATCH] mfd: fix TWL4030 COR bit polarity for BCI SIH block Grazvydas Ignotas
2010-10-05 15:52 ` Tony Lindgren
2010-10-18 23:37 ` Samuel Ortiz
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).