linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] pinctrl: uniphier: enable UniPhier SoCs pinctrl drivers by default
@ 2015-10-27  2:28 Masahiro Yamada
  2015-10-27  2:28 ` [PATCH 2/2] pinctrl: uniphier: guard uniphier directory with CONFIG_PINCTRL_UNIPHIER Masahiro Yamada
  2015-10-29 13:33 ` [PATCH 1/2] pinctrl: uniphier: enable UniPhier SoCs pinctrl drivers by default Linus Walleij
  0 siblings, 2 replies; 8+ messages in thread
From: Masahiro Yamada @ 2015-10-27  2:28 UTC (permalink / raw)
  To: linux-gpio; +Cc: Masahiro Yamada, Linus Walleij, linux-arm-kernel, linux-kernel

Add "default y" to the Kconfig rather than adding entries into
arch/arm/configs/multi_v7_defconfig.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---

 drivers/pinctrl/uniphier/Kconfig | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/pinctrl/uniphier/Kconfig b/drivers/pinctrl/uniphier/Kconfig
index eab23ef..b1d2f941 100644
--- a/drivers/pinctrl/uniphier/Kconfig
+++ b/drivers/pinctrl/uniphier/Kconfig
@@ -7,26 +7,32 @@ config PINCTRL_UNIPHIER_CORE
 
 config PINCTRL_UNIPHIER_PH1_LD4
 	tristate "UniPhier PH1-LD4 SoC pinctrl driver"
+	default y
 	select PINCTRL_UNIPHIER_CORE
 
 config PINCTRL_UNIPHIER_PH1_PRO4
 	tristate "UniPhier PH1-Pro4 SoC pinctrl driver"
+	default y
 	select PINCTRL_UNIPHIER_CORE
 
 config PINCTRL_UNIPHIER_PH1_SLD8
 	tristate "UniPhier PH1-sLD8 SoC pinctrl driver"
+	default y
 	select PINCTRL_UNIPHIER_CORE
 
 config PINCTRL_UNIPHIER_PH1_PRO5
 	tristate "UniPhier PH1-Pro5 SoC pinctrl driver"
+	default y
 	select PINCTRL_UNIPHIER_CORE
 
 config PINCTRL_UNIPHIER_PROXSTREAM2
 	tristate "UniPhier ProXstream2 SoC pinctrl driver"
+	default y
 	select PINCTRL_UNIPHIER_CORE
 
 config PINCTRL_UNIPHIER_PH1_LD6B
 	tristate "UniPhier PH1-LD6b SoC pinctrl driver"
+	default y
 	select PINCTRL_UNIPHIER_CORE
 
 endif
-- 
1.9.1


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

* [PATCH 2/2] pinctrl: uniphier: guard uniphier directory with CONFIG_PINCTRL_UNIPHIER
  2015-10-27  2:28 [PATCH 1/2] pinctrl: uniphier: enable UniPhier SoCs pinctrl drivers by default Masahiro Yamada
