This patch adds support for saving/loading weekday value from the chip.
Signed-off-by: Emil Bartczak
---
drivers/rtc/rtc-mcp795.c | 12 +++-
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/drivers/rtc/rtc-mcp795.c b/drivers/rtc/rtc-mcp795.c
index ce75e42..8107fc0 100644
This patch adds alarm support. This allows to configure the chip
to generate an interrupt when the alarm matches current time value.
Alarm can be programmed up to one year in the future
and is accurate to the second.
Signed-off-by: Emil Bartczak
---
drivers/rtc/rtc-mcp795.c | 171
This patchset provides support for weekday and alarm
in the file driver/rtc/rtc-mcp795.c.
Please review the changes and consider to apply them to the main kernel tree.
Changes from v1:
- Cover letter added.
Emil Bartczak (2):
rtc: mcp795: Add support for weekday.
rtc: mcp795: add alarm
This patch adds alarm support. This allows to configure the chip
to generate an interrupt when the alarm matches current time value.
Alarm can be programmed up to one year in the future
and is accurate to the second.
Signed-off-by: Emil Bartczak
---
drivers/rtc/rtc-mcp795.c | 171
This patch adds support for saving/loading weekday value from the chip.
Signed-off-by: Emil Bartczak
---
drivers/rtc/rtc-mcp795.c | 12 +++-
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/drivers/rtc/rtc-mcp795.c b/drivers/rtc/rtc-mcp795.c
index ce75e42..8107fc0 100644
According the datasheet the leap year is a fifth bit in month register.
Signed-off-by: Emil Bartczak
---
drivers/rtc/rtc-mcp795.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/rtc/rtc-mcp795.c b/drivers/rtc/rtc-mcp795.c
index 0389ee0..5fbdb4c 100644
--- a/drivers
This patch doesn't change the code but replaces all bitmask values
with the BIT(x) macro.
Signed-off-by: Emil Bartczak
---
drivers/rtc/rtc-mcp795.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/rtc/rtc-mcp795.c b/drivers/rtc/rtc-mcp795.c
index 89b0ffa..8e
Fix whitespace and indentation errors and the following
checkpatch warnings:
- line 15: Block comments use a trailing */ on a separate line
- line 256: Line over 80 characters
No code change.
Signed-off-by: Emil Bartczak
---
drivers/rtc/rtc-mcp795.c | 12 ++--
1 file changed, 6
In linux rtc_time struct, tm_mon range is 0~11, while in RTC HW REG,
month range is 1~12. This patch adjusts difference of them.
Signed-off-by: Emil Bartczak
---
drivers/rtc/rtc-mcp795.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/rtc/rtc-mcp795.c b/drivers
Write command after loading
the date and begin a new command to write the month. In addition,
disable the oscillator before loading the new values. This is done
by ensuring both the ST and EXTOSC bits are cleared and waiting for
the OSCON bit to clear.
Signed-off-by: Emil Bartczak
---
drivers/rtc
values with the
BIT(x) macro.
Emil Bartczak (6):
rtc: mcp795: use bcd2bin/bin2bcd.
rtc: mcp795: fix bitmask value for leap year (LP).
rtc: mcp795: fix time range difference between linux and RTC chip.
rtc: mcp795: fix month write resetting date to 1.
rtc: mcp795: Prefer using the BIT
Change rtc-mcp795.c to use the bcd2bin/bin2bcd functions.
This change fixes the wrong conversion of month value
from binary to BCD (missing right shift operation for 10 month).
Signed-off-by: Emil Bartczak
---
drivers/rtc/rtc-mcp795.c | 25 +
1 file changed, 13
On Mon, Dec 05, 2016 at 11:15:59PM +0100, Alexandre Belloni wrote:
> On 05/12/2016 at 23:03:52 +0100, Emil Bartczak wrote :
> > >
> > > > #define MCP795_WRITE 0x12
> > > > #define MCP795_UNLOCK 0x14
> > > > #define MCP795_IDWRITE 0x32
>
Hi,
On Mon, Dec 05, 2016 at 04:24:10PM +0100, Alexandre Belloni wrote:
> On 05/12/2016 at 14:11:52 +0100, Emil Bartczak wrote :
> > According to Microchip errata some combinations of date and month
> > values may result in the date being reset to 1, even if the date
> > is
Hi,
On Mon, Dec 05, 2016 at 04:09:59PM +0100, Alexandre Belloni wrote:
> Hi,
>
> On 05/12/2016 at 14:11:50 +0100, Emil Bartczak wrote :
> > The 10 month register was always set to value 0 in the RTC hardware.
> > Due to the bug month November or December became February.
According to Microchip errata some combinations of date and month
values may result in the date being reset to 1, even if the date
is also written with the month (for example 31-07 or 31-08).
As a workaround avoid writing date and month values within the same
Write command. Instead, terminate the W
In linux rtc_time struct, tm_mon range is 0~11, while in RTC HW REG,
month range is 1~12. This patch adjusts difference of them.
---
drivers/rtc/rtc-mcp795.c | 6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/rtc/rtc-mcp795.c b/drivers/rtc/rtc-mcp795.c
index 266328b.
Change rtc-mcp795.c to use the bcd2bin/bin2bcd functions.
---
drivers/rtc/rtc-mcp795.c | 28 +---
1 file changed, 13 insertions(+), 15 deletions(-)
diff --git a/drivers/rtc/rtc-mcp795.c b/drivers/rtc/rtc-mcp795.c
index c9ad46c..1d823f9 100644
--- a/drivers/rtc/rtc-mcp795.c
This patchset provides 3 bug fixes (patch 1, 2 and 3) and one
improvement (patch 4) in the file driver/rtc/rtc-mcp795.c.
Please review the changes and consider to apply them to the
main kernel tree.
Emil Bartczak (4):
rtc: mcp795: fix invalid month setting.
rtc: mcp795: fix time range
The 10 month register was always set to value 0 in the RTC hardware.
Due to the bug month November or December became February.
---
drivers/rtc/rtc-mcp795.c | 12 +++-
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/drivers/rtc/rtc-mcp795.c b/drivers/rtc/rtc-mcp795.c
index 40
Add device tree support to the rtc-mcp795 driver.
Signed-off-by: Emil Bartczak
---
Documentation/devicetree/bindings/rtc/maxim,mcp795.txt | 11 +++
drivers/rtc/rtc-mcp795.c | 10 ++
2 files changed, 21 insertions(+)
create mode 100644 Documentation
21 matches
Mail list logo