linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATH] Fix ies/smt and register irq fail bug.
@ 2015-05-27  9:43 Hongzhou Yang
  2015-05-27  9:43 ` [PATCH 1/2] pinctrl: mediatek: Fix bug of ies/smt setting for mt8173 Hongzhou Yang
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Hongzhou Yang @ 2015-05-27  9:43 UTC (permalink / raw)
  To: Linus Walleij, Matthias Brugger
  Cc: Hongzhou Yang, Yingjoe Chen, Chaotian Jing, Fabian Frederick,
	Axel Lin, Maoguang Meng, linux-gpio, linux-kernel,
	linux-arm-kernel, linux-mediatek, srv_heupstream, Sascha Hauer,
	eddie.huang, dandan.he

Hi Linus,
After integration test, we found some bugs in the code you just merged.
The first is that I missed ies/smt configuration for MSDC3.
The seconed is the if judgement for "interrupt-controller" I added last
time should on the contrary. So adding these two patches to fix them.
Sorry about this. And please help to merge them, many thanks.

These patches include below changes:
- Adding MSDC3 ies/smt support for mt8173.
- Since mt6397 is no need to support interrupt controller,
I judged "interrupt-controller" property to skip it last time,
but the if judgement should on the contrary, this is a bug.
so adding this patch to fix it. 
 
Hongzhou Yang (2):
  pinctrl: mediatek: Fix bug of ies/smt setting for mt8173.
  pinctrl: mediatek: Fix pinctrl register irq fail bug.

 drivers/pinctrl/mediatek/pinctrl-mt8173.c     |   10 +++++++++-
 drivers/pinctrl/mediatek/pinctrl-mtk-common.c |    4 ++--
 2 files changed, 11 insertions(+), 3 deletions(-)

--
1.7.9.5



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

* [PATCH 1/2] pinctrl: mediatek: Fix bug of ies/smt setting for mt8173.
  2015-05-27  9:43 [PATH] Fix ies/smt and register irq fail bug Hongzhou Yang
@ 2015-05-27  9:43 ` Hongzhou Yang
  2015-06-02  9:07   ` Linus Walleij
  2015-05-27  9:43 ` [PATCH 2/2] pinctrl: mediatek: Fix pinctrl register irq fail bug Hongzhou Yang
  2015-06-02  2:34 ` [PATH] Fix ies/smt and " Hongzhou Yang
  2 siblings, 1 reply; 7+ messages in thread
From: Hongzhou Yang @ 2015-05-27  9:43 UTC (permalink / raw)
  To: Linus Walleij, Matthias Brugger
  Cc: Hongzhou Yang, Yingjoe Chen, Chaotian Jing, Fabian Frederick,
	Axel Lin, Maoguang Meng, linux-gpio, linux-kernel,
	linux-arm-kernel, linux-mediatek, srv_heupstream, Sascha Hauer,
	eddie.huang, dandan.he

Add ies/smt support for MSDC3.
Also fix ies bug for pin 106 and 107.

Signed-off-by: Hongzhou Yang <hongzhou.yang@mediatek.com>
---
 drivers/pinctrl/mediatek/pinctrl-mt8173.c |   10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/drivers/pinctrl/mediatek/pinctrl-mt8173.c b/drivers/pinctrl/mediatek/pinctrl-mt8173.c
index cf4ed6e..d0c811d 100644
--- a/drivers/pinctrl/mediatek/pinctrl-mt8173.c
+++ b/drivers/pinctrl/mediatek/pinctrl-mt8173.c
@@ -84,6 +84,10 @@ static const struct mtk_pin_ies_smt_set mt8173_smt_set[] = {
 	MTK_PIN_IES_SMT_SPEC(16, 16, 0x930, 0),
 	MTK_PIN_IES_SMT_SPEC(17, 17, 0x950, 2),
 	MTK_PIN_IES_SMT_SPEC(18, 21, 0x940, 3),
+	MTK_PIN_IES_SMT_SPEC(22, 25, 0xce0, 13),
+	MTK_PIN_IES_SMT_SPEC(26, 26, 0xcc0, 13),
+	MTK_PIN_IES_SMT_SPEC(27, 27, 0xcd0, 13),
+	MTK_PIN_IES_SMT_SPEC(28, 28, 0xd70, 13),
 	MTK_PIN_IES_SMT_SPEC(29, 32, 0x930, 3),
 	MTK_PIN_IES_SMT_SPEC(33, 33, 0x930, 4),
 	MTK_PIN_IES_SMT_SPEC(34, 36, 0x930, 5),
@@ -133,6 +137,10 @@ static const struct mtk_pin_ies_smt_set mt8173_ies_set[] = {
 	MTK_PIN_IES_SMT_SPEC(16, 16, 0x900, 0),
 	MTK_PIN_IES_SMT_SPEC(17, 17, 0x920, 2),
 	MTK_PIN_IES_SMT_SPEC(18, 21, 0x910, 3),
+	MTK_PIN_IES_SMT_SPEC(22, 25, 0xce0, 14),
+	MTK_PIN_IES_SMT_SPEC(26, 26, 0xcc0, 14),
+	MTK_PIN_IES_SMT_SPEC(27, 27, 0xcd0, 14),
+	MTK_PIN_IES_SMT_SPEC(28, 28, 0xd70, 14),
 	MTK_PIN_IES_SMT_SPEC(29, 32, 0x900, 3),
 	MTK_PIN_IES_SMT_SPEC(33, 33, 0x900, 4),
 	MTK_PIN_IES_SMT_SPEC(34, 36, 0x900, 5),
@@ -161,7 +169,7 @@ static const struct mtk_pin_ies_smt_set mt8173_ies_set[] = {
 	MTK_PIN_IES_SMT_SPEC(100, 103, 0xca0, 14),
 	MTK_PIN_IES_SMT_SPEC(104, 104, 0xc80, 14),
 	MTK_PIN_IES_SMT_SPEC(105, 105, 0xc90, 14),
-	MTK_PIN_IES_SMT_SPEC(106, 107, 0x91, 4),
+	MTK_PIN_IES_SMT_SPEC(106, 107, 0x910, 4),
 	MTK_PIN_IES_SMT_SPEC(108, 112, 0x910, 1),
 	MTK_PIN_IES_SMT_SPEC(113, 116, 0x910, 2),
 	MTK_PIN_IES_SMT_SPEC(117, 118, 0x910, 5),
-- 
1.7.9.5


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

* [PATCH 2/2] pinctrl: mediatek: Fix pinctrl register irq fail bug.
  2015-05-27  9:43 [PATH] Fix ies/smt and register irq fail bug Hongzhou Yang
  2015-05-27  9:43 ` [PATCH 1/2] pinctrl: mediatek: Fix bug of ies/smt setting for mt8173 Hongzhou Yang
