i2c: designware: Print clock freq on invalid clock freq error
authorHans de Goede <hdegoede@redhat.com>
Thu, 13 Jul 2017 13:45:01 +0000 (15:45 +0200)
committerWolfram Sang <wsa@the-dreams.de>
Mon, 31 Jul 2017 13:55:41 +0000 (15:55 +0200)
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 <hdegoede@redhat.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
drivers/i2c/busses/i2c-designware-platdrv.c

index 2ea6d0d25a01a33069bce293ab6858947a0cb01f..d139b156f9c9038cc76c6d3b76fc959cb56a43b2 100644 (file)
@@ -319,7 +319,8 @@ static int dw_i2c_plat_probe(struct platform_device *pdev)
        if (dev->clk_freq != 100000 && dev->clk_freq != 400000
            && dev->clk_freq != 1000000 && dev->clk_freq != 3400000) {
                dev_err(&pdev->dev,
-                       "Only 100kHz, 400kHz, 1MHz and 3.4MHz supported");
+                       "%d Hz is unsupported, only 100kHz, 400kHz, 1MHz and 3.4MHz are supported\n",
+                       dev->clk_freq);
                ret = -EINVAL;
                goto exit_reset;
        }