Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

extcon: ptn5150: Use defines for registers

The register addresses are not continuous, so use simple defines for
them. This also makes it easier to find the address for register.

No functional change.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>

authored by

Krzysztof Kozlowski and committed by
Chanwoo Choi
b9a32f62 d0f66810

+10 -12
+10 -12
drivers/extcon/extcon-ptn5150.c
··· 19 19 #include <linux/gpio/consumer.h> 20 20 21 21 /* PTN5150 registers */ 22 - enum ptn5150_reg { 23 - PTN5150_REG_DEVICE_ID = 0x01, 24 - PTN5150_REG_CONTROL, 25 - PTN5150_REG_INT_STATUS, 26 - PTN5150_REG_CC_STATUS, 27 - PTN5150_REG_CON_DET = 0x09, 28 - PTN5150_REG_VCONN_STATUS, 29 - PTN5150_REG_RESET, 30 - PTN5150_REG_INT_MASK = 0x18, 31 - PTN5150_REG_INT_REG_STATUS, 32 - PTN5150_REG_END, 33 - }; 22 + #define PTN5150_REG_DEVICE_ID 0x01 23 + #define PTN5150_REG_CONTROL 0x02 24 + #define PTN5150_REG_INT_STATUS 0x03 25 + #define PTN5150_REG_CC_STATUS 0x04 26 + #define PTN5150_REG_CON_DET 0x09 27 + #define PTN5150_REG_VCONN_STATUS 0x0a 28 + #define PTN5150_REG_RESET 0x0b 29 + #define PTN5150_REG_INT_MASK 0x18 30 + #define PTN5150_REG_INT_REG_STATUS 0x19 31 + #define PTN5150_REG_END PTN5150_REG_INT_REG_STATUS 34 32 35 33 #define PTN5150_DFP_ATTACHED 0x1 36 34 #define PTN5150_UFP_ATTACHED 0x2