All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/8] watchdog fixes for COMPILE_TEST change
@ 2017-02-28 21:01 Arnd Bergmann
  2017-02-28 21:01 ` [PATCH 1/8] mfd: retu: add inline alternatives for CONFIG_RETU=n Arnd Bergmann
                   ` (8 more replies)
  0 siblings, 9 replies; 32+ messages in thread
From: Arnd Bergmann @ 2017-02-28 21:01 UTC (permalink / raw)
  To: Guenter Roeck; +Cc: Wim Van Sebroeck, linux-watchdog, Lee Jones, linux-kernel

Hi Guenter,

I noticed your change to enable lots of watchdog drivers for compile
testing in linux-next today. While this is generally a great idea,
I'm not entirely sure why this appeared during the merge window.

I case you plan to have this merged into v4.11, please make sure
to get the fixups in. I found eight drivers that now have incorrect
dependencies. For two of them I changed the MFD code, for the others
I just adapted the Kconfig dependencies, mostly by reverting
part of your patch.

    Arnd

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

* [PATCH 1/8] mfd: retu: add inline alternatives for CONFIG_RETU=n
  2017-02-28 21:01 [PATCH 0/8] watchdog fixes for COMPILE_TEST change Arnd Bergmann
@ 2017-02-28 21:01 ` Arnd Bergmann
  2017-02-28 21:40   ` Guenter Roeck
  2017-02-28 21:01 ` [PATCH 2/8] mfd: db8500-prcmu: fix stub helper interface Arnd Bergmann
                   ` (7 subsequent siblings)
  8 siblings, 1 reply; 32+ messages in thread
From: Arnd Bergmann @ 2017-02-28 21:01 UTC (permalink / raw)
  To: Guenter Roeck
  Cc: Wim Van Sebroeck, linux-watchdog, Lee Jones, linux-kernel, Arnd Bergmann

The retu watchdog calls into the respective mfd driver, but fails to
link if that is diabled:

drivers/watchdog/built-in.o: In function `retu_wdt_set_timeout':
ziirave_wdt.c:(.text+0x8c88): undefined reference to `retu_write'
ziirave_wdt.c:(.text+0x8c88): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `retu_write'
drivers/watchdog/built-in.o: In function `retu_wdt_start':
ziirave_wdt.c:(.text+0x8cc8): undefined reference to `retu_write'
ziirave_wdt.c:(.text+0x8cc8): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `retu_write'

This adds inline stub helpers that let us build the driver anyway.

Fixes: da2a68b3eb47 ("watchdog: Enable COMPILE_TEST where possible")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/watchdog/Kconfig | 2 +-
 include/linux/mfd/retu.h | 5 +++++
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig
index c831b7967bf9..6ca2f3ae7f1e 100644
--- a/drivers/watchdog/Kconfig
+++ b/drivers/watchdog/Kconfig
@@ -585,7 +585,7 @@ config UX500_WATCHDOG
 
 config RETU_WATCHDOG
 	tristate "Retu watchdog"
-	depends on MFD_RETU || COMPILE_TEST
+	depends on MFD_RETU || (COMPILE_TEST && MFD_RETU=n)
 	select WATCHDOG_CORE
 	help
 	  Retu watchdog driver for Nokia Internet Tablets (770, N800,
diff --git a/include/linux/mfd/retu.h b/include/linux/mfd/retu.h
index 65471c4a3926..a6828e899775 100644
--- a/include/linux/mfd/retu.h
+++ b/include/linux/mfd/retu.h
@@ -11,8 +11,13 @@
 
 struct retu_dev;
 
+#if IS_ENABLED(CONFIG_MFD_RETU)
 int retu_read(struct retu_dev *, u8);
 int retu_write(struct retu_dev *, u8, u16);
+#else
+static inline int retu_read(struct retu_dev *dev, u8 r)		{ return -EINVAL; }
+static inline int retu_write(struct retu_dev *dev, u8 r, u16 v)	{ return -EINVAL; }
+#endif
 
 /* Registers */
 #define RETU_REG_WATCHDOG	0x17		/* Watchdog */
-- 
2.9.0

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

* [PATCH 2/8] mfd: db8500-prcmu: fix stub helper interface
  2017-02-28 21:01 [PATCH 0/8] watchdog fixes for COMPILE_TEST change Arnd Bergmann
  2017-02-28 21:01 ` [PATCH 1/8] mfd: retu: add inline alternatives for CONFIG_RETU=n Arnd Bergmann
@ 2017-02-28 21:01 ` Arnd Bergmann
  2017-02-28 21:42   ` Guenter Roeck
  2017-03-14 11:14     ` Lee Jones
  2017-02-28 21:01 ` [PATCH 3/8] watchdog: wm831x watchdog really needs mfd Arnd Bergmann
                   ` (6 subsequent siblings)
  8 siblings, 2 replies; 32+ messages in thread
From: Arnd Bergmann @ 2017-02-28 21:01 UTC (permalink / raw)
  To: Guenter Roeck
  Cc: Wim Van Sebroeck, linux-watchdog, Lee Jones, linux-kernel, Arnd Bergmann

When the db8500 watchdog is enabled without the PRCMU, we get a lot of
warnings about duplicate or missing helper functions:

In file included from drivers/watchdog/ux500_wdt.c:21:0:
include/linux/mfd/dbx500-prcmu.h:422:19: error: redefinition of 'prcmu_abb_read'
 static inline int prcmu_abb_read(u8 slave, u8 reg, u8 *value, u8 size)

This removes the duplicate function definitions and moves the helpers in
dbx500-prcmu outside of the #ifdef that hides them.

Fixes: da2a68b3eb47 ("watchdog: Enable COMPILE_TEST where possible")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 include/linux/mfd/db8500-prcmu.h | 27 ----------------------
 include/linux/mfd/dbx500-prcmu.h | 49 ++++++++++++++++++++--------------------
 2 files changed, 25 insertions(+), 51 deletions(-)

diff --git a/include/linux/mfd/db8500-prcmu.h b/include/linux/mfd/db8500-prcmu.h
index 7ba67b55b312..ac9b8a6b8e9c 100644
--- a/include/linux/mfd/db8500-prcmu.h
+++ b/include/linux/mfd/db8500-prcmu.h
@@ -500,17 +500,12 @@ void prcmu_configure_auto_pm(struct prcmu_auto_pm_config *sleep,
 	struct prcmu_auto_pm_config *idle);
 bool prcmu_is_auto_pm_enabled(void);
 
-int prcmu_config_clkout(u8 clkout, u8 source, u8 div);
 int prcmu_set_clock_divider(u8 clock, u8 divider);
 int db8500_prcmu_config_hotdog(u8 threshold);
 int db8500_prcmu_config_hotmon(u8 low, u8 high);
 int db8500_prcmu_start_temp_sense(u16 cycles32k);
 int db8500_prcmu_stop_temp_sense(void);
-int prcmu_abb_read(u8 slave, u8 reg, u8 *value, u8 size);
-int prcmu_abb_write(u8 slave, u8 reg, u8 *value, u8 size);
 
-int prcmu_ac_wake_req(void);
-void prcmu_ac_sleep_req(void);
 void db8500_prcmu_modem_reset(void);
 
 int db8500_prcmu_config_a9wdog(u8 num, bool sleep_auto_off);
@@ -608,11 +603,6 @@ static inline bool prcmu_is_auto_pm_enabled(void)
 	return false;
 }
 
-static inline int prcmu_config_clkout(u8 clkout, u8 source, u8 div)
-{
-	return 0;
-}
-
 static inline int prcmu_set_clock_divider(u8 clock, u8 divider)
 {
 	return 0;
@@ -638,23 +628,6 @@ static inline int db8500_prcmu_stop_temp_sense(void)
 	return 0;
 }
 
-static inline int prcmu_abb_read(u8 slave, u8 reg, u8 *value, u8 size)
-{
-	return -ENOSYS;
-}
-
-static inline int prcmu_abb_write(u8 slave, u8 reg, u8 *value, u8 size)
-{
-	return -ENOSYS;
-}
-
-static inline int prcmu_ac_wake_req(void)
-{
-	return 0;
-}
-
-static inline void prcmu_ac_sleep_req(void) {}
-
 static inline void db8500_prcmu_modem_reset(void) {}
 
 static inline void db8500_prcmu_system_reset(u16 reset_code) {}
diff --git a/include/linux/mfd/dbx500-prcmu.h b/include/linux/mfd/dbx500-prcmu.h
index 2e2c6a63a065..533459c7ad08 100644
--- a/include/linux/mfd/dbx500-prcmu.h
+++ b/include/linux/mfd/dbx500-prcmu.h
@@ -376,30 +376,6 @@ static inline void prcmu_write_masked(unsigned int reg, u32 mask, u32 value)
 	db8500_prcmu_write_masked(reg, mask, value);
 }
 
-static inline int prcmu_enable_a9wdog(u8 id)
-{
-	return db8500_prcmu_enable_a9wdog(id);
-}
-
-static inline int prcmu_disable_a9wdog(u8 id)
-{
-	return db8500_prcmu_disable_a9wdog(id);
-}
-
-static inline int prcmu_kick_a9wdog(u8 id)
-{
-	return db8500_prcmu_kick_a9wdog(id);
-}
-
-static inline int prcmu_load_a9wdog(u8 id, u32 timeout)
-{
-	return db8500_prcmu_load_a9wdog(id, timeout);
-}
-
-static inline int prcmu_config_a9wdog(u8 num, bool sleep_auto_off)
-{
-	return db8500_prcmu_config_a9wdog(num, sleep_auto_off);
-}
 #else
 
 static inline void prcmu_early_init(u32 phy_base, u32 size) {}
@@ -569,6 +545,31 @@ static inline void prcmu_write_masked(unsigned int reg, u32 mask, u32 value) {}
 
 #endif
 
