[rtc-linux] Re: [PATCH RESENT v2] rtc: cmos: remove all __exit_p annotations

2016-10-18 Thread Alexandre Belloni
; When cmos_set_alarm() is called dev is NULL and so trigger the deref via > cmos->irq > > The problem comes from that the device is removed but no remove function > are called due to _exit_p(). > > This patch remove all _exit_p() annotation. > > Signed-off-by: Corentin

[rtc-linux] Re: [PATCH 1/1] rtc: add century field data boundary

2016-10-19 Thread Alexandre Belloni
ude/linux/mc146818rtc.h > index a585b4b..199065a 100644 > --- a/include/linux/mc146818rtc.h > +++ b/include/linux/mc146818rtc.h > @@ -122,6 +122,8 @@ struct cmos_rtc_board_info { > #define RTC_IO_EXTENT_USED RTC_IO_EXTENT > #endif /* ARCH_RTC_LOCATION */ > > +#define

[rtc-linux] Re: [PATCH v3] rtc-cmos: Reject unsupported alarm values

2016-10-19 Thread Alexandre Belloni
; --- > drivers/rtc/rtc-cmos.c | 72 > ++ > 1 file changed, 72 insertions(+) > Applied, thanks. -- Alexandre Belloni, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com -- You received this message because you are subscribed to "rtc-l

[rtc-linux] Re: [PATCH] rtc-cmos: don't refer to asm-generic/rtc.h

2016-10-19 Thread Alexandre Belloni
gt; drivers/rtc/Kconfig| 4 ++-- > drivers/rtc/rtc-cmos.c | 3 --- > 2 files changed, 2 insertions(+), 5 deletions(-) > Applied, thanks. -- Alexandre Belloni, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com -- You received this message because you a

[rtc-linux] Re: [PATCH] rtc: cmos: Don't enable interrupts in the middle of the interrupt handler

2016-10-20 Thread Alexandre Belloni
2] [] arch_cpu_idle+0xa/0x10 > [ 202.634973] [] default_idle_call+0x1e/0x30 > [ 202.634974] [] cpu_startup_entry+0x17c/0x1f0 > [ 202.634976] [] rest_init+0x127/0x130 > [ 202.634978] [] start_kernel+0x3f6/0x403 > [ 202.634980] [] x86_64_start_reservations+0x2a/0x2c > [ 202.6

[rtc-linux] Re: [PATCH 1/2] ABI: rtc-ab8500: fix rtc_calibration documentation

2016-10-30 Thread Alexandre Belloni
On 29/10/2016 at 08:10:02 -0200, Mauro Carvalho Chehab wrote : > The "What:" field at the ABI should describe the location of > the ABI, e. g. the position under a mounted sysfs. > > Fix it. > > Cc: Mark Godfrey > Cc: Linus Walleij > Cc: Alessandro Zummo &g

[rtc-linux] Re: [PATCH 1/1] rtc: pcf85063: do not register a RTC device if chip is not present

2016-11-04 Thread Alexandre Belloni
85063.c | 7 +++ > 1 file changed, 7 insertions(+) > Applied, thanks. -- Alexandre Belloni, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com -- You received this message because you are subscribed to "rtc-linux". Membership options at http://gr

[rtc-linux] Re: [PATCH 0/3] rtc: remove modular usage from non-modular code

2016-11-04 Thread Alexandre Belloni
and spreads like weeds. > > Build tested on current linux-next (sparc32) to ensure no silly typos > or implicit include issues that would break compilation crept in. > > --- > > Cc: Alessandro Zummo > Cc: Alexandre Belloni > Cc: "David S. Miller" > Cc:

[rtc-linux] Re: [PATCH v3 1/7] rtc: rtc-jz4740: Add support for the RTC in the jz4780 SoC

2016-11-04 Thread Alexandre Belloni
(-) > > v2: No change > v3: No change > All applied, thanks -- Alexandre Belloni, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com -- You received this message because you are subscribed to "rtc-linux". Membership options at http://grou

[rtc-linux] Re: [PATCH] Documentation: bindings: fix twl-rtc documentation

2016-11-04 Thread Alexandre Belloni
letions(-) > Applied, thanks. -- Alexandre Belloni, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com -- You received this message because you are subscribed to "rtc-linux". Membership options at http://groups.google.com/group/rtc-linux . Please read

[rtc-linux] Re: [PATCH 3/4] rtc: Enable compile testing for Maxim and Samsung drivers

2016-11-04 Thread Alexandre Belloni
ivers/rtc/Kconfig | 7 --- > 1 file changed, 4 insertions(+), 3 deletions(-) > Applied, thanks. -- Alexandre Belloni, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com -- You received this message because you are subscribed to "rtc-linux". Membershi

[rtc-linux] Re: [PATCH 1/2] rtc: omap: Fix selecting external osc

2016-11-04 Thread Alexandre Belloni
abling support") > Signed-off-by: Keerthy > Signed-off-by: Lokesh Vutla > Signed-off-by: Dave Gerlach > --- > > Boot tested and checked for rtc ticking on am335x-boneblack, am335x-bone > am437x-gp-evm, dra7-evm, dra72-evm. > > drivers/rtc/rtc-omap.c | 6 -- &g

[rtc-linux] [PATCH] rtc: fix typos in Kconfig

2016-11-08 Thread Alexandre Belloni
s/buillt/built/g Signed-off-by: Alexandre Belloni --- drivers/rtc/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig index 24b0778f6e28..ab55f35019fc 100644 --- a/drivers/rtc/Kconfig +++ b/drivers/rtc/Kconfig @@ -1565,7

[rtc-linux] [PATCH 2/2] rtc: jz4740: make the driver builtin only

2016-11-08 Thread Alexandre Belloni
Since the driver is now calling machine_halt() that is not exported, it has to be built in the kernel. Building it as a module will fail at linking time. Signed-off-by: Alexandre Belloni --- drivers/rtc/Kconfig | 5 + drivers/rtc/rtc-jz4740.c | 10 +- 2 files changed, 2

[rtc-linux] [PATCH 1/2] rtc: jz4740: remove unused EXPORT_SYMBOL

2016-11-08 Thread Alexandre Belloni
jz4740_rtc_poweroff() is only called from the driver, stop exporting it. Signed-off-by: Alexandre Belloni --- drivers/rtc/rtc-jz4740.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/rtc/rtc-jz4740.c b/drivers/rtc/rtc-jz4740.c index 33ccd73ee947..18feae6c4e95

[rtc-linux] [GIT PULL] RTC fixes for 4.9

2016-11-14 Thread Alexandre Belloni
+ drivers/rtc/rtc-cmos.c| 15 --- drivers/rtc/rtc-omap.c| 38 ++ 3 files changed, 39 insertions(+), 15 deletions(-) -- Alexandre Belloni, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com -- You received th

[rtc-linux] Re: [PATCH 2/3] rtc: sparc: make starfire explicitly non-modular

2016-11-20 Thread Alexandre Belloni
at > > when reading the driver there is no doubt it is builtin-only. > > > > We delete the MODULE_LICENSE tag etc. since all that information > > was (or is now) contained at the top of the file in the comments. > > > > Cc: Alessandro Zummo > > Cc: Alexan

[rtc-linux] Re: [PATCH 1/3] rtc: rtc-twl: kill static variables

2016-11-22 Thread Alexandre Belloni
030) { This changes the meaning of it. What if at some point there is a new part that is neither a 4030 nor an 6030? That will probably mean going over ths part of code again but maybe the odds are low and nobody cares. -- Alexandre Belloni, Free Electrons Embedded Linux and Kernel engineering

[rtc-linux] Re: [PATCH 2/3] rtc: rtc-twl: make driver DT only

2016-11-22 Thread Alexandre Belloni
obe = twl_rtc_probe, You can then get rid of of_match_ptr() -- Alexandre Belloni, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com -- You received this message because you are subscribed to "rtc-linux". Membership options at http://groups.google.

[rtc-linux] Re: [PATCH 1/3] rtc: rtc-twl: kill static variables

2016-11-23 Thread Alexandre Belloni
On 23/11/2016 at 10:39:12 +0200, Nicolae Rosia wrote : > Hi, > Thanks for the review. > > On Wed, Nov 23, 2016 at 12:31 AM, Alexandre Belloni > wrote: > > Hi, > > > > A few alignments are off but I can fix that provided you answer the > > question below: &g

[rtc-linux] Re: [PATCH 1/2] drivers: rtc: rtc-tps65910: Add RTC calibration support

2016-11-25 Thread Alexandre Belloni
rtc_register(&pdev->dev); > + if (ret < 0) { > + dev_err(&pdev->dev, "Failed to register to sysfs\n"); > + return ret; > + } > + > return 0; > } > > @@ -294,6 +412,8 @@ static int tps65910_rtc_probe(struc

[rtc-linux] Re: [PATCH 1/2] drivers: rtc: rtc-tps65910: Add RTC calibration support

2016-11-25 Thread Alexandre Belloni
On 25/11/2016 at 13:20:05 +0200, Vesa Jääskeläinen wrote : > On 2016-11-25 12:32, Alexandre Belloni wrote: > > Hi, > > > > On 25/11/2016 at 11:52:17 +0200, Vesa Jääskeläinen wrote : > > > Texas Instrument's TPS65910 has support for compensating RTC crystal >

[rtc-linux] Re: [PATCH] rtc: rtc-ds3232: add device tree support

2016-11-28 Thread Alexandre Belloni
> + { } > +}; > +MODULE_DEVICE_TABLE(of, ds3232_of_match); > +#endif > + > static struct i2c_driver ds3232_driver = { > .driver = { > .name = "rtc-ds3232", > + .of_match_table = of_match_ptr(ds3232_of_match), > .pm =

