Skip to content

Commit

Permalink
gpio: xilinx: Switch to use bitmap APIs
Browse files Browse the repository at this point in the history
It seems that Xilinx GPIO driver operates with bit arrays longer than 32 and
thus can leverage bitmap APIs for that. It makes code better to understand.

The ->probe() function is modified to try read properties for both channels
since is_dual check makes only sense for the amount of pins used for the second
channel. On top of that kzalloc() guarantees zero initial values for the fields
in the private data structure, hence drop unneeded conditionals and assignments.

The change is inspired by Syed Nayyar Waris' ideas about bitmap API extension.

Signed-off-by: Andy Shevchenko <[email protected]>
Tested-by: Neeli Srinivas <[email protected]>
Signed-off-by: Bartosz Golaszewski <[email protected]>
  • Loading branch information
andy-shev authored and brgl committed May 12, 2021
1 parent 043aa3d commit 02b3f84
Showing 1 changed file with 178 additions and 178 deletions.
Loading

0 comments on commit 02b3f84

Please sign in to comment.