[RFC,4/7] pinctrl: sunxi: remove redundant "depends on RESET_CONTROLLER"
diff mbox

Message ID 1446722128-11961-5-git-send-email-yamada.masahiro@socionext.com
State New
Headers show

Commit Message

Masahiro Yamada Nov. 5, 2015, 11:15 a.m. UTC
ARCH_SUNXI selects RESET_CONTROLLER.
The dependency "depends on RESET_CONTROLLER" is already met.

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

 drivers/pinctrl/sunxi/Kconfig | 2 --
 1 file changed, 2 deletions(-)

Comments

Linus Walleij Nov. 5, 2015, 1:40 p.m. UTC | #1
On Thu, Nov 5, 2015 at 12:15 PM, Masahiro Yamada
<yamada.masahiro@socionext.com> wrote:

> ARCH_SUNXI selects RESET_CONTROLLER.
> The dependency "depends on RESET_CONTROLLER" is already met.
>
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>

NACK, this pin controller needs that as dependency, I don't worry
that it's overspecified.

They both do this:
#include <linux/reset.h>

And the object should specify its dependencies, not rely on them
being implicitly available.

The dep is there for human readers too, not just machines. And to
them, this is helpful information.

Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Linus Walleij Nov. 5, 2015, 2:06 p.m. UTC | #2
On Thu, Nov 5, 2015 at 2:40 PM, Linus Walleij <linus.walleij@linaro.org> wrote:
> On Thu, Nov 5, 2015 at 12:15 PM, Masahiro Yamada
> <yamada.masahiro@socionext.com> wrote:
>
>> ARCH_SUNXI selects RESET_CONTROLLER.
>> The dependency "depends on RESET_CONTROLLER" is already met.
>>
>> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
>
> NACK, this pin controller needs that as dependency, I don't worry
> that it's overspecified.
>
> They both do this:
> #include <linux/reset.h>

You could of course replace the depends with select in this
file so the menu options don't get hidden, as seems to be
the problem as described in 0/7.

Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Masahiro Yamada Nov. 16, 2015, 3:40 a.m. UTC | #3
Hi Linus

2015-11-05 22:40 GMT+09:00 Linus Walleij <linus.walleij@linaro.org>:
> On Thu, Nov 5, 2015 at 12:15 PM, Masahiro Yamada
> <yamada.masahiro@socionext.com> wrote:
>
>> ARCH_SUNXI selects RESET_CONTROLLER.
>> The dependency "depends on RESET_CONTROLLER" is already met.
>>
>> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
>
> NACK, this pin controller needs that as dependency, I don't worry
> that it's overspecified.
>
> They both do this:
> #include <linux/reset.h>
>
> And the object should specify its dependencies, not rely on them
> being implicitly available.
>
> The dep is there for human readers too, not just machines. And to
> them, this is helpful information.

How strict we should follow this rule?

Many drivers depend on OF, but do they all have "depends on OF"?
Linus Walleij Nov. 17, 2015, 2:03 p.m. UTC | #4
On Mon, Nov 16, 2015 at 4:40 AM, Masahiro Yamada
<yamada.masahiro@socionext.com> wrote:
> 2015-11-05 22:40 GMT+09:00 Linus Walleij <linus.walleij@linaro.org>:
>> On Thu, Nov 5, 2015 at 12:15 PM, Masahiro Yamada
>> <yamada.masahiro@socionext.com> wrote:
>>
>>> ARCH_SUNXI selects RESET_CONTROLLER.
>>> The dependency "depends on RESET_CONTROLLER" is already met.
>>>
>>> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
>>
>> NACK, this pin controller needs that as dependency, I don't worry
>> that it's overspecified.
>>
>> They both do this:
>> #include <linux/reset.h>
>>
>> And the object should specify its dependencies, not rely on them
>> being implicitly available.
>>
>> The dep is there for human readers too, not just machines. And to
>> them, this is helpful information.
>
> How strict we should follow this rule?
>
> Many drivers depend on OF, but do they all have "depends on OF"?

I think they should, and if they are in my subsystems I consider
it a bug if they don't have this dependency. Also it is a very common
reason why test compiles fail.

Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch
diff mbox

diff --git a/drivers/pinctrl/sunxi/Kconfig b/drivers/pinctrl/sunxi/Kconfig
index e68fd95..50bd2e3 100644
--- a/drivers/pinctrl/sunxi/Kconfig
+++ b/drivers/pinctrl/sunxi/Kconfig
@@ -27,7 +27,6 @@  config PINCTRL_SUN6I_A31S
 
 config PINCTRL_SUN6I_A31_R
 	def_bool MACH_SUN6I
-	depends on RESET_CONTROLLER
 	select PINCTRL_SUNXI_COMMON
 
 config PINCTRL_SUN7I_A20
@@ -48,7 +47,6 @@  config PINCTRL_SUN8I_A83T
 
 config PINCTRL_SUN8I_A23_R
 	def_bool MACH_SUN8I
-	depends on RESET_CONTROLLER
 	select PINCTRL_SUNXI_COMMON
 
 config PINCTRL_SUN9I_A80