FreeBSD kernel IICBUS device code
nxprtc.c File Reference
#include <sys/cdefs.h>
#include "opt_platform.h"
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/bus.h>
#include <sys/clock.h>
#include <sys/kernel.h>
#include <sys/libkern.h>
#include <sys/module.h>
#include <sys/sysctl.h>
#include <dev/iicbus/iicbus.h>
#include <dev/iicbus/iiconf.h>
#include "clock_if.h"
#include "iicbus_if.h"
Include dependency graph for nxprtc.c:

Go to the source code of this file.

Data Structures

struct  time_regs
 
struct  nxprtc_softc
 
struct  nxprtc_compat_data
 

Macros

#define PCF8563_ADDR   0xa2
 
#define PCF8523_ADDR   0xd0
 
#define PCF85xx_R_CS1   0x00 /* CS1 and CS2 control regs are in */
 
#define PCF85xx_R_CS2   0x01 /* the same location on all chips. */
 
#define PCF85xx_B_CS1_STOP   0x20 /* Stop time incrementing bit */
 
#define PCF85xx_B_SECOND_OS   0x80 /* Oscillator Stopped bit */
 
#define PCF85xx_M_SECOND   0x7f /* Masks for all BCD time regs... */
 
#define PCF85xx_M_MINUTE   0x7f
 
#define PCF85xx_M_12HOUR   0x1f
 
#define PCF85xx_M_24HOUR   0x3f
 
#define PCF85xx_M_DAY   0x3f
 
#define PCF85xx_M_MONTH   0x1f
 
#define PCF85xx_M_YEAR   0xff
 
#define PCF2127_R_TMR_CTL   0x10 /* Timer/watchdog control */
 
#define PCF2127_M_TMR_CTRL   0xe3 /* Mask off undef bits */
 
#define PCF2127_B_TMR_CD   0x40 /* Run in countdown mode */
 
#define PCF2127_B_TMR_64HZ   0x01 /* Timer frequency 64Hz */
 
#define PCF2127_R_TS_CTL   0x12 /* Timestamp control */
 
#define PCF2127_B_TSOFF   0x40 /* Turn off timestamp function */
 
#define PCF2127_R_AGING_OFFSET   0x19 /* Frequency aging offset in PPM */
 
#define PCF2129_B_CS1_12HR   0x04 /* Use 12-hour (AM/PM) mode bit */
 
#define PCF2129_B_CLKOUT_OTPR   0x20 /* OTP refresh command */
 
#define PCF2129_B_CLKOUT_HIGHZ   0x07 /* Clock Out Freq = disable */
 
#define PCF8523_R_CS3   0x02 /* Control and status reg 3 */
 
#define PCF8523_R_SECOND   0x03 /* Seconds */
 
#define PCF8523_R_TMR_CLKOUT   0x0F /* Timer and clockout control */
 
#define PCF8523_R_TMR_A_FREQ   0x10 /* Timer A frequency control */
 
#define PCF8523_R_TMR_A_COUNT   0x11 /* Timer A count */
 
#define PCF8523_M_TMR_A_FREQ   0x07 /* Mask off undef bits */
 
#define PCF8523_B_HOUR_PM   0x20 /* PM bit */
 
#define PCF8523_B_CS1_SOFTRESET   0x58 /* Initiate Soft Reset bits */
 
#define PCF8523_B_CS1_12HR   0x08 /* Use 12-hour (AM/PM) mode bit */
 
#define PCF8523_B_CLKOUT_TACD   0x02 /* TimerA runs in CountDown mode */
 
#define PCF8523_B_CLKOUT_HIGHZ   0x38 /* Clock Out Freq = disable */
 
#define PCF8523_B_TMR_A_64HZ   0x01 /* Timer A freq 64Hz */
 
#define PCF8523_M_CS3_PM   0xE0 /* Power mode mask */
 
#define PCF8523_B_CS3_PM_NOBAT   0xE0 /* PM bits: no battery usage */
 
