04 Apr, 2019
12 commits
-
Allow reading the oscillator status bit. Also allow clearing it even if
that makes little sense and can't be done in a race free way.Signed-off-by: Alexandre Belloni
-
The PCF850363 has an offset correction with two modes:
With mode 0, the correction is triggered once every two hours and then
correction pulses are applied once per minute until the programmed
correction values have been implemented. This gives a step of 4.34 ppm.With mode 1, the correction is triggered once every four minutes and then
correction pulses are applied once per second up to a maximum of 60 pulses.
When correction values greater than 60 pulses are used, additional
correction pulses are made in the 59 th second. This gives a step of 4.069
ppm.Use the correction closest to the requested value.
Signed-off-by: Alexandre Belloni
-
The pcf85063 has one byte of nvram.
Signed-off-by: Alexandre Belloni
-
The Micro Crystal RV8263 has the same IC as the pcf85063 but has an on
board crystal. This means that the CAP_SEL bit has to be cleared so the
correct capacitance is selected for the crystal.Signed-off-by: Alexandre Belloni
-
Add support for the alarms. The match on the weekday is not used as it it
not necessarily properly set.The tested RTC shows a behaviour where setting an alarm on the second right
after an alarm that fired is not working, probably because of the circuit
that ensures an alarm only fires once. This is why uie_unsupported is set.Signed-off-by: Alexandre Belloni
-
As stated in a comment pcf85063a and pcf85063tp don't have the same number
of registers. Especially, pcf85063tp doesn't have alarm support.Signed-off-by: Alexandre Belloni
-
Switch to regmap to simplify register accesses and remove the need for
pcf85063_stop_clock/pcf85063_start_clock.Signed-off-by: Alexandre Belloni
-
This is a standard BCD RTC that will fail in 2100.
Signed-off-by: Alexandre Belloni
-
This allows further improvement of the driver.
Signed-off-by: Alexandre Belloni
-
Only smbus reads and write are done in the driver, plain i2c functionality
is not required.Signed-off-by: Alexandre Belloni
-
Use SPDX-License-Identifier instead of a verbose license text.
Signed-off-by: Alexandre Belloni
-
struct i2c_device_id argument of probe() is not used, so use probe_new()
instead.Signed-off-by: Alexandre Belloni
03 Mar, 2019
1 commit
-
Some of defines are not in use since
7b5768486a910532885f01b9d2dad4818c8b3be1. Remove it to make the code
easier to read and understand.Signed-off-by: Alexey Roslyakov
Signed-off-by: Alexandre Belloni
23 Jan, 2019
1 commit
-
Add support for specifying the xtal load capacitance in the DT node.
The pcf85063 supports xtal load capacitance of 7pF or 12.5pF.
If the rtc has the wrong configuration the time will
drift several hours/week.The driver use the default value 7pF.
The DT may specify either 7000fF or 12500fF.
(The DT uses femto Farad to avoid decimal numbers).
Other values are warned and the driver uses the default value.Signed-off-by: Sam Ravnborg
Cc: Alessandro Zummo
Cc: Alexandre Belloni
Cc: Urs Fässler
Signed-off-by: Alexandre Belloni
28 Jul, 2018
1 commit
-
Fix a bug that caused the Control_1 register to get zeroed whenever the
RTC time is set. The problem occurred between stopping and starting the
RTC clock, wherein the return value of a successful I2C write function
would get written to the register.Also update variables of the start and stop functions to be more
consistent with the rest of the driver.Signed-off-by: Alvin Šipraga
Signed-off-by: Alexandre Belloni
17 Mar, 2018
3 commits
-
Bit clear operation was missing ~
Signed-off-by: Michael McCormick
Signed-off-by: Alexandre Belloni -
pcf85063_get_datetime and pcf85063_set_datetime are only used after casting
dev to an i2c_client. Remove that useless indirection.Signed-off-by: Alexandre Belloni
-
The RTC core is always calling rtc_valid_tm after the read_time callback.
It is not necessary to call it before returning from the callback.Signed-off-by: Alexandre Belloni
05 Nov, 2016
1 commit
-
Add a sanity check to see if chip is present. If we can not communicate
with the chip there is no point in registering a RTC device.Signed-off-by: Mirza Krak
Signed-off-by: Alexandre Belloni
20 Jul, 2016
2 commits
-
The current rtc-pcf85063 driver only supports the PCF85063TP device.
Using the existing driver on a PCF85063A will result in the time being
set correctly into the RTC, but the RTC is held in the stopped state.
Therefore, the time will no longer advance and no error is indicated.The PCF85063A device has a bigger memory map than the PCF85063TP.
The existing driver make use of an address rollover condition,
but the rollover point is different in the two devices.Signed-off-by: Chris DeBruin
Signed-off-by: Alexandre Belloni -
The year range is not validated properly
As the driver has been mainlined in 2014, it is not an issue to stop
handling dates between 1970 and 2000 with the benefit of handling dates up
to 2100.Signed-off-by: Alexandre Belloni
15 Mar, 2016
6 commits
-
No members of struct pcf85063 are used anymore, remove the whole structure.
Reviewed-by: Juergen Borleis
Signed-off-by: Alexandre Belloni -
Since the driver is mainlined there is no use for a separate version
number.Signed-off-by: Alexandre Belloni
-
pcf85063_get_datetime() tries to handle a century bit but that bit is not
documented and the final value is never used anywhere else in the kernel.Reviewed-by: Juergen Borleis
Tested-by: Ulrich Ölmann
Signed-off-by: Alexandre Belloni -
When setting a new time/date the RTC's clock must be stopped first, in
order to write the time/date registers in an atomic manner.
So, this change stops the clock first and then writes the time/date
registers and the clock control register (to re-enable the clock) in one
turn.Signed-off-by: Juergen Borleis
Signed-off-by: Alexandre Belloni -
Check if the RTC signals an invalid time/date (due to a battery power loss
for example). In this case ignore the time/date until it is really set again.Signed-off-by: Juergen Borleis
Signed-off-by: Alexandre Belloni -
By using i2c_smbus_read_i2c_block_data() the code is now much simpler.
While at it: when reading the RTC's seconds register, all time/date registers
are frozen until the RTC's year register is read. So it is important to read
all time/date registers in one turn to not lose a second event. Make it more
clear why the read must happen in this way.Signed-off-by: Juergen Borleis
Signed-off-by: Alexandre Belloni
08 Nov, 2015
1 commit
-
Return an error when the date is invalid as the policy should be
implemented there.Signed-off-by: Alexandre Belloni
05 Sep, 2015
1 commit
-
i2c_driver does not need to set an owner because i2c_register_driver()
will set it.Signed-off-by: Krzysztof Kozlowski
Signed-off-by: Alexandre Belloni
09 Aug, 2014
1 commit
-
Add support for the pcf85063 rtc chip.
[akpm@linux-foundation.org: fix comment typo, tweak conding style]
Signed-off-by: Soeren Andersen
Cc: Alessandro Zummo
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds