linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 1/2] i2c: designware: Print clock freq on invalid clock freq error
@ 2017-07-10 18:45 Hans de Goede
  2017-07-10 18:45 ` [PATCH v2 2/2] i2c: designware: Some broken DSTDs use 1MiHz instead of 1MHz Hans de Goede
  0 siblings, 1 reply; 2+ messages in thread
From: Hans de Goede @ 2017-07-10 18:45 UTC (permalink / raw)
  To: Jarkko Nikula, Wolfram Sang, Andy Shevchenko, Mika Westerberg
  Cc: Hans de Goede, linux-i2c

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>
---
Changes in v2:
-Also fix the message missing a \n at the end
---
 drivers/i2c/busses/i2c-designware-platdrv.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/i2c/busses/i2c-designware-platdrv.c b/drivers/i2c/busses/i2c-designware-platdrv.c
index d1263b82d646..4a3a7eda978b 100644
--- a/drivers/i2c/busses/i2c-designware-platdrv.c
+++ b/drivers/i2c/busses/i2c-designware-platdrv.c
@@ -275,7 +275,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);
 		r = -EINVAL;
 		goto exit_reset;
 	}
-- 
2.13.0

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

end of thread, other threads:[~2017-07-10 18:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-10 18:45 [PATCH v2 1/2] i2c: designware: Print clock freq on invalid clock freq error Hans de Goede
2017-07-10 18:45 ` [PATCH v2 2/2] i2c: designware: Some broken DSTDs use 1MiHz instead of 1MHz Hans de Goede

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).