gpio: pca953x: Rewrite ->get_multiple() function
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Mon, 20 Apr 2020 17:27:50 +0000 (20:27 +0300)
committerBartosz Golaszewski <bgolaszewski@baylibre.com>
Wed, 29 Apr 2020 11:19:38 +0000 (13:19 +0200)
commit6f793485fc03fe832e1abcf0682efd7b4419ae2d
tree8b84d3fff6d004f075f4a487dc20032be367c90b
parent9784c9963feccd8dede924dbc0f8b1c64506e646
gpio: pca953x: Rewrite ->get_multiple() function

The commit 96d7c7b3e654 ("gpio: gpio-pca953x, Add get_multiple function")
basically did everything wrong from style and code reuse perspective, i.e.
- it didn't utilize existing PCA953x internal helpers
- it didn't utilize bitmap API
- it misses the point that ilog2(), besides that BANK_SFT is useless,
  can be used in macros
- it has indentation issues.

Rewrite the function completely.

Cc: Paul Thomas <pthomas8589@gmail.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
drivers/gpio/gpio-pca953x.c