diff mbox

[v4,00/88] PFC pinctrl functions for sh7372, sh73a0, r8a7740 and r8a7779

Message ID 2240978.MXCESHIJiU@avalon (mailing list archive)
State Accepted
Headers show

Commit Message

Laurent Pinchart March 14, 2013, 12:54 p.m. UTC
Hi Simon,

On Thursday 14 March 2013 10:46:55 Simon Horman wrote:

[snip]

> I am seeing (a hopefully minor) problem which is using the defconfigs for
> the armadillo800eva I see:
> 
> fbdev-laurent
> 
> I believe this applies at least to all the other arm-based boards too.
> 
> drivers/built-in.o:(.rodata+0xa4): undefined reference to
> `pinconf_generic_dump_config'
> 
> It seems like some Kconfig updates might be in order.

I see two ways to fix this but I'm not sure which one is best. The first one
handles the issue in the pinctrl core:


Linus, what's your opinion?

Comments

Linus Walleij March 14, 2013, 1:31 p.m. UTC | #1
On Thu, Mar 14, 2013 at 1:54 PM, Laurent Pinchart
<laurent.pinchart@ideasonboard.com> wrote:

>> It seems like some Kconfig updates might be in order.
>
> I see two ways to fix this but I'm not sure which one is best. The first one
> handles the issue in the pinctrl core:

And that is what we want to do.

> -#ifdef CONFIG_GENERIC_PINCONF
> +#if defined(CONFIG_GENERIC_PINCONF) && defined (CONFIG_DEBUG_FS)

I merged a patch like this only yesterday to my fixes branch.

commit bf4d7be57ba9040347065f48a60f895a254f6e28
Author: Sachin Kamat <sachin.kamat@linaro.org>
Date:   Wed Mar 13 17:13:46 2013 +0530
pinctrl: generic: Fix compilation error

> @@ -365,7 +365,9 @@ static const struct pinconf_ops sh_pfc_pinconf_ops = {
>         .pin_config_get                 = sh_pfc_pinconf_get,
>         .pin_config_set                 = sh_pfc_pinconf_set,
>         .pin_config_group_set           = sh_pfc_pinconf_group_set,
> +#ifdef CONFIG_DEBUG_FS
>         .pin_config_config_dbg_show     = pinconf_generic_dump_config,
> +#endif
>  };

Is that necessary? Well it makes it harder to do the wrong thing...

Can you send a separate patch like this?

Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-sh" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Laurent Pinchart March 14, 2013, 1:39 p.m. UTC | #2
Hi Linus,

On Thursday 14 March 2013 14:31:09 Linus Walleij wrote:
> On Thu, Mar 14, 2013 at 1:54 PM, Laurent Pinchart wrote:
> >> It seems like some Kconfig updates might be in order.
> > 
> > I see two ways to fix this but I'm not sure which one is best. The first
> > one handles the issue in the pinctrl core:
>
> And that is what we want to do.
> 
> > -#ifdef CONFIG_GENERIC_PINCONF
> > +#if defined(CONFIG_GENERIC_PINCONF) && defined (CONFIG_DEBUG_FS)
> 
> I merged a patch like this only yesterday to my fixes branch.
> 
> commit bf4d7be57ba9040347065f48a60f895a254f6e28
> Author: Sachin Kamat <sachin.kamat@linaro.org>
> Date:   Wed Mar 13 17:13:46 2013 +0530
> pinctrl: generic: Fix compilation error

Great, thank you. Is that patch present in a stable branch that Simon could 
merge ?

> > @@ -365,7 +365,9 @@ static const struct pinconf_ops sh_pfc_pinconf_ops = {
> >         .pin_config_get                 = sh_pfc_pinconf_get,
> >         .pin_config_set                 = sh_pfc_pinconf_set,
> >         .pin_config_group_set           = sh_pfc_pinconf_group_set,
> > +#ifdef CONFIG_DEBUG_FS
> >         .pin_config_config_dbg_show     = pinconf_generic_dump_config,
> > +#endif
> > 
> >  };
> 
> Is that necessary? Well it makes it harder to do the wrong thing...
> 
> Can you send a separate patch like this?

With the above patch merged in your tree no modification to sh-pfc is needed 
anymore.
Linus Walleij March 14, 2013, 1:55 p.m. UTC | #3
On Thu, Mar 14, 2013 at 2:39 PM, Laurent Pinchart
<laurent.pinchart@ideasonboard.com> wrote:
> [Me]
>> I merged a patch like this only yesterday to my fixes branch.
>>
>> commit bf4d7be57ba9040347065f48a60f895a254f6e28
>> Author: Sachin Kamat <sachin.kamat@linaro.org>
>> Date:   Wed Mar 13 17:13:46 2013 +0530
>> pinctrl: generic: Fix compilation error
>
> Great, thank you. Is that patch present in a stable branch that Simon could
> merge ?

Yes the fixes branch in the pinctrl tree.

>> > @@ -365,7 +365,9 @@ static const struct pinconf_ops sh_pfc_pinconf_ops = {
>> >         .pin_config_get                 = sh_pfc_pinconf_get,
>> >         .pin_config_set                 = sh_pfc_pinconf_set,
>> >         .pin_config_group_set           = sh_pfc_pinconf_group_set,
>> > +#ifdef CONFIG_DEBUG_FS
>> >         .pin_config_config_dbg_show     = pinconf_generic_dump_config,
>> > +#endif
>> >
>> >  };
>>
>> Is that necessary? Well it makes it harder to do the wrong thing...
>>
>> Can you send a separate patch like this?
>
> With the above patch merged in your tree no modification to sh-pfc is needed
> anymore.

Which one? The one I already merge or the snippet right here
#ifdef:ing around the dbg_show thing?

Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-sh" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Laurent Pinchart March 14, 2013, 2:01 p.m. UTC | #4
On Thursday 14 March 2013 14:55:00 Linus Walleij wrote:
> On Thu, Mar 14, 2013 at 2:39 PM, Laurent Pinchart wrote:
> > [Me]
> > 
> >> I merged a patch like this only yesterday to my fixes branch.
> >> 
> >> commit bf4d7be57ba9040347065f48a60f895a254f6e28
> >> Author: Sachin Kamat <sachin.kamat@linaro.org>
> >> Date:   Wed Mar 13 17:13:46 2013 +0530
> >> pinctrl: generic: Fix compilation error
> > 
> > Great, thank you. Is that patch present in a stable branch that Simon
> > could merge ?
> 
> Yes the fixes branch in the pinctrl tree.

Thank you. Simon, it looks like we'll need another rebase :-/ Could you please 
merge that branch into your tree and give me the name of the resulting branch 
on which I'll rebase the PFC patches ?

> >> > @@ -365,7 +365,9 @@ static const struct pinconf_ops sh_pfc_pinconf_ops
> >> > = {
> >> > 
> >> >         .pin_config_get                 = sh_pfc_pinconf_get,
> >> >         .pin_config_set                 = sh_pfc_pinconf_set,
> >> >         .pin_config_group_set           = sh_pfc_pinconf_group_set,
> >> > 
> >> > +#ifdef CONFIG_DEBUG_FS
> >> > 
> >> >         .pin_config_config_dbg_show     = pinconf_generic_dump_config,
> >> > 
> >> > +#endif
> >> > 
> >> >  };
> >> 
> >> Is that necessary? Well it makes it harder to do the wrong thing...
> >> 
> >> Can you send a separate patch like this?
> > 
> > With the above patch merged in your tree no modification to sh-pfc is
> > needed anymore.
> 
> Which one? The one I already merge or the snippet right here
> #ifdef:ing around the dbg_show thing?

The one you have already merged, sorry.
Simon Horman March 15, 2013, 6:25 a.m. UTC | #5
On Thu, Mar 14, 2013 at 03:01:48PM +0100, Laurent Pinchart wrote:
> On Thursday 14 March 2013 14:55:00 Linus Walleij wrote:
> > On Thu, Mar 14, 2013 at 2:39 PM, Laurent Pinchart wrote:
> > > [Me]
> > > 
> > >> I merged a patch like this only yesterday to my fixes branch.
> > >> 
> > >> commit bf4d7be57ba9040347065f48a60f895a254f6e28
> > >> Author: Sachin Kamat <sachin.kamat@linaro.org>
> > >> Date:   Wed Mar 13 17:13:46 2013 +0530
> > >> pinctrl: generic: Fix compilation error
> > > 
> > > Great, thank you. Is that patch present in a stable branch that Simon
> > > could merge ?
> > 
> > Yes the fixes branch in the pinctrl tree.
> 
> Thank you. Simon, it looks like we'll need another rebase :-/ Could you please 
> merge that branch into your tree and give me the name of the resulting branch 
> on which I'll rebase the PFC patches ?

Sure, I have merged Linus's fixes branch into pinmux-base in the renesas
tree and pushed it to kernel.org. It should be there in a few minutes.
For reference the head commit is:

commit 47f4e0c1c87f34bf1fc74b8935a37d229a147946
Merge: a9324f6 bf4d7be
Author: Simon Horman <horms+renesas@verge.net.au>
Date:   Fri Mar 15 07:16:28 2013 +0100

    Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl into pinmux-base

> > >> > @@ -365,7 +365,9 @@ static const struct pinconf_ops sh_pfc_pinconf_ops
> > >> > = {
> > >> > 
> > >> >         .pin_config_get                 = sh_pfc_pinconf_get,
> > >> >         .pin_config_set                 = sh_pfc_pinconf_set,
> > >> >         .pin_config_group_set           = sh_pfc_pinconf_group_set,
> > >> > 
> > >> > +#ifdef CONFIG_DEBUG_FS
> > >> > 
> > >> >         .pin_config_config_dbg_show     = pinconf_generic_dump_config,
> > >> > 
> > >> > +#endif
> > >> > 
> > >> >  };
> > >> 
> > >> Is that necessary? Well it makes it harder to do the wrong thing...
> > >> 
> > >> Can you send a separate patch like this?
> > > 
> > > With the above patch merged in your tree no modification to sh-pfc is
> > > needed anymore.
> > 
> > Which one? The one I already merge or the snippet right here
> > #ifdef:ing around the dbg_show thing?
> 
> The one you have already merged, sorry.
> 
> -- 
> Regards,
> 
> Laurent Pinchart
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-sh" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-sh" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Laurent Pinchart March 15, 2013, 12:35 p.m. UTC | #6
Hi Simon,

On Friday 15 March 2013 07:25:28 Simon Horman wrote:
> On Thu, Mar 14, 2013 at 03:01:48PM +0100, Laurent Pinchart wrote:
> > On Thursday 14 March 2013 14:55:00 Linus Walleij wrote:
> > > On Thu, Mar 14, 2013 at 2:39 PM, Laurent Pinchart wrote:
> > > > [Me]
> > > > 
> > > >> I merged a patch like this only yesterday to my fixes branch.
> > > >> 
> > > >> commit bf4d7be57ba9040347065f48a60f895a254f6e28
> > > >> Author: Sachin Kamat <sachin.kamat@linaro.org>
> > > >> Date:   Wed Mar 13 17:13:46 2013 +0530
> > > >> pinctrl: generic: Fix compilation error
> > > > 
> > > > Great, thank you. Is that patch present in a stable branch that Simon
> > > > could merge ?
> > > 
> > > Yes the fixes branch in the pinctrl tree.
> > 
> > Thank you. Simon, it looks like we'll need another rebase :-/ Could you
> > please merge that branch into your tree and give me the name of the
> > resulting branch on which I'll rebase the PFC patches ?
> 
> Sure, I have merged Linus's fixes branch into pinmux-base in the renesas
> tree and pushed it to kernel.org. It should be there in a few minutes.
> For reference the head commit is:
> 
> commit 47f4e0c1c87f34bf1fc74b8935a37d229a147946
> Merge: a9324f6 bf4d7be
> Author: Simon Horman <horms+renesas@verge.net.au>
> Date:   Fri Mar 15 07:16:28 2013 +0100
> 
>     Merge branch 'fixes' of
> git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl into
> pinmux-base

Thank you. I've rebased my branches on top of that and pushed the result to

	git://linuxtv.org/pinchartl/fbdev.git
Simon Horman March 15, 2013, 3:37 p.m. UTC | #7
On Fri, Mar 15, 2013 at 01:35:47PM +0100, Laurent Pinchart wrote:
> Hi Simon,
> 
> On Friday 15 March 2013 07:25:28 Simon Horman wrote:
> > On Thu, Mar 14, 2013 at 03:01:48PM +0100, Laurent Pinchart wrote:
> > > On Thursday 14 March 2013 14:55:00 Linus Walleij wrote:
> > > > On Thu, Mar 14, 2013 at 2:39 PM, Laurent Pinchart wrote:
> > > > > [Me]
> > > > > 
> > > > >> I merged a patch like this only yesterday to my fixes branch.
> > > > >> 
> > > > >> commit bf4d7be57ba9040347065f48a60f895a254f6e28
> > > > >> Author: Sachin Kamat <sachin.kamat@linaro.org>
> > > > >> Date:   Wed Mar 13 17:13:46 2013 +0530
> > > > >> pinctrl: generic: Fix compilation error
> > > > > 
> > > > > Great, thank you. Is that patch present in a stable branch that Simon
> > > > > could merge ?
> > > > 
> > > > Yes the fixes branch in the pinctrl tree.
> > > 
> > > Thank you. Simon, it looks like we'll need another rebase :-/ Could you
> > > please merge that branch into your tree and give me the name of the
> > > resulting branch on which I'll rebase the PFC patches ?
> > 
> > Sure, I have merged Linus's fixes branch into pinmux-base in the renesas
> > tree and pushed it to kernel.org. It should be there in a few minutes.
> > For reference the head commit is:
> > 
> > commit 47f4e0c1c87f34bf1fc74b8935a37d229a147946
> > Merge: a9324f6 bf4d7be
> > Author: Simon Horman <horms+renesas@verge.net.au>
> > Date:   Fri Mar 15 07:16:28 2013 +0100
> > 
> >     Merge branch 'fixes' of
> > git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl into
> > pinmux-base
> 
> Thank you. I've rebased my branches on top of that and pushed the result to
> 
> 	git://linuxtv.org/pinchartl/fbdev.git

Thanks, that seems better.

I have pushed the pinmux/3.9/functions of your fbdev tree
as the pinmux branch of my renesas tree on kernel.org.

I have also rebased and pushed my boards-base, boards and next branches
accordingly.
--
To unsubscribe from this list: send the line "unsubscribe linux-sh" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/pinctrl/pinconf.h b/drivers/pinctrl/pinconf.h
index 1f7113e..971636d 100644
--- a/drivers/pinctrl/pinconf.h
+++ b/drivers/pinctrl/pinconf.h
@@ -90,7 +90,7 @@  static inline void pinconf_init_device_debugfs(struct dentry *devroot,
  * pin config.
  */
 
-#ifdef CONFIG_GENERIC_PINCONF
+#if defined(CONFIG_GENERIC_PINCONF) && defined (CONFIG_DEBUG_FS)
 
 void pinconf_generic_dump_pin(struct pinctrl_dev *pctldev,
 			      struct seq_file *s, unsigned pin);

And the second one in the PFC driver:

diff --git a/drivers/pinctrl/sh-pfc/pinctrl.c b/drivers/pinctrl/sh-pfc/pinctrl.c
index aef268b..b5ec109 100644
--- a/drivers/pinctrl/sh-pfc/pinctrl.c
+++ b/drivers/pinctrl/sh-pfc/pinctrl.c
@@ -365,7 +365,9 @@  static const struct pinconf_ops sh_pfc_pinconf_ops = {
 	.pin_config_get			= sh_pfc_pinconf_get,
 	.pin_config_set			= sh_pfc_pinconf_set,
 	.pin_config_group_set		= sh_pfc_pinconf_group_set,
+#ifdef CONFIG_DEBUG_FS
 	.pin_config_config_dbg_show	= pinconf_generic_dump_config,
+#endif
 };
 
 /* PFC ranges -> pinctrl pin descs */