#define PCF8523_B_CS3_PM_STD   0x00 /* PM bits: standard */
 
#define PCF8523_B_CS3_PM_DSNBM   0xa0 /* PM bits: direct switch, no bat mon */
 
#define PCF8523_B_CS3_BLF   0x04 /* Battery Low Flag bit */
 
#define PCF8563_R_SECOND   0x02 /* Seconds */
 
#define PCF8563_R_CLKOUT   0x0d /* Clock output control */
 
#define PCF8563_R_TMR_CTRL   0x0e /* Timer control */
 
#define PCF8563_R_TMR_COUNT   0x0f /* Timer count */
 
#define PCF8563_M_TMR_CTRL   0x93 /* Mask off undef bits */
 
#define PCF8563_B_TMR_ENABLE   0x80 /* Enable countdown timer */
 
#define PCF8563_B_TMR_64HZ   0x01 /* Timer frequency 64Hz */
 
#define PCF8563_B_MONTH_C   0x80 /* Century bit */
 
#define TMR_TICKS_SEC   64
 
#define TMR_TICKS_HALFSEC   32
 
#define SC_F_CPOL   (1 << 0) /* Century bit means 19xx */
 
#define WAITFLAGS   (IIC_WAIT | IIC_RECURSIVE)
 

Enumerations

enum  {
  TYPE_NONE , TYPE_PCA2129 , TYPE_PCA8565 , TYPE_PCF2127 ,
  TYPE_PCF2129 , TYPE_PCF8523 , TYPE_PCF8563 , TYPE_COUNT
}
 

Functions

 __FBSDID ("$FreeBSD$")
 
 CTASSERT (nitems(desc_strings)==TYPE_COUNT)
 
static int nxprtc_readfrom (device_t slavedev, uint8_t regaddr, void *buffer, uint16_t buflen, int waithow)
 
static int read_reg (struct nxprtc_softc *sc, uint8_t reg, uint8_t *val)
 
static int write_reg (struct nxprtc_softc *sc, uint8_t reg, uint8_t val)
 
static int read_timeregs (struct nxprtc_softc *sc, struct time_regs *tregs, uint8_t *tmr)
 
static int write_timeregs (struct nxprtc_softc *sc, struct time_regs *tregs)
 
static int freqadj_sysctl (SYSCTL_HANDLER_ARGS)
 
static int pcf8523_battery_check (struct nxprtc_softc *sc)
 
static int pcf8523_start (struct nxprtc_softc *sc)
 
static int pcf8523_start_timer (struct nxprtc_softc *sc)
 
static int pcf2127_start_timer (struct nxprtc_softc *sc)
 
static int pcf8563_start (struct nxprtc_softc *sc)
 
static int pcf8563_start_timer (struct nxprtc_softc *sc)
 
static void nxprtc_start (void *dev)
 
static int nxprtc_gettime (device_t dev, struct timespec *ts)
 
static int nxprtc_settime (device_t dev, struct timespec *ts)
 
static int nxprtc_get_chiptype (device_t dev)
 
static int nxprtc_probe (device_t dev)
 
static int nxprtc_attach (device_t dev)
 
static int nxprtc_detach (device_t dev)
 
 DRIVER_MODULE (nxprtc, iicbus, nxprtc_driver, nxprtc_devclass, NULL, NULL)
 
 MODULE_VERSION (nxprtc, 1)
 
 MODULE_DEPEND (nxprtc, iicbus, IICBUS_MINVER, IICBUS_PREFVER, IICBUS_MAXVER)
 
 IICBUS_FDT_PNP_INFO (compat_data)
 

Variables

static const char * desc_strings []
 
static nxprtc_compat_data compat_data []
 
static device_method_t nxprtc_methods []
 
static driver_t nxprtc_driver
 
static devclass_t nxprtc_devclass
 

Macro Definition Documentation

◆ PCF2127_B_TMR_64HZ

