]> git.ipfire.org Git - thirdparty/linux.git/commit
regmap: provide helpers for simple bit operations
authorBartosz Golaszewski <bgolaszewski@baylibre.com>
Thu, 28 May 2020 15:45:02 +0000 (17:45 +0200)
committerMark Brown <broonie@kernel.org>
Fri, 29 May 2020 13:00:42 +0000 (14:00 +0100)
commitaa2ff9dbaeddabb5ad166db5f9f1a0580a8bbba8
tree5c710c63c6e650e003dfd8e6ed088e3149fd984f
parent8f3d9f354286745c751374f5f1fcafee6b3f3136
regmap: provide helpers for simple bit operations

In many instances regmap_update_bits() is used for simple bit setting
and clearing. In these cases the last argument is redundant and we can
hide it with a static inline function.

This adds three new helpers for simple bit operations: set_bits,
clear_bits and test_bits (the last one defined as a regular function).

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Link: https://lore.kernel.org/r/20200528154503.26304-2-brgl@bgdev.pl
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/base/regmap/regmap.c
include/linux/regmap.h