[rtc-linux] Re: [PATCH] rtc: rtc-ds3232: add device tree support

2016-11-28 Thread Alexandre Belloni
On 28/11/2016 at 08:31:20 +, Peter Robinson wrote : > On Mon, Nov 28, 2016 at 8:24 AM, Alexandre Belloni > wrote: > > Hi, > > > > On 28/11/2016 at 07:06:44 +, Peter Robinson wrote : > >> Set the of_match_table for this driver so that devices can be describ

[rtc-linux] Re: [PATCH v2 0/2] rtc: rtc-twl: cleanup

2016-11-30 Thread Alexandre Belloni
ly > > drivers/rtc/Kconfig | 1 + > drivers/rtc/rtc-twl.c | 202 > ++ > 2 files changed, 122 insertions(+), 81 deletions(-) > Both applied, thanks -- Alexandre Belloni, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com -- You rece

[rtc-linux] Re: [PATCH] rtc: add support for EPSON TOYOCOM RTC-7301SF/DG

2016-11-30 Thread Alexandre Belloni
priv, false); > + If the RTC is battery backed, it may still run with the core power off and maybe someone will actually expect the alarm to trigger at a later time. I don't mind much as you are probably the only user anyway. -- Alexandre Belloni, Free Electrons Embedded Linux and Kernel en