@ 2015-05-27  9:43 ` Hongzhou Yang
  2015-05-28  1:11   ` Axel Lin
  2015-06-02  9:08   ` Linus Walleij
  2015-06-02  2:34 ` [PATH] Fix ies/smt and " Hongzhou Yang
  2 siblings, 2 replies; 7+ messages in thread
From: Hongzhou Yang @ 2015-05-27  9:43 UTC (permalink / raw)
  To: Linus Walleij, Matthias Brugger
  Cc: Hongzhou Yang, Yingjoe Chen, Chaotian Jing, Fabian Frederick,
	Axel Lin, Maoguang Meng, linux-gpio, linux-kernel,
	linux-arm-kernel, linux-mediatek, srv_heupstream, Sascha Hauer,
	eddie.huang, dandan.he

Since mt6397 is no need to support interrupt controller,
I judged "interrupt-controller" property to skip it last patch.
But the if judgement should on the contrary, this is a bug.

And find of_property_read_bool is better for this case.
So using of_property_read_bool instead of of_find_property.

Also fix bug of misuse pointer.

Signed-off-by: Hongzhou Yang <hongzhou.yang@mediatek.com>
---
 drivers/pinctrl/mediatek/pinctrl-mtk-common.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/pinctrl/mediatek/pinctrl-mtk-common.c b/drivers/pinctrl/mediatek/pinctrl-mtk-common.c
