Lines Matching refs:flags
51 int err, flags; in nct3018y_set_alarm_mode() local
55 flags = i2c_smbus_read_byte_data(client, NCT3018Y_REG_CTRL); in nct3018y_set_alarm_mode()
56 if (flags < 0) { in nct3018y_set_alarm_mode()
59 return flags; in nct3018y_set_alarm_mode()
63 flags |= NCT3018Y_BIT_AIE; in nct3018y_set_alarm_mode()
65 flags &= ~NCT3018Y_BIT_AIE; in nct3018y_set_alarm_mode()
67 flags |= NCT3018Y_BIT_CIE; in nct3018y_set_alarm_mode()
68 err = i2c_smbus_write_byte_data(client, NCT3018Y_REG_CTRL, flags); in nct3018y_set_alarm_mode()
74 flags = i2c_smbus_read_byte_data(client, NCT3018Y_REG_ST); in nct3018y_set_alarm_mode()
75 if (flags < 0) { in nct3018y_set_alarm_mode()
78 return flags; in nct3018y_set_alarm_mode()
81 flags &= ~(NCT3018Y_BIT_AF); in nct3018y_set_alarm_mode()
82 err = i2c_smbus_write_byte_data(client, NCT3018Y_REG_ST, flags); in nct3018y_set_alarm_mode()
94 int flags; in nct3018y_get_alarm_mode() local
98 flags = i2c_smbus_read_byte_data(client, NCT3018Y_REG_CTRL); in nct3018y_get_alarm_mode()
99 if (flags < 0) in nct3018y_get_alarm_mode()
100 return flags; in nct3018y_get_alarm_mode()
101 *alarm_enable = flags & NCT3018Y_BIT_AIE; in nct3018y_get_alarm_mode()
106 flags = i2c_smbus_read_byte_data(client, NCT3018Y_REG_ST); in nct3018y_get_alarm_mode()
107 if (flags < 0) in nct3018y_get_alarm_mode()
108 return flags; in nct3018y_get_alarm_mode()
109 *alarm_flag = flags & NCT3018Y_BIT_AF; in nct3018y_get_alarm_mode()
289 int status, flags = 0; in nct3018y_ioctl() local
298 flags |= RTC_VL_DATA_INVALID; in nct3018y_ioctl()
300 return put_user(flags, (unsigned int __user *)arg); in nct3018y_ioctl()
326 int flags; in nct3018y_clkout_recalc_rate() local
328 flags = i2c_smbus_read_byte_data(client, NCT3018Y_REG_CLKO); in nct3018y_clkout_recalc_rate()
329 if (flags < 0) in nct3018y_clkout_recalc_rate()
332 flags &= NCT3018Y_REG_CLKO_F_MASK; in nct3018y_clkout_recalc_rate()
333 return clkout_rates[flags]; in nct3018y_clkout_recalc_rate()
353 int i, flags; in nct3018y_clkout_set_rate() local
355 flags = i2c_smbus_read_byte_data(client, NCT3018Y_REG_CLKO); in nct3018y_clkout_set_rate()
356 if (flags < 0) in nct3018y_clkout_set_rate()
357 return flags; in nct3018y_clkout_set_rate()
361 flags &= ~NCT3018Y_REG_CLKO_F_MASK; in nct3018y_clkout_set_rate()
362 flags |= i; in nct3018y_clkout_set_rate()
363 return i2c_smbus_write_byte_data(client, NCT3018Y_REG_CLKO, flags); in nct3018y_clkout_set_rate()
373 int flags; in nct3018y_clkout_control() local
375 flags = i2c_smbus_read_byte_data(client, NCT3018Y_REG_CLKO); in nct3018y_clkout_control()
376 if (flags < 0) in nct3018y_clkout_control()
377 return flags; in nct3018y_clkout_control()
380 flags |= NCT3018Y_REG_CLKO_CKE; in nct3018y_clkout_control()
382 flags &= ~NCT3018Y_REG_CLKO_CKE; in nct3018y_clkout_control()
384 return i2c_smbus_write_byte_data(client, NCT3018Y_REG_CLKO, flags); in nct3018y_clkout_control()
401 int flags; in nct3018y_clkout_is_prepared() local
403 flags = i2c_smbus_read_byte_data(client, NCT3018Y_REG_CLKO); in nct3018y_clkout_is_prepared()
404 if (flags < 0) in nct3018y_clkout_is_prepared()
405 return flags; in nct3018y_clkout_is_prepared()
407 return flags & NCT3018Y_REG_CLKO_CKE; in nct3018y_clkout_is_prepared()
428 init.flags = 0; in nct3018y_clkout_register_clk()
458 int err, flags; in nct3018y_probe() local
474 flags = i2c_smbus_read_byte_data(client, NCT3018Y_REG_CTRL); in nct3018y_probe()
475 if (flags < 0) { in nct3018y_probe()
477 return flags; in nct3018y_probe()
478 } else if (flags & NCT3018Y_BIT_TWO) { in nct3018y_probe()
482 flags = NCT3018Y_BIT_TWO; in nct3018y_probe()
483 err = i2c_smbus_write_byte_data(client, NCT3018Y_REG_CTRL, flags); in nct3018y_probe()
489 flags = 0; in nct3018y_probe()
490 err = i2c_smbus_write_byte_data(client, NCT3018Y_REG_ST, flags); in nct3018y_probe()