gpio: exar: unduplicate address and offset computation
authorBartosz Golaszewski <bgolaszewski@baylibre.com>
Wed, 30 Sep 2020 08:20:10 +0000 (10:20 +0200)
committerBartosz Golaszewski <bgolaszewski@baylibre.com>
Wed, 25 Nov 2020 14:36:52 +0000 (15:36 +0100)
commit696868d0a79c211b51d0d0f7a1e6805e12d7fb42
tree4bd090af37a40a3ae8ff998bb961bfa039946839
parent0c2c7e1323b44548c10f899df565e4c4154600f1
gpio: exar: unduplicate address and offset computation

Provide and use helpers for calculating the register address and bit
offset instead of hand coding it in every function.

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
drivers/gpio/gpio-exar.c