#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/lock.h>
#include <sys/module.h>
#include <dev/iicbus/iiconf.h>
#include <dev/iicbus/iicbus.h>
#include "clock_if.h"
#include "iicbus_if.h"
Go to the source code of this file.
|
| __FBSDID ("$FreeBSD$") |
|
static void | rtc8583_init (void *arg) |
|
static int | rtc8583_probe (device_t dev) |
|
static int | rtc8583_attach (device_t dev) |
|
static int | rtc8583_detach (device_t dev) |
|
static int | rtc8583_gettime (device_t dev, struct timespec *ts) |
|
static int | rtc8583_settime (device_t dev, struct timespec *ts) |
|
static int | rtc8583_writeto (device_t slavedev, uint8_t regaddr, void *buffer, uint16_t buflen, int waithow) |
|
static int | rtc8583_read1 (struct rtc8583_softc *sc, uint8_t reg, uint8_t *data) |
|
static int | rtc8583_write1 (struct rtc8583_softc *sc, uint8_t reg, uint8_t val) |
|
| DRIVER_MODULE (rtc8583, iicbus, rtc8583_driver, rtc8583_devclass, NULL, NULL) |
|
| MODULE_VERSION (rtc8583, 1) |
|
| MODULE_DEPEND (rtc8583, iicbus, IICBUS_MINVER, IICBUS_PREFVER, IICBUS_MAXVER) |
|
| IICBUS_FDT_PNP_INFO (compat_data) |
|
◆ MAX_TRANSFER
◆ RTC8583_SC_REG
#define RTC8583_SC_REG 0x01 /* RTC Seconds */ |
◆ RTC8583_USERSRAM_REG
#define RTC8583_USERSRAM_REG 0x10 /* User SRAM register (first) */ |
◆ __FBSDID()
◆ DRIVER_MODULE()
◆ IICBUS_FDT_PNP_INFO()
◆ MODULE_DEPEND()
◆ MODULE_VERSION()
MODULE_VERSION |
( |
rtc8583 |
, |
|
|
1 |
|
|
) |
| |
◆ rtc8583_attach()
static int rtc8583_attach |
( |
device_t |
dev | ) |
|
|
static |
◆ rtc8583_detach()
static int rtc8583_detach |
( |
device_t |
dev | ) |
|
|
static |
◆ rtc8583_gettime()
static int rtc8583_gettime |
( |
device_t |
dev, |
|
|
struct timespec * |
ts |
|
) |
| |
|
static |
Definition at line 192 of file rtc8583.c.
References rtc8583_softc::busdev, time_regs::day, dev, rtc8583_softc::dev, time_regs::hour, IIC_WAIT, iicbus_release_bus(), iicbus_request_bus(), iicdev_readfrom(), time_regs::min, time_regs::month, time_regs::msec, rtc8583_read1(), RTC8583_SC_REG, RTC8583_USERSRAM_REG, rtc8583_write1(), and time_regs::sec.
◆ rtc8583_init()
static void rtc8583_init |
( |
void * |
arg | ) |
|
|
static |
◆ rtc8583_probe()
static int rtc8583_probe |
( |
device_t |
dev | ) |
|
|
static |
◆ rtc8583_read1()
static int rtc8583_read1 |
( |
struct rtc8583_softc * |
sc, |
|
|
uint8_t |
reg, |
|
|
uint8_t * |
data |
|
) |
| |
|
inlinestatic |
◆ rtc8583_settime()
static int rtc8583_settime |
( |
device_t |
dev, |
|
|
struct timespec * |
ts |
|
) |
| |
|
static |
Definition at line 249 of file rtc8583.c.
References rtc8583_softc::busdev, time_regs::day, dev, rtc8583_softc::dev, time_regs::hour, IIC_WAIT, iicbus_release_bus(), iicbus_request_bus(), time_regs::min, time_regs::month, time_regs::msec, RTC8583_SC_REG, RTC8583_USERSRAM_REG, rtc8583_write1(), rtc8583_writeto(), and time_regs::sec.
◆ rtc8583_write1()
static int rtc8583_write1 |
( |
struct rtc8583_softc * |
sc, |
|
|
uint8_t |
reg, |
|
|
uint8_t |
val |
|
) |
| |
|
inlinestatic |
◆ rtc8583_writeto()
static int rtc8583_writeto |
( |
device_t |
slavedev, |
|
|
uint8_t |
regaddr, |
|
|
void * |
buffer, |
|
|
uint16_t |
buflen, |
|
|
int |
waithow |
|
) |
| |
|
static |
◆ rtc8583_devclass
devclass_t rtc8583_devclass |
|
static |
◆ rtc8583_driver
Initial value:= {
"rtc8583",
}
static device_method_t rtc8583_methods[]
Definition at line 295 of file rtc8583.c.
◆ rtc8583_methods
device_method_t rtc8583_methods[] |
|
static |
Initial value:= {
DEVMETHOD_END,
}
static int rtc8583_attach(device_t dev)
static int rtc8583_detach(device_t dev)
static int rtc8583_settime(device_t dev, struct timespec *ts)
static int rtc8583_gettime(device_t dev, struct timespec *ts)
static int rtc8583_probe(device_t dev)
Definition at line 282 of file rtc8583.c.