mirror of
https://github.com/torvalds/linux.git
synced 2026-07-28 01:55:51 +02:00
iio: light: opt3001: use macros from bits.h header
Use GENMASK() and BIT() macros from bits.h header where it makes sense. While at it, remove unused macro. No functional change. Signed-off-by: Joshua Crofts <joshua.crofts1@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
This commit is contained in:
parent
b622051675
commit
8402b32661
|
|
@ -33,17 +33,16 @@
|
|||
#define OPT3001_MANUFACTURER_ID 0x7e
|
||||
#define OPT3001_DEVICE_ID 0x7f
|
||||
|
||||
#define OPT3001_CONFIGURATION_RN_MASK (0xf << 12)
|
||||
#define OPT3001_CONFIGURATION_RN_MASK GENMASK(15, 12)
|
||||
#define OPT3001_CONFIGURATION_RN_AUTO (0xc << 12)
|
||||
|
||||
#define OPT3001_CONFIGURATION_CT BIT(11)
|
||||
|
||||
#define OPT3001_CONFIGURATION_M_MASK (3 << 9)
|
||||
#define OPT3001_CONFIGURATION_M_MASK GENMASK(10, 9)
|
||||
#define OPT3001_CONFIGURATION_M_SHUTDOWN (0 << 9)
|
||||
#define OPT3001_CONFIGURATION_M_SINGLE (1 << 9)
|
||||
#define OPT3001_CONFIGURATION_M_CONTINUOUS (2 << 9) /* also 3 << 9 */
|
||||
|
||||
#define OPT3001_CONFIGURATION_OVF BIT(8)
|
||||
#define OPT3001_CONFIGURATION_CRF BIT(7)
|
||||
#define OPT3001_CONFIGURATION_FH BIT(6)
|
||||
#define OPT3001_CONFIGURATION_FL BIT(5)
|
||||
|
|
@ -51,7 +50,7 @@
|
|||
#define OPT3001_CONFIGURATION_POL BIT(3)
|
||||
#define OPT3001_CONFIGURATION_ME BIT(2)
|
||||
|
||||
#define OPT3001_CONFIGURATION_FC_MASK (3 << 0)
|
||||
#define OPT3001_CONFIGURATION_FC_MASK GENMASK(1, 0)
|
||||
|
||||
/* The end-of-conversion enable is located in the low-limit register */
|
||||
#define OPT3001_LOW_LIMIT_EOC_ENABLE 0xc000
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user