mfd: ti_am335x_tscadc: Use BIT(), GENMASK() and FIELD_PREP() when relevant
authorMiquel Raynal <miquel.raynal@bootlin.com>
Fri, 15 Oct 2021 08:14:45 +0000 (10:14 +0200)
committerLee Jones <lee.jones@linaro.org>
Wed, 20 Oct 2021 16:29:04 +0000 (17:29 +0100)
commitb7cb7bf11817129c623fa921a1d6cd86b3cb727b
treedb348aee4aa2ae5198a1943afdea8f868f98d21f
parent65de5532a317b22f7fb93001cd0ed494145d3f4e
mfd: ti_am335x_tscadc: Use BIT(), GENMASK() and FIELD_PREP() when relevant

Clean the ti_am335x_tscadc.h header by:
* converting masks to GENMASK()
* converting regular shifts to BIT()
* using FIELD_PREP() when relevant

Sometimes reorder the lines to be able to use the relevant bitmask.

Mind the s/%d/%ld/ change in a log due to the type change following the
use of FIELD_PREP() in the header.

Suggested-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Link: https://lore.kernel.org/r/20211015081506.933180-28-miquel.raynal@bootlin.com
drivers/iio/adc/ti_am335x_adc.c
include/linux/mfd/ti_am335x_tscadc.h