All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/2] regmap: provide simple bitops and use them in a driver
@ 2020-05-28 14:22 ` Bartosz Golaszewski
  0 siblings, 0 replies; 18+ messages in thread
From: Bartosz Golaszewski @ 2020-05-28 14:22 UTC (permalink / raw)
  To: John Crispin, Sean Wang, Mark Lee, David S . Miller,
	Jakub Kicinski, Matthias Brugger, Mark Brown
  Cc: netdev, linux-arm-kernel, linux-mediatek, linux-kernel,
	Fabien Parent, Stephane Le Provost, Pedro Tsai, Andrew Perepech,
	Bartosz Golaszewski

From: Bartosz Golaszewski <bgolaszewski@baylibre.com>

I noticed that oftentimes I use regmap_update_bits() for simple bit
setting or clearing. In this case the fourth argument is superfluous as
it's always 0 or equal to the mask argument.

This series proposes to add simple bit operations for setting, clearing
and testing specific bits with regmap.

The second patch uses all three in a driver that got recently picked into
the net-next tree.

The patches obviously target different trees so - if you're ok with
the change itself - I propose you pick the first one into your regmap
tree for v5.8 and then I'll resend the second patch to add the first
user for these macros for v5.9.

v1 -> v2:
- convert the new macros to static inline functions

Bartosz Golaszewski (2):
  regmap: provide helpers for simple bit operations
  net: ethernet: mtk-star-emac: use regmap bitops

 drivers/base/regmap/regmap.c                  | 22 +++++
 drivers/net/ethernet/mediatek/mtk_star_emac.c | 80 ++++++++-----------
 include/linux/regmap.h                        | 36 +++++++++
 3 files changed, 93 insertions(+), 45 deletions(-)

-- 
2.26.1


^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2020-05-28 15:06 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-28 14:22 [PATCH v2 0/2] regmap: provide simple bitops and use them in a driver Bartosz Golaszewski
2020-05-28 14:22 ` Bartosz Golaszewski
2020-05-28 14:22 ` Bartosz Golaszewski
2020-05-28 14:22 ` [PATCH v2 1/2] regmap: provide helpers for simple bit operations Bartosz Golaszewski
2020-05-28 14:22   ` Bartosz Golaszewski
2020-05-28 14:22   ` Bartosz Golaszewski
2020-05-28 14:44   ` Mark Brown
2020-05-28 14:44     ` Mark Brown
2020-05-28 14:44     ` Mark Brown
2020-05-28 14:49     ` Bartosz Golaszewski
2020-05-28 14:49       ` Bartosz Golaszewski
2020-05-28 14:49       ` Bartosz Golaszewski
2020-05-28 15:05       ` Mark Brown
2020-05-28 15:05         ` Mark Brown
2020-05-28 15:05         ` Mark Brown
2020-05-28 14:22 ` [PATCH v2 2/2] net: ethernet: mtk-star-emac: use regmap bitops Bartosz Golaszewski
2020-05-28 14:22   ` Bartosz Golaszewski
2020-05-28 14:22   ` Bartosz Golaszewski

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.