[rtc-linux] Re: [PATCH 1/2] drivers: rtc: rtc-tps65910: Add RTC calibration support

2016-11-30 Thread Alexandre Belloni
On 28/11/2016 at 16:42:05 +0200, Vesa Jääskeläinen wrote : > On 2016-11-25 17:37, Alexandre Belloni wrote: > > On 25/11/2016 at 13:20:05 +0200, Vesa Jääskeläinen wrote : > > > On 2016-11-25 12:32, Alexandre Belloni wrote: > > > > Hi, > > > > >

[rtc-linux] Re: [RFC PATCH] rtc/nxp: add FTM alarm driver as the wakeup source

2016-11-30 Thread Alexandre Belloni
e to setup alarm, so we are using system time for > now. > Anybody have better idea? > No, that seems fine to me. I'll review the rest of the driver. -- Alexandre Belloni, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com -- You received this message because y

Re: [rtc-linux] Re: [RFC PATCH 2/3] rtc: Add Amlogic Virtual Wake RTC

2016-11-30 Thread Alexandre Belloni
t as a timer inside the kernel. I think it may be fine to handle that in the RTC subsystem for now. The same issue can be seen with the flextimer on LS1021A: http://lists.infradead.org/pipermail/linux-arm-kernel/2015-August/365597.html -- Alexandre Belloni, Free Electrons Embedded Linux and

[rtc-linux] Re: [PATCH v2] rtc: add support for EPSON TOYOCOM RTC-7301SF/DG

2016-12-03 Thread Alexandre Belloni
= BIT(0), > + RTC7301_CONTROL_STOP= BIT(1), > + RTC7301_CONTROL_BANK_SEL_0 = BIT(2), > + RTC7301_CONTROL_BANK_SEL_1 = BIT(3), > +}; > + Well, I'm still not convinced this enum is useful, please change those to #defines. Else, this see

[rtc-linux] Re: [PATCH 2/8] dt-bindings: document the STM32 RTC bindings

2016-12-05 Thread Alexandre Belloni
ck entry ck_rtc. > +- clock-names: name of the clock used. Should be "ck_rtc". Is this name really useful? > +- interrupt-parent: phandle for the interrupt controller. > +- interrupts: rtc alarm interrupt. > +- interrupt-names: rtc alarm interrupt name, should be "alarm&

[rtc-linux] Re: [PATCH 1/4] rtc: mcp795: fix invalid month setting.

2016-12-05 Thread Alexandre Belloni
im->tm_mday= ((data[4] & 0x30) >> 4) * 10 + (data[4] & 0x0f); > - tim->tm_mon = ((data[5] & 0x10) >> 4) * 10 + (data[5] & > 0x0f); > + tim->tm_mon = ((data[5] & 0x10) >> 4) * 10 + (data[5] & 0x0f); Al

[rtc-linux] Re: [PATCH 3/4] rtc: mcp795: fix month write resetting date to 1.

