Lines Matching +full:0 +full:x32

19 #define LTC2992_CTRLB			0x01
20 #define LTC2992_FAULT1 0x03
21 #define LTC2992_POWER1 0x05
22 #define LTC2992_POWER1_MAX 0x08
23 #define LTC2992_POWER1_MIN 0x0B
24 #define LTC2992_POWER1_MAX_THRESH 0x0E
25 #define LTC2992_POWER1_MIN_THRESH 0x11
26 #define LTC2992_DSENSE1 0x14
27 #define LTC2992_DSENSE1_MAX 0x16
28 #define LTC2992_DSENSE1_MIN 0x18
29 #define LTC2992_DSENSE1_MAX_THRESH 0x1A
30 #define LTC2992_DSENSE1_MIN_THRESH 0x1C
31 #define LTC2992_SENSE1 0x1E
32 #define LTC2992_SENSE1_MAX 0x20
33 #define LTC2992_SENSE1_MIN 0x22
34 #define LTC2992_SENSE1_MAX_THRESH 0x24
35 #define LTC2992_SENSE1_MIN_THRESH 0x26
36 #define LTC2992_G1 0x28
37 #define LTC2992_G1_MAX 0x2A
38 #define LTC2992_G1_MIN 0x2C
39 #define LTC2992_G1_MAX_THRESH 0x2E
40 #define LTC2992_G1_MIN_THRESH 0x30
41 #define LTC2992_FAULT2 0x35
42 #define LTC2992_G2 0x5A
43 #define LTC2992_G2_MAX 0x5C
44 #define LTC2992_G2_MIN 0x5E
45 #define LTC2992_G2_MAX_THRESH 0x60
46 #define LTC2992_G2_MIN_THRESH 0x62
47 #define LTC2992_G3 0x64
48 #define LTC2992_G3_MAX 0x66
49 #define LTC2992_G3_MIN 0x68
50 #define LTC2992_G3_MAX_THRESH 0x6A
51 #define LTC2992_G3_MIN_THRESH 0x6C
52 #define LTC2992_G4 0x6E
53 #define LTC2992_G4_MAX 0x70
54 #define LTC2992_G4_MIN 0x72
55 #define LTC2992_G4_MAX_THRESH 0x74
56 #define LTC2992_G4_MIN_THRESH 0x76
57 #define LTC2992_FAULT3 0x92
58 #define LTC2992_GPIO_STATUS 0x95
59 #define LTC2992_GPIO_IO_CTRL 0x96
60 #define LTC2992_GPIO_CTRL 0x97
62 #define LTC2992_POWER(x) (LTC2992_POWER1 + ((x) * 0x32))
63 #define LTC2992_POWER_MAX(x) (LTC2992_POWER1_MAX + ((x) * 0x32))
64 #define LTC2992_POWER_MIN(x) (LTC2992_POWER1_MIN + ((x) * 0x32))
65 #define LTC2992_POWER_MAX_THRESH(x) (LTC2992_POWER1_MAX_THRESH + ((x) * 0x32))
66 #define LTC2992_POWER_MIN_THRESH(x) (LTC2992_POWER1_MIN_THRESH + ((x) * 0x32))
67 #define LTC2992_DSENSE(x) (LTC2992_DSENSE1 + ((x) * 0x32))
68 #define LTC2992_DSENSE_MAX(x) (LTC2992_DSENSE1_MAX + ((x) * 0x32))
69 #define LTC2992_DSENSE_MIN(x) (LTC2992_DSENSE1_MIN + ((x) * 0x32))
70 #define LTC2992_DSENSE_MAX_THRESH(x) (LTC2992_DSENSE1_MAX_THRESH + ((x) * 0x32))
71 #define LTC2992_DSENSE_MIN_THRESH(x) (LTC2992_DSENSE1_MIN_THRESH + ((x) * 0x32))
72 #define LTC2992_SENSE(x) (LTC2992_SENSE1 + ((x) * 0x32))
73 #define LTC2992_SENSE_MAX(x) (LTC2992_SENSE1_MAX + ((x) * 0x32))
74 #define LTC2992_SENSE_MIN(x) (LTC2992_SENSE1_MIN + ((x) * 0x32))
75 #define LTC2992_SENSE_MAX_THRESH(x) (LTC2992_SENSE1_MAX_THRESH + ((x) * 0x32))
76 #define LTC2992_SENSE_MIN_THRESH(x) (LTC2992_SENSE1_MIN_THRESH + ((x) * 0x32))
77 #define LTC2992_POWER_FAULT(x) (LTC2992_FAULT1 + ((x) * 0x32))
78 #define LTC2992_SENSE_FAULT(x) (LTC2992_FAULT1 + ((x) * 0x32))
79 #define LTC2992_DSENSE_FAULT(x) (LTC2992_FAULT1 + ((x) * 0x32))
90 #define LTC2992_GPIO1_FAULT_MSK(x) (BIT(0) << (x))
93 #define LTC2992_GPIO2_FAULT_MSK(x) (BIT(0) << (x))
106 #define LTC2992_GPIO3_BIT 0
140 .min_alarm_msk = LTC2992_GPIO1_FAULT_MSK(0),
152 .min_alarm_msk = LTC2992_GPIO2_FAULT_MSK(0),
164 .min_alarm_msk = LTC2992_GPIO3_FAULT_MSK(0),
176 .min_alarm_msk = LTC2992_GPIO4_FAULT_MSK(0),
195 if (ret < 0) in ltc2992_read_reg()
198 val = 0; in ltc2992_read_reg()
199 for (i = 0; i < reg_len; i++) in ltc2992_read_reg()
210 for (i = 0; i < reg_len; i++) in ltc2992_write_reg()
211 regvals[reg_len - i - 1] = (val >> (i * 8)) & 0xFF; in ltc2992_write_reg()
226 if (reg < 0) in ltc2992_gpio_get()
246 if (reg < 0) in ltc2992_gpio_get_multiple()
256 return 0; in ltc2992_gpio_get_multiple()
267 if (reg < 0) { in ltc2992_gpio_set()
283 unsigned long gpio_ctrl_io = 0; in ltc2992_gpio_set_multiple()
284 unsigned long gpio_ctrl = 0; in ltc2992_gpio_set_multiple()
308 ret = ltc2992_write_reg(st, LTC2992_GPIO_IO_CTRL, 1, 0); in ltc2992_config_gpio()
309 if (ret < 0) in ltc2992_config_gpio()
314 for (i = 0; i < ARRAY_SIZE(st->gpio_names); i++) { in ltc2992_config_gpio()
405 return 0; in ltc2992_is_visible()
413 if (reg_val < 0) in ltc2992_get_voltage()
419 return 0; in ltc2992_get_voltage()
441 if (reg_val < 0) in ltc2992_read_gpio_alarm()
489 mask = LTC2992_SENSE_FAULT_MSK(0); in ltc2992_read_in_alarm()
492 if (reg_val < 0) in ltc2992_read_in_alarm()
540 if (reg_val < 0) in ltc2992_get_current()
546 return 0; in ltc2992_get_current()
567 mask = LTC2992_DSENSE_FAULT_MSK(0); in ltc2992_read_curr_alarm()
570 if (reg_val < 0) in ltc2992_read_curr_alarm()
615 if (reg_val < 0) in ltc2992_get_power()
621 return 0; in ltc2992_get_power()
642 mask = LTC2992_POWER_FAULT_MSK(0); in ltc2992_read_power_alarm()
645 if (reg_val < 0) in ltc2992_read_power_alarm()
852 .max_register = 0xE8,
867 if (ret < 0) { in ltc2992_parse_dt()
888 return 0; in ltc2992_parse_dt()
907 if (ret < 0) in ltc2992_i2c_probe()
911 if (ret < 0) in ltc2992_i2c_probe()
927 {"ltc2992", 0},