@ 2015-10-27  2:28 ` Masahiro Yamada
  2015-10-29 13:34   ` Linus Walleij
  2015-10-29 13:33 ` [PATCH 1/2] pinctrl: uniphier: enable UniPhier SoCs pinctrl drivers by default Linus Walleij
  1 sibling, 1 reply; 8+ messages in thread
From: Masahiro Yamada @ 2015-10-27  2:28 UTC (permalink / raw)
  To: linux-gpio; +Cc: Masahiro Yamada, linux-arm-kernel, Linus Walleij, linux-kernel

CONFIG_PINCTRL_UNIPHIER is more suitable than CONFIG_ARCH_UNIPHIER
to guard the drivers/pinctrl/uniphier directory.

The current CONFIG_PINCTRL_UNIPHIER_CORE is a bit long
(it would break the indentation in drivers/pinctrl/Makefile),
so rename it into CONFIG_PINCTRL_UNIPHIER.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---

 drivers/pinctrl/Makefile          |  2 +-
 drivers/pinctrl/uniphier/Kconfig  | 14 +++++++-------
 drivers/pinctrl/uniphier/Makefile |  2 +-
 3 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/drivers/pinctrl/Makefile b/drivers/pinctrl/Makefile
index cad077c..367af9b 100644
--- a/drivers/pinctrl/Makefile
+++ b/drivers/pinctrl/Makefile
@@ -50,6 +50,6 @@ obj-$(CONFIG_PINCTRL_SAMSUNG)	+= samsung/
 obj-$(CONFIG_PINCTRL_SH_PFC)	+= sh-pfc/
 obj-$(CONFIG_PLAT_SPEAR)	+= spear/
 obj-$(CONFIG_ARCH_SUNXI)	+= sunxi/
-obj-$(CONFIG_ARCH_UNIPHIER)	+= uniphier/
+obj-$(CONFIG_PINCTRL_UNIPHIER)	+= uniphier/
 obj-$(CONFIG_ARCH_VT8500)	+= vt8500/
 obj-$(CONFIG_ARCH_MEDIATEK)	+= mediatek/
diff --git a/drivers/pinctrl/uniphier/Kconfig b/drivers/pinctrl/uniphier/Kconfig
index b1d2f941..7ca72bc 100644
--- a/drivers/pinctrl/uniphier/Kconfig
+++ b/drivers/pinctrl/uniphier/Kconfig
@@ -1,6 +1,6 @@
 if ARCH_UNIPHIER
 
-config PINCTRL_UNIPHIER_CORE
+config PINCTRL_UNIPHIER
 	bool
 	select PINMUX
 	select GENERIC_PINCONF
@@ -8,31 +8,31 @@ config PINCTRL_UNIPHIER_CORE
 config PINCTRL_UNIPHIER_PH1_LD4
 	tristate "UniPhier PH1-LD4 SoC pinctrl driver"
 	default y
-	select PINCTRL_UNIPHIER_CORE
+	select PINCTRL_UNIPHIER
 
 config PINCTRL_UNIPHIER_PH1_PRO4
 	tristate "UniPhier PH1-Pro4 SoC pinctrl driver"
 	default y
-	select PINCTRL_UNIPHIER_CORE
+	select PINCTRL_UNIPHIER
 
 config PINCTRL_UNIPHIER_PH1_SLD8
 	tristate "UniPhier PH1-sLD8 SoC pinctrl driver"
 	default y
-	select PINCTRL_UNIPHIER_CORE
+	select PINCTRL_UNIPHIER
 
 config PINCTRL_UNIPHIER_PH1_PRO5
 	tristate "UniPhier PH1-Pro5 SoC pinctrl driver"
 	default y
-	select PINCTRL_UNIPHIER_CORE
+	select PINCTRL_UNIPHIER
 
 config PINCTRL_UNIPHIER_PROXSTREAM2
 	tristate "UniPhier ProXstream2 SoC pinctrl driver"
 	default y
-	select PINCTRL_UNIPHIER_CORE
+	select PINCTRL_UNIPHIER
 
 config PINCTRL_UNIPHIER_PH1_LD6B
 	tristate "UniPhier PH1-LD6b SoC pinctrl driver"
 	default y
-	select PINCTRL_UNIPHIER_CORE
+	select PINCTRL_UNIPHIER
 
 endif
diff --git a/drivers/pinctrl/uniphier/Makefile b/drivers/pinctrl/uniphier/Makefile
index e215b10..e7ce967 100644
--- a/drivers/pinctrl/uniphier/Makefile
+++ b/drivers/pinctrl/uniphier/Makefile
@@ -1,4 +1,4 @@
-obj-$(CONFIG_PINCTRL_UNIPHIER_CORE)		+= pinctrl-uniphier-core.o
+obj-y						+= pinctrl-uniphier-core.o
 
 obj-$(CONFIG_PINCTRL_UNIPHIER_PH1_LD4)		+= pinctrl-ph1-ld4.o
 obj-$(CONFIG_PINCTRL_UNIPHIER_PH1_PRO4)		+= pinctrl-ph1-pro4.o
-- 
1.9.1


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

* Re: [PATCH 1/2] pinctrl: uniphier: enable UniPhier SoCs pinctrl drivers by default
  2015-10-27  2:28 [PATCH 1/2] pinctrl: uniphier: enable UniPhier SoCs pinctrl drivers by default Masahiro Yamada
  2015-10-27  2:28 ` [PATCH 2/2] pinctrl: uniphier: guard uniphier directory with CONFIG_PINCTRL_UNIPHIER Masahiro Yamada