2016-12-05 Thread Alexandre Belloni
reak; > + if (!(data & MCP795_OSCON_BIT)) > + break; > + > + } while (--retries); > + > + return !retries ? -EIO : ret; > +} > + > +static int mcp795_start_oscillator(struct device *dev) > +{ > + return mcp795_rtcc_set_bits(de

[rtc-linux] Re: [PATCH 4/4] rtc: mcp795: use bcd2bin/bin2bcd.

2016-12-05 Thread Alexandre Belloni
CP795_EEREAD0x03 > @@ -137,7 +138,6 @@ static int mcp795_start_oscillator(struct device *dev) > > static int mcp795_set_time(struct device *dev, struct rtc_time *tim) > { > - int month; You just introduced this variable to fix a bug. Maybe it was not necessary?

[rtc-linux] Re: [PATCH 1/4] rtc: mcp795: fix invalid month setting.

2016-12-05 Thread Alexandre Belloni
& 0x0f); > > > tim->tm_mday= ((data[4] & 0x30) >> 4) * 10 + (data[4] & 0x0f); > > > - tim->tm_mon = ((data[5] & 0x10) >> 4) * 10 + (data[5] & > > > 0x0f); > > > + tim->tm_mon = ((data[5] & 0x10) >> 4) *

[rtc-linux] Re: [PATCH 3/4] rtc: mcp795: fix month write resetting date to 1.

2016-12-05 Thread Alexandre Belloni
value 0. > What do you think? > That is one way but maybe some people are setting that bit in the bootloader. It doesn't matter much. If you are not using the feature, let it that way. If anybody needs it at some point they can still send a patch :) -- Alexandre Belloni, Free El

[rtc-linux] Re: [PATCH] rtc: ds1374: Merge conditional + WARN_ON()

2016-12-07 Thread Alexandre Belloni
-) > Applied, thanks. -- Alexandre Belloni, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com -- You received this message because you are subscribed to "rtc-linux". Membership options at http://groups.google.com/group/rtc-linux . Please read http://gro

[rtc-linux] Re: [PATCH 2/2] rtc: imxdi: use the security violation interrupt

2016-12-07 Thread Alexandre Belloni
> + > platform_set_drvdata(pdev, imxdi); > imxdi->rtc = devm_rtc_device_register(&pdev->dev, pdev->name, > &dryice_rtc_ops, THIS_MODULE); > -- > 1.7.10.4 > -- Alexandre Belloni, Free Electrons Embedded Linux and Kernel en

[rtc-linux] Re: [PATCH 1/2] rtc: imxdi: (trivial) fix a typo

2016-12-07 Thread Alexandre Belloni
On 19/11/2016 at 14:03:33 +0100, Martin Kaiser wrote : > Signed-off-by: Martin Kaiser > --- > drivers/rtc/rtc-imxdi.c |2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > Applied, thanks. -- Alexandre Belloni, Free Electrons Embedded Linux and Kernel engineer

[rtc-linux] Re: [PATCH V1] rtc: ds1307: Add ACPI support

2016-12-07 Thread Alexandre Belloni
ions(-) > Applied after fixing a few alignment issues, thanks. -- Alexandre Belloni, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com -- You received this message because you are subscribed to "rtc-linux". Membership options at http://groups.google.com/gro

[rtc-linux] Re: [PATCH 3/8] rtc: add STM32 RTC driver

2016-12-07 Thread Alexandre Belloni
can > add a warning for the user in this case ? > > There is exactly one driver ever checking the return value of device_init_wakeup(). It basically always succeeds. -- Alexandre Belloni, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com -- You received

[rtc-linux] Re: [PATCH 3/8] rtc: add STM32 RTC driver

2016-12-07 Thread Alexandre Belloni
f (IS_ERR(rtc->base)) > + return PTR_ERR(rtc->base); > + > + dbp = syscon_regmap_lookup_by_phandle(pdev->dev.of_node, "st,syscfg"); > + if (IS_ERR(dbp)) { > + dev_err(&pdev->dev, "no st,syscfg\n"); > + return PTR_ERR(dbp); >

[rtc-linux] Re: [PATCH v3] rtc: add support for EPSON TOYOCOM RTC-7301SF/DG

2016-12-07 Thread Alexandre Belloni
Artix7 FPGA board with my own > custom IP for RTC-7301. > > Signed-off-by: Akinobu Mita > Acked-by: Rob Herring > Cc: Alessandro Zummo > Cc: Alexandre Belloni > --- > * Changes from v2 > - Convert enum to usual #defines > > .../devicetree/bindings/rtc/ep

[rtc-linux] Re: [PATCH v2 0/6] Provides bug fixes for rtc-mcp795.c

2016-12-07 Thread Alexandre Belloni
- > 1 file changed, 100 insertions(+), 22 deletions(-) > All applied, thanks! -- Alexandre Belloni, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com -- You received this message because you are subscribed to "rtc-linux". Membership optio

[rtc-linux] [GIT PULL] RTC for 4.10

2016-12-18 Thread Alexandre Belloni
rs/rtc/rtc-r7301.c -- Alexandre Belloni, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com -- You received this message because you are subscribed to "rtc-linux". Membership options at http://groups.google.com/group/rtc-linux . Please read http://groups.google

[rtc-linux] Re: [PATCH 1/1] rtc: rx8010: change lock mechanism

2016-12-18 Thread Alexandre Belloni
ops_lock); > if (ret < 0) > return ret; > > @@ -466,8 +457,6 @@ static int rx8010_probe(struct i2c_client *client, > rx8010->client = client; > i2c_set_clientdata(client, rx8010); > > - spin_lock_init(&rx8010->flag

Re: [rtc-linux] [PATCH] rtc: pcf8563: Do not disable clk out by default

2016-12-18 Thread Alexandre Belloni
description is misleading. The CCF is the one disabling the clock if it is not used. If any user of the clock is declared, it will not be disabled so it already works in both cases (provided you have a proper driver getting the clock). -- Alexandre Belloni, Free Electrons Embedded Linux and Kernel

[rtc-linux] Re: [PATCH v2 0/2] drivers: rtc: rtc-tps65910: Add RTC calibration support

2016-12-18 Thread Alexandre Belloni
-f) whether > compensation is enabled or not. If this should not be the case it can be > easily fixed, -EINVAL might do the trick. > If compensation is not enabled, simply return 0 so userspace actually has a way to know it is not currently in effect. Anyway, you'll have to write a

[rtc-linux] Re: [PATCH v2 0/2] drivers: rtc: rtc-tps65910: Add RTC calibration support

2016-12-18 Thread Alexandre Belloni
On 19/12/2016 at 01:38:54 +0100, Alexandre Belloni wrote : > On 11/12/2016 at 00:21:02 +0200, Vesa Jääskeläinen wrote : > > > > On 2016-12-10 23:50, Vesa Jääskeläinen wrote: > > > Texas Instrument's TPS65910 has support for compensating RTC crystal > > > ina

[rtc-linux] Re: [PATCH v2 2/2] drivers: rtc: rtc-tps65910: use 'unsigned int' instead of 'unsigned' in arguments

2016-12-18 Thread Alexandre Belloni
ps65910_rtc_alarm_irq_enable(struct device *dev, unsigned > enabled) > +static int tps65910_rtc_alarm_irq_enable(struct device *dev, > + unsigned int enabled) > { > struct tps65910 *tps = dev_get_drvdata(dev->parent); > u8 v

[rtc-linux] Re: [PATCH 2/2] rtc: jz4740: make the driver builtin only

2016-12-19 Thread Alexandre Belloni
Hi, On 19/12/2016 at 09:03:17 +0100, Geert Uytterhoeven wrote : > On Wed, Nov 9, 2016 at 1:37 AM, Alexandre Belloni > wrote: > > Since the driver is now calling machine_halt() that is not exported, it has > > to be built in the kernel. Building it as a module will fail a

[rtc-linux] Re: [PATCH v2] rtc: armada38x: Followed the new recommendation for errata implementation

2016-12-20 Thread Alexandre Belloni
(rtc->rtc_dev)) { > @@ -260,6 +329,7 @@ static __init int armada38x_rtc_probe(struct > platform_device *pdev) > dev_err(&pdev->dev, "Failed to register RTC device: %d\n", ret); > return ret; > } > + Unrelated change. > return 0; >

[rtc-linux] Re: [PATCH v2] rtc: armada38x: Followed the new recommendation for errata implementation

2016-12-21 Thread Alexandre Belloni
On 21/12/2016 at 10:02:54 +0100, Gregory CLEMENT wrote : > Hi Alexandre, > > On mer., déc. 21 2016, Alexandre Belloni > wrote: > > > I agree with all your remark expect one, see below: > [...] > >>rtc_update_irq(rtc->rtc_dev, 1, event); > >>

[rtc-linux] Re: [PATCH] rtc: armada38x: add __ro_after_init to armada38x_rtc_ops

2017-01-04 Thread Alexandre Belloni
file_operations pointer in the kernel, or the thousand other operations > > > structure pointers that a running kernel has. > > I'm not sure to understand the question and the response. A quick check > with grep suggests that most rtc_class_ops pointers are already const

Re: [rtc-linux] [PATCH] rtc: Add support for RX4035

2017-01-04 Thread Alexandre Belloni
->tm_year < 70) > + tm->tm_year += 100; /* assume we are in 1970...2069 */ This is bad and usually doesn't work properly. The datasheet explicitly state: "The auto calendar function updates all dates, months, and years from January 1, 2001 to December 31, 2099." It will

[rtc-linux] Re: [PATCH v2 1/1] rtc: rx8010: change lock mechanism

2017-01-04 Thread Alexandre Belloni
3:~# > Message from syslogd@GE004097290448 at Dec 3 11:17:08 ... > kernel:[ 82.108175] BUG: spinlock wrong CPU on CPU#0, hwclock/855 > > Message from syslogd@GE004097290448 at Dec 3 11:17:08 ... > kernel:[ 82.113660] lock: 0xedb4899c, .magic: dead4ead, .owner: > hwclock/855,

Re: [rtc-linux] Question about RTC validity mechanism

2017-01-09 Thread Alexandre Belloni
. You could handle one case by storing that you saw the POC bit high at some point and returning -EINVAL in read_time until the time is set by set_time. -- Alexandre Belloni, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com -- You received this message because you a

[rtc-linux] Re: [PATCH v3 1/2] drivers: rtc: rtc-tps65910: Add RTC calibration support

2017-01-09 Thread Alexandre Belloni
> include/linux/mfd/tps65910.h | 1 + > 2 files changed, 144 insertions(+) > Applied, thanks. -- Alexandre Belloni, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com -- You received this message because you are subscribed to "rtc-linux". Me

[rtc-linux] Re: [PATCH v3 2/2] drivers: rtc: rtc-tps65910: use 'unsigned int' instead of 'unsigned' in arguments

2017-01-09 Thread Alexandre Belloni
2 insertions(+), 1 deletion(-) > Applied, thanks. -- Alexandre Belloni, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com -- You received this message because you are subscribed to "rtc-linux". Membership options at http://groups.google.com/group/rtc-linux

[rtc-linux] Re: [PATCH v3] rtc: armada38x: Follow the new recommendation for errata implementation

2017-01-09 Thread Alexandre Belloni
way to find the correct value. > > Gregory > > drivers/rtc/rtc-armada38x.c | 118 > +++- > 1 file changed, 95 insertions(+), 23 deletions(-) > Applied, thanks. -- Alexandre Belloni, Free Electrons Embedded Linux and Kernel engineering

[rtc-linux] Re: [PATCH v2 0/2] Provides support for alarm.

2017-01-09 Thread Alexandre Belloni
arm on weekday, how awful... Applied, thanks. -- Alexandre Belloni, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com -- You received this message because you are subscribed to "rtc-linux". Membership options at http://groups.google.com/group/rtc-linux . P

[rtc-linux] Re: [PATCH 1/3 v4] rtc: imxdi: use the security violation interrupt

2017-01-10 Thread Alexandre Belloni
s/rtc/rtc-imxdi.c | 28 ---- > 1 file changed, 20 insertions(+), 8 deletions(-) > Applied after fixing the multiline comment, thanks. -- Alexandre Belloni, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com -- You received this message be

[rtc-linux] Re: [PATCH 3/3] Documentation: dt: rtc-imxdi: security violation interrupt

2017-01-10 Thread Alexandre Belloni
> Applied, thanks. -- Alexandre Belloni, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com -- You received this message because you are subscribed to "rtc-linux". Membership options at http://groups.google.com/group/rtc-linux . Please read http://groups.google.co

[rtc-linux] Re: [PATCHv3 3/8] rtc: add STM32 RTC driver

2017-01-10 Thread Alexandre Belloni
tm is already checked multiple times (up to three) in the core before this function can be called. > + } > + You don't need to resend the whole series, just this patch. I'll take 2/8 and 3/8, the other ones can go through the stm32 tree. -- Alexandre Belloni, Free Electr

