Patchwork i2c: designware: remove HAVE_CLK build dependecy

login
register
mail settings
Submitter Baruch Siach
Date Dec. 30, 2013, 8:31 a.m.
Message ID <f3ebead75d45623e4b649c7a8d0112584ffd1788.1388392279.git.baruch@tkos.co.il>
Download mbox | patch
Permalink /patch/305736/
State Accepted
Headers show

Comments

Baruch Siach - Dec. 30, 2013, 8:31 a.m.
Since 93abe8e4 (clk: add non CONFIG_HAVE_CLK routines) code using clk.h need
not depend on HAVE_CLK. Also, remove a redundant clk.h include from core driver
file.

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
---
 drivers/i2c/busses/Kconfig               | 1 -
 drivers/i2c/busses/i2c-designware-core.c | 1 -
 2 files changed, 2 deletions(-)
Wolfram Sang - Jan. 4, 2014, 10:48 p.m.
On Mon, Dec 30, 2013 at 10:31:19AM +0200, Baruch Siach wrote:
> Since 93abe8e4 (clk: add non CONFIG_HAVE_CLK routines) code using clk.h need
> not depend on HAVE_CLK. Also, remove a redundant clk.h include from core driver
> file.
> 
> Signed-off-by: Baruch Siach <baruch@tkos.co.il>

Is the patch description correct? The core driver simply does not need
clk.h and thus the dependency. No redundancy here, or?
Baruch Siach - Jan. 5, 2014, 5:04 a.m.
Hi Wolfram,

On Sat, Jan 04, 2014 at 11:48:46PM +0100, Wolfram Sang wrote:
> On Mon, Dec 30, 2013 at 10:31:19AM +0200, Baruch Siach wrote:
> > Since 93abe8e4 (clk: add non CONFIG_HAVE_CLK routines) code using clk.h need
> > not depend on HAVE_CLK. Also, remove a redundant clk.h include from core driver
> > file.
> > 
> > Signed-off-by: Baruch Siach <baruch@tkos.co.il>
> 
> Is the patch description correct? The core driver simply does not need
> clk.h and thus the dependency. No redundancy here, or?

The platform code (i2c-designware-platform.c) uses the clk API, but the 
Kconfig dependency on HAVE_CLK is not needed anymore. The core code 
(i2c-designware-core.c) doesn't use clk. Originally the driver was in a single 
file, including the clk handling. This code has been moved to the platform 
file, so the core file doesn't need the clk.h include.

Logically, these are two separate issues. But I'm not sure it is worth 
splitting into two patches. What do you think?

baruch
Baruch Siach - Jan. 13, 2014, 12:18 p.m.
Hi Wolfram,

Ping?

On Sun, Jan 05, 2014 at 07:04:10AM +0200, Baruch Siach wrote:
> On Sat, Jan 04, 2014 at 11:48:46PM +0100, Wolfram Sang wrote:
> > On Mon, Dec 30, 2013 at 10:31:19AM +0200, Baruch Siach wrote:
> > > Since 93abe8e4 (clk: add non CONFIG_HAVE_CLK routines) code using clk.h need
> > > not depend on HAVE_CLK. Also, remove a redundant clk.h include from core driver
> > > file.
> > > 
> > > Signed-off-by: Baruch Siach <baruch@tkos.co.il>
> > 
> > Is the patch description correct? The core driver simply does not need
> > clk.h and thus the dependency. No redundancy here, or?
> 
> The platform code (i2c-designware-platform.c) uses the clk API, but the 
> Kconfig dependency on HAVE_CLK is not needed anymore. The core code 
> (i2c-designware-core.c) doesn't use clk. Originally the driver was in a single 
> file, including the clk handling. This code has been moved to the platform 
> file, so the core file doesn't need the clk.h include.
> 
> Logically, these are two separate issues. But I'm not sure it is worth 
> splitting into two patches. What do you think?

baruch
Wolfram Sang - Jan. 13, 2014, 12:39 p.m.
> The platform code (i2c-designware-platform.c) uses the clk API, but the 
> Kconfig dependency on HAVE_CLK is not needed anymore. The core code 
> (i2c-designware-core.c) doesn't use clk. Originally the driver was in a single 
> file, including the clk handling. This code has been moved to the platform 
> file, so the core file doesn't need the clk.h include.

Ah, now I got it. Updated the commit msg slightly to make clear about
the platform driver vs core difference and applied to for-next, thanks!

Patch

diff --git a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig
index 3b26129..2b6056a 100644
--- a/drivers/i2c/busses/Kconfig
+++ b/drivers/i2c/busses/Kconfig
@@ -412,7 +412,6 @@  config I2C_DESIGNWARE_CORE
 
 config I2C_DESIGNWARE_PLATFORM
 	tristate "Synopsys DesignWare Platform"
-	depends on HAVE_CLK
 	select I2C_DESIGNWARE_CORE
 	help
 	  If you say yes to this option, support will be included for the
diff --git a/drivers/i2c/busses/i2c-designware-core.c b/drivers/i2c/busses/i2c-designware-core.c
index e89e3e2..14c4b30 100644
--- a/drivers/i2c/busses/i2c-designware-core.c
+++ b/drivers/i2c/busses/i2c-designware-core.c
@@ -26,7 +26,6 @@ 
  *
  */
 #include <linux/export.h>
-#include <linux/clk.h>
 #include <linux/errno.h>
 #include <linux/err.h>
 #include <linux/i2c.h>