Skip to content

Commit 22acc37

Browse files
jwrdegoedeWolfram Sang
authored andcommitted
i2c: designware: Print clock freq on invalid clock freq error
When we refuse to probe due to an invalid clock frequency, log the frequency which is causing this error. Signed-off-by: Hans de Goede <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Signed-off-by: Wolfram Sang <[email protected]>
1 parent c64ffff commit 22acc37

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/i2c/busses/i2c-designware-platdrv.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,8 @@ static int dw_i2c_plat_probe(struct platform_device *pdev)
319319
if (dev->clk_freq != 100000 && dev->clk_freq != 400000
320320
&& dev->clk_freq != 1000000 && dev->clk_freq != 3400000) {
321321
dev_err(&pdev->dev,
322-
"Only 100kHz, 400kHz, 1MHz and 3.4MHz supported");
322+
"%d Hz is unsupported, only 100kHz, 400kHz, 1MHz and 3.4MHz are supported\n",
323+
dev->clk_freq);
323324
ret = -EINVAL;
324325
goto exit_reset;
325326
}

0 commit comments

Comments
 (0)