index cd22729..f206a54 100644
--- a/drivers/pinctrl/mediatek/pinctrl-mtk-common.c
+++ b/drivers/pinctrl/mediatek/pinctrl-mtk-common.c
@@ -1280,7 +1280,7 @@ int mtk_pctrl_init(struct platform_device *pdev,
 		goto pctrl_error;
 	}
 
-	pctl->chip = &mtk_gpio_chip;
+	*pctl->chip = mtk_gpio_chip;
 	pctl->chip->ngpio = pctl->devdata->npins;
 	pctl->chip->label = dev_name(&pdev->dev);
 	pctl->chip->dev = &pdev->dev;
@@ -1300,7 +1300,7 @@ int mtk_pctrl_init(struct platform_device *pdev,
 		goto chip_error;
 	}
 
-	if (of_find_property(np, "interrupt-controller", NULL))
+	if (!of_property_read_bool(np, "interrupt-controller"))
 		return 0;
 
 	/* Get EINT register base from dts. */
-- 
1.7.9.5


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

* Re: [PATCH 2/2] pinctrl: mediatek: Fix pinctrl register irq fail bug.
  2015-05-27  9:43 ` [PATCH 2/2] pinctrl: mediatek: Fix pinctrl register irq fail bug Hongzhou Yang
@ 2015-05-28  1:11   ` Axel Lin
  2015-06-02  9:08   ` Linus Walleij
  1 sibling, 0 replies; 7+ messages in thread
From: Axel Lin @ 2015-05-28  1:11 UTC (permalink / raw)
  To: Hongzhou Yang
  Cc: Linus Walleij, Matthias Brugger, Yingjoe Chen, Chaotian Jing,
	Fabian Frederick, Maoguang Meng, linux-gpio, linux-kernel,
	linux-arm-kernel, linux-mediatek, srv_heupstream, Sascha Hauer,
	eddie.huang, dandan.he

2015-05-27 17:43 GMT+08:00 Hongzhou Yang <hongzhou.yang@mediatek.com>:
> Since mt6397 is no need to support interrupt controller,
> I judged "interrupt-controller" property to skip it last patch.
> But the if judgement should on the contrary, this is a bug.
>
> And find of_property_read_bool is better for this case.
> So using of_property_read_bool instead of of_find_property.
>
> Also fix bug of misuse pointer.
>
> Signed-off-by: Hongzhou Yang <hongzhou.yang@mediatek.com>
Reviewed-by: Axel Lin <axel.lin@ingics.com>

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

* Re: [PATH] Fix ies/smt and register irq fail bug.
  2015-05-27  9:43 [PATH] Fix ies/smt and register irq fail bug Hongzhou Yang
  2015-05-27  9:43 ` [PATCH 1/2] pinctrl: mediatek: Fix bug of ies/smt setting for mt8173 Hongzhou Yang
  2015-05-27  9:43 ` [PATCH 2/2] pinctrl: mediatek: Fix pinctrl register irq fail bug Hongzhou Yang
@ 2015-06-02  2:34 ` Hongzhou Yang
  2 siblings, 0 replies; 7+ messages in thread
From: Hongzhou Yang @ 2015-06-02  2:34 UTC (permalink / raw)
  To: Linus Walleij
  Cc: Matthias Brugger, Yingjoe Chen, Chaotian Jing, Fabian Frederick,
	Axel Lin, Maoguang Meng, linux-gpio, linux-kernel,
	linux-arm-kernel, linux-mediatek, srv_heupstream, Sascha Hauer,
	eddie.huang, dandan.he

On Wed, 2015-05-27 at 02:43 -0700, Hongzhou Yang wrote:
> Hi Linus,
> After integration test, we found some bugs in the code you just merged.
> The first is that I missed ies/smt configuration for MSDC3.
> The seconed is the if judgement for "interrupt-controller" I added last
> time should on the contrary. So adding these two patches to fix them.
> Sorry about this. And please help to merge them, many thanks.
> 
> These patches include below changes:
> - Adding MSDC3 ies/smt support for mt8173.
> - Since mt6397 is no need to support interrupt controller,
> I judged "interrupt-controller" property to skip it last time,
> but the if judgement should on the contrary, this is a bug.
> so adding this patch to fix it. 
>  
> Hongzhou Yang (2):
>   pinctrl: mediatek: Fix bug of ies/smt setting for mt8173.
>   pinctrl: mediatek: Fix pinctrl register irq fail bug.
> 
>  drivers/pinctrl/mediatek/pinctrl-mt8173.c     |   10 +++++++++-
>  drivers/pinctrl/mediatek/pinctrl-mtk-common.c |    4 ++--
>  2 files changed, 11 insertions(+), 3 deletions(-)
> 
> --
> 1.7.9.5
> 

