-/* $OpenBSD: rtc.c,v 1.10 2014/07/11 08:18:31 guenther Exp $ */
+/* $OpenBSD: rtc.c,v 1.11 2021/04/24 10:15:14 mpi Exp $ */
/*
* Copyright (c) 1992, 1993
int rtc_settime(todr_chip_handle_t, struct timeval *);
int rtc_bq4802_gettime(todr_chip_handle_t, struct timeval *);
int rtc_bq4802_settime(todr_chip_handle_t, struct timeval *);
-int rtc_getcal(todr_chip_handle_t, int *);
-int rtc_setcal(todr_chip_handle_t, int);
int
rtc_match(struct device *parent, void *cf, void *aux)
handle->cookie = sc;
handle->todr_gettime = rtc_gettime;
handle->todr_settime = rtc_settime;
- handle->todr_getcal = rtc_getcal;
- handle->todr_setcal = rtc_setcal;
handle->bus_cookie = NULL;
handle->todr_setwen = NULL;
bus_space_write_1(iot, ioh, BQ4802_CTRL, csr);
return (0);
}
-
-int
-rtc_getcal(todr_chip_handle_t handle, int *vp)
-{
- return (EOPNOTSUPP);
-}
-
-int
-rtc_setcal(todr_chip_handle_t handle, int v)
-{
- return (EOPNOTSUPP);
-}
-/* $OpenBSD: clock_subr.h,v 1.6 2020/05/17 13:21:20 visa Exp $ */
+/* $OpenBSD: clock_subr.h,v 1.7 2021/04/24 10:15:15 mpi Exp $ */
/* $NetBSD: clock_subr.h,v 1.2 1997/03/15 18:11:17 is Exp $ */
/*-
*
* todr_gettime: convert time-of-day clock into a `struct timeval'
* todr_settime: set time-of-day clock from a `struct timeval'
- * todr_getcal: get current TOD clock calibration value in ppm
- * todr_setcal: set calibration value in ppm in TOD clock
*
* (this is probably not so useful:)
* todr_setwen: provide a machine-dependent TOD clock write-enable callback
int (*todr_gettime)(struct todr_chip_handle *, struct timeval *);
int (*todr_settime)(struct todr_chip_handle *, struct timeval *);
- int (*todr_getcal)(struct todr_chip_handle *, int *);
- int (*todr_setcal)(struct todr_chip_handle *, int);
int (*todr_setwen)(struct todr_chip_handle *, int);
};
typedef struct todr_chip_handle *todr_chip_handle_t;
#define todr_gettime(ct, t) ((*(ct)->todr_gettime)(ct, t))
#define todr_settime(ct, t) ((*(ct)->todr_settime)(ct, t))
-#define todr_getcal(ct, vp) ((*(ct)->todr_gettime)(ct, vp))
-#define todr_setcal(ct, v) ((*(ct)->todr_settime)(ct, v))
#define todr_wenable(ct, v) if ((ct)->todr_setwen) \
((*(ct)->todr_setwen)(ct, v))
-/* $OpenBSD: sxirtc.c,v 1.4 2019/08/11 14:46:18 kettenis Exp $ */
+/* $OpenBSD: sxirtc.c,v 1.5 2021/04/24 10:15:15 mpi Exp $ */
/*
* Copyright (c) 2008 Mark Kettenis
* Copyright (c) 2013 Artturi Alm
handle->cookie = self;
handle->todr_gettime = sxirtc_gettime;
handle->todr_settime = sxirtc_settime;
- handle->todr_getcal = NULL;
- handle->todr_setcal = NULL;
handle->bus_cookie = NULL;
handle->todr_setwen = NULL;
todr_handle = handle;
-/* $OpenBSD: ds1307.c,v 1.2 2020/04/27 12:41:44 kettenis Exp $ */
+/* $OpenBSD: ds1307.c,v 1.3 2021/04/24 10:15:15 mpi Exp $ */
/*
* Copyright (c) 2016 Marcus Glocker <mglocker@openbsd.org>
int maxrtc_set_24h_mode(struct maxrtc_softc *);
int maxrtc_gettime(struct todr_chip_handle *, struct timeval *);
int maxrtc_settime(struct todr_chip_handle *, struct timeval *);
-int maxrtc_getcal(struct todr_chip_handle *, int *);
-int maxrtc_setcal(struct todr_chip_handle *, int);
/*
* Driver glue structures.
sc->sc_todr.cookie = sc;
sc->sc_todr.todr_gettime = maxrtc_gettime;
sc->sc_todr.todr_settime = maxrtc_settime;
- sc->sc_todr.todr_getcal = maxrtc_getcal;
- sc->sc_todr.todr_setcal = maxrtc_setcal;
sc->sc_todr.todr_setwen = NULL;
if (maxrtc_enable_osc(sc) == -1)
return (0);
}
-
-int
-maxrtc_getcal(struct todr_chip_handle *ch, int *cal)
-{
- return (EOPNOTSUPP);
-}
-
-int
-maxrtc_setcal(struct todr_chip_handle *ch, int cal)
-{
- return (EOPNOTSUPP);
-}
-/* $OpenBSD: pcf8523.c,v 1.4 2020/04/27 12:36:03 kettenis Exp $ */
+/* $OpenBSD: pcf8523.c,v 1.5 2021/04/24 10:15:15 mpi Exp $ */
/*
* Copyright (c) 2005 Kimihiro Nonaka
int pcfrtc_clock_write(struct pcfrtc_softc *, struct clock_ymdhms *);
int pcfrtc_gettime(struct todr_chip_handle *, struct timeval *);
int pcfrtc_settime(struct todr_chip_handle *, struct timeval *);
-int pcfrtc_getcal(struct todr_chip_handle *, int *);
-int pcfrtc_setcal(struct todr_chip_handle *, int);
int
pcfrtc_match(struct device *parent, void *v, void *arg)
sc->sc_todr.cookie = sc;
sc->sc_todr.todr_gettime = pcfrtc_gettime;
sc->sc_todr.todr_settime = pcfrtc_settime;
- sc->sc_todr.todr_getcal = pcfrtc_getcal;
- sc->sc_todr.todr_setcal = pcfrtc_setcal;
sc->sc_todr.todr_setwen = NULL;
#if 0
return (0);
}
-int
-pcfrtc_setcal(struct todr_chip_handle *ch, int cal)
-{
- return (EOPNOTSUPP);
-}
-
-int
-pcfrtc_getcal(struct todr_chip_handle *ch, int *cal)
-{
- return (EOPNOTSUPP);
-}
-
uint8_t
pcfrtc_reg_read(struct pcfrtc_softc *sc, int reg)
{
-/* $OpenBSD: pcf8563.c,v 1.3 2021/01/13 11:01:19 kettenis Exp $ */
+/* $OpenBSD: pcf8563.c,v 1.4 2021/04/24 10:15:15 mpi Exp $ */
/*
* Copyright (c) 2005 Kimihiro Nonaka
int pcxrtc_clock_write(struct pcxrtc_softc *, struct clock_ymdhms *);
int pcxrtc_gettime(struct todr_chip_handle *, struct timeval *);
int pcxrtc_settime(struct todr_chip_handle *, struct timeval *);
-int pcxrtc_getcal(struct todr_chip_handle *, int *);
-int pcxrtc_setcal(struct todr_chip_handle *, int);
int
pcxrtc_match(struct device *parent, void *v, void *arg)
sc->sc_todr.cookie = sc;
sc->sc_todr.todr_gettime = pcxrtc_gettime;
sc->sc_todr.todr_settime = pcxrtc_settime;
- sc->sc_todr.todr_getcal = pcxrtc_getcal;
- sc->sc_todr.todr_setcal = pcxrtc_setcal;
sc->sc_todr.todr_setwen = NULL;
#if 0
return (0);
}
-int
-pcxrtc_setcal(struct todr_chip_handle *ch, int cal)
-{
- return (EOPNOTSUPP);
-}
-
-int
-pcxrtc_getcal(struct todr_chip_handle *ch, int *cal)
-{
- return (EOPNOTSUPP);
-}
-
uint8_t
pcxrtc_reg_read(struct pcxrtc_softc *sc, int reg)
{
-/* $OpenBSD: rs5c372.c,v 1.5 2009/10/05 18:59:36 deraadt Exp $ */
+/* $OpenBSD: rs5c372.c,v 1.6 2021/04/24 10:15:15 mpi Exp $ */
/* $NetBSD: rs5c372.c,v 1.5 2006/03/29 06:41:24 thorpej Exp $ */
/*
int ricohrtc_clock_write(struct ricohrtc_softc *, struct clock_ymdhms *);
int ricohrtc_gettime(struct todr_chip_handle *, struct timeval *);
int ricohrtc_settime(struct todr_chip_handle *, struct timeval *);
-int ricohrtc_getcal(struct todr_chip_handle *, int *);
-int ricohrtc_setcal(struct todr_chip_handle *, int);
int
ricohrtc_match(struct device *parent, void *v, void *arg)
sc->sc_todr.cookie = sc;
sc->sc_todr.todr_gettime = ricohrtc_gettime;
sc->sc_todr.todr_settime = ricohrtc_settime;
- sc->sc_todr.todr_getcal = ricohrtc_getcal;
- sc->sc_todr.todr_setcal = ricohrtc_setcal;
sc->sc_todr.todr_setwen = NULL;
#if 0
return (0);
}
-int
-ricohrtc_setcal(struct todr_chip_handle *ch, int cal)
-{
-
- return (EOPNOTSUPP);
-}
-
-int
-ricohrtc_getcal(struct todr_chip_handle *ch, int *cal)
-{
-
- return (EOPNOTSUPP);
-}
-
void
ricohrtc_reg_write(struct ricohrtc_softc *sc, int reg, uint8_t val)
{
-/* $OpenBSD: mk48txx.c,v 1.7 2011/04/05 19:54:35 jasper Exp $ */
+/* $OpenBSD: mk48txx.c,v 1.8 2021/04/24 10:15:15 mpi Exp $ */
/* $NetBSD: mk48txx.c,v 1.7 2001/04/08 17:05:10 tsutsui Exp $ */
/*-
* Copyright (c) 2000 The NetBSD Foundation, Inc.
int mk48txx_gettime(todr_chip_handle_t, struct timeval *);
int mk48txx_settime(todr_chip_handle_t, struct timeval *);
-int mk48txx_getcal(todr_chip_handle_t, int *);
-int mk48txx_setcal(todr_chip_handle_t, int);
int mk48txx_auto_century_adjust = 1;
handle->cookie = mk;
handle->todr_gettime = mk48txx_gettime;
handle->todr_settime = mk48txx_settime;
- handle->todr_getcal = mk48txx_getcal;
- handle->todr_setcal = mk48txx_setcal;
handle->todr_setwen = NULL;
mk->mk_bt = bt;
mk->mk_bh = bh;
return (0);
}
-int
-mk48txx_getcal(handle, vp)
- todr_chip_handle_t handle;
- int *vp;
-{
- return (EOPNOTSUPP);
-}
-
-int
-mk48txx_setcal(handle, v)
- todr_chip_handle_t handle;
- int v;
-{
- return (EOPNOTSUPP);
-}
-
int
mk48txx_get_nvram_size(handle, vp)
todr_chip_handle_t handle;