1 /* SPDX-License-Identifier: GPL-2.0-only */
5 #ifndef __DRIVERS_I2C_PCF8523_CHIP_H__
6 #define __DRIVERS_I2C_PCF8523_CHIP_H__
8 struct drivers_i2c_pcf8523_config
{
9 unsigned char cap_sel
; /* Internal capacitor selection */
10 unsigned char second_int_en
; /* Enable IRQ for seconds */
11 unsigned char alarm_int_en
; /* Enable IRQ for alarm */
12 unsigned char correction_int_en
;/* Enable IRQ for corrections */
13 unsigned char wdt_int_en
; /* Enable IRQ for watchdog */
14 unsigned char tmrA_int_en
; /* Enable IRQ for timer A */
15 unsigned char tmrB_int_en
; /* Enable IRQ for timer B */
16 unsigned char power_mode
; /* Set up power mode */
17 unsigned char bat_switch_int_en
;/* Enable IRQ for battery switch */
18 unsigned char bat_low_int_en
; /* Enable IRQ for low battery */
19 unsigned char offset_mode
; /* Set up mode how to handle offset */
20 unsigned char offset_val
; /* Value for offset adjustment */
21 unsigned char tmrA_mode
; /* Operation mode of timer A */
22 unsigned char tmrA_int_mode
; /* IRQ mode for timer A */
23 unsigned char tmrB_mode
; /* Operation mode for timer B */
24 unsigned char tmrB_int_mode
; /* IRQ mode for timer B */
25 unsigned char cof_selection
; /* Set up "clock out" frequency */
26 unsigned char tmrA_prescaler
; /* Prescaler for timer A */
27 unsigned char tmrB_prescaler
; /* Prescaler for timer B */
28 unsigned char tmrB_pulse_cfg
; /* Pulse width config for timer B */
29 unsigned char set_user_date
; /* Use user date from device tree */
30 unsigned char user_year
; /* User year to set */
31 unsigned char user_month
; /* User month to set */
32 unsigned char user_day
; /* User day to set */
33 unsigned char user_weekday
; /* User weekday to set */
36 #endif /* __DRIVERS_I2C_PCF8523_CHIP_H__ */