diff options
author | Christian Gromm <christian.gromm@microchip.com> | 2018-05-08 11:44:59 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-05-08 13:41:49 +0200 |
commit | 0003718c92a3d05a8ae100aecffb1e18b3dd9850 (patch) | |
tree | a83a39529f98627c96f03cf2fdd982dddd5e7e8d /drivers/staging/most | |
parent | ea8bcd5282d9dc683d7a544c42bcc057c168d315 (diff) | |
download | linux-0003718c92a3d05a8ae100aecffb1e18b3dd9850.tar.gz linux-0003718c92a3d05a8ae100aecffb1e18b3dd9850.tar.bz2 linux-0003718c92a3d05a8ae100aecffb1e18b3dd9850.zip |
staging: most: i2c: trace real polling rate
The real polling rate depends on the CONFIG_HZ and may differ from the
required polling rate.
Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/most')
-rw-r--r-- | drivers/staging/most/i2c/i2c.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/staging/most/i2c/i2c.c b/drivers/staging/most/i2c/i2c.c index 30d18cc5f072..39b15908b476 100644 --- a/drivers/staging/most/i2c/i2c.c +++ b/drivers/staging/most/i2c/i2c.c @@ -76,7 +76,7 @@ static int configure_channel(struct most_interface *most_iface, { int ret; struct hdm_i2c *dev = to_hdm(most_iface); - unsigned int delay; + unsigned int delay, pr; BUG_ON(ch_idx < 0 || ch_idx >= NUM_CHANNELS); BUG_ON(dev->is_open[ch_idx]); @@ -109,7 +109,8 @@ static int configure_channel(struct most_interface *most_iface, } else if (scan_rate) { delay = msecs_to_jiffies(MSEC_PER_SEC / scan_rate); dev->rx.delay = delay ? delay : 1; - pr_info("polling rate is %d Hz\n", scan_rate); + pr = MSEC_PER_SEC / jiffies_to_msecs(dev->rx.delay); + pr_info("polling rate is %u Hz\n", pr); } } dev->is_open[ch_idx] = true; |