History log of /openbsd-current/sys/dev/i2c/pcf8523.c
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 1.8 12-Oct-2022 kettenis

Extend struct todr_chip_handle with a todr_quality member. This allows us
to assign a quality to RTC implementation and pick the "best" RTC if a
system has multiple RTCs (or multiple interfaces to an RTC). This allows
us to prefer a battery-backed I2C RTC over an RTC that is part of the SoC
which is only running of the SoC is powered. It also allows us to
work around issues with firmware RTC interfaces that may lie to us or
even crash the system.

This change makes sure the todr_quality member of the struct is always
initialized. In most cases the quality will be set to zero; further
adjustments of the quality for specific subsystems/architectures will follow.

ok cheloha@, patrick@


Revision tags: OPENBSD_7_2_BASE
# 1.7 06-Apr-2022 naddy

constify struct cfattach


Revision tags: OPENBSD_7_1_BASE
# 1.6 22-Nov-2021 kettenis

Remove unused header files and make some cosmetic changes.

ok patrick@


Revision tags: OPENBSD_7_0_BASE
# 1.5 24-Apr-2021 mpi

Remove unused function pointers from `todr_handle'.

from miod@


Revision tags: OPENBSD_6_7_BASE OPENBSD_6_8_BASE OPENBSD_6_9_BASE
# 1.4 27-Apr-2020 kettenis

Don't clear OSF flag when we attach such that we can reject the RTC clock
time if the flag is set. Instead clear the flag when we set the time.
This way we don't use the clock time if the oscillator has been interrupted.
This happens for example when the battery is dead.

ok sthen@


Revision tags: OPENBSD_6_0_BASE OPENBSD_6_1_BASE OPENBSD_6_2_BASE OPENBSD_6_3_BASE OPENBSD_6_4_BASE OPENBSD_6_5_BASE OPENBSD_6_6_BASE
# 1.3 20-May-2016 kettenis

Change the identification string to "nxp,pcf8523" as this is what is stored
in the FDT.


# 1.2 16-May-2016 kettenis

Attempt to clear the OS flag when we attach.


# 1.1 16-May-2016 kettenis

Driver for the NXP PCF8523 Real Time Clock.


# 1.7 06-Apr-2022 naddy

constify struct cfattach


Revision tags: OPENBSD_7_1_BASE
# 1.6 22-Nov-2021 kettenis

Remove unused header files and make some cosmetic changes.

ok patrick@


Revision tags: OPENBSD_7_0_BASE
# 1.5 24-Apr-2021 mpi

Remove unused function pointers from `todr_handle'.

from miod@


Revision tags: OPENBSD_6_7_BASE OPENBSD_6_8_BASE OPENBSD_6_9_BASE
# 1.4 27-Apr-2020 kettenis

Don't clear OSF flag when we attach such that we can reject the RTC clock
time if the flag is set. Instead clear the flag when we set the time.
This way we don't use the clock time if the oscillator has been interrupted.
This happens for example when the battery is dead.

ok sthen@


Revision tags: OPENBSD_6_0_BASE OPENBSD_6_1_BASE OPENBSD_6_2_BASE OPENBSD_6_3_BASE OPENBSD_6_4_BASE OPENBSD_6_5_BASE OPENBSD_6_6_BASE
# 1.3 20-May-2016 kettenis

Change the identification string to "nxp,pcf8523" as this is what is stored
in the FDT.


# 1.2 16-May-2016 kettenis

Attempt to clear the OS flag when we attach.


# 1.1 16-May-2016 kettenis

Driver for the NXP PCF8523 Real Time Clock.


# 1.6 22-Nov-2021 kettenis

Remove unused header files and make some cosmetic changes.

ok patrick@


Revision tags: OPENBSD_7_0_BASE
# 1.5 24-Apr-2021 mpi

Remove unused function pointers from `todr_handle'.

from miod@


Revision tags: OPENBSD_6_7_BASE OPENBSD_6_8_BASE OPENBSD_6_9_BASE
# 1.4 27-Apr-2020 kettenis

Don't clear OSF flag when we attach such that we can reject the RTC clock
time if the flag is set. Instead clear the flag when we set the time.
This way we don't use the clock time if the oscillator has been interrupted.
This happens for example when the battery is dead.

ok sthen@


Revision tags: OPENBSD_6_0_BASE OPENBSD_6_1_BASE OPENBSD_6_2_BASE OPENBSD_6_3_BASE OPENBSD_6_4_BASE OPENBSD_6_5_BASE OPENBSD_6_6_BASE
# 1.3 20-May-2016 kettenis

Change the identification string to "nxp,pcf8523" as this is what is stored
in the FDT.


# 1.2 16-May-2016 kettenis

Attempt to clear the OS flag when we attach.


# 1.1 16-May-2016 kettenis

Driver for the NXP PCF8523 Real Time Clock.


# 1.5 24-Apr-2021 mpi

Remove unused function pointers from `todr_handle'.

from miod@


Revision tags: OPENBSD_6_7_BASE OPENBSD_6_8_BASE OPENBSD_6_9_BASE
# 1.4 27-Apr-2020 kettenis

Don't clear OSF flag when we attach such that we can reject the RTC clock
time if the flag is set. Instead clear the flag when we set the time.
This way we don't use the clock time if the oscillator has been interrupted.
This happens for example when the battery is dead.

ok sthen@


Revision tags: OPENBSD_6_0_BASE OPENBSD_6_1_BASE OPENBSD_6_2_BASE OPENBSD_6_3_BASE OPENBSD_6_4_BASE OPENBSD_6_5_BASE OPENBSD_6_6_BASE
# 1.3 20-May-2016 kettenis

Change the identification string to "nxp,pcf8523" as this is what is stored
in the FDT.


# 1.2 16-May-2016 kettenis

Attempt to clear the OS flag when we attach.


# 1.1 16-May-2016 kettenis

Driver for the NXP PCF8523 Real Time Clock.


# 1.4 27-Apr-2020 kettenis

Don't clear OSF flag when we attach such that we can reject the RTC clock
time if the flag is set. Instead clear the flag when we set the time.
This way we don't use the clock time if the oscillator has been interrupted.
This happens for example when the battery is dead.

ok sthen@


Revision tags: OPENBSD_6_0_BASE OPENBSD_6_1_BASE OPENBSD_6_2_BASE OPENBSD_6_3_BASE OPENBSD_6_4_BASE OPENBSD_6_5_BASE OPENBSD_6_6_BASE
# 1.3 20-May-2016 kettenis

Change the identification string to "nxp,pcf8523" as this is what is stored
in the FDT.


# 1.2 16-May-2016 kettenis

Attempt to clear the OS flag when we attach.


# 1.1 16-May-2016 kettenis

Driver for the NXP PCF8523 Real Time Clock.


Revision tags: OPENBSD_6_0_BASE OPENBSD_6_1_BASE OPENBSD_6_2_BASE
# 1.3 20-May-2016 kettenis

Change the identification string to "nxp,pcf8523" as this is what is stored
in the FDT.


# 1.2 16-May-2016 kettenis

Attempt to clear the OS flag when we attach.


# 1.1 16-May-2016 kettenis

Driver for the NXP PCF8523 Real Time Clock.