Re: [PATCH 1/2] rtc: pcf2127: Disable Power-On Reset Override

2021-01-13 Thread Philipp Rosenberger
Hi Uwe, On 12.01.21 20:26, Uwe Kleine-König wrote: Hello, On Mon, Jan 04, 2021 at 05:19:09PM +0100, Philipp Rosenberger wrote: If the PCF2127/2129 has lost all power and is then powered again it goes into "Power-On Reset Override" mode. In this mode the RTC seems to work fine

[PATCH v2 0/2] rtc: pcf2127: proper initialization after power loss

2021-01-13 Thread Philipp Rosenberger
If the PCF2127/2129 loses power it needs some initialization to work correctly. A bootloader/firmware might do this. If not we should do this in the driver. Changes for v2: - make commit log and comments more clear - check if PORO was really disabled Philipp Rosenberger (2): rtc: pcf2127

[PATCH v2 2/2] rtc: pcf2127: Run a OTP refresh if not done before

2021-01-13 Thread Philipp Rosenberger
The datasheet of the PCF2127 states,it is recommended to process an OTP refresh once the power is up and the oscillator is operating stable. The OTP refresh takes less than 100 ms to complete. Signed-off-by: Philipp Rosenberger --- drivers/rtc/rtc-pcf2127.c | 16 1 file changed

[PATCH v2 1/2] rtc: pcf2127: Disable Power-On Reset Override

2021-01-13 Thread Philipp Rosenberger
h the PORO active no interrupts are generated on the interrupt pin (INT). Signed-off-by: Philipp Rosenberger --- drivers/rtc/rtc-pcf2127.c | 18 ++ 1 file changed, 18 insertions(+) diff --git a/drivers/rtc/rtc-pcf2127.c b/drivers/rtc/rtc-pcf2127.c index 39a7b5116aa4..378b1ce812d6 10

Re: [PATCH v2 1/2] rtc: pcf2127: Disable Power-On Reset Override

2021-01-14 Thread Philipp Rosenberger
On 14.01.21 09:05, Uwe Kleine-König wrote: On Wed, Jan 13, 2021 at 12:27:41PM +0100, Philipp Rosenberger wrote: To resume normal operation after a total power loss (no or empty battery) the "Power-On Reset Override (PORO)" facility needs to be disabled. As the oscillator may t

Re: [PATCH v2 2/2] rtc: pcf2127: Run a OTP refresh if not done before

2021-01-14 Thread Philipp Rosenberger
On 14.01.21 09:06, Uwe Kleine-König wrote: On Wed, Jan 13, 2021 at 12:27:42PM +0100, Philipp Rosenberger wrote: The datasheet of the PCF2127 states,it is recommended to process an OTP s/,/, / ACK refresh once the power is up and the oscillator is operating stable. The OTP refresh

Re: [PATCH v2 2/2] rtc: pcf2127: Run a OTP refresh if not done before

2021-01-14 Thread Philipp Rosenberger
On 14.01.21 10:50, Alexandre Belloni wrote: On 13/01/2021 12:27:42+0100, Philipp Rosenberger wrote: The datasheet of the PCF2127 states,it is recommended to process an OTP refresh once the power is up and the oscillator is operating stable. The OTP refresh takes less than 100 ms to complete

Re: [PATCH v2 1/2] rtc: pcf2127: Disable Power-On Reset Override