Hi Linus,

Do you have any suggestion about these two patches?
Since we can't boot up device without these two patches, could
you please help to merge them?
Thank you very much.

Yours,
Hongzhou




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

* Re: [PATCH 1/2] pinctrl: mediatek: Fix bug of ies/smt setting for mt8173.
  2015-05-27  9:43 ` [PATCH 1/2] pinctrl: mediatek: Fix bug of ies/smt setting for mt8173 Hongzhou Yang
@ 2015-06-02  9:07   ` Linus Walleij
  0 siblings, 0 replies; 7+ messages in thread
From: Linus Walleij @ 2015-06-02  9:07 UTC (permalink / raw)
  To: Hongzhou Yang
  Cc: Matthias Brugger, Yingjoe Chen, Chaotian Jing, Fabian Frederick,
	Axel Lin, Maoguang Meng, linux-gpio, linux-kernel,
	linux-arm-kernel, linux-mediatek, srv_heupstream, Sascha Hauer,
	huang eddie, dandan.he

On Wed, May 27, 2015 at 11:43 AM, Hongzhou Yang
<hongzhou.yang@mediatek.com> wrote:

> Add ies/smt support for MSDC3.
> Also fix ies bug for pin 106 and 107.
>
> Signed-off-by: Hongzhou Yang <hongzhou.yang@mediatek.com>

Patch applied.

Yours,
Linus Walleij

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

* Re: [PATCH 2/2] pinctrl: mediatek: Fix pinctrl register irq fail bug.
  2015-05-27  9:43 ` [PATCH 2/2] pinctrl: mediatek: Fix pinctrl register irq fail bug Hongzhou Yang
  2015-05-28  1:11   ` Axel Lin
@ 2015-06-02  9:08   ` Linus Walleij
  1 sibling, 0 replies; 7+ messages in thread
From: Linus Walleij @ 2015-06-02  9:08 UTC (permalink / raw)
  To: Hongzhou Yang
  Cc: Matthias Brugger, Yingjoe Chen, Chaotian Jing, Fabian Frederick,
	Axel Lin, Maoguang Meng, linux-gpio, linux-kernel,
	linux-arm-kernel, linux-mediatek, srv_heupstream, Sascha Hauer,
	huang eddie, dandan.he

On Wed, May 27, 2015 at 11:43 AM, Hongzhou Yang
<hongzhou.yang@mediatek.com> wrote:

> Since mt6397 is no need to support interrupt controller,
> I judged "interrupt-controller" property to skip it last patch.
> But the if judgement should on the contrary, this is a bug.
>
> And find of_property_read_bool is better for this case.
> So using of_property_read_bool instead of of_find_property.
>
> Also fix bug of misuse pointer.
>
> Signed-off-by: Hongzhou Yang <hongzhou.yang@mediatek.com>

Patch applied with Axel's review tag.

Yours,
Linus Walleij

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

end of thread, other threads:[~2015-06-02  9:09 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-27  9:43 [PATH] Fix ies/smt and register irq fail bug Hongzhou Yang
2015-05-27  9:43 ` [PATCH 1/2] pinctrl: mediatek: Fix bug of ies/smt setting for mt8173 Hongzhou Yang
2015-06-02  9:07   ` Linus Walleij
2015-05-27  9:43 ` [PATCH 2/2] pinctrl: mediatek: Fix pinctrl register irq fail bug Hongzhou Yang
2015-05-28  1:11   ` Axel Lin
2015-06-02  9:08   ` Linus Walleij
2015-06-02  2:34 ` [PATH] Fix ies/smt and " Hongzhou Yang

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).