[rtc-linux] Re: [PATCH] rtc: constify rtc_class_ops structures

2017-01-10 Thread Alexandre Belloni
13b7 drivers/rtc/rtc-imxdi.o > >1269 192 01461 5b5 drivers/rtc/rtc-mxc.o > > File size remains unchanged for : drivers/rtc/rtc-mxc.o > > Signed-off-by: Bhumika Goyal > --- > drivers/rtc/rtc-dm355evm.c | 2 +- > drivers/rtc/rtc-imxdi.c| 2 +- &g

[rtc-linux] Re: [PATCH] rtc: add const to rtc_class_ops structures

2017-01-10 Thread Alexandre Belloni
ile compiling the .o files for all the > changed .c files. Therefore file size details of the .o files > could not be obtained. > > drivers/rtc/rtc-au1xxx.c | 2 +- > drivers/rtc/rtc-bfin.c | 2 +- > drivers/rtc/rtc-ls1x.c | 2 +- > drivers/rtc/rtc-sh.c | 2 +- &

[rtc-linux] Re: [PATCHv3 3/8] rtc: add STM32 RTC driver

2017-01-11 Thread Alexandre Belloni
On 11/01/2017 at 11:07:16 +0100, Amelie DELAUNAY wrote : > > This will never happen, tm is already checked multiple times (up to > > three) in the core before this function can be called. > > > You're right. I'll remove all rtc_valid_tm calls. You can keep the