2021-01-14 Thread Philipp Rosenberger
On 14.01.21 10:33, Alexandre Belloni wrote: Hi, On 14/01/2021 10:10:32+0100, Philipp Rosenberger wrote: On 14.01.21 09:05, Uwe Kleine-König wrote: On Wed, Jan 13, 2021 at 12:27:41PM +0100, Philipp Rosenberger wrote: To resume normal operation after a total power loss (no or empty battery

Re: [PATCH v2 1/2] rtc: pcf2127: Disable Power-On Reset Override

2021-01-14 Thread Philipp Rosenberger
On 14.01.21 11:53, Alexandre Belloni wrote: On 14/01/2021 11:43:22+0100, Philipp Rosenberger wrote: On 14.01.21 10:33, Alexandre Belloni wrote: Hi, On 14/01/2021 10:10:32+0100, Philipp Rosenberger wrote: On 14.01.21 09:05, Uwe Kleine-König wrote: On Wed, Jan 13, 2021 at 12:27:41PM

Re: [PATCH v2 2/2] rtc: pcf2127: Run a OTP refresh if not done before

2021-01-14 Thread Philipp Rosenberger
On 14.01.21 12:11, Alexandre Belloni wrote: On 14/01/2021 11:30:37+0100, Philipp Rosenberger wrote: + ret = regmap_set_bits(pcf2127->regmap, PCF2127_REG_CLKOUT, + PCF2127_BIT_CLKOUT_OTPR); + if (ret < 0) { + dev_err(dev, "%s:

[PATCH 0/2] rtc: pcf2127: proper initilize rtc after power loss

2021-01-04 Thread Philipp Rosenberger
If the PCF2127/2129 loses power it needs some initialization to work correctly. A bootloader/firmware might do this. If not we should do this in the driver. Philipp Rosenberger (2): rtc: pcf2127: Disable Power-On Reset Override rtc: pcf2127: Run a OTP refresh if not done before drivers/rtc

[PATCH 1/2] rtc: pcf2127: Disable Power-On Reset Override

2021-01-04 Thread Philipp Rosenberger
m function. Signed-off-by: Philipp Rosenberger --- drivers/rtc/rtc-pcf2127.c | 13 + 1 file changed, 13 insertions(+) diff --git a/drivers/rtc/rtc-pcf2127.c b/drivers/rtc/rtc-pcf2127.c index 39a7b5116aa4..39c28bac4d1a 100644 --- a/drivers/rtc/rtc-pcf2127.c +++ b/drivers/rtc/rtc-pcf2127.c

[PATCH 2/2] rtc: pcf2127: Run a OTP refresh if not done before

2021-01-04 Thread Philipp Rosenberger
The datasheet of the PCF2127 states,it is recommended to process an OTP refresh once the power is up and the oscillator is operating stable. The OTP refresh takes less than 100 ms to complete. Signed-off-by: Philipp Rosenberger --- drivers/rtc/rtc-pcf2127.c | 11 +++ 1 file changed, 11

[PATCH v3 2/2] rtc: pcf2127: Run a OTP refresh if not done before

2021-01-18 Thread Philipp Rosenberger
The datasheet of the PCF2127 states, it is recommended to process an OTP refresh once the power is up and the oscillator is operating stable. The OTP refresh takes less than 100 ms to complete. Signed-off-by: Philipp Rosenberger --- drivers/rtc/rtc-pcf2127.c | 17 + 1 file

[PATCH v3 0/2] rtc: pcf2127: proper initialization after power loss

2021-01-18 Thread Philipp Rosenberger
: - make commit log and comments more clear - check if PORO was really disabled Philipp Rosenberger (2): rtc: pcf2127: Disable Power-On Reset Override rtc: pcf2127: Run a OTP refresh if not done before drivers/rtc/rtc-pcf2127.c | 25 + 1 file changed, 25 insertions

[PATCH v3 1/2] rtc: pcf2127: Disable Power-On Reset Override

2021-01-18 Thread Philipp Rosenberger
x27;ve seen on the PCF2127 and PCF2129 there is not interrupted gernerated at the interrupt pin (INT), as long the PORO bit is set. This behavior is not documented in the manual. Signed-off-by: Philipp Rosenberger --- drivers/rtc/rtc-pcf2127.c | 8 1 file changed, 8 insertions(+) diff --git

[PATCH] trace: fix commets of include guards

2020-07-15 Thread Philipp Rosenberger
Some header files where derived from other headers, but the comments of the include guards where not changed. This patch fixes those comments at the end of the header files. Signed-off-by: Philipp Rosenberger --- include/trace/events/initcall.h | 2 +- include/trace/events/irq_matrix.h | 2

[PATCH 1/2] gpio: gpio-mxc: Fix: higher 16 GPIOs usable as wake source

2017-07-12 Thread Philipp Rosenberger
to the problem that only some gpios (the lower 16) were useable as wake sources. Signed-off-by: Philipp Rosenberger --- drivers/gpio/gpio-mxc.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpio/gpio-mxc.c b/drivers/gpio/gpio-mxc.c index 3abea3f..9269225 100644 --- a/drivers/gpi

[PATCH 0/2] gpio-mxc: Fix issue with gpios used as wake source on iMX27

2017-07-12 Thread Philipp Rosenberger
prevents the upper 16 gpios per bank to be used as wake source. The first patch fixes the assignment for the irq_high. The second patch adds proper return values. Which should make finding any problems in the future much easier. Philipp Rosenberger (2): gpio: gpio-mxc: Fix: higher 16 GPIOs usable as

[PATCH 2/2] gpio: gpio-mxc: gpio_set_wake_irq() use proper return values

2017-07-12 Thread Philipp Rosenberger
Errors from enable_irq_wake() in gpio_set_wake_irq() were silently ignored. Thus led to the problem that gpio_set_wake_irq() always returned successfully, even if enable_irq_wake() returned an error. Signed-off-by: Philipp Rosenberger --- drivers/gpio/gpio-mxc.c | 11 ++- 1 file changed