Skip to contentSkip to conversation

i2c: rk3x: add Kconfig dependency on COMMON_CLK

PATCH In review Max Schwarz 2 participants 2 messages Nov 24, 2014 I2C subsystem host drivers

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 i2c: rk3x: add Kconfig dependency on COMMON_CLK

Commit 5a6f1566f6a0 ("i2c: rk3x: handle dynamic clock rate changes correctly") introduced a dependency on clock rate notifiers. Now we get compiler errors if compiled without COMMON_CLK:

drivers/i2c/busses/i2c-rk3x.c: In function 'rk3x_i2c_clk_notifier_cb':
drivers/i2c/busses/i2c-rk3x.c:634:7: error: 'PRE_RATE_CHANGE' undeclared (first use in this function) [...]

But the driver has always depended on COMMON_CLK even if it compiled
- in fact it fails to probe without it. So add that as a Kconfig
dependency.

Fixes 5a6f1566f6a0 ("i2c: rk3x: handle dynamic clock rate changes correctly")

---

Wolfram,

here is a version with *even* better commit msg in case you still want to take that instead of my quick fix.

Uwe, thanks again for your comments!

Cheers,
Max

 drivers/i2c/busses/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/i2c/busses/Kconfig +1 -1
index a940e33..bb66119 100644
@@ -720,7 +720,7 @@ config I2C_RIIC
 
 config I2C_RK3X
 	tristate "Rockchip RK3xxx I2C adapter"
-	depends on OF
+	depends on OF && COMMON_CLK
 	help
 	  Say Y here to include support for the I2C adapter in Rockchip RK3xxx
 	  SoCs.
Signature · 1 line
1.9.1
Acked-by on v3 1/1
#1 lore raw

Hallo,

Quoted 12 lines · Max Schwarz

Commit 5a6f1566f6a0 ("i2c: rk3x: handle dynamic clock rate changes correctly") introduced a dependency on clock rate notifiers. Now we get compiler errors if compiled without COMMON_CLK:

drivers/i2c/busses/i2c-rk3x.c: In function 'rk3x_i2c_clk_notifier_cb':
drivers/i2c/busses/i2c-rk3x.c:634:7: error: 'PRE_RATE_CHANGE' undeclared (first use in this function) [...]

But the driver has always depended on COMMON_CLK even if it compiled
- in fact it fails to probe without it. So add that as a Kconfig
dependency.

Quoted 8 lines
Fixes 5a6f1566f6a0 ("i2c: rk3x: handle dynamic clock rate changes correctly")

---

Wolfram,

here is a version with *even* better commit msg in case you still want to take that instead of my quick fix.

Thanks
Uwe

Signature · 2 lines
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |