Lines Matching full:result

73 static bool max31790_convert_pwm_frequency_into_hz(uint16_t *result, uint8_t pwm_frequency)  in max31790_convert_pwm_frequency_into_hz()  argument
77 *result = 25; in max31790_convert_pwm_frequency_into_hz()
80 *result = 30; in max31790_convert_pwm_frequency_into_hz()
83 *result = 35; in max31790_convert_pwm_frequency_into_hz()
86 *result = 100; in max31790_convert_pwm_frequency_into_hz()
89 *result = 125; in max31790_convert_pwm_frequency_into_hz()
92 *result = 150; /* actually 149.7, according to the datasheet */ in max31790_convert_pwm_frequency_into_hz()
95 *result = 1250; in max31790_convert_pwm_frequency_into_hz()
98 *result = 1470; in max31790_convert_pwm_frequency_into_hz()
101 *result = 3570; in max31790_convert_pwm_frequency_into_hz()
104 *result = 5000; in max31790_convert_pwm_frequency_into_hz()
107 *result = 12500; in max31790_convert_pwm_frequency_into_hz()
110 *result = 25000; in max31790_convert_pwm_frequency_into_hz()
118 static bool max31790_convert_pwm_frequency_into_register(uint8_t *result, uint32_t pwm_frequency) in max31790_convert_pwm_frequency_into_register() argument
122 *result = 0; in max31790_convert_pwm_frequency_into_register()
125 *result = 1; in max31790_convert_pwm_frequency_into_register()
128 *result = 2; in max31790_convert_pwm_frequency_into_register()
131 *result = 3; in max31790_convert_pwm_frequency_into_register()
134 *result = 4; in max31790_convert_pwm_frequency_into_register()
137 *result = 5; in max31790_convert_pwm_frequency_into_register()
140 *result = 6; in max31790_convert_pwm_frequency_into_register()
143 *result = 7; in max31790_convert_pwm_frequency_into_register()
146 *result = 8; in max31790_convert_pwm_frequency_into_register()
149 *result = 9; in max31790_convert_pwm_frequency_into_register()
152 *result = 10; in max31790_convert_pwm_frequency_into_register()
155 *result = 11; in max31790_convert_pwm_frequency_into_register()
168 int result; in max31790_set_cycles_internal() local
182 result = i2c_reg_read_byte_dt(&config->i2c, MAX37190_REGISTER_PWMFREQUENCY, in max31790_set_cycles_internal()
184 if (result != 0) { in max31790_set_cycles_internal()
185 return result; in max31790_set_cycles_internal()
190 result = i2c_reg_write_byte_dt(&config->i2c, MAX37190_REGISTER_PWMFREQUENCY, in max31790_set_cycles_internal()
192 if (result != 0) { in max31790_set_cycles_internal()
193 return result; in max31790_set_cycles_internal()
222 result = i2c_write_dt(&config->i2c, buffer, sizeof(buffer)); in max31790_set_cycles_internal()
229 result = i2c_write_dt(&config->i2c, buffer, sizeof(buffer)); in max31790_set_cycles_internal()
232 if (result != 0) { in max31790_set_cycles_internal()
233 return result; in max31790_set_cycles_internal()
236 result = i2c_reg_write_byte_dt(&config->i2c, MAX37190_REGISTER_FANCONFIGURATION(channel), in max31790_set_cycles_internal()
238 if (result != 0) { in max31790_set_cycles_internal()
239 return result; in max31790_set_cycles_internal()
242 result = i2c_reg_write_byte_dt(&config->i2c, MAX31790_REGISTER_FANDYNAMICS(channel), in max31790_set_cycles_internal()
244 if (result != 0) { in max31790_set_cycles_internal()
245 return result; in max31790_set_cycles_internal()
254 result = i2c_write_dt(&config->i2c, buffer, sizeof(buffer)); in max31790_set_cycles_internal()
255 if (result != 0) { in max31790_set_cycles_internal()
256 return result; in max31790_set_cycles_internal()
267 int result; in max31790_set_cycles() local
283 result = max31790_set_cycles_internal(dev, channel, period_count, pulse_count, flags); in max31790_set_cycles()
285 return result; in max31790_set_cycles()
292 int result; in max31790_get_cycles_per_sec() local
304 result = i2c_reg_read_byte_dt(&config->i2c, MAX37190_REGISTER_GLOBALCONFIGURATION, in max31790_get_cycles_per_sec()
306 if (result != 0) { in max31790_get_cycles_per_sec()
308 return result; in max31790_get_cycles_per_sec()