+static inline int prcmu_enable_a9wdog(u8 id)
+{
+	return db8500_prcmu_enable_a9wdog(id);
+}
+
+static inline int prcmu_disable_a9wdog(u8 id)
+{
+	return db8500_prcmu_disable_a9wdog(id);
+}
+
+static inline int prcmu_kick_a9wdog(u8 id)
+{
+	return db8500_prcmu_kick_a9wdog(id);
+}
+
+static inline int prcmu_load_a9wdog(u8 id, u32 timeout)
+{
+	return db8500_prcmu_load_a9wdog(id, timeout);
+}
+
+static inline int prcmu_config_a9wdog(u8 num, bool sleep_auto_off)
+{
+	return db8500_prcmu_config_a9wdog(num, sleep_auto_off);
+}
+
 static inline void prcmu_set(unsigned int reg, u32 bits)
 {
 	prcmu_write_masked(reg, bits, bits);
-- 
2.9.0

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

* [PATCH 3/8] watchdog: wm831x watchdog really needs mfd
  2017-02-28 21:01 [PATCH 0/8] watchdog fixes for COMPILE_TEST change Arnd Bergmann
  2017-02-28 21:01 ` [PATCH 1/8] mfd: retu: add inline alternatives for CONFIG_RETU=n Arnd Bergmann
  2017-02-28 21:01 ` [PATCH 2/8] mfd: db8500-prcmu: fix stub helper interface Arnd Bergmann
@ 2017-02-28 21:01 ` Arnd Bergmann
  2017-02-28 21:36   ` Guenter Roeck
  2017-02-28 21:01 ` [PATCH 4/8] watchdog: geode: restore hard CS5535_MFGPT dependency Arnd Bergmann
                   ` (5 subsequent siblings)
  8 siblings, 1 reply; 32+ messages in thread
From: Arnd Bergmann @ 2017-02-28 21:01 UTC (permalink / raw)
  To: Guenter Roeck
  Cc: Wim Van Sebroeck, linux-watchdog, Lee Jones, linux-kernel, Arnd Bergmann

The wm831x watchdog driver can now be built without the wm831x mfd
driver, which results in a link error:

(.text+0x1a95c): undefined reference to `wm831x_set_bits'
(.text+0x1a95c): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `wm831x_set_bits'
(.text+0x1a968): undefined reference to `wm831x_reg_lock'
(.text+0x1a968): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `wm831x_reg_lock'
(.text+0x1a9dc): undefined reference to `wm831x_reg_unlock'
(.text+0x1a9dc): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `wm831x_reg_unlock'

This adds back the dependency that was removed. We can still build test
this driver on all architectures by enabling the MFD driver for it first.

Fixes: da2a68b3eb47 ("watchdog: Enable COMPILE_TEST where possible")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/watchdog/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig
index 6ca2f3ae7f1e..34a927703d64 100644
--- a/drivers/watchdog/Kconfig
+++ b/drivers/watchdog/Kconfig
@@ -176,7 +176,7 @@ config WDAT_WDT
 
 config WM831X_WATCHDOG
 	tristate "WM831x watchdog"
-	depends on MFD_WM831X || COMPILE_TEST
+	depends on MFD_WM831X
 	select WATCHDOG_CORE
 	help
 	  Support for the watchdog in the WM831x AudioPlus PMICs.  When
-- 
2.9.0

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

* [PATCH 4/8] watchdog: geode: restore hard CS5535_MFGPT dependency
  2017-02-28 21:01 [PATCH 0/8] watchdog fixes for COMPILE_TEST change Arnd Bergmann
                   ` (2 preceding siblings ...)
  2017-02-28 21:01 ` [PATCH 3/8] watchdog: wm831x watchdog really needs mfd Arnd Bergmann
@ 2017-02-28 21:01 ` Arnd Bergmann
  2017-02-28 21:42   ` Guenter Roeck
  2017-02-28 21:01 ` [PATCH 5/8] watchdog: menf21bmc: add I2C dependency Arnd Bergmann
                   ` (4 subsequent siblings)
  8 siblings, 1 reply; 32+ messages in thread
From: Arnd Bergmann @ 2017-02-28 21:01 UTC (permalink / raw)
  To: Guenter Roeck
  Cc: Wim Van Sebroeck, linux-watchdog, Lee Jones, linux-kernel, Arnd Bergmann

Wtihout CONFIG_CS5535_MFGPT, the driver does not link right:

drivers/watchdog/built-in.o: In function `geodewdt_probe':
geodewdt.c:(.init.text+0xca3): undefined reference to `cs5535_mfgpt_alloc_timer'
geodewdt.c:(.init.text+0xcd4): undefined reference to `cs5535_mfgpt_write'
geodewdt.c:(.init.text+0xcef): undefined reference to `cs5535_mfgpt_toggle_event'

This adds back the dependency on this base driver.

Fixes: da2a68b3eb47 ("watchdog: Enable COMPILE_TEST where possible")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/watchdog/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig
index 34a927703d64..de52495ef150 100644
--- a/drivers/watchdog/Kconfig
+++ b/drivers/watchdog/Kconfig
@@ -851,7 +851,7 @@ config SP5100_TCO
 
 config GEODE_WDT
 	tristate "AMD Geode CS5535/CS5536 Watchdog"
-	depends on CS5535_MFGPT || (X86 && COMPILE_TEST)
+	depends on CS5535_MFGPT
 	help
 	  This driver enables a watchdog capability built into the
 	  CS5535/CS5536 companion chips for the AMD Geode GX and LX
-- 
2.9.0

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

* [PATCH 5/8] watchdog: menf21bmc: add I2C dependency
  2017-02-28 21:01 [PATCH 0/8] watchdog fixes for COMPILE_TEST change Arnd Bergmann
                   ` (3 preceding siblings ...)
  2017-02-28 21:01 ` [PATCH 4/8] watchdog: geode: restore hard CS5535_MFGPT dependency Arnd Bergmann
@ 2017-02-28 21:01 ` Arnd Bergmann
  2017-02-28 21:43   ` Guenter Roeck
  2017-02-28 21:01 ` [PATCH 6/8] watchdog: sp805: add back AMBA dependency Arnd Bergmann
                   ` (3 subsequent siblings)
  8 siblings, 1 reply; 32+ messages in thread
From: Arnd Bergmann @ 2017-02-28 21:01 UTC (permalink / raw)
  To: Guenter Roeck
  Cc: Wim Van Sebroeck, linux-watchdog, Lee Jones, linux-kernel, Arnd Bergmann

This driver fails to link when CONFIG_I2C is disabled or a loadable module while
the watchdog is built-in:

drivers/watchdog/built-in.o: In function `menf21bmc_wdt_shutdown':
menf21bmc_wdt.c:(.text+0x9b44): undefined reference to `i2c_smbus_write_word_data'
menf21bmc_wdt.c:(.text+0x9b44): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `i2c_smbus_write_word_data'

This adds a Kconfig dependency for it, to enforce a valid configuration.

Fixes: da2a68b3eb47 ("watchdog: Enable COMPILE_TEST where possible")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/watchdog/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig
index de52495ef150..ab0ec389e436 100644
--- a/drivers/watchdog/Kconfig
+++ b/drivers/watchdog/Kconfig
@@ -142,6 +142,7 @@ config GPIO_WATCHDOG_ARCH_INITCALL
 config MENF21BMC_WATCHDOG
 	tristate "MEN 14F021P00 BMC Watchdog"
 	depends on MFD_MENF21BMC || COMPILE_TEST
+	depends on I2C
 	select WATCHDOG_CORE
 	help
 	  Say Y here to include support for the MEN 14F021P00 BMC Watchdog.
-- 
2.9.0

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

* [PATCH 6/8] watchdog: sp805: add back AMBA dependency
  2017-02-28 21:01 [PATCH 0/8] watchdog fixes for COMPILE_TEST change Arnd Bergmann
                   ` (4 preceding siblings ...)
  2017-02-28 21:01 ` [PATCH 5/8] watchdog: menf21bmc: add I2C dependency Arnd Bergmann
@ 2017-02-28 21:01 ` Arnd Bergmann
  2017-02-28 21:43   ` Guenter Roeck
  2017-02-28 21:01 ` [PATCH 7/8] watchdog: bcm2835: add CONFIG_OF dependency Arnd Bergmann
                   ` (2 subsequent siblings)
  8 siblings, 1 reply; 32+ messages in thread
From: Arnd Bergmann @ 2017-02-28 21:01 UTC (permalink / raw)
  To: Guenter Roeck
  Cc: Wim Van Sebroeck, linux-watchdog, Lee Jones, linux-kernel, Arnd Bergmann

The driver fails to link if ARM_AMBA is disabled:

drivers/watchdog/sp805_wdt.o: In function `sp805_wdt_driver_init':
sp805_wdt.c:(.init.text+0x4): undefined reference to `amba_driver_register'

It seems that the COMPILE_TEST was added in the wrong place, as there
is no architecture dependency, but a bus dependency. This moves
the dependency accordingly.

Fixes: da2a68b3eb47 ("watchdog: Enable COMPILE_TEST where possible")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/watchdog/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig
index ab0ec389e436..3216012170fa 100644
--- a/drivers/watchdog/Kconfig
+++ b/drivers/watchdog/Kconfig
@@ -218,7 +218,7 @@ config ZIIRAVE_WATCHDOG
 
 config ARM_SP805_WATCHDOG
 	tristate "ARM SP805 Watchdog"
-	depends on (ARM || ARM64) && (ARM_AMBA || COMPILE_TEST)
+	depends on (ARM || ARM64 || COMPILE_TEST) && ARM_AMBA
 	select WATCHDOG_CORE
 	help
 	  ARM Primecell SP805 Watchdog timer. This will reboot your system when
-- 
2.9.0

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

* [PATCH 7/8] watchdog: bcm2835: add CONFIG_OF dependency
  2017-02-28 21:01 [PATCH 0/8] watchdog fixes for COMPILE_TEST change Arnd Bergmann
                   ` (5 preceding siblings ...)
  2017-02-28 21:01 ` [PATCH 6/8] watchdog: sp805: add back AMBA dependency Arnd Bergmann
@ 2017-02-28 21:01 ` Arnd Bergmann
  2017-02-28 21:43   ` Guenter Roeck
  2017-02-28 21:01 ` [PATCH 8/8] watchdog: kempld: revert to full dependency Arnd Bergmann
  2017-02-28 21:31 ` [PATCH 0/8] watchdog fixes for COMPILE_TEST change Guenter Roeck
  8 siblings, 1 reply; 32+ messages in thread
From: Arnd Bergmann @ 2017-02-28 21:01 UTC (permalink / raw)
  To: Guenter Roeck
  Cc: Wim Van Sebroeck, linux-watchdog, Lee Jones, linux-kernel, Arnd Bergmann

Without CONFIG_OF, the driver fails to link:

drivers/watchdog/built-in.o: In function `bcm2835_power_off':
bcm2835_wdt.c:(.text+0x1946): undefined reference to `of_find_device_by_node'

This adds a new dependency, to allow the COMPILE_TEST check to succeed.

Fixes: da2a68b3eb47 ("watchdog: Enable COMPILE_TEST where possible")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/watchdog/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig
index 3216012170fa..8cb9b986ee2d 100644
--- a/drivers/watchdog/Kconfig
+++ b/drivers/watchdog/Kconfig
@@ -1496,7 +1496,7 @@ config BCM63XX_WDT
 
 config BCM2835_WDT
 	tristate "Broadcom BCM2835 hardware watchdog"
-	depends on ARCH_BCM2835 || COMPILE_TEST
+	depends on ARCH_BCM2835 || (OF && COMPILE_TEST)
 	select WATCHDOG_CORE
 	help
 	  Watchdog driver for the built in watchdog hardware in Broadcom
-- 
2.9.0

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

* [PATCH 8/8] watchdog: kempld: revert to full dependency
  2017-02-28 21:01 [PATCH 0/8] watchdog fixes for COMPILE_TEST change Arnd Bergmann
                   ` (6 preceding siblings ...)
  2017-02-28 21:01 ` [PATCH 7/8] watchdog: bcm2835: add CONFIG_OF dependency Arnd Bergmann
@ 2017-02-28 21:01 ` Arnd Bergmann
  2017-02-28 21:39   ` Guenter Roeck
  2017-02-28 21:31 ` [PATCH 0/8] watchdog fixes for COMPILE_TEST change Guenter Roeck
  8 siblings, 1 reply; 32+ messages in thread
From: Arnd Bergmann @ 2017-02-28 21:01 UTC (permalink / raw)
  To: Guenter Roeck
  Cc: Wim Van Sebroeck, linux-watchdog, Lee Jones, linux-kernel, Arnd Bergmann

The kempld watchdog driver requires the respective MFD driver:

drivers/watchdog/built-in.o: In function `kempld_wdt_probe':
kempld_wdt.c:(.text+0x5c78): undefined reference to `kempld_get_mutex'
kempld_wdt.c:(.text+0x5c84): undefined reference to `kempld_read8'
kempld_wdt.c:(.text+0x5c8e): undefined reference to `kempld_release_mutex'
kempld_wdt.c:(.text+0x5d1c): undefined reference to `kempld_read8'
kempld_wdt.c:(.text+0x5d2c): undefined reference to `kempld_write8'

This adds the Kconfig dependency back.

Fixes: da2a68b3eb47 ("watchdog: Enable COMPILE_TEST where possible")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/watchdog/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig
index 8cb9b986ee2d..fcaab3139a5c 100644
--- a/drivers/watchdog/Kconfig
+++ b/drivers/watchdog/Kconfig
@@ -1064,7 +1064,7 @@ config HP_WATCHDOG
 
 config KEMPLD_WDT
 	tristate "Kontron COM Watchdog Timer"
-	depends on MFD_KEMPLD || COMPILE_TEST
+	depends on MFD_KEMPLD
 	select WATCHDOG_CORE
 	help
 	  Support for the PLD watchdog on some Kontron ETX and COMexpress
-- 
2.9.0

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

* Re: [PATCH 0/8] watchdog fixes for COMPILE_TEST change
  2017-02-28 21:01 [PATCH 0/8] watchdog fixes for COMPILE_TEST change Arnd Bergmann
                   ` (7 preceding siblings ...)
  2017-02-28 21:01 ` [PATCH 8/8] watchdog: kempld: revert to full dependency Arnd Bergmann
@ 2017-02-28 21:31 ` Guenter Roeck
  8 siblings, 0 replies; 32+ messages in thread
From: Guenter Roeck @ 2017-02-28 21:31 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: Wim Van Sebroeck, linux-watchdog, Lee Jones, linux-kernel

On Tue, Feb 28, 2017 at 10:01:15PM +0100, Arnd Bergmann wrote:
> Hi Guenter,
> 
> I noticed your change to enable lots of watchdog drivers for compile
> testing in linux-next today. While this is generally a great idea,
> I'm not entirely sure why this appeared during the merge window.
> 
Problem is that Wim doesn't apply patches to a tree which gets exposed
to -next. I'll have to discuss with him how to change that. The tree
has been exposed to 0day for quite some time, though, which did not
report any errors (nor did my own build tests). No idea how both me
and 0day missed all those problems.

Sorry :-(

Guenter

> I case you plan to have this merged into v4.11, please make sure
> to get the fixups in. I found eight drivers that now have incorrect
> dependencies. For two of them I changed the MFD code, for the others
> I just adapted the Kconfig dependencies, mostly by reverting
> part of your patch.
> 
>     Arnd
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-watchdog" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH 3/8] watchdog: wm831x watchdog really needs mfd
  2017-02-28 21:01 ` [PATCH 3/8] watchdog: wm831x watchdog really needs mfd Arnd Bergmann
@ 2017-02-28 21:36   ` Guenter Roeck
  2017-02-28 21:44     ` Arnd Bergmann
  0 siblings, 1 reply; 32+ messages in thread
From: Guenter Roeck @ 2017-02-28 21:36 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: Wim Van Sebroeck, linux-watchdog, Lee Jones, linux-kernel

On Tue, Feb 28, 2017 at 10:01:18PM +0100, Arnd Bergmann wrote:
> The wm831x watchdog driver can now be built without the wm831x mfd
> driver, which results in a link error:
> 
> (.text+0x1a95c): undefined reference to `wm831x_set_bits'
> (.text+0x1a95c): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `wm831x_set_bits'
> (.text+0x1a968): undefined reference to `wm831x_reg_lock'
> (.text+0x1a968): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `wm831x_reg_lock'
> (.text+0x1a9dc): undefined reference to `wm831x_reg_unlock'
> (.text+0x1a9dc): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `wm831x_reg_unlock'
> 
> This adds back the dependency that was removed. We can still build test
> this driver on all architectures by enabling the MFD driver for it first.
> 
> Fixes: da2a68b3eb47 ("watchdog: Enable COMPILE_TEST where possible")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  drivers/watchdog/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig
> index 6ca2f3ae7f1e..34a927703d64 100644
> --- a/drivers/watchdog/Kconfig
> +++ b/drivers/watchdog/Kconfig
> @@ -176,7 +176,7 @@ config WDAT_WDT
>  
>  config WM831X_WATCHDOG
>  	tristate "WM831x watchdog"
> -	depends on MFD_WM831X || COMPILE_TEST
> +	depends on MFD_WM831X

I prefer the fix proposed by Randy:

-       depends on MFD_WM831X || COMPILE_TEST
+       depends on MFD_WM831X || (MFD_WM831X=y && COMPILE_TEST)

>  	select WATCHDOG_CORE
>  	help
>  	  Support for the watchdog in the WM831x AudioPlus PMICs.  When
> -- 
> 2.9.0
> 

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

* Re: [PATCH 8/8] watchdog: kempld: revert to full dependency
  2017-02-28 21:01 ` [PATCH 8/8] watchdog: kempld: revert to full dependency Arnd Bergmann
@ 2017-02-28 21:39   ` Guenter Roeck
  0 siblings, 0 replies; 32+ messages in thread
From: Guenter Roeck @ 2017-02-28 21:39 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: Wim Van Sebroeck, linux-watchdog, Lee Jones, linux-kernel

On Tue, Feb 28, 2017 at 10:01:23PM +0100, Arnd Bergmann wrote:
> The kempld watchdog driver requires the respective MFD driver:
> 
> drivers/watchdog/built-in.o: In function `kempld_wdt_probe':
> kempld_wdt.c:(.text+0x5c78): undefined reference to `kempld_get_mutex'
> kempld_wdt.c:(.text+0x5c84): undefined reference to `kempld_read8'
> kempld_wdt.c:(.text+0x5c8e): undefined reference to `kempld_release_mutex'
> kempld_wdt.c:(.text+0x5d1c): undefined reference to `kempld_read8'
> kempld_wdt.c:(.text+0x5d2c): undefined reference to `kempld_write8'
> 
> This adds the Kconfig dependency back.
> 
> Fixes: da2a68b3eb47 ("watchdog: Enable COMPILE_TEST where possible")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  drivers/watchdog/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig
> index 8cb9b986ee2d..fcaab3139a5c 100644
> --- a/drivers/watchdog/Kconfig
> +++ b/drivers/watchdog/Kconfig
> @@ -1064,7 +1064,7 @@ config HP_WATCHDOG
>  
>  config KEMPLD_WDT
>  	tristate "Kontron COM Watchdog Timer"
> -	depends on MFD_KEMPLD || COMPILE_TEST
> +	depends on MFD_KEMPLD

Randy suggested:

-       depends on MFD_KEMPLD || COMPILE_TEST
+       depends on MFD_KEMPLD || (MFD_KEMPLD=y && COMPILE_TEST)

... though I guess that boils down to the same.

Guenter

>  	select WATCHDOG_CORE
>  	help
>  	  Support for the PLD watchdog on some Kontron ETX and COMexpress
> -- 
> 2.9.0
> 

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

* Re: [PATCH 1/8] mfd: retu: add inline alternatives for CONFIG_RETU=n
  2017-02-28 21:01 ` [PATCH 1/8] mfd: retu: add inline alternatives for CONFIG_RETU=n Arnd Bergmann
@ 2017-02-28 21:40   ` Guenter Roeck
  0 siblings, 0 replies; 32+ messages in thread
From: Guenter Roeck @ 2017-02-28 21:40 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: Wim Van Sebroeck, linux-watchdog, Lee Jones, linux-kernel

On Tue, Feb 28, 2017 at 10:01:16PM +0100, Arnd Bergmann wrote:
> The retu watchdog calls into the respective mfd driver, but fails to
> link if that is diabled:
> 
> drivers/watchdog/built-in.o: In function `retu_wdt_set_timeout':
> ziirave_wdt.c:(.text+0x8c88): undefined reference to `retu_write'
> ziirave_wdt.c:(.text+0x8c88): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `retu_write'
> drivers/watchdog/built-in.o: In function `retu_wdt_start':
> ziirave_wdt.c:(.text+0x8cc8): undefined reference to `retu_write'
> ziirave_wdt.c:(.text+0x8cc8): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `retu_write'
> 
> This adds inline stub helpers that let us build the driver anyway.
> 
> Fixes: da2a68b3eb47 ("watchdog: Enable COMPILE_TEST where possible")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  drivers/watchdog/Kconfig | 2 +-
>  include/linux/mfd/retu.h | 5 +++++
>  2 files changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig
> index c831b7967bf9..6ca2f3ae7f1e 100644
> --- a/drivers/watchdog/Kconfig
> +++ b/drivers/watchdog/Kconfig
> @@ -585,7 +585,7 @@ config UX500_WATCHDOG
>  
>  config RETU_WATCHDOG
>  	tristate "Retu watchdog"
> -	depends on MFD_RETU || COMPILE_TEST
> +	depends on MFD_RETU || (COMPILE_TEST && MFD_RETU=n)

Let's just disable COMPILE_TEST for RETU_WATCHDOG instead.

>  	select WATCHDOG_CORE
>  	help
>  	  Retu watchdog driver for Nokia Internet Tablets (770, N800,
> diff --git a/include/linux/mfd/retu.h b/include/linux/mfd/retu.h
> index 65471c4a3926..a6828e899775 100644
> --- a/include/linux/mfd/retu.h
> +++ b/include/linux/mfd/retu.h
> @@ -11,8 +11,13 @@
>  
>  struct retu_dev;
>  
> +#if IS_ENABLED(CONFIG_MFD_RETU)
>  int retu_read(struct retu_dev *, u8);
>  int retu_write(struct retu_dev *, u8, u16);
> +#else
> +static inline int retu_read(struct retu_dev *dev, u8 r)		{ return -EINVAL; }
> +static inline int retu_write(struct retu_dev *dev, u8 r, u16 v)	{ return -EINVAL; }
> +#endif
>  
>  /* Registers */
>  #define RETU_REG_WATCHDOG	0x17		/* Watchdog */
> -- 
> 2.9.0
> 

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

* Re: [PATCH 2/8] mfd: db8500-prcmu: fix stub helper interface
  2017-02-28 21:01 ` [PATCH 2/8] mfd: db8500-prcmu: fix stub helper interface Arnd Bergmann
@ 2017-02-28 21:42   ` Guenter Roeck
  2017-02-28 21:47     ` Arnd Bergmann
  2017-03-14 11:14     ` Lee Jones
  1 sibling, 1 reply; 32+ messages in thread
From: Guenter Roeck @ 2017-02-28 21:42 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: Wim Van Sebroeck, linux-watchdog, Lee Jones, linux-kernel

On Tue, Feb 28, 2017 at 10:01:17PM +0100, Arnd Bergmann wrote:
> When the db8500 watchdog is enabled without the PRCMU, we get a lot of
> warnings about duplicate or missing helper functions:
> 
> In file included from drivers/watchdog/ux500_wdt.c:21:0:
> include/linux/mfd/dbx500-prcmu.h:422:19: error: redefinition of 'prcmu_abb_read'
>  static inline int prcmu_abb_read(u8 slave, u8 reg, u8 *value, u8 size)
> 
> This removes the duplicate function definitions and moves the helpers in
> dbx500-prcmu outside of the #ifdef that hides them.
> 

Is that appropriate ? Maybe we should just disable COMPILE_TEST
for this driver instead.

> Fixes: da2a68b3eb47 ("watchdog: Enable COMPILE_TEST where possible")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  include/linux/mfd/db8500-prcmu.h | 27 ----------------------
>  include/linux/mfd/dbx500-prcmu.h | 49 ++++++++++++++++++++--------------------
>  2 files changed, 25 insertions(+), 51 deletions(-)
> 
> diff --git a/include/linux/mfd/db8500-prcmu.h b/include/linux/mfd/db8500-prcmu.h
> index 7ba67b55b312..ac9b8a6b8e9c 100644
> --- a/include/linux/mfd/db8500-prcmu.h
> +++ b/include/linux/mfd/db8500-prcmu.h
> @@ -500,17 +500,12 @@ void prcmu_configure_auto_pm(struct prcmu_auto_pm_config *sleep,
>  	struct prcmu_auto_pm_config *idle);
>  bool prcmu_is_auto_pm_enabled(void);
>  
> -int prcmu_config_clkout(u8 clkout, u8 source, u8 div);
>  int prcmu_set_clock_divider(u8 clock, u8 divider);
>  int db8500_prcmu_config_hotdog(u8 threshold);
>  int db8500_prcmu_config_hotmon(u8 low, u8 high);
>  int db8500_prcmu_start_temp_sense(u16 cycles32k);
>  int db8500_prcmu_stop_temp_sense(void);
> -int prcmu_abb_read(u8 slave, u8 reg, u8 *value, u8 size);
> -int prcmu_abb_write(u8 slave, u8 reg, u8 *value, u8 size);
>  
> -int prcmu_ac_wake_req(void);
> -void prcmu_ac_sleep_req(void);
>  void db8500_prcmu_modem_reset(void);
>  
>  int db8500_prcmu_config_a9wdog(u8 num, bool sleep_auto_off);
> @@ -608,11 +603,6 @@ static inline bool prcmu_is_auto_pm_enabled(void)
>  	return false;
>  }
>  
> -static inline int prcmu_config_clkout(u8 clkout, u8 source, u8 div)
> -{
> -	return 0;
> -}
> -
>  static inline int prcmu_set_clock_divider(u8 clock, u8 divider)
>  {
>  	return 0;
> @@ -638,23 +628,6 @@ static inline int db8500_prcmu_stop_temp_sense(void)
>  	return 0;
>  }
>  
> -static inline int prcmu_abb_read(u8 slave, u8 reg, u8 *value, u8 size)
> -{
> -	return -ENOSYS;
> -}
> -
> -static inline int prcmu_abb_write(u8 slave, u8 reg, u8 *value, u8 size)
> -{
> -	return -ENOSYS;
> -}
> -
> -static inline int prcmu_ac_wake_req(void)
> -{
> -	return 0;
> -}
> -
> -static inline void prcmu_ac_sleep_req(void) {}
> -
>  static inline void db8500_prcmu_modem_reset(void) {}
>  
>  static inline void db8500_prcmu_system_reset(u16 reset_code) {}
> diff --git a/include/linux/mfd/dbx500-prcmu.h b/include/linux/mfd/dbx500-prcmu.h
> index 2e2c6a63a065..533459c7ad08 100644
> --- a/include/linux/mfd/dbx500-prcmu.h
> +++ b/include/linux/mfd/dbx500-prcmu.h
> @@ -376,30 +376,6 @@ static inline void prcmu_write_masked(unsigned int reg, u32 mask, u32 value)
>  	db8500_prcmu_write_masked(reg, mask, value);
>  }
>  
> -static inline int prcmu_enable_a9wdog(u8 id)
> -{
> -	return db8500_prcmu_enable_a9wdog(id);
> -}
> -
> -static inline int prcmu_disable_a9wdog(u8 id)
> -{
> -	return db8500_prcmu_disable_a9wdog(id);
> -}
> -
> -static inline int prcmu_kick_a9wdog(u8 id)
> -{
> -	return db8500_prcmu_kick_a9wdog(id);
> -}
> -
> -static inline int prcmu_load_a9wdog(u8 id, u32 timeout)
> -{
> -	return db8500_prcmu_load_a9wdog(id, timeout);
> -}
> -
> -static inline int prcmu_config_a9wdog(u8 num, bool sleep_auto_off)
> -{
> -	return db8500_prcmu_config_a9wdog(num, sleep_auto_off);
> -}
>  #else
>  
>  static inline void prcmu_early_init(u32 phy_base, u32 size) {}
> @@ -569,6 +545,31 @@ static inline void prcmu_write_masked(unsigned int reg, u32 mask, u32 value) {}
>  
>  #endif
>  
> +static inline int prcmu_enable_a9wdog(u8 id)
> +{
> +	return db8500_prcmu_enable_a9wdog(id);
> +}
> +
> +static inline int prcmu_disable_a9wdog(u8 id)
> +{
> +	return db8500_prcmu_disable_a9wdog(id);
> +}
> +
> +static inline int prcmu_kick_a9wdog(u8 id)
> +{
> +	return db8500_prcmu_kick_a9wdog(id);
> +}
> +
> +static inline int prcmu_load_a9wdog(u8 id, u32 timeout)
> +{
> +	return db8500_prcmu_load_a9wdog(id, timeout);
> +}
> +
> +static inline int prcmu_config_a9wdog(u8 num, bool sleep_auto_off)
> +{
> +	return db8500_prcmu_config_a9wdog(num, sleep_auto_off);
> +}
> +
>  static inline void prcmu_set(unsigned int reg, u32 bits)
>  {
>  	prcmu_write_masked(reg, bits, bits);
> -- 
> 2.9.0
> 

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

* Re: [PATCH 4/8] watchdog: geode: restore hard CS5535_MFGPT dependency
  2017-02-28 21:01 ` [PATCH 4/8] watchdog: geode: restore hard CS5535_MFGPT dependency Arnd Bergmann
@ 2017-02-28 21:42   ` Guenter Roeck
  0 siblings, 0 replies; 32+ messages in thread
From: Guenter Roeck @ 2017-02-28 21:42 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: Wim Van Sebroeck, linux-watchdog, Lee Jones, linux-kernel

On Tue, Feb 28, 2017 at 10:01:19PM +0100, Arnd Bergmann wrote:
> Wtihout CONFIG_CS5535_MFGPT, the driver does not link right:
> 
> drivers/watchdog/built-in.o: In function `geodewdt_probe':
> geodewdt.c:(.init.text+0xca3): undefined reference to `cs5535_mfgpt_alloc_timer'
> geodewdt.c:(.init.text+0xcd4): undefined reference to `cs5535_mfgpt_write'
> geodewdt.c:(.init.text+0xcef): undefined reference to `cs5535_mfgpt_toggle_event'
> 
> This adds back the dependency on this base driver.
> 
> Fixes: da2a68b3eb47 ("watchdog: Enable COMPILE_TEST where possible")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Reviewed-by: Guenter Roeck <linux@roeck-us.net>

> ---
>  drivers/watchdog/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig
> index 34a927703d64..de52495ef150 100644
> --- a/drivers/watchdog/Kconfig
> +++ b/drivers/watchdog/Kconfig
> @@ -851,7 +851,7 @@ config SP5100_TCO
>  
>  config GEODE_WDT
>  	tristate "AMD Geode CS5535/CS5536 Watchdog"
> -	depends on CS5535_MFGPT || (X86 && COMPILE_TEST)
> +	depends on CS5535_MFGPT
>  	help
>  	  This driver enables a watchdog capability built into the
>  	  CS5535/CS5536 companion chips for the AMD Geode GX and LX
> -- 
> 2.9.0
> 

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

* Re: [PATCH 5/8] watchdog: menf21bmc: add I2C dependency
  2017-02-28 21:01 ` [PATCH 5/8] watchdog: menf21bmc: add I2C dependency Arnd Bergmann
@ 2017-02-28 21:43   ` Guenter Roeck
  0 siblings, 0 replies; 32+ messages in thread
From: Guenter Roeck @ 2017-02-28 21:43 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: Wim Van Sebroeck, linux-watchdog, Lee Jones, linux-kernel

On Tue, Feb 28, 2017 at 10:01:20PM +0100, Arnd Bergmann wrote:
> This driver fails to link when CONFIG_I2C is disabled or a loadable module while
> the watchdog is built-in:
> 
> drivers/watchdog/built-in.o: In function `menf21bmc_wdt_shutdown':
> menf21bmc_wdt.c:(.text+0x9b44): undefined reference to `i2c_smbus_write_word_data'
> menf21bmc_wdt.c:(.text+0x9b44): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `i2c_smbus_write_word_data'
> 
> This adds a Kconfig dependency for it, to enforce a valid configuration.
> 
> Fixes: da2a68b3eb47 ("watchdog: Enable COMPILE_TEST where possible")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Reviewed-by: Guenter Roeck <linux@roeck-us.net>

> ---
>  drivers/watchdog/Kconfig | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig
> index de52495ef150..ab0ec389e436 100644
> --- a/drivers/watchdog/Kconfig
> +++ b/drivers/watchdog/Kconfig
> @@ -142,6 +142,7 @@ config GPIO_WATCHDOG_ARCH_INITCALL
>  config MENF21BMC_WATCHDOG
>  	tristate "MEN 14F021P00 BMC Watchdog"
>  	depends on MFD_MENF21BMC || COMPILE_TEST
> +	depends on I2C
>  	select WATCHDOG_CORE
>  	help
>  	  Say Y here to include support for the MEN 14F021P00 BMC Watchdog.
> -- 
> 2.9.0
> 

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

* Re: [PATCH 6/8] watchdog: sp805: add back AMBA dependency
  2017-02-28 21:01 ` [PATCH 6/8] watchdog: sp805: add back AMBA dependency Arnd Bergmann
@ 2017-02-28 21:43   ` Guenter Roeck
  0 siblings, 0 replies; 32+ messages in thread
From: Guenter Roeck @ 2017-02-28 21:43 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: Wim Van Sebroeck, linux-watchdog, Lee Jones, linux-kernel

On Tue, Feb 28, 2017 at 10:01:21PM +0100, Arnd Bergmann wrote:
> The driver fails to link if ARM_AMBA is disabled:
> 
> drivers/watchdog/sp805_wdt.o: In function `sp805_wdt_driver_init':
> sp805_wdt.c:(.init.text+0x4): undefined reference to `amba_driver_register'
> 
> It seems that the COMPILE_TEST was added in the wrong place, as there
> is no architecture dependency, but a bus dependency. This moves
> the dependency accordingly.
> 
> Fixes: da2a68b3eb47 ("watchdog: Enable COMPILE_TEST where possible")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Reviewed-by: Guenter Roeck <linux@roeck-us.net>

> ---
>  drivers/watchdog/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig
> index ab0ec389e436..3216012170fa 100644
> --- a/drivers/watchdog/Kconfig
> +++ b/drivers/watchdog/Kconfig
> @@ -218,7 +218,7 @@ config ZIIRAVE_WATCHDOG
>  
>  config ARM_SP805_WATCHDOG
>  	tristate "ARM SP805 Watchdog"
> -	depends on (ARM || ARM64) && (ARM_AMBA || COMPILE_TEST)
> +	depends on (ARM || ARM64 || COMPILE_TEST) && ARM_AMBA
>  	select WATCHDOG_CORE
>  	help
>  	  ARM Primecell SP805 Watchdog timer. This will reboot your system when
> -- 
> 2.9.0
> 

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

* Re: [PATCH 7/8] watchdog: bcm2835: add CONFIG_OF dependency
  2017-02-28 21:01 ` [PATCH 7/8] watchdog: bcm2835: add CONFIG_OF dependency Arnd Bergmann
@ 2017-02-28 21:43   ` Guenter Roeck
  0 siblings, 0 replies; 32+ messages in thread
From: Guenter Roeck @ 2017-02-28 21:43 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: Wim Van Sebroeck, linux-watchdog, Lee Jones, linux-kernel

On Tue, Feb 28, 2017 at 10:01:22PM +0100, Arnd Bergmann wrote:
> Without CONFIG_OF, the driver fails to link:
> 
> drivers/watchdog/built-in.o: In function `bcm2835_power_off':
> bcm2835_wdt.c:(.text+0x1946): undefined reference to `of_find_device_by_node'
> 
> This adds a new dependency, to allow the COMPILE_TEST check to succeed.
> 
> Fixes: da2a68b3eb47 ("watchdog: Enable COMPILE_TEST where possible")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Reviewed-by: Guenter Roeck <linux@roeck-us.net>

> ---
>  drivers/watchdog/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig
> index 3216012170fa..8cb9b986ee2d 100644
> --- a/drivers/watchdog/Kconfig
> +++ b/drivers/watchdog/Kconfig
> @@ -1496,7 +1496,7 @@ config BCM63XX_WDT
>  
>  config BCM2835_WDT
>  	tristate "Broadcom BCM2835 hardware watchdog"
> -	depends on ARCH_BCM2835 || COMPILE_TEST
> +	depends on ARCH_BCM2835 || (OF && COMPILE_TEST)
>  	select WATCHDOG_CORE
>  	help
>  	  Watchdog driver for the built in watchdog hardware in Broadcom
> -- 
> 2.9.0
> 

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

* Re: [PATCH 3/8] watchdog: wm831x watchdog really needs mfd
  2017-02-28 21:36   ` Guenter Roeck
@ 2017-02-28 21:44     ` Arnd Bergmann
  2017-02-28 21:48       ` Arnd Bergmann
  0 siblings, 1 reply; 32+ messages in thread
From: Arnd Bergmann @ 2017-02-28 21:44 UTC (permalink / raw)
  To: Guenter Roeck
  Cc: Wim Van Sebroeck, linux-watchdog, Lee Jones, Linux Kernel Mailing List

On Tue, Feb 28, 2017 at 10:36 PM, Guenter Roeck <linux@roeck-us.net> wrote:

>>  config WM831X_WATCHDOG
>>       tristate "WM831x watchdog"
>> -     depends on MFD_WM831X || COMPILE_TEST
>> +     depends on MFD_WM831X
>
> I prefer the fix proposed by Randy:
>
> -       depends on MFD_WM831X || COMPILE_TEST
> +       depends on MFD_WM831X || (MFD_WM831X=y && COMPILE_TEST)
>

Agreed, that's better.

    Arnd

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

* Re: [PATCH 2/8] mfd: db8500-prcmu: fix stub helper interface
  2017-02-28 21:42   ` Guenter Roeck
@ 2017-02-28 21:47     ` Arnd Bergmann
  2017-02-28 23:19       ` Guenter Roeck
  2017-02-28 23:24       ` Guenter Roeck
  0 siblings, 2 replies; 32+ messages in thread
From: Arnd Bergmann @ 2017-02-28 21:47 UTC (permalink / raw)
  To: Guenter Roeck
  Cc: Wim Van Sebroeck, linux-watchdog, Lee Jones, Linux Kernel Mailing List

On Tue, Feb 28, 2017 at 10:42 PM, Guenter Roeck <linux@roeck-us.net> wrote:
> On Tue, Feb 28, 2017 at 10:01:17PM +0100, Arnd Bergmann wrote:
>> When the db8500 watchdog is enabled without the PRCMU, we get a lot of
>> warnings about duplicate or missing helper functions:
>>
>> In file included from drivers/watchdog/ux500_wdt.c:21:0:
>> include/linux/mfd/dbx500-prcmu.h:422:19: error: redefinition of 'prcmu_abb_read'
>>  static inline int prcmu_abb_read(u8 slave, u8 reg, u8 *value, u8 size)
>>
>> This removes the duplicate function definitions and moves the helpers in
>> dbx500-prcmu outside of the #ifdef that hides them.
>>
>
> Is that appropriate ? Maybe we should just disable COMPILE_TEST
> for this driver instead.

Or we could do both. The MFD driver was written to support this in principle,
it just hasn't worked in a long time.

     Arnd

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

* Re: [PATCH 3/8] watchdog: wm831x watchdog really needs mfd
  2017-02-28 21:44     ` Arnd Bergmann
@ 2017-02-28 21:48       ` Arnd Bergmann
  2017-02-28 23:16         ` Guenter Roeck
  0 siblings, 1 reply; 32+ messages in thread
From: Arnd Bergmann @ 2017-02-28 21:48 UTC (permalink / raw)
  To: Guenter Roeck
  Cc: Wim Van Sebroeck, linux-watchdog, Lee Jones, Linux Kernel Mailing List

On Tue, Feb 28, 2017 at 10:44 PM, Arnd Bergmann <arnd@arndb.de> wrote:
> On Tue, Feb 28, 2017 at 10:36 PM, Guenter Roeck <linux@roeck-us.net> wrote:
>
>>>  config WM831X_WATCHDOG
>>>       tristate "WM831x watchdog"
>>> -     depends on MFD_WM831X || COMPILE_TEST
>>> +     depends on MFD_WM831X
>>
>> I prefer the fix proposed by Randy:
>>
>> -       depends on MFD_WM831X || COMPILE_TEST
>> +       depends on MFD_WM831X || (MFD_WM831X=y && COMPILE_TEST)
>>
>
> Agreed, that's better.

Actually I misread. They should be completely equivalent, the part after
the || has no effect here.

     Arnd

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

* Re: [PATCH 3/8] watchdog: wm831x watchdog really needs mfd
  2017-02-28 21:48       ` Arnd Bergmann
@ 2017-02-28 23:16         ` Guenter Roeck
  2017-03-01  2:50           ` Randy Dunlap
  0 siblings, 1 reply; 32+ messages in thread
From: Guenter Roeck @ 2017-02-28 23:16 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Wim Van Sebroeck, linux-watchdog, Lee Jones, Linux Kernel Mailing List

On Tue, Feb 28, 2017 at 10:48:27PM +0100, Arnd Bergmann wrote:
> On Tue, Feb 28, 2017 at 10:44 PM, Arnd Bergmann <arnd@arndb.de> wrote:
> > On Tue, Feb 28, 2017 at 10:36 PM, Guenter Roeck <linux@roeck-us.net> wrote:
> >
> >>>  config WM831X_WATCHDOG
> >>>       tristate "WM831x watchdog"
> >>> -     depends on MFD_WM831X || COMPILE_TEST
> >>> +     depends on MFD_WM831X
> >>
> >> I prefer the fix proposed by Randy:
> >>
> >> -       depends on MFD_WM831X || COMPILE_TEST
> >> +       depends on MFD_WM831X || (MFD_WM831X=y && COMPILE_TEST)
> >>
> >
> > Agreed, that's better.
> 
> Actually I misread. They should be completely equivalent, the part after
> the || has no effect here.
> 
Yes, I figured that out later as well.

Guenter

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

* Re: [PATCH 2/8] mfd: db8500-prcmu: fix stub helper interface
  2017-02-28 21:47     ` Arnd Bergmann
@ 2017-02-28 23:19       ` Guenter Roeck
  2017-02-28 23:24       ` Guenter Roeck
  1 sibling, 0 replies; 32+ messages in thread
From: Guenter Roeck @ 2017-02-28 23:19 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Wim Van Sebroeck, linux-watchdog, Lee Jones, Linux Kernel Mailing List

On Tue, Feb 28, 2017 at 10:47:02PM +0100, Arnd Bergmann wrote:
> On Tue, Feb 28, 2017 at 10:42 PM, Guenter Roeck <linux@roeck-us.net> wrote:
> > On Tue, Feb 28, 2017 at 10:01:17PM +0100, Arnd Bergmann wrote:
> >> When the db8500 watchdog is enabled without the PRCMU, we get a lot of
> >> warnings about duplicate or missing helper functions:
> >>
> >> In file included from drivers/watchdog/ux500_wdt.c:21:0:
> >> include/linux/mfd/dbx500-prcmu.h:422:19: error: redefinition of 'prcmu_abb_read'
> >>  static inline int prcmu_abb_read(u8 slave, u8 reg, u8 *value, u8 size)
> >>
> >> This removes the duplicate function definitions and moves the helpers in
> >> dbx500-prcmu outside of the #ifdef that hides them.
> >>
> >
> > Is that appropriate ? Maybe we should just disable COMPILE_TEST
> > for this driver instead.
> 
> Or we could do both. The MFD driver was written to support this in principle,
> it just hasn't worked in a long time.
> 
Both sounds better to me at this point.

Guenter

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

* Re: [PATCH 2/8] mfd: db8500-prcmu: fix stub helper interface
  2017-02-28 21:47     ` Arnd Bergmann
  2017-02-28 23:19       ` Guenter Roeck
@ 2017-02-28 23:24       ` Guenter Roeck
  2017-03-01  9:17         ` Arnd Bergmann
  1 sibling, 1 reply; 32+ messages in thread
From: Guenter Roeck @ 2017-02-28 23:24 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Wim Van Sebroeck, linux-watchdog, Lee Jones, Linux Kernel Mailing List

On Tue, Feb 28, 2017 at 10:47:02PM +0100, Arnd Bergmann wrote:
> On Tue, Feb 28, 2017 at 10:42 PM, Guenter Roeck <linux@roeck-us.net> wrote:
> > On Tue, Feb 28, 2017 at 10:01:17PM +0100, Arnd Bergmann wrote:
> >> When the db8500 watchdog is enabled without the PRCMU, we get a lot of
> >> warnings about duplicate or missing helper functions:
> >>
> >> In file included from drivers/watchdog/ux500_wdt.c:21:0:
> >> include/linux/mfd/dbx500-prcmu.h:422:19: error: redefinition of 'prcmu_abb_read'
> >>  static inline int prcmu_abb_read(u8 slave, u8 reg, u8 *value, u8 size)
> >>
> >> This removes the duplicate function definitions and moves the helpers in
> >> dbx500-prcmu outside of the #ifdef that hides them.
> >>
> >
> > Is that appropriate ? Maybe we should just disable COMPILE_TEST
> > for this driver instead.
> 
> Or we could do both. The MFD driver was written to support this in principle,
> it just hasn't worked in a long time.
> 

Can you send me patches to disable COMPILE_TEST for this driver and for retu ?

Thanks,
Guenter

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

* Re: [PATCH 3/8] watchdog: wm831x watchdog really needs mfd
  2017-02-28 23:16         ` Guenter Roeck
@ 2017-03-01  2:50           ` Randy Dunlap
  0 siblings, 0 replies; 32+ messages in thread
From: Randy Dunlap @ 2017-03-01  2:50 UTC (permalink / raw)
  To: Guenter Roeck, Arnd Bergmann
  Cc: Wim Van Sebroeck, linux-watchdog, Lee Jones, Linux Kernel Mailing List

On 02/28/17 15:16, Guenter Roeck wrote:
> On Tue, Feb 28, 2017 at 10:48:27PM +0100, Arnd Bergmann wrote:
>> On Tue, Feb 28, 2017 at 10:44 PM, Arnd Bergmann <arnd@arndb.de> wrote:
>>> On Tue, Feb 28, 2017 at 10:36 PM, Guenter Roeck <linux@roeck-us.net> wrote:
>>>
>>>>>  config WM831X_WATCHDOG
>>>>>       tristate "WM831x watchdog"
>>>>> -     depends on MFD_WM831X || COMPILE_TEST
>>>>> +     depends on MFD_WM831X
>>>>
>>>> I prefer the fix proposed by Randy:
>>>>
>>>> -       depends on MFD_WM831X || COMPILE_TEST
>>>> +       depends on MFD_WM831X || (MFD_WM831X=y && COMPILE_TEST)
>>>>
>>>
>>> Agreed, that's better.
>>
>> Actually I misread. They should be completely equivalent, the part after
>> the || has no effect here.
>>
> Yes, I figured that out later as well.

Agreed.  Arnd's is simpler.  My patch might keep someone else from
making the same mistake.  ;)


-- 
~Randy

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

* Re: [PATCH 2/8] mfd: db8500-prcmu: fix stub helper interface
  2017-02-28 23:24       ` Guenter Roeck
@ 2017-03-01  9:17         ` Arnd Bergmann
  0 siblings, 0 replies; 32+ messages in thread
From: Arnd Bergmann @ 2017-03-01  9:17 UTC (permalink / raw)
  To: Guenter Roeck
  Cc: Wim Van Sebroeck, linux-watchdog, Lee Jones, Linux Kernel Mailing List

On Wed, Mar 1, 2017 at 12:24 AM, Guenter Roeck <linux@roeck-us.net> wrote:
> On Tue, Feb 28, 2017 at 10:47:02PM +0100, Arnd Bergmann wrote:
>> On Tue, Feb 28, 2017 at 10:42 PM, Guenter Roeck <linux@roeck-us.net> wrote:
>> > On Tue, Feb 28, 2017 at 10:01:17PM +0100, Arnd Bergmann wrote:
>> >> When the db8500 watchdog is enabled without the PRCMU, we get a lot of
>> >> warnings about duplicate or missing helper functions:
>> >>
>> >> In file included from drivers/watchdog/ux500_wdt.c:21:0:
>> >> include/linux/mfd/dbx500-prcmu.h:422:19: error: redefinition of 'prcmu_abb_read'
>> >>  static inline int prcmu_abb_read(u8 slave, u8 reg, u8 *value, u8 size)
>> >>
>> >> This removes the duplicate function definitions and moves the helpers in
>> >> dbx500-prcmu outside of the #ifdef that hides them.
>> >>
>> >
>> > Is that appropriate ? Maybe we should just disable COMPILE_TEST
>> > for this driver instead.
>>
>> Or we could do both. The MFD driver was written to support this in principle,
>> it just hasn't worked in a long time.
>>
>
> Can you send me patches to disable COMPILE_TEST for this driver and for retu ?

Done.

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

* Re: [PATCH 2/8] mfd: db8500-prcmu: fix stub helper interface
  2017-02-28 21:01 ` [PATCH 2/8] mfd: db8500-prcmu: fix stub helper interface Arnd Bergmann
@ 2017-03-14 11:14     ` Lee Jones
  2017-03-14 11:14     ` Lee Jones
  1 sibling, 0 replies; 32+ messages in thread
From: Lee Jones @ 2017-03-14 11:14 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Guenter Roeck, Wim Van Sebroeck, linux-watchdog, linux-kernel

On Tue, 28 Feb 2017, Arnd Bergmann wrote:

> When the db8500 watchdog is enabled without the PRCMU, we get a lot of
> warnings about duplicate or missing helper functions:
> 
> In file included from drivers/watchdog/ux500_wdt.c:21:0:
> include/linux/mfd/dbx500-prcmu.h:422:19: error: redefinition of 'prcmu_abb_read'
>  static inline int prcmu_abb_read(u8 slave, u8 reg, u8 *value, u8 size)
> 
> This removes the duplicate function definitions and moves the helpers in
> dbx500-prcmu outside of the #ifdef that hides them.
> 
> Fixes: da2a68b3eb47 ("watchdog: Enable COMPILE_TEST where possible")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  include/linux/mfd/db8500-prcmu.h | 27 ----------------------
>  include/linux/mfd/dbx500-prcmu.h | 49 ++++++++++++++++++++--------------------
>  2 files changed, 25 insertions(+), 51 deletions(-)

Is this patch still valid?

> diff --git a/include/linux/mfd/db8500-prcmu.h b/include/linux/mfd/db8500-prcmu.h
> index 7ba67b55b312..ac9b8a6b8e9c 100644
> --- a/include/linux/mfd/db8500-prcmu.h
> +++ b/include/linux/mfd/db8500-prcmu.h
> @@ -500,17 +500,12 @@ void prcmu_configure_auto_pm(struct prcmu_auto_pm_config *sleep,
>  	struct prcmu_auto_pm_config *idle);
>  bool prcmu_is_auto_pm_enabled(void);
>  
> -int prcmu_config_clkout(u8 clkout, u8 source, u8 div);
>  int prcmu_set_clock_divider(u8 clock, u8 divider);
>  int db8500_prcmu_config_hotdog(u8 threshold);
>  int db8500_prcmu_config_hotmon(u8 low, u8 high);
>  int db8500_prcmu_start_temp_sense(u16 cycles32k);
>  int db8500_prcmu_stop_temp_sense(void);
> -int prcmu_abb_read(u8 slave, u8 reg, u8 *value, u8 size);
> -int prcmu_abb_write(u8 slave, u8 reg, u8 *value, u8 size);
>  
> -int prcmu_ac_wake_req(void);
> -void prcmu_ac_sleep_req(void);
>  void db8500_prcmu_modem_reset(void);
>  
>  int db8500_prcmu_config_a9wdog(u8 num, bool sleep_auto_off);
> @@ -608,11 +603,6 @@ static inline bool prcmu_is_auto_pm_enabled(void)
>  	return false;
>  }
>  
> -static inline int prcmu_config_clkout(u8 clkout, u8 source, u8 div)
> -{
> -	return 0;
> -}
> -
>  static inline int prcmu_set_clock_divider(u8 clock, u8 divider)
>  {
>  	return 0;
> @@ -638,23 +628,6 @@ static inline int db8500_prcmu_stop_temp_sense(void)
>  	return 0;
>  }
>  
> -static inline int prcmu_abb_read(u8 slave, u8 reg, u8 *value, u8 size)
> -{
> -	return -ENOSYS;
> -}
> -
> -static inline int prcmu_abb_write(u8 slave, u8 reg, u8 *value, u8 size)
> -{
> -	return -ENOSYS;
> -}
> -
> -static inline int prcmu_ac_wake_req(void)
> -{
> -	return 0;
> -}
> -
> -static inline void prcmu_ac_sleep_req(void) {}
> -
>  static inline void db8500_prcmu_modem_reset(void) {}
>  
>  static inline void db8500_prcmu_system_reset(u16 reset_code) {}
> diff --git a/include/linux/mfd/dbx500-prcmu.h b/include/linux/mfd/dbx500-prcmu.h
> index 2e2c6a63a065..533459c7ad08 100644
> --- a/include/linux/mfd/dbx500-prcmu.h
> +++ b/include/linux/mfd/dbx500-prcmu.h
> @@ -376,30 +376,6 @@ static inline void prcmu_write_masked(unsigned int reg, u32 mask, u32 value)
>  	db8500_prcmu_write_masked(reg, mask, value);
>  }
>  
> -static inline int prcmu_enable_a9wdog(u8 id)
> -{
> -	return db8500_prcmu_enable_a9wdog(id);
> -}
> -
> -static inline int prcmu_disable_a9wdog(u8 id)
> -{
> -	return db8500_prcmu_disable_a9wdog(id);
> -}
> -
> -static inline int prcmu_kick_a9wdog(u8 id)
> -{
> -	return db8500_prcmu_kick_a9wdog(id);
> -}
> -
> -static inline int prcmu_load_a9wdog(u8 id, u32 timeout)
> -{
> -	return db8500_prcmu_load_a9wdog(id, timeout);
> -}
> -
> -static inline int prcmu_config_a9wdog(u8 num, bool sleep_auto_off)
> -{
> -	return db8500_prcmu_config_a9wdog(num, sleep_auto_off);
> -}
>  #else
>  
>  static inline void prcmu_early_init(u32 phy_base, u32 size) {}
> @@ -569,6 +545,31 @@ static inline void prcmu_write_masked(unsigned int reg, u32 mask, u32 value) {}
>  
>  #endif
>  
> +static inline int prcmu_enable_a9wdog(u8 id)
> +{
> +	return db8500_prcmu_enable_a9wdog(id);
> +}
> +
> +static inline int prcmu_disable_a9wdog(u8 id)
> +{
> +	return db8500_prcmu_disable_a9wdog(id);
> +}
> +
> +static inline int prcmu_kick_a9wdog(u8 id)
> +{
> +	return db8500_prcmu_kick_a9wdog(id);
> +}
> +
> +static inline int prcmu_load_a9wdog(u8 id, u32 timeout)
> +{
> +	return db8500_prcmu_load_a9wdog(id, timeout);
> +}
> +
> +static inline int prcmu_config_a9wdog(u8 num, bool sleep_auto_off)
> +{
> +	return db8500_prcmu_config_a9wdog(num, sleep_auto_off);
> +}
> +
>  static inline void prcmu_set(unsigned int reg, u32 bits)
>  {
>  	prcmu_write_masked(reg, bits, bits);

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

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

* Re: [PATCH 2/8] mfd: db8500-prcmu: fix stub helper interface
@ 2017-03-14 11:14     ` Lee Jones
  0 siblings, 0 replies; 32+ messages in thread
From: Lee Jones @ 2017-03-14 11:14 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Guenter Roeck, Wim Van Sebroeck, linux-watchdog, linux-kernel

On Tue, 28 Feb 2017, Arnd Bergmann wrote:

> When the db8500 watchdog is enabled without the PRCMU, we get a lot of
> warnings about duplicate or missing helper functions:
> 
> In file included from drivers/watchdog/ux500_wdt.c:21:0:
> include/linux/mfd/dbx500-prcmu.h:422:19: error: redefinition of 'prcmu_abb_read'
>  static inline int prcmu_abb_read(u8 slave, u8 reg, u8 *value, u8 size)
> 
> This removes the duplicate function definitions and moves the helpers in
> dbx500-prcmu outside of the #ifdef that hides them.
> 
> Fixes: da2a68b3eb47 ("watchdog: Enable COMPILE_TEST where possible")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  include/linux/mfd/db8500-prcmu.h | 27 ----------------------
>  include/linux/mfd/dbx500-prcmu.h | 49 ++++++++++++++++++++--------------------
>  2 files changed, 25 insertions(+), 51 deletions(-)

Is this patch still valid?

> diff --git a/include/linux/mfd/db8500-prcmu.h b/include/linux/mfd/db8500-prcmu.h
> index 7ba67b55b312..ac9b8a6b8e9c 100644
> --- a/include/linux/mfd/db8500-prcmu.h
> +++ b/include/linux/mfd/db8500-prcmu.h
> @@ -500,17 +500,12 @@ void prcmu_configure_auto_pm(struct prcmu_auto_pm_config *sleep,
>  	struct prcmu_auto_pm_config *idle);
>  bool prcmu_is_auto_pm_enabled(void);
>  
> -int prcmu_config_clkout(u8 clkout, u8 source, u8 div);
>  int prcmu_set_clock_divider(u8 clock, u8 divider);
>  int db8500_prcmu_config_hotdog(u8 threshold);
>  int db8500_prcmu_config_hotmon(u8 low, u8 high);
>  int db8500_prcmu_start_temp_sense(u16 cycles32k);
>  int db8500_prcmu_stop_temp_sense(void);
> -int prcmu_abb_read(u8 slave, u8 reg, u8 *value, u8 size);
> -int prcmu_abb_write(u8 slave, u8 reg, u8 *value, u8 size);
>  
> -int prcmu_ac_wake_req(void);
> -void prcmu_ac_sleep_req(void);
>  void db8500_prcmu_modem_reset(void);
>  
>  int db8500_prcmu_config_a9wdog(u8 num, bool sleep_auto_off);
> @@ -608,11 +603,6 @@ static inline bool prcmu_is_auto_pm_enabled(void)
>  	return false;
>  }
>  
> -static inline int prcmu_config_clkout(u8 clkout, u8 source, u8 div)
> -{
> -	return 0;
> -}
> -
>  static inline int prcmu_set_clock_divider(u8 clock, u8 divider)
>  {
>  	return 0;
> @@ -638,23 +628,6 @@ static inline int db8500_prcmu_stop_temp_sense(void)
>  	return 0;
>  }
>  
> -static inline int prcmu_abb_read(u8 slave, u8 reg, u8 *value, u8 size)
> -{
> -	return -ENOSYS;
> -}
> -
> -static inline int prcmu_abb_write(u8 slave, u8 reg, u8 *value, u8 size)
> -{
> -	return -ENOSYS;
> -}
> -
> -static inline int prcmu_ac_wake_req(void)
> -{
> -	return 0;
> -}
> -
> -static inline void prcmu_ac_sleep_req(void) {}
> -
>  static inline void db8500_prcmu_modem_reset(void) {}
>  
>  static inline void db8500_prcmu_system_reset(u16 reset_code) {}
> diff --git a/include/linux/mfd/dbx500-prcmu.h b/include/linux/mfd/dbx500-prcmu.h
> index 2e2c6a63a065..533459c7ad08 100644
> --- a/include/linux/mfd/dbx500-prcmu.h
> +++ b/include/linux/mfd/dbx500-prcmu.h
> @@ -376,30 +376,6 @@ static inline void prcmu_write_masked(unsigned int reg, u32 mask, u32 value)
>  	db8500_prcmu_write_masked(reg, mask, value);
>  }
>  
> -static inline int prcmu_enable_a9wdog(u8 id)
> -{
> -	return db8500_prcmu_enable_a9wdog(id);
> -}
> -
> -static inline int prcmu_disable_a9wdog(u8 id)
> -{
> -	return db8500_prcmu_disable_a9wdog(id);
> -}
> -
> -static inline int prcmu_kick_a9wdog(u8 id)
> -{
> -	return db8500_prcmu_kick_a9wdog(id);
> -}
> -
> -static inline int prcmu_load_a9wdog(u8 id, u32 timeout)
> -{
> -	return db8500_prcmu_load_a9wdog(id, timeout);
> -}
> -
> -static inline int prcmu_config_a9wdog(u8 num, bool sleep_auto_off)
> -{
> -	return db8500_prcmu_config_a9wdog(num, sleep_auto_off);
> -}
>  #else
>  
>  static inline void prcmu_early_init(u32 phy_base, u32 size) {}
> @@ -569,6 +545,31 @@ static inline void prcmu_write_masked(unsigned int reg, u32 mask, u32 value) {}
>  
>  #endif
>  
> +static inline int prcmu_enable_a9wdog(u8 id)
> +{
> +	return db8500_prcmu_enable_a9wdog(id);
> +}
> +
> +static inline int prcmu_disable_a9wdog(u8 id)
> +{
> +	return db8500_prcmu_disable_a9wdog(id);
> +}
> +
> +static inline int prcmu_kick_a9wdog(u8 id)
> +{
> +	return db8500_prcmu_kick_a9wdog(id);
> +}
> +
> +static inline int prcmu_load_a9wdog(u8 id, u32 timeout)
> +{
> +	return db8500_prcmu_load_a9wdog(id, timeout);
> +}
> +
> +static inline int prcmu_config_a9wdog(u8 num, bool sleep_auto_off)
> +{
> +	return db8500_prcmu_config_a9wdog(num, sleep_auto_off);
> +}
> +
>  static inline void prcmu_set(unsigned int reg, u32 bits)
>  {
>  	prcmu_write_masked(reg, bits, bits);

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line "unsubscribe linux-watchdog" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH 2/8] mfd: db8500-prcmu: fix stub helper interface
  2017-03-14 11:14     ` Lee Jones
  (?)
@ 2017-03-14 12:09     ` Arnd Bergmann
  2017-03-15 10:27         ` Lee Jones
  -1 siblings, 1 reply; 32+ messages in thread
From: Arnd Bergmann @ 2017-03-14 12:09 UTC (permalink / raw)
  To: Lee Jones
  Cc: Guenter Roeck, Wim Van Sebroeck, linux-watchdog,
	Linux Kernel Mailing List

On Tue, Mar 14, 2017 at 12:14 PM, Lee Jones <lee.jones@linaro.org> wrote:
> On Tue, 28 Feb 2017, Arnd Bergmann wrote:
>
>> When the db8500 watchdog is enabled without the PRCMU, we get a lot of
>> warnings about duplicate or missing helper functions:
>>
>> In file included from drivers/watchdog/ux500_wdt.c:21:0:
>> include/linux/mfd/dbx500-prcmu.h:422:19: error: redefinition of 'prcmu_abb_read'
>>  static inline int prcmu_abb_read(u8 slave, u8 reg, u8 *value, u8 size)
>>
>> This removes the duplicate function definitions and moves the helpers in
>> dbx500-prcmu outside of the #ifdef that hides them.
>>
>> Fixes: da2a68b3eb47 ("watchdog: Enable COMPILE_TEST where possible")
>> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
>> ---
>>  include/linux/mfd/db8500-prcmu.h | 27 ----------------------
>>  include/linux/mfd/dbx500-prcmu.h | 49 ++++++++++++++++++++--------------------
>>  2 files changed, 25 insertions(+), 51 deletions(-)
>
> Is this patch still valid?

Yes. The build error was resolved with a different patch, but this is
still a useful cleanup.

    Arnd

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

* Re: [PATCH 2/8] mfd: db8500-prcmu: fix stub helper interface
  2017-03-14 12:09     ` Arnd Bergmann
@ 2017-03-15 10:27         ` Lee Jones
  0 siblings, 0 replies; 32+ messages in thread
From: Lee Jones @ 2017-03-15 10:27 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Guenter Roeck, Wim Van Sebroeck, linux-watchdog,
	Linux Kernel Mailing List

On Tue, 14 Mar 2017, Arnd Bergmann wrote:

> On Tue, Mar 14, 2017 at 12:14 PM, Lee Jones <lee.jones@linaro.org> wrote:
> > On Tue, 28 Feb 2017, Arnd Bergmann wrote:
> >
> >> When the db8500 watchdog is enabled without the PRCMU, we get a lot of
> >> warnings about duplicate or missing helper functions:
> >>
> >> In file included from drivers/watchdog/ux500_wdt.c:21:0:
> >> include/linux/mfd/dbx500-prcmu.h:422:19: error: redefinition of 'prcmu_abb_read'
> >>  static inline int prcmu_abb_read(u8 slave, u8 reg, u8 *value, u8 size)
> >>
> >> This removes the duplicate function definitions and moves the helpers in
> >> dbx500-prcmu outside of the #ifdef that hides them.
> >>
> >> Fixes: da2a68b3eb47 ("watchdog: Enable COMPILE_TEST where possible")
> >> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> >> ---
> >>  include/linux/mfd/db8500-prcmu.h | 27 ----------------------
> >>  include/linux/mfd/dbx500-prcmu.h | 49 ++++++++++++++++++++--------------------
> >>  2 files changed, 25 insertions(+), 51 deletions(-)
> >
> > Is this patch still valid?
> 
> Yes. The build error was resolved with a different patch, but this is
> still a useful cleanup.

Okay, so at least it needs LinusW's Ack.

Once obtained can I take this independently from the rest of the set? 

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

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

* Re: [PATCH 2/8] mfd: db8500-prcmu: fix stub helper interface
@ 2017-03-15 10:27         ` Lee Jones
  0 siblings, 0 replies; 32+ messages in thread
From: Lee Jones @ 2017-03-15 10:27 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Guenter Roeck, Wim Van Sebroeck, linux-watchdog,
	Linux Kernel Mailing List

On Tue, 14 Mar 2017, Arnd Bergmann wrote:

> On Tue, Mar 14, 2017 at 12:14 PM, Lee Jones <lee.jones@linaro.org> wrote:
> > On Tue, 28 Feb 2017, Arnd Bergmann wrote:
> >
> >> When the db8500 watchdog is enabled without the PRCMU, we get a lot of
> >> warnings about duplicate or missing helper functions:
> >>
> >> In file included from drivers/watchdog/ux500_wdt.c:21:0:
> >> include/linux/mfd/dbx500-prcmu.h:422:19: error: redefinition of 'prcmu_abb_read'
> >>  static inline int prcmu_abb_read(u8 slave, u8 reg, u8 *value, u8 size)
> >>
> >> This removes the duplicate function definitions and moves the helpers in
> >> dbx500-prcmu outside of the #ifdef that hides them.
> >>
> >> Fixes: da2a68b3eb47 ("watchdog: Enable COMPILE_TEST where possible")
> >> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> >> ---
> >>  include/linux/mfd/db8500-prcmu.h | 27 ----------------------
> >>  include/linux/mfd/dbx500-prcmu.h | 49 ++++++++++++++++++++--------------------
> >>  2 files changed, 25 insertions(+), 51 deletions(-)
> >
> > Is this patch still valid?
> 
> Yes. The build error was resolved with a different patch, but this is
> still a useful cleanup.

Okay, so at least it needs LinusW's Ack.

Once obtained can I take this independently from the rest of the set? 

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line "unsubscribe linux-watchdog" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH 2/8] mfd: db8500-prcmu: fix stub helper interface
  2017-03-15 10:27         ` Lee Jones
  (?)
@ 2017-03-15 11:36         ` Arnd Bergmann
  -1 siblings, 0 replies; 32+ messages in thread
From: Arnd Bergmann @ 2017-03-15 11:36 UTC (permalink / raw)
  To: Lee Jones
  Cc: Guenter Roeck, Wim Van Sebroeck, linux-watchdog,
	Linux Kernel Mailing List

On Wed, Mar 15, 2017 at 11:27 AM, Lee Jones <lee.jones@linaro.org> wrote:
> On Tue, 14 Mar 2017, Arnd Bergmann wrote:
>> On Tue, Mar 14, 2017 at 12:14 PM, Lee Jones <lee.jones@linaro.org> wrote:
>> > On Tue, 28 Feb 2017, Arnd Bergmann wrote:

>> > Is this patch still valid?
>>
>> Yes. The build error was resolved with a different patch, but this is
>> still a useful cleanup.
>
> Okay, so at least it needs LinusW's Ack.
>
> Once obtained can I take this independently from the rest of the set?

Yes, the other patches are already merged, and independent of this one.

    Arnd

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

end of thread, other threads:[~2017-03-15 11:37 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-28 21:01 [PATCH 0/8] watchdog fixes for COMPILE_TEST change Arnd Bergmann
2017-02-28 21:01 ` [PATCH 1/8] mfd: retu: add inline alternatives for CONFIG_RETU=n Arnd Bergmann
2017-02-28 21:40   ` Guenter Roeck
2017-02-28 21:01 ` [PATCH 2/8] mfd: db8500-prcmu: fix stub helper interface Arnd Bergmann
2017-02-28 21:42   ` Guenter Roeck
2017-02-28 21:47     ` Arnd Bergmann
2017-02-28 23:19       ` Guenter Roeck
2017-02-28 23:24       ` Guenter Roeck
2017-03-01  9:17         ` Arnd Bergmann
2017-03-14 11:14   ` Lee Jones
2017-03-14 11:14     ` Lee Jones
2017-03-14 12:09     ` Arnd Bergmann
2017-03-15 10:27       ` Lee Jones
2017-03-15 10:27         ` Lee Jones
2017-03-15 11:36         ` Arnd Bergmann
2017-02-28 21:01 ` [PATCH 3/8] watchdog: wm831x watchdog really needs mfd Arnd Bergmann
2017-02-28 21:36   ` Guenter Roeck
2017-02-28 21:44     ` Arnd Bergmann
2017-02-28 21:48       ` Arnd Bergmann
2017-02-28 23:16         ` Guenter Roeck
2017-03-01  2:50           ` Randy Dunlap
2017-02-28 21:01 ` [PATCH 4/8] watchdog: geode: restore hard CS5535_MFGPT dependency Arnd Bergmann
2017-02-28 21:42   ` Guenter Roeck
2017-02-28 21:01 ` [PATCH 5/8] watchdog: menf21bmc: add I2C dependency Arnd Bergmann
2017-02-28 21:43   ` Guenter Roeck
2017-02-28 21:01 ` [PATCH 6/8] watchdog: sp805: add back AMBA dependency Arnd Bergmann
2017-02-28 21:43   ` Guenter Roeck
2017-02-28 21:01 ` [PATCH 7/8] watchdog: bcm2835: add CONFIG_OF dependency Arnd Bergmann
2017-02-28 21:43   ` Guenter Roeck
2017-02-28 21:01 ` [PATCH 8/8] watchdog: kempld: revert to full dependency Arnd Bergmann
2017-02-28 21:39   ` Guenter Roeck
2017-02-28 21:31 ` [PATCH 0/8] watchdog fixes for COMPILE_TEST change Guenter Roeck

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.