#define PCF2127_B_TMR_64HZ   0x01 /* Timer frequency 64Hz */

Definition at line 109 of file nxprtc.c.

◆ PCF2127_B_TMR_CD

#define PCF2127_B_TMR_CD   0x40 /* Run in countdown mode */

Definition at line 108 of file nxprtc.c.

◆ PCF2127_B_TSOFF

#define PCF2127_B_TSOFF   0x40 /* Turn off timestamp function */

Definition at line 112 of file nxprtc.c.

◆ PCF2127_M_TMR_CTRL

#define PCF2127_M_TMR_CTRL   0xe3 /* Mask off undef bits */

Definition at line 106 of file nxprtc.c.

◆ PCF2127_R_AGING_OFFSET

#define PCF2127_R_AGING_OFFSET   0x19 /* Frequency aging offset in PPM */

Definition at line 114 of file nxprtc.c.

◆ PCF2127_R_TMR_CTL

#define PCF2127_R_TMR_CTL   0x10 /* Timer/watchdog control */

Definition at line 104 of file nxprtc.c.

◆ PCF2127_R_TS_CTL

#define PCF2127_R_TS_CTL   0x12 /* Timestamp control */

Definition at line 111 of file nxprtc.c.

◆ PCF2129_B_CLKOUT_HIGHZ

#define PCF2129_B_CLKOUT_HIGHZ   0x07 /* Clock Out Freq = disable */

Definition at line 121 of file nxprtc.c.

◆ PCF2129_B_CLKOUT_OTPR

#define PCF2129_B_CLKOUT_OTPR   0x20 /* OTP refresh command */

Definition at line 120 of file nxprtc.c.

◆ PCF2129_B_CS1_12HR

#define PCF2129_B_CS1_12HR   0x04 /* Use 12-hour (AM/PM) mode bit */

Definition at line 119 of file nxprtc.c.

◆ PCF8523_ADDR

#define PCF8523_ADDR   0xd0

Definition at line 82 of file nxprtc.c.

◆ PCF8523_B_CLKOUT_HIGHZ

#define PCF8523_B_CLKOUT_HIGHZ   0x38 /* Clock Out Freq = disable */

Definition at line 138 of file nxprtc.c.

◆ PCF8523_B_CLKOUT_TACD

#define PCF8523_B_CLKOUT_TACD   0x02 /* TimerA runs in CountDown mode */

Definition at line 137 of file nxprtc.c.

◆ PCF8523_B_CS1_12HR

#define PCF8523_B_CS1_12HR   0x08 /* Use 12-hour (AM/PM) mode bit */

Definition at line 136 of file nxprtc.c.

◆ PCF8523_B_CS1_SOFTRESET

#define PCF8523_B_CS1_SOFTRESET   0x58 /* Initiate Soft Reset bits */

Definition at line 135 of file nxprtc.c.

◆ PCF8523_B_CS3_BLF

#define PCF8523_B_CS3_BLF   0x04 /* Battery Low Flag bit */

Definition at line 145 of file nxprtc.c.

◆ PCF8523_B_CS3_PM_DSNBM

#define PCF8523_B_CS3_PM_DSNBM   0xa0 /* PM bits: direct switch, no bat mon */

Definition at line 144 of file nxprtc.c.

◆ PCF8523_B_CS3_PM_NOBAT

#define PCF8523_B_CS3_PM_NOBAT   0xE0 /* PM bits: no battery usage */

Definition at line 142 of file nxprtc.c.

◆ PCF8523_B_CS3_PM_STD

#define PCF8523_B_CS3_PM_STD   0x00 /* PM bits: standard */

Definition at line 143 of file nxprtc.c.

◆ PCF8523_B_HOUR_PM

#define PCF8523_B_HOUR_PM   0x20 /* PM bit */

Definition at line 134 of file nxprtc.c.

◆ PCF8523_B_TMR_A_64HZ