[rtc-linux] Re: [PATCHv3 3/8] rtc: add STM32 RTC driver

2017-01-11 Thread Alexandre Belloni
On 11/01/2017 at 11:42:50 +0100, Amelie DELAUNAY wrote : > > On 01/11/2017 11:17 AM, Alexandre Belloni wrote: > > On 11/01/2017 at 11:07:16 +0100, Amelie DELAUNAY wrote : > > > > This will never happen, tm is already checked multiple times (up to > > > > thr

[rtc-linux] Re: [PATCH] rtc: armada38x: make struct rtc_class_ops const

2017-01-11 Thread Alexandre Belloni
o be a misunderstanding.) > > drivers/rtc/rtc-armada38x.c | 24 +--- > 1 file changed, 17 insertions(+), 7 deletions(-) > Applied, thanks. -- Alexandre Belloni, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com -- You received this m

[rtc-linux] Re: [PATCH] rtc: armada38x: hide maybe-uninitialized warning

2017-01-12 Thread Alexandre Belloni
t out with max=0 as well. > > Fixes: 61cffa2438e3 ("rtc: armada38x: Follow the new recommendation for > errata implementation") > Signed-off-by: Arnd Bergmann Actually, I fixed that one directly in the commit yesterday as it has been reported to me multiple times al

[rtc-linux] Re: [PATCH] rtc: armada38x: avoid unused-function warning