@ 2015-10-29 13:33 ` Linus Walleij
  2015-10-30  2:01   ` Masahiro Yamada
  2015-10-31  1:41   ` Olof Johansson
  1 sibling, 2 replies; 8+ messages in thread
From: Linus Walleij @ 2015-10-29 13:33 UTC (permalink / raw)
  To: Masahiro Yamada, arm; +Cc: linux-gpio, linux-arm-kernel, linux-kernel

On Tue, Oct 27, 2015 at 3:28 AM, Masahiro Yamada
<yamada.masahiro@socionext.com> wrote:

> Add "default y" to the Kconfig rather than adding entries into
> arch/arm/configs/multi_v7_defconfig.
>
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>

(...)
> config PINCTRL_UNIPHIER_PH1_LD4
>         tristate "UniPhier PH1-LD4 SoC pinctrl driver"
> +       default y
>         select PINCTRL_UNIPHIER_CORE

Why is it not default y if <PH1_LD4_SOC_THING>?

So it is only turned on if the corresponding SoC is selected?

Or don't you have symbols like that?

ARM SoC folks: can you ACK this patch indicating that this is the way
you wanna handle this?

Yours,
Linus Walleij

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

* Re: [PATCH 2/2] pinctrl: uniphier: guard uniphier directory with CONFIG_PINCTRL_UNIPHIER
  2015-10-27  2:28 ` [PATCH 2/2] pinctrl: uniphier: guard uniphier directory with CONFIG_PINCTRL_UNIPHIER Masahiro Yamada
@ 2015-10-29 13:34   ` Linus Walleij
  2015-10-30 10:29     ` Masahiro Yamada
  0 siblings, 1 reply; 8+ messages in thread
From: Linus Walleij @ 2015-10-29 13:34 UTC (permalink / raw)
  To: Masahiro Yamada; +Cc: linux-gpio, linux-arm-kernel, linux-kernel

On Tue, Oct 27, 2015 at 3:28 AM, Masahiro Yamada
<yamada.masahiro@socionext.com> wrote:

> CONFIG_PINCTRL_UNIPHIER is more suitable than CONFIG_ARCH_UNIPHIER
> to guard the drivers/pinctrl/uniphier directory.
>
> The current CONFIG_PINCTRL_UNIPHIER_CORE is a bit long
> (it would break the indentation in drivers/pinctrl/Makefile),
> so rename it into CONFIG_PINCTRL_UNIPHIER.
>
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>

Holding this back until we know what to do with the first patch
but it looks OK.

Yours,
Linus Walleij

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

* Re: [PATCH 1/2] pinctrl: uniphier: enable UniPhier SoCs pinctrl drivers by default
  2015-10-29 13:33 ` [PATCH 1/2] pinctrl: uniphier: enable UniPhier SoCs pinctrl drivers by default Linus Walleij
@ 2015-10-30  2:01   ` Masahiro Yamada
  2015-10-31  1:41   ` Olof Johansson
  1 sibling, 0 replies; 8+ messages in thread
From: Masahiro Yamada @ 2015-10-30  2:01 UTC (permalink / raw)
  To: Linus Walleij; +Cc: arm, linux-gpio, linux-arm-kernel, linux-kernel

Hi Linus,


2015-10-29 22:33 GMT+09:00 Linus Walleij <linus.walleij@linaro.org>:
> On Tue, Oct 27, 2015 at 3:28 AM, Masahiro Yamada
> <yamada.masahiro@socionext.com> wrote:
>
>> Add "default y" to the Kconfig rather than adding entries into
>> arch/arm/configs/multi_v7_defconfig.
>>
>> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
>
> (...)
>> config PINCTRL_UNIPHIER_PH1_LD4
>>         tristate "UniPhier PH1-LD4 SoC pinctrl driver"
>> +       default y
>>         select PINCTRL_UNIPHIER_CORE
>
> Why is it not default y if <PH1_LD4_SOC_THING>?
>
> So it is only turned on if the corresponding SoC is selected?
>
> Or don't you have symbols like that?

No, I don't have such per-SoC symbols.

I only have ARCH_UNIPHIER, for the whole UniPhier SoC family.

We no longer #ifdef <SOC_THING> in C sources.

The only difference among SoCs is, which drivers should be enabled.

All SoCs in UniPhier family share the multi-platform kernel image,
so I think, this way is reasonable enough.



-- 
Best Regards
Masahiro Yamada

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

* Re: [PATCH 2/2] pinctrl: uniphier: guard uniphier directory with CONFIG_PINCTRL_UNIPHIER
  2015-10-29 13:34   ` Linus Walleij