#define PCF8523_B_TMR_A_64HZ   0x01 /* Timer A freq 64Hz */

Definition at line 139 of file nxprtc.c.

◆ PCF8523_M_CS3_PM

#define PCF8523_M_CS3_PM   0xE0 /* Power mode mask */

Definition at line 141 of file nxprtc.c.

◆ PCF8523_M_TMR_A_FREQ

#define PCF8523_M_TMR_A_FREQ   0x07 /* Mask off undef bits */

Definition at line 132 of file nxprtc.c.

◆ PCF8523_R_CS3

#define PCF8523_R_CS3   0x02 /* Control and status reg 3 */

Definition at line 126 of file nxprtc.c.

◆ PCF8523_R_SECOND

#define PCF8523_R_SECOND   0x03 /* Seconds */

Definition at line 127 of file nxprtc.c.

◆ PCF8523_R_TMR_A_COUNT

#define PCF8523_R_TMR_A_COUNT   0x11 /* Timer A count */

Definition at line 130 of file nxprtc.c.

◆ PCF8523_R_TMR_A_FREQ

#define PCF8523_R_TMR_A_FREQ   0x10 /* Timer A frequency control */

Definition at line 129 of file nxprtc.c.

◆ PCF8523_R_TMR_CLKOUT

#define PCF8523_R_TMR_CLKOUT   0x0F /* Timer and clockout control */

Definition at line 128 of file nxprtc.c.

◆ PCF8563_ADDR

#define PCF8563_ADDR   0xa2

Definition at line 81 of file nxprtc.c.

◆ PCF8563_B_MONTH_C

#define PCF8563_B_MONTH_C   0x80 /* Century bit */

Definition at line 162 of file nxprtc.c.

◆ PCF8563_B_TMR_64HZ

#define PCF8563_B_TMR_64HZ   0x01 /* Timer frequency 64Hz */

Definition at line 160 of file nxprtc.c.

◆ PCF8563_B_TMR_ENABLE

#define PCF8563_B_TMR_ENABLE   0x80 /* Enable countdown timer */

Definition at line 159 of file nxprtc.c.

◆ PCF8563_M_TMR_CTRL

#define PCF8563_M_TMR_CTRL   0x93 /* Mask off undef bits */

Definition at line 157 of file nxprtc.c.

◆ PCF8563_R_CLKOUT

#define PCF8563_R_CLKOUT   0x0d /* Clock output control */

Definition at line 152 of file nxprtc.c.

◆ PCF8563_R_SECOND

#define PCF8563_R_SECOND   0x02 /* Seconds */

Definition at line 150 of file nxprtc.c.

◆ PCF8563_R_TMR_COUNT

#define PCF8563_R_TMR_COUNT   0x0f /* Timer count */

Definition at line 155 of file nxprtc.c.

◆ PCF8563_R_TMR_CTRL

#define PCF8563_R_TMR_CTRL   0x0e /* Timer control */

Definition at line 154 of file nxprtc.c.

◆ PCF85xx_B_CS1_STOP

#define PCF85xx_B_CS1_STOP   0x20 /* Stop time incrementing bit */

Definition at line 90 of file nxprtc.c.

◆ PCF85xx_B_SECOND_OS

#define PCF85xx_B_SECOND_OS   0x80 /* Oscillator Stopped bit */

Definition at line 91 of file nxprtc.c.

◆ PCF85xx_M_12HOUR

#define PCF85xx_M_12HOUR   0x1f

Definition at line 95 of file nxprtc.c.

◆ PCF85xx_M_24HOUR

#define PCF85xx_M_24HOUR   0x3f

Definition at line 96 of file nxprtc.c.

◆ PCF85xx_M_DAY

#define PCF85xx_M_DAY   0x3f

Definition at line 97 of file nxprtc.c.

◆ PCF85xx_M_MINUTE

#define PCF85xx_M_MINUTE   0x7f

Definition at line 94 of file nxprtc.c.