2017-01-12 Thread Alexandre Belloni
device *dev) > { > if (device_may_wakeup(dev)) { > struct armada38x_rtc *rtc = dev_get_drvdata(dev); > @@ -363,7 +362,6 @@ static int armada38x_rtc_resume(struct device *dev) > > return 0; > } > -#endif > > static SIMPLE_DEV_PM_OPS(armada

[rtc-linux] Re: [PATCHv5 3/8] rtc: add STM32 RTC driver

2017-01-12 Thread Alexandre Belloni
rtc/rtc-stm32.c | 727 > > 3 files changed, 739 insertions(+) > create mode 100644 drivers/rtc/rtc-stm32.c > This didn't apply cleanly, please check rtc-next. I don't think I made any mistake as the issue was only in Kconfig. You probably based your patches on 4.9 instead

[rtc-linux] Re: [PATCHv3 2/8] dt-bindings: document the STM32 RTC bindings

2017-01-12 Thread Alexandre Belloni
+++ > 1 file changed, 27 insertions(+) > create mode 100644 Documentation/devicetree/bindings/rtc/st,stm32-rtc.txt > Applied, thanks. -- Alexandre Belloni, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com -- You received this message because yo

[rtc-linux] Re: [PATCH 3/3] rtc: stm32: use 32-bit cast for BIT() macro

2017-01-13 Thread Alexandre Belloni
as it's no longer a simple expression. > Yes, at least checkpatch complains about it. -- Alexandre Belloni, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com -- You received this message because you are subscribed to "rtc-linux". Membership o

[rtc-linux] Re: [PATCH 1/3] rtc: stm32: remove __exit annotation on remove callback

2017-01-13 Thread Alexandre Belloni
--- > drivers/rtc/rtc-stm32.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > Applied, thanks. -- Alexandre Belloni, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com -- You received this message because you are subscribed to "rtc-l

[rtc-linux] Re: [PATCH 2/3] rtc: stm32: fix building without CONFIG_OF

2017-01-13 Thread Alexandre Belloni
> As the #ifdef serves no purpose here, let's just remove it. > > Fixes: 4e64350f42e2 ("rtc: add STM32 RTC driver") > Signed-off-by: Arnd Bergmann > --- > drivers/rtc/rtc-stm32.c | 2 -- > 1 file changed, 2 deletions(-) > Applied, thanks. -- Alexandre

[rtc-linux] Re: [PATCH 1/2] rtc: tegra: Sort includes alphabetically

2017-01-13 Thread Alexandre Belloni
igned-off-by: Thierry Reding > --- > drivers/rtc/rtc-tegra.c | 13 +++-- > 1 file changed, 7 insertions(+), 6 deletions(-) > Applied both, thanks. -- Alexandre Belloni, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com -- You received this mess

[rtc-linux] Re: [PATCH] rtc: sun6i: Switch to the external oscillator

2017-01-16 Thread Alexandre Belloni
I_ALARM_CONFIG); > > + /* switch to the external, more precise, oscillator */ > + writel(SUN6I_LOSC_CTRL_KEY | SUN6I_LOSC_CTRL_EXT_OSC, > +chip->base + SUN6I_LOSC_CTRL); > + > chip->rtc = rtc_device_register("rtc-sun6i", &pdev->dev,

[rtc-linux] Re: [PATCH] rtc: sun6i: Switch to the external oscillator

2017-01-16 Thread Alexandre Belloni
On 16/01/2017 at 17:13:49 +0100, Maxime Ripard wrote : > On Mon, Jan 16, 2017 at 04:39:59PM +0100, Alexandre Belloni wrote: > > On 16/01/2017 at 16:21:48 +0100, Maxime Ripard wrote : > > > The RTC is clocked from either an internal, imprecise, oscillator or an > > > ext

[rtc-linux] Re: [PATCH 2/2] RTC: s35390a: implement ioctls

2017-01-16 Thread Alexandre Belloni
> + > + case RTC_VL_CLR: > + /* update flag and clear register */ > + err = s35390a_reset(s35390a, &sts); > + if ((err == 1) || (err == 0)) Whatever the error, once the first s35390a_get_reg(), the POC and BLD flags are lost. I would r

[rtc-linux] Re: [PATCH 1/2] RTC: s35390a: handle invalid RTC time

2017-01-16 Thread Alexandre Belloni
= client; > i2c_set_clientdata(client, s35390a); > + s35390a->isinvalid = 0; > > /* This chip uses multiple addresses, use dummy devices for them */ > for (i = 1; i < 8; ++i) { > -- > 1.8.3.1 > -- Alexandre Belloni, Free Electrons Embedded Linux an

[rtc-linux] Re: [PATCH] rtc: stm32: use 0 instead of ~PWR_CR_DBP in regmap_update_bits

2017-01-17 Thread Alexandre Belloni
> As PWR_CR_DBP mask prevents other bits to be cleared, replace all > ~PWR_CR_DBP by 0. > > Fixes: 4e64350f42e2 ("rtc: add STM32 RTC driver") > Signed-off-by: Arnd Bergmann > Signed-off-by: Amelie Delaunay > --- Applied, thanks. -- Alexandre Belloni, Free

[rtc-linux] Re: [PATCH] rtc: stm32: fix comparison warnings

2017-01-17 Thread Alexandre Belloni
a-- ) { > > drivers/rtc/rtc-stm32.c:530:44: warning: comparison of unsigned expression < > 0 is always false [-Wtype-limits] > (rate - ((pred_a + 1) * (pred_s + 1)) < 0) ? > > Fixes: 4e64350f42e2 ("rtc: add STM32 RTC driver") > Signed-off-by: Amelie Delau

[rtc-linux] Re: [PATCH 1/2] RTC: s35390a: handle invalid RTC time

2017-01-17 Thread Alexandre Belloni
On 17/01/2017 at 09:24:17 +0100, Fabien Lahoudere wrote : > On Mon, 2017-01-16 at 18:50 +0100, Alexandre Belloni wrote: > > Hi, > > > > On 12/01/2017 at 11:43:37 +0100, Fabien Lahoudere wrote : > > > If RTC time have been altered by low voltage, we notify users >

[rtc-linux] Re: [PATCH 3/4] rtc: cros-ec: add cros-ec-rtc driver.

2017-01-17 Thread Alexandre Belloni
; tristate "Dallas/Maxim DS1307/37/38/39/40, ST M41T00, EPSON RX-8025, > ISL12057" > help > + ret = rtc_valid_tm(&tm); > + if (ret) > + dev_err(&pdev->dev, "invalid date/time\n"); > + nitpick: I'm not sure this i

[rtc-linux] Re: [PATCH 4/4] mfd: cros_ec: add RTC as mfd subdevice

2017-01-17 Thread Alexandre Belloni
d support */ > + if (cros_ec_check_features(ec, EC_FEATURE_RTC)) > + cros_ec_rtc_register(ec); > + > return 0; > > dev_reg_failed: > -- > 2.9.3 > -- Alexandre Belloni, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com -- You

[rtc-linux] Re: imx6ul: power-up using the RTC

2017-01-20 Thread Alexandre Belloni
s only with dbg prints | > > For me it looks like the debug prints may delay the poweroff driver > long enough, that some other driver (rtc?) writes the 0x0b bits. > Is snvs_rtc_alarm_irq_enable() waiting long enough? I'd say yes but you never know... You can also use the kernel

[rtc-linux] Re: [PATCH 1/6] rtc: sun6i: Expose the 32kHz oscillator

2017-01-22 Thread Alexandre Belloni
, 0); > - chip->base = devm_ioremap_resource(&pdev->dev, res); > - if (IS_ERR(chip->base)) > - return PTR_ERR(chip->base); > - > chip->irq = platform_get_irq(pdev, 0); > if (chip->irq < 0) { > dev_err(&pd

[rtc-linux] Re: [PATCH 0/6] rtc: sun6i: Fix the RTC accuracy

2017-01-22 Thread Alexandre Belloni
insertions(+), 33 deletions(-) > > base-commit: 99cef370ac9939df2aeb16c96d07e842b2fa8201 > -- > git-series 0.8.11 -- Alexandre Belloni, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com -- You received this message because you are subscribed to "rtc-linux&q

[rtc-linux] Re: [PATCH 4/6] rtc: sun6i: Force the mux to the external oscillator

2017-01-22 Thread Alexandre Belloni
ntioned in patch 1, maybe it is easier to force > the mux before the clocks are registered by writing directly to > the registers? We could also backport the changes to stable? > I'd say that the risk to break existing platforms is low enough to backport that patch to stable. Maxime as

[rtc-linux] Re: [PATCH v2 3/4] rtc: cros-ec: add cros-ec-rtc driver.

2017-01-22 Thread Alexandre Belloni
bo i Serra Acked-by: Alexandre Belloni Lee, this can go through the mfd tree. Hopefully, nobody will add a new driver nearby ;) -- Alexandre Belloni, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com -- You received this message because you are subscribed to &q

[rtc-linux] Re: [PATCH 08/22] rtc: Add device tree probing to the Gemini driver

2017-01-24 Thread Alexandre Belloni
14 ++ > drivers/rtc/rtc-gemini.c | 7 +++ > 2 files changed, 21 insertions(+) > create mode 100644 Documentation/devicetree/bindings/rtc/cortina,gemini.txt > Applied, thanks. -- Alexandre Belloni, Free Electrons Embedded Linux and Kerne

[rtc-linux] Re: [PATCH v2 0/7] rtc: sun6i: Fix the RTC accuracy

2017-01-24 Thread Alexandre Belloni
able the build as a module > rtc: sun6i: Add some locking > rtc: sun6i: Switch to the external oscillator > rtc: sun6i: Expose the 32kHz oscillator > rtc: sun6i: Switch to devm_rtc_device_register > ARM: sun8i: a23/a33: Enable the real LOSC and use it > ARM: sun8i: a

[rtc-linux] [PATCH] rtc: jz4740: make the driver buildable as a module again

2017-01-24 Thread Alexandre Belloni
By using kernel_halt() instead of machine_halt(), we can make the driver build as a module. However, jz4740 platforms not loading this module will not be able to power off. Suggested-by: Geert Uytterhoeven Signed-off-by: Alexandre Belloni Revert "rtc: jz4740: make the driver builtin

[rtc-linux] Re: [RFC PATCH] rtc/nxp: add FTM alarm driver as the wakeup source

2017-01-26 Thread Alexandre Belloni
if (irq <= 0) { > + pr_err("ftm: unable to get IRQ from DT, %d\n", irq); > + return -EINVAL; > + } > + > + rtc.endian = of_property_read_bool(np, "big-endian"); > + Doesn't the platform know the endianness, is it rea

[rtc-linux] Re: [PATCH] rtc: add support for maxim dallas ds1682

2017-01-28 Thread Alexandre Belloni
t; + chip->gpio[DS1682_DQ].gpio); > + > + platform_set_drvdata(pdev, chip); > + > + chip->rtc = devm_rtc_device_register(&pdev->dev, "ds1682", > + &ds1682_rtc_ops, THIS_MODULE); > + if (IS_ERR(chip

[rtc-linux] [GIT PULL] RTC fixes for 4.10

2017-01-30 Thread Alexandre Belloni
) RTC fixes for 4.10: - Allow jz4740 to build as a module again by using kernel_halt() Alexandre Belloni (1): rtc: jz4740: make the driver buildable as a module again drivers/rtc

[rtc-linux] Re: [PATCH] rtc: bq32000: add support to enable disable the trickle charge FET bypass.

2017-01-31 Thread Alexandre Belloni
+) > create mode 100644 Documentation/ABI/testing/sysfs-bus-i2c-devices-bq32k > Applied, thanks. -- Alexandre Belloni, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com -- You received this message because you are subscribed to "rtc-linux". M

[rtc-linux] Re: [PATCH] rtc: snvs: add a missing write sync

2017-01-31 Thread Alexandre Belloni
rs/rtc/rtc-snvs.c | 1 + > 1 file changed, 1 insertion(+) > Applied, thanks. -- Alexandre Belloni, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com -- You received this message because you are subscribed to "rtc-linux". Membership options at htt

[rtc-linux] Re: [PATCH] rtc: sun6i: Fix compatibility with old DT binding

2017-01-31 Thread Alexandre Belloni
- > 1 file changed, 3 insertions(+), 3 deletions(-) > Applied, thanks. -- Alexandre Belloni, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com -- You received this message because you are subscribed to "rtc-linux". Membership options at http://groups.google.c

<    1   2   3   4   >