@ 2015-10-30 10:29     ` Masahiro Yamada
  0 siblings, 0 replies; 8+ messages in thread
From: Masahiro Yamada @ 2015-10-30 10:29 UTC (permalink / raw)
  To: Linus Walleij; +Cc: linux-gpio, linux-arm-kernel, linux-kernel

Hi Linus.

2015-10-29 22:34 GMT+09:00 Linus Walleij <linus.walleij@linaro.org>:
> On Tue, Oct 27, 2015 at 3:28 AM, Masahiro Yamada
> <yamada.masahiro@socionext.com> wrote:
>
>> CONFIG_PINCTRL_UNIPHIER is more suitable than CONFIG_ARCH_UNIPHIER
>> to guard the drivers/pinctrl/uniphier directory.
>>
>> The current CONFIG_PINCTRL_UNIPHIER_CORE is a bit long
>> (it would break the indentation in drivers/pinctrl/Makefile),
>> so rename it into CONFIG_PINCTRL_UNIPHIER.
>>
>> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
>
> Holding this back until we know what to do with the first patch
> but it looks OK.

I've re-sent this as a single patch
in case 1/2 might take some time for review.


As you agreed with this one, please let it go in first.




-- 
Best Regards
Masahiro Yamada

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

* Re: [PATCH 1/2] pinctrl: uniphier: enable UniPhier SoCs pinctrl drivers by default
  2015-10-29 13:33 ` [PATCH 1/2] pinctrl: uniphier: enable UniPhier SoCs pinctrl drivers by default Linus Walleij
  2015-10-30  2:01   ` Masahiro Yamada
@ 2015-10-31  1:41   ` Olof Johansson
  2015-11-02 11:47     ` Masahiro Yamada
  1 sibling, 1 reply; 8+ messages in thread
From: Olof Johansson @ 2015-10-31  1:41 UTC (permalink / raw)
  To: Linus Walleij
  Cc: Masahiro Yamada, arm, linux-gpio, linux-arm-kernel, linux-kernel

On Thu, Oct 29, 2015 at 02:33:34PM +0100, Linus Walleij wrote:
> On Tue, Oct 27, 2015 at 3:28 AM, Masahiro Yamada
> <yamada.masahiro@socionext.com> wrote:
> 
> > Add "default y" to the Kconfig rather than adding entries into
> > arch/arm/configs/multi_v7_defconfig.
> >
> > Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> 
> (...)
> > config PINCTRL_UNIPHIER_PH1_LD4
> >         tristate "UniPhier PH1-LD4 SoC pinctrl driver"
> > +       default y
> >         select PINCTRL_UNIPHIER_CORE
> 
> Why is it not default y if <PH1_LD4_SOC_THING>?
> 
> So it is only turned on if the corresponding SoC is selected?
> 
> Or don't you have symbols like that?
> 
> ARM SoC folks: can you ACK this patch indicating that this is the way
> you wanna handle this?

Most other will have a "default MACH_<foo>", but Uniphier lacks those Kconfig
symbols. Or even a def_bool for that platform such that it's not an option if
the platform is enabled. It makes no sense to enable a platform but not the
pinctrl on it, so that's a good way to do it.

I would honestly rather have those in the mach makefile, and make the drivers
select the right thing by default, than having to know exactly which drivers to
enable for a specific SoC.


-Olof

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

* Re: [PATCH 1/2] pinctrl: uniphier: enable UniPhier SoCs pinctrl drivers by default
  2015-10-31  1:41   ` Olof Johansson
