staging: most: i2c: reduce parameters inconsistency
authorChristian Gromm <christian.gromm@microchip.com>
Tue, 8 May 2018 09:45:02 +0000 (11:45 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 8 May 2018 11:41:49 +0000 (13:41 +0200)
commit7e6e228873945ccb46895f1f5e29187814ea1d8d
tree15dabc31e98cc168c21125614dd0dfc6061b1e21
parenteb50842c5f5cf880bef97816cf5732de47a591bb
staging: most: i2c: reduce parameters inconsistency

Currently, there are two module parameters for the i2c driver:
  - polling_req: boolean irq/polling mode;
  - scan_rate: polling rate, that is used in the case where the polling
    mode is active

This model is misconfiguration-prone.  For example, it is possible to
select polling mode with the zero polling rate or configure non-zero
polling rate in a combination with the IRQ mode.

This patch replaces the 'polling_req' and 'scan_rate' by the
'polling_rate', where the value zero means the interrupt driven mode and
other values are used as the polling rate in the polling mode.

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>
drivers/staging/most/i2c/i2c.c