◆ PCF85xx_M_MONTH

#define PCF85xx_M_MONTH   0x1f

Definition at line 98 of file nxprtc.c.

◆ PCF85xx_M_SECOND

#define PCF85xx_M_SECOND   0x7f /* Masks for all BCD time regs... */

Definition at line 93 of file nxprtc.c.

◆ PCF85xx_M_YEAR

#define PCF85xx_M_YEAR   0xff

Definition at line 99 of file nxprtc.c.

◆ PCF85xx_R_CS1

#define PCF85xx_R_CS1   0x00 /* CS1 and CS2 control regs are in */

Definition at line 87 of file nxprtc.c.

◆ PCF85xx_R_CS2

#define PCF85xx_R_CS2   0x01 /* the same location on all chips. */

Definition at line 88 of file nxprtc.c.

◆ SC_F_CPOL

#define SC_F_CPOL   (1 << 0) /* Century bit means 19xx */

Definition at line 219 of file nxprtc.c.

◆ TMR_TICKS_HALFSEC

#define TMR_TICKS_HALFSEC   32

Definition at line 169 of file nxprtc.c.

◆ TMR_TICKS_SEC

#define TMR_TICKS_SEC   64

Definition at line 168 of file nxprtc.c.

◆ WAITFLAGS

#define WAITFLAGS   (IIC_WAIT | IIC_RECURSIVE)

Definition at line 228 of file nxprtc.c.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
TYPE_NONE 
TYPE_PCA2129 
TYPE_PCA8565 
TYPE_PCF2127 
TYPE_PCF2129 
TYPE_PCF8523 
TYPE_PCF8563 
TYPE_COUNT 

Definition at line 174 of file nxprtc.c.

Function Documentation

◆ __FBSDID()

__FBSDID ( "$FreeBSD$"  )

◆ CTASSERT()