@ 2015-11-02 11:47     ` Masahiro Yamada
  0 siblings, 0 replies; 8+ messages in thread
From: Masahiro Yamada @ 2015-11-02 11:47 UTC (permalink / raw)
  To: Olof Johansson
  Cc: Linus Walleij, arm, linux-kernel, linux-arm-kernel, linux-gpio

Hi Olof,


2015-10-31 10:41 GMT+09:00 Olof Johansson <olof@lixom.net>:
> On Thu, Oct 29, 2015 at 02:33:34PM +0100, Linus Walleij wrote:
>> On Tue, Oct 27, 2015 at 3:28 AM, Masahiro Yamada
>> <yamada.masahiro@socionext.com> wrote:
>>
>> > Add "default y" to the Kconfig rather than adding entries into
>> > arch/arm/configs/multi_v7_defconfig.
>> >
>> > Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
>>
>> (...)
>> > config PINCTRL_UNIPHIER_PH1_LD4
>> >         tristate "UniPhier PH1-LD4 SoC pinctrl driver"
>> > +       default y
>> >         select PINCTRL_UNIPHIER_CORE
>>
>> Why is it not default y if <PH1_LD4_SOC_THING>?
>>
>> So it is only turned on if the corresponding SoC is selected?
>>
>> Or don't you have symbols like that?
>>
>> ARM SoC folks: can you ACK this patch indicating that this is the way
>> you wanna handle this?
>
> Most other will have a "default MACH_<foo>", but Uniphier lacks those Kconfig
> symbols. Or even a def_bool for that platform such that it's not an option if
> the platform is enabled. It makes no sense to enable a platform but not the
> pinctrl on it, so that's a good way to do it.
>
> I would honestly rather have those in the mach makefile, and make the drivers
> select the right thing by default, than having to know exactly which drivers to
> enable for a specific SoC.

I have a question.


Most of sub-architectures define per-SoC options in their mach-<>/Kconfig,but
some of them enable DTBs per SoC-family.


For example,

arch/arm/mach-exynos/Kconfig define SoC options.


So,

dtb-$(CONFIG_ARCH_EXYNOS5) += \
        exynos5250-arndale.dtb \
        exynos5250-smdk5250.dtb \
        exynos5250-snow.dtb \
        exynos5250-spring.dtb \
        exynos5260-xyref5260.dtb \
        exynos5410-smdk5410.dtb \
        exynos5420-arndale-octa.dtb \
        exynos5420-peach-pit.dtb \
        exynos5420-smdk5420.dtb \
        exynos5422-odroidxu3.dtb \
        exynos5422-odroidxu3-lite.dtb \
        exynos5440-sd5v1.dtb \
        exynos5440-ssdk5440.dtb \
        exynos5800-peach-pi.dtb

should be like follows?

dtb-$(CONFIG_SOC_EXYNOS5250) += \
        exynos5250-arndale.dtb \
        exynos5250-smdk5250.dtb \
        exynos5250-snow.dtb \
        exynos5250-spring.dtb
dtb-$(CONFIG_SOC_EXYNOS5260) += \
        exynos5260-xyref5260.dtb
dtb-$(CONFIG_SOC_EXYNOS5410) += \
        exynos5410-smdk5410.dtb
dtb-$(CONFIG_SOC_EXYNOS5420) += \
        exynos5420-arndale-octa.dtb \
        exynos5420-peach-pit.dtb \
        exynos5420-smdk5420.dtb \
        exynos5422-odroidxu3.dtb \
        exynos5422-odroidxu3-lite.dtb
dtb-$(CONFIG_SOC_EXYNOS5440) += \
        exynos5440-sd5v1.dtb \
        exynos5440-ssdk5440.dtb
dtb-$(CONFIG_SOC_EXYNOS5800) += \
        exynos5800-peach-pi.dtb




Likewise for Mediatek DTBs?

dtb-$(CONFIG_ARCH_MEDIATEK) += \
        mt6580-evbp1.dtb \
        mt6589-aquaris5.dtb \
        mt6592-evb.dtb \
        mt8127-moose.dtb \
        mt8135-evbp1.dtb




-- 
Best Regards
Masahiro Yamada

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

end of thread, other threads:[~2015-11-02 11:47 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-27  2:28 [PATCH 1/2] pinctrl: uniphier: enable UniPhier SoCs pinctrl drivers by default Masahiro Yamada
2015-10-27  2:28 ` [PATCH 2/2] pinctrl: uniphier: guard uniphier directory with CONFIG_PINCTRL_UNIPHIER Masahiro Yamada
2015-10-29 13:34   ` Linus Walleij
2015-10-30 10:29     ` Masahiro Yamada
2015-10-29 13:33 ` [PATCH 1/2] pinctrl: uniphier: enable UniPhier SoCs pinctrl drivers by default Linus Walleij
2015-10-30  2:01   ` Masahiro Yamada
2015-10-31  1:41   ` Olof Johansson
2015-11-02 11:47     ` Masahiro Yamada

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