CTASSERT ( nitems(desc_strings = =TYPE_COUNT)

◆ DRIVER_MODULE()

DRIVER_MODULE ( nxprtc  ,
iicbus  ,
nxprtc_driver  ,
nxprtc_devclass  ,
NULL  ,
NULL   
)

◆ freqadj_sysctl()

static int freqadj_sysctl ( SYSCTL_HANDLER_ARGS  )
static

Definition at line 364 of file nxprtc.c.

References nxprtc_softc::freqadj, PCF2127_R_AGING_OFFSET, and write_reg().

Referenced by pcf8523_start().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ IICBUS_FDT_PNP_INFO()

IICBUS_FDT_PNP_INFO ( compat_data  )

◆ MODULE_DEPEND()

MODULE_DEPEND ( nxprtc  ,
iicbus  ,
IICBUS_MINVER  ,
IICBUS_PREFVER  ,
IICBUS_MAXVER   
)

◆ MODULE_VERSION()

MODULE_VERSION ( nxprtc  ,
 
)

◆ nxprtc_attach()

◆ nxprtc_detach()

static int nxprtc_detach ( device_t  dev)
static

Definition at line 991 of file nxprtc.c.

References dev.

◆ nxprtc_get_chiptype()

static int nxprtc_get_chiptype ( device_t  dev)
static

Definition at line 890 of file nxprtc.c.

References nxprtc_softc::chiptype, compat_data, dev, nxprtc_compat_data::ocd_data, nxprtc_compat_data::ocd_str, TYPE_NONE, and TYPE_PCF8563.

Referenced by nxprtc_attach(), and nxprtc_probe().

Here is the caller graph for this function:

◆ nxprtc_gettime()

◆ nxprtc_probe()

static int nxprtc_probe ( device_t  dev)
static

Definition at line 927 of file nxprtc.c.

References nxprtc_softc::chiptype, desc_strings, dev, nxprtc_get_chiptype(), and TYPE_NONE.

Here is the call graph for this function:

◆ nxprtc_readfrom()

static int nxprtc_readfrom ( device_t  slavedev,
uint8_t  regaddr,
void *  buffer,
uint16_t  buflen,
int  waithow 
)
static

Definition at line 260 of file nxprtc.c.

References iic_msg::buf, iic_msg::flags, IIC_M_RD, IIC_M_WR, iicbus_transfer_excl(), iic_msg::len, and iic_msg::slave.

Referenced by pcf8523_start(), pcf8563_start(), read_reg(), and read_timeregs().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ nxprtc_settime()

◆ nxprtc_start()

static void nxprtc_start ( void *  dev)
static

◆ pcf2127_start_timer()

static int pcf2127_start_timer ( struct nxprtc_softc sc)
static

Definition at line 588 of file nxprtc.c.

References PCF2127_B_TMR_CD, PCF2127_M_TMR_CTRL, PCF2127_R_TMR_CTL, PCF8523_B_TMR_A_64HZ, read_reg(), nxprtc_softc::tmcaddr, and write_reg().

Referenced by nxprtc_start().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ pcf8523_battery_check()

static int pcf8523_battery_check ( struct nxprtc_softc sc)
static

Definition at line 388 of file nxprtc.c.

References nxprtc_softc::bat_time, nxprtc_softc::dev, PCF8523_B_CS3_BLF, PCF8523_B_CS3_PM_DSNBM, PCF8523_B_CS3_PM_STD, PCF8523_R_CS3, read_reg(), and write_reg().

Referenced by nxprtc_settime(), and pcf8523_start().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ pcf8523_start()

◆ pcf8523_start_timer()

static int pcf8523_start_timer ( struct nxprtc_softc sc)
static

Definition at line 556 of file nxprtc.c.

References PCF8523_B_CLKOUT_HIGHZ, PCF8523_B_CLKOUT_TACD, PCF8523_B_TMR_A_64HZ, PCF8523_M_TMR_A_FREQ, PCF8523_R_TMR_A_FREQ, PCF8523_R_TMR_CLKOUT, read_reg(), nxprtc_softc::tmcaddr, and write_reg().

Referenced by nxprtc_start().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ pcf8563_start()

static int pcf8563_start ( struct nxprtc_softc sc)
static

Definition at line 615 of file nxprtc.c.

References nxprtc_softc::dev, nxprtc_readfrom(), PCF8563_R_CLKOUT, PCF85xx_B_CS1_STOP, PCF85xx_B_SECOND_OS, PCF85xx_R_CS1, WAITFLAGS, and write_reg().

Referenced by nxprtc_start().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ pcf8563_start_timer()

static int pcf8563_start_timer ( struct nxprtc_softc sc)
static

Definition at line 661 of file nxprtc.c.

References PCF8563_B_TMR_64HZ, PCF8563_B_TMR_ENABLE, PCF8563_M_TMR_CTRL, PCF8563_R_TMR_CTRL, read_reg(), nxprtc_softc::tmcaddr, and write_reg().

Referenced by nxprtc_start().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ read_reg()

static int read_reg ( struct nxprtc_softc sc,
uint8_t  reg,
uint8_t *  val 
)
static

Definition at line 293 of file nxprtc.c.

References nxprtc_softc::dev, nxprtc_readfrom(), val, and WAITFLAGS.

Referenced by nxprtc_gettime(), nxprtc_settime(), pcf2127_start_timer(), pcf8523_battery_check(), pcf8523_start(), pcf8523_start_timer(), pcf8563_start_timer(), and read_timeregs().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ read_timeregs()

static int read_timeregs ( struct nxprtc_softc sc,
struct time_regs tregs,
uint8_t *  tmr 
)
static

Definition at line 307 of file nxprtc.c.

References nxprtc_softc::dev, nxprtc_readfrom(), read_reg(), time_regs::sec, nxprtc_softc::secaddr, nxprtc_softc::tmcaddr, TMR_TICKS_HALFSEC, TMR_TICKS_SEC, nxprtc_softc::use_timer, and WAITFLAGS.

Referenced by nxprtc_gettime().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ write_reg()

static int write_reg ( struct nxprtc_softc sc,
uint8_t  reg,
uint8_t  val 
)
static

Definition at line 300 of file nxprtc.c.

References nxprtc_softc::dev, iicdev_writeto(), val, and WAITFLAGS.

Referenced by freqadj_sysctl(), nxprtc_settime(), pcf2127_start_timer(), pcf8523_battery_check(), pcf8523_start(), pcf8523_start_timer(), pcf8563_start(), and pcf8563_start_timer().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ write_timeregs()

static int write_timeregs ( struct nxprtc_softc sc,
struct time_regs tregs 
)
static

Definition at line 356 of file nxprtc.c.

References nxprtc_softc::dev, iicdev_writeto(), nxprtc_softc::secaddr, and WAITFLAGS.

Referenced by nxprtc_settime().

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ compat_data

nxprtc_compat_data compat_data[]
static
Initial value:
= {
{"nxp,pca2129", TYPE_PCA2129},
{"nxp,pca8565", TYPE_PCA8565},
{"nxp,pcf2127", TYPE_PCF2127},
{"nxp,pcf2129", TYPE_PCF2129},
{"nxp,pcf8523", TYPE_PCF8523},
{"nxp,pcf8563", TYPE_PCF8563},
{"pcf8563", TYPE_PCF8563},
{"phg,pcf8563", TYPE_PCF8563},
{"philips,pcf8563", TYPE_PCF8563},
{NULL, TYPE_NONE},
}
@ TYPE_NONE
Definition: nxprtc.c:175
@ TYPE_PCF2127
Definition: nxprtc.c:178
@ TYPE_PCA2129
Definition: nxprtc.c:176
@ TYPE_PCF2129
Definition: nxprtc.c:179
@ TYPE_PCF8523
Definition: nxprtc.c:180
@ TYPE_PCA8565
Definition: nxprtc.c:177
@ TYPE_PCF8563
Definition: nxprtc.c:181

Definition at line 243 of file nxprtc.c.

Referenced by nxprtc_get_chiptype().

◆ desc_strings

const char* desc_strings[]
static
Initial value:
= {
"",
"NXP PCA2129 RTC",
"NXP PCA8565 RTC",
"NXP PCF2127 RTC",
"NXP PCF2129 RTC",
"NXP PCF8523 RTC",
"NXP PCF8563 RTC",
}

Definition at line 185 of file nxprtc.c.

Referenced by nxprtc_probe().

◆ nxprtc_devclass

devclass_t nxprtc_devclass
static

Definition at line 1015 of file nxprtc.c.

◆ nxprtc_driver

driver_t nxprtc_driver
static
Initial value:
= {
"nxprtc",
sizeof(struct nxprtc_softc),
}
static device_method_t nxprtc_methods[]
Definition: nxprtc.c:998

Definition at line 1009 of file nxprtc.c.

◆ nxprtc_methods

device_method_t nxprtc_methods[]
static
Initial value:
= {
DEVMETHOD(device_probe, nxprtc_probe),
DEVMETHOD(device_attach, nxprtc_attach),
DEVMETHOD(device_detach, nxprtc_detach),
DEVMETHOD(clock_gettime, nxprtc_gettime),
DEVMETHOD(clock_settime, nxprtc_settime),
DEVMETHOD_END
}
static int nxprtc_probe(device_t dev)
Definition: nxprtc.c:927
static int nxprtc_gettime(device_t dev, struct timespec *ts)
Definition: nxprtc.c:742
static int nxprtc_detach(device_t dev)
Definition: nxprtc.c:991
static int nxprtc_settime(device_t dev, struct timespec *ts)
Definition: nxprtc.c:808
static int nxprtc_attach(device_t dev)
Definition: nxprtc.c:946

Definition at line 998 of file nxprtc.c.