[PATCH 1/2] rtc: nvmem: use devm_nvmem_register()

2018-11-10 Thread Alexandre Belloni
Use the resource managed variant of nvmem_register(). Signed-off-by: Alexandre Belloni --- drivers/rtc/nvmem.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/rtc/nvmem.c b/drivers/rtc/nvmem.c index 36ab183c42f1..2a7220d8b02d 100644 --- a/drivers/rtc/nvmem.c

[PATCH 2/2] dt-bindings: rtc: Move trivial RTCs to rtc.txt

2018-11-11 Thread Alexandre Belloni
Move trivial RTCs to the rtc generic binding documentation as they all also support at least 'start-year'. Signed-off-by: Alexandre Belloni --- Documentation/devicetree/bindings/rtc/rtc.txt | 34 +++ .../devicetree/bindings/trivial-devices.txt | 24

[PATCH 1/2] dt-bindings: rtc: add generic bindings

2018-11-11 Thread Alexandre Belloni
Add generic binding documentation for the RTC subsystem. Signed-off-by: Alexandre Belloni --- Documentation/devicetree/bindings/rtc/rtc.txt | 30 +++ 1 file changed, 30 insertions(+) create mode 100644 Documentation/devicetree/bindings/rtc/rtc.txt diff --git a/Documentation

Re: [RFC PATCH v2 1/6] mtd: spi-nor: atmel-quaspi: Typo fix

2018-07-03 Thread Alexandre Belloni
different from your work address if necessary (git format-patch will insert the proper From line). -- Alexandre Belloni, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering https://bootlin.com

Re: [PATCH v2] rtc: OMAP: Add support for rtc-only mode

2018-07-09 Thread Alexandre Belloni
+ rtc->ops->power_off_program(rtc->dev.parent); > > +} > > +EXPORT_SYMBOL_GPL(rtc_power_off_program); > > We typically do not add new interfaces without any users, so this will > probably have to go in along with the corresponding omap changes for > rtc-only mode. > I'm probably not smart enough but I still don't get why you need to add an interface at all, especially one that will result in a NULL pointer dereference on 99.6% of the drivers. This is so specific to your use case that this has zero chance to be reused by another driver. -- Alexandre Belloni, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering https://bootlin.com

Re: [GIT PULL] RTC for 4.18

2018-07-09 Thread Alexandre Belloni
he serial cable of my T20 board with this PMIC. I'll try to find some time later this week to solve that. If I can't fix it on time, I'll revert the patch. -- Alexandre Belloni, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering https://bootlin.com

Re: [GIT PULL] RTC for 4.18

2018-07-10 Thread Alexandre Belloni
rrupts with the offending patch reverted so hopefully, this fix is sufficient. On 09/07/2018 14:17:47+0200, Alexandre Belloni wrote: > On 09/07/2018 13:04:36+0100, Jon Hunter wrote: > > > Ok, I probably found the issue but the fix is not immediate. I'll try to > > > pos

Re: [GIT PULL] RTC for 4.18

2018-07-11 Thread Alexandre Belloni
On 11/07/2018 10:17:11+0100, Jon Hunter wrote: > Hi Alexandre. > > On 10/07/18 23:14, Alexandre Belloni wrote: > > Hi Jon, > > > > Can you test that one? > > > > https://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux.git/patch/?id=4393575d9aa250

[PATCH] pinctrl: ocelot: fix gpio4 twi function

2018-07-11 Thread Alexandre Belloni
the TWI function on GPIO4 is actually a multiplexed SCL, not an original TWI SDA or SCL. Fix it. Signed-off-by: Alexandre Belloni --- drivers/pinctrl/pinctrl-ocelot.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pinctrl/pinctrl-ocelot.c b/drivers/pinctrl/pinctrl

[PATCH v2 1/2] mips: mscc: build FIT image for Ocelot

2018-06-26 Thread Alexandre Belloni
Ocelot now has a u-boot port, allow building FIT images instead of relying on the legacy detection and builtin DTB. Signed-off-by: Alexandre Belloni Reviewed-by: James Hogan --- Changes in v2: - require -> requires arch/mips/boot/dts/mscc/Makefile| 2 +- arch/mips/gene

[PATCH v2 2/2] mips: generic: allow not building DTB in

2018-06-26 Thread Alexandre Belloni
not include any DTB in the kernel image so it is smaller. Signed-off-by: Alexandre Belloni --- Changes in v2: - rebased on v4.18-rc1 arch/mips/Kconfig | 1 - arch/mips/Makefile | 2 +- arch/mips/generic/Kconfig | 1 + arch/mips/generic/vmlinux.its.S | 2 ++ 4

Re: [PATCH v2 2/2] mips: generic: allow not building DTB in

2018-06-26 Thread Alexandre Belloni
On 26/06/2018 13:57:12+0200, Alexandre Belloni wrote: > Allow not building any DTB in the generic kernel so it gets smaller. This > is necessary for ocelot because it can be built as a legacy platform that > needs a built-in DTB and it can also handle a separate DTB once it is > up

Re: [GIT PULL] RTC for 4.18

2018-06-26 Thread Alexandre Belloni
it/abelloni/linux.git/patch/?id=1b287f23b0a1fcb2b502dae981a8024be379391e -- Alexandre Belloni, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering https://bootlin.com

Re: [GIT PULL] RTC for 4.18

2018-06-26 Thread Alexandre Belloni
On 26/06/2018 17:54:57+0100, Jon Hunter wrote: > > On 26/06/18 17:15, Alexandre Belloni wrote: > > Hi, > > > > On 26/06/2018 16:51:40+0100, Jon Hunter wrote: > >>> rtc: tps6586x: let the core handle rtc range > >> > >> Sorry I am

Re: [PATCH v2 4/6] arm: dts: add support for Laird WB50N cpu module and DVK

2018-06-27 Thread Alexandre Belloni
rom you, I'll take care of the necessary changes. -- Alexandre Belloni, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering https://bootlin.com

Re: [PATCH v5 1/6] ARM: at91: add TCB registers definitions

2018-06-28 Thread Alexandre Belloni
On 28/06/2018 17:15:39+0200, Daniel Lezcano wrote: > On 19/06/2018 23:19, Alexandre Belloni wrote: > > Add registers and bits definitions for the timer counter blocks found on > > Atmel ARM SoCs. > > > > Tested-by: Alexander Dahl > > Tested-by: Andras Szemzo >

Re: [PATCH v3 5/6] spi: at91-usart: add driver for at91-usart as spi

2018-05-24 Thread Alexandre Belloni
ut() set direction should be called in > spi_add_device. What do you think? Is ok? Back in 2014, I was suggesting using devm_gpio_request_one() in of_spi_register_master(). That would take care of setting the direction of the GPIO: https://www.spinics.net/lists/arm-kernel/msg351251.html I never took the time to create the patch and test though. -- Alexandre Belloni, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering https://bootlin.com

[GIT PULL] ARM: at91: DT for 4.18

2018-05-25 Thread Alexandre Belloni
ernĂ¡n Gonzalez (1): ARM: dts: at91-sama5d2_xplained: Use IRQ_TYPE specifier arch/arm/boot/dts/at91-sama5d2_xplained.dts | 2 +- arch/arm/boot/dts/at91-sama5d4ek.dts| 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) -- Alexandre Belloni, Bootlin (formerly Free Electrons) Emb

[PATCH] rtc: test: remove obsolete .set_mmss

2018-05-25 Thread Alexandre Belloni
There is no point in testing .set_mmss versus .set_mmss64 as there are both taking the exact same argument (truncated for set_mmss though). Signed-off-by: Alexandre Belloni --- drivers/rtc/rtc-test.c | 19 ++- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a

Re: [PATCH] Fix a typo in RTC documentation for RTC_DRV_JZ4740

2018-05-26 Thread Alexandre Belloni
file changed, 1 insertion(+), 1 deletion(-) > Applied, thanks. -- Alexandre Belloni, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering https://bootlin.com

Re: [PATCH] ARM: dts: at91-sama5d2_xplained: Use IRQ_TYPE specifier

2018-05-14 Thread Alexandre Belloni
t; 1 file changed, 1 insertion(+), 1 deletion(-) > Applied, thanks. -- Alexandre Belloni, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering https://bootlin.com

[PATCH net-next v3 2/7] net: phy: mscc-miim: Add MDIO driver

2018-05-14 Thread Alexandre Belloni
Add a driver for the Microsemi MII Management controller (MIIM) found on Microsemi SoCs. On Ocelot, there are two controllers, one is connected to the internal PHYs, the other one can communicate with external PHYs. Reviewed-by: Andrew Lunn Signed-off-by: Alexandre Belloni --- drivers/net/phy

[PATCH net-next v3 1/7] dt-bindings: net: add DT bindings for Microsemi MIIM

2018-05-14 Thread Alexandre Belloni
DT bindings for the Microsemi MII Management Controller found on Microsemi SoCs Reviewed-by: Florian Fainelli Reviewed-by: Rob Herring Signed-off-by: Alexandre Belloni --- .../devicetree/bindings/net/mscc-miim.txt | 26 +++ 1 file changed, 26 insertions(+) create mode

[PATCH net-next v3 0/7] Microsemi Ocelot Ethernet switch support

2018-05-14 Thread Alexandre Belloni
27;ve tried switching to NAPI but this is not working well, mainly because the only way to disable interrupts is to actually mask them in the interrupt controller (it is not possible to tell the switch to stop generating interrupts). Cc: James Hogan Alexandre Belloni (7): dt-bindings: net: a

[PATCH net-next v3 6/7] MIPS: mscc: connect phys to ports on ocelot_pcb123

2018-05-14 Thread Alexandre Belloni
Add phy to switch port connections for PCB123 for internal PHYs. Cc: James Hogan Signed-off-by: Alexandre Belloni --- arch/mips/boot/dts/mscc/ocelot_pcb123.dts | 20 1 file changed, 20 insertions(+) diff --git a/arch/mips/boot/dts/mscc/ocelot_pcb123.dts b/arch/mips/boot

[PATCH net-next v3 7/7] MAINTAINERS: Add entry for Microsemi Ethernet switches

2018-05-14 Thread Alexandre Belloni
Add myself as a maintainer for the Microsemi Ethernet switches. Signed-off-by: Alexandre Belloni --- MAINTAINERS | 6 ++ 1 file changed, 6 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 0a1410d5a621..b632deb3f503 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -9280,6 +9280,12

[PATCH net-next v3 5/7] MIPS: mscc: Add switch to ocelot

2018-05-14 Thread Alexandre Belloni
Ocelot has an integrated switch, add support for it. Cc: James Hogan Signed-off-by: Alexandre Belloni --- arch/mips/boot/dts/mscc/ocelot.dtsi | 88 + 1 file changed, 88 insertions(+) diff --git a/arch/mips/boot/dts/mscc/ocelot.dtsi b/arch/mips/boot/dts/mscc

[PATCH net-next v3 3/7] dt-bindings: net: add DT bindings for Microsemi Ocelot Switch

2018-05-14 Thread Alexandre Belloni
DT bindings for the Ethernet switch found on Microsemi Ocelot platforms. Reviewed-by: Rob Herring Signed-off-by: Alexandre Belloni --- .../devicetree/bindings/net/mscc-ocelot.txt | 82 +++ 1 file changed, 82 insertions(+) create mode 100644 Documentation/devicetree/bindings

[PATCH 1/2] rtc: ds1685: remove improper datetime access ABI

2018-06-18 Thread Alexandre Belloni
The driver exposes an undocumented ABI to access the date and time registers. It is not actually used by any userspace tools. Remove it. Signed-off-by: Alexandre Belloni --- drivers/rtc/rtc-ds1685.c | 221 --- 1 file changed, 221 deletions(-) diff --git a

[PATCH 2/2] rtc: ds1685: remove sysfs access to control registers

2018-06-18 Thread Alexandre Belloni
Access to the control registers is mostly not needed and can cause runtime issues (like missed interrupts). Remove this debugging interface. Signed-off-by: Alexandre Belloni --- drivers/rtc/Kconfig | 12 -- drivers/rtc/rtc-ds1685.c | 369 --- 2 files

[PATCH v5 3/6] clocksource/drivers: atmel-pit: make option silent

2018-06-19 Thread Alexandre Belloni
To conform with the other option, make the ATMEL_PIT option silent so it can be selected from the platform Tested-by: Alexander Dahl Signed-off-by: Alexandre Belloni --- drivers/clocksource/Kconfig | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/clocksource

[PATCH v5 5/6] ARM: configs: at91: use new TCB timer driver

2018-06-19 Thread Alexandre Belloni
Unselecting ATMEL_TCLIB switches the TCB timer driver from tcb_clksrc to timer-atmel-tcb. Signed-off-by: Alexandre Belloni --- arch/arm/configs/at91_dt_defconfig | 1 - arch/arm/configs/sama5_defconfig | 1 - 2 files changed, 2 deletions(-) diff --git a/arch/arm/configs/at91_dt_defconfig b

[PATCH v5 6/6] ARM: configs: at91: unselect PIT

2018-06-19 Thread Alexandre Belloni
The PIT is not required anymore to successfully boot and may actually harm in case preempt-rt is used because the PIT interrupt is shared. Disable it so the TCB clocksource is used. Signed-off-by: Alexandre Belloni --- arch/arm/configs/at91_dt_defconfig | 1 + arch/arm/configs/sama5_defconfig

[PATCH v5 0/6] clocksource: rework Atmel TCB timer driver

2018-06-19 Thread Alexandre Belloni
v4.17-rc1 - fixed an issue when setting max_delta for clockevents_config_and_register Alexandre Belloni (6): ARM: at91: add TCB registers definitions clocksource/drivers: Add a new driver for the Atmel ARM TC blocks clocksource/drivers: atmel-pit: make option silent ARM: at91: Implement c

[PATCH v5 4/6] ARM: at91: Implement clocksource selection

2018-06-19 Thread Alexandre Belloni
Allow selecting and unselecting the PIT clocksource driver so it doesn't have to be compile when unused. Tested-by: Alexander Dahl Signed-off-by: Alexandre Belloni --- arch/arm/mach-at91/Kconfig | 25 + 1 file changed, 25 insertions(+) diff --git a/arch/arm/mach

[PATCH v5 1/6] ARM: at91: add TCB registers definitions

2018-06-19 Thread Alexandre Belloni
Add registers and bits definitions for the timer counter blocks found on Atmel ARM SoCs. Tested-by: Alexander Dahl Tested-by: Andras Szemzo Signed-off-by: Alexandre Belloni --- include/soc/at91/atmel_tcb.h | 216 +++ 1 file changed, 216 insertions(+) create

[PATCH v5 2/6] clocksource/drivers: Add a new driver for the Atmel ARM TC blocks

2018-06-19 Thread Alexandre Belloni
). read/writel are still used to access channel specific registers to avoid the performance impact of regmap (mainly locking). Tested-by: Alexander Dahl Tested-by: Andras Szemzo Signed-off-by: Alexandre Belloni --- drivers/clocksource/Kconfig | 8 + drivers/clocksource/Makefile

Re: [PATCH 18/20] dts: sama5d2: Update coresight bindings for hardware ports

2018-06-19 Thread Alexandre Belloni
On 05/06/2018 22:43:29+0100, Suzuki K Poulose wrote: > Switch to the new coresight bindings for hardware ports > > Cc: Nicolas Ferre > Cc: Alexandre Belloni > Cc: Mathieu Poirier > Signed-off-by: Suzuki K Poulose > --- > arch/arm/boot/dts/sama5d2.dtsi | 5 ++

Re: [PATCH v5 2/6] clocksource/drivers: Add a new driver for the Atmel ARM TC blocks

2018-06-20 Thread Alexandre Belloni
d. > > + */ > > + old = readl(tc.base + ATMEL_TC_SR(tc.channels[0])); > > + return -ETIME; > > + } > > Aarg. Doesn;t that timer block have a simple count down and fire mode? > These compare equal timers suck. It only counts up... -- Alexandre Belloni, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering https://bootlin.com

Re: [PATCH v5 2/6] clocksource/drivers: Add a new driver for the Atmel ARM TC blocks

2018-06-20 Thread Alexandre Belloni
> > > These compare equal timers suck. > > > > It only counts up... > > Have you tried to play with that waveform stuff? > There are only a count up and count up then down modes. As the counter value is in a read only register, the only configurable starting value is 0 so it will always start by counting up. I'm pretty sure the up/down mode will not help us. -- Alexandre Belloni, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering https://bootlin.com

Re: [PATCH] rtc: rtc-bq4802: add error handling for devm_ioremap

2018-06-20 Thread Alexandre Belloni
802.c | 4 > 1 file changed, 4 insertions(+) > Applied, thanks. -- Alexandre Belloni, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering https://bootlin.com

Re: [PATCH 18/20] dts: sama5d2: Update coresight bindings for hardware ports

2018-06-20 Thread Alexandre Belloni
On 20/06/2018 10:44:29+0100, Suzuki K Poulose wrote: > On 19/06/18 22:24, Alexandre Belloni wrote: > > On 05/06/2018 22:43:29+0100, Suzuki K Poulose wrote: > > > Switch to the new coresight bindings for hardware ports > > > > > > Cc: Nicolas Ferre > >

Re: [PATCH v5 2/6] clocksource/drivers: Add a new driver for the Atmel ARM TC blocks

2018-06-20 Thread Alexandre Belloni
counter comparison you don't like. the second one uses its own channel in the way you describe (set RC, reset counter, start counter). This was necessary because some people are running out of TCB channels as they use the remaining ones as PWMs. But it is still better to use one channel a

Re: [PATCH] rtc: sprd: Add new RTC power down check method

2018-05-31 Thread Alexandre Belloni
--- > 1 file changed, 24 insertions(+), 23 deletions(-) > Applied, thanks. -- Alexandre Belloni, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering https://bootlin.com

[PATCH 2/2] rtc: ds1685: Add range

2018-05-31 Thread Alexandre Belloni
Useful range is 2000-2099 because leap year fails on centuries. Signed-off-by: Alexandre Belloni --- drivers/rtc/rtc-ds1685.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/rtc/rtc-ds1685.c b/drivers/rtc/rtc-ds1685.c index e6390475380f..5c0db6c8134c 100644 --- a/drivers/rtc/rtc

[PATCH 1/2] rtc: ds1685: fix possible race condition

2018-05-31 Thread Alexandre Belloni
The IRQ is requested before the struct rtc is allocated and registered, but this struct is used in the IRQ handler. Switch to devm_rtc_allocate_device/rtc_register_device to allocate the rtc before requesting the IRQ. Signed-off-by: Alexandre Belloni --- drivers/rtc/rtc-ds1685.c | 41

Re: [PATCH v4 1/7] dt-bindings: clk: at91: add an I2S mux clock

2018-05-31 Thread Alexandre Belloni
I2S clock source selection > >> > >> > >> Is this boolean or takes some values. If latter, what are valid values? > > > > > > This is the compatible string of the clock driver. > > Ah, now I remember. AT91 uses fine grained clock nodes in DT. Is there > still a plan to fix this? > There is still a plan to do that, hopefully soon (I'd like to aim for the next release or the one after). I think this one should go in as-is so it can be fixed with all the other one at once. -- Alexandre Belloni, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering https://bootlin.com

[PATCH 4/5] rtc: test: emulate alarms using timers

2018-05-31 Thread Alexandre Belloni
Use timers to emulate alarms. Note that multiple alarms may happen if they are set more than 15 days after the current RTC time. Signed-off-by: Alexandre Belloni --- drivers/rtc/rtc-test.c | 56 +++--- 1 file changed, 52 insertions(+), 4 deletions(-) diff

[PATCH 3/5] rtc: test: store time as an offset to system time

2018-05-31 Thread Alexandre Belloni
Store the time as an offset to system time. As the offset is in second, it is currently always synced with system time. Signed-off-by: Alexandre Belloni --- drivers/rtc/rtc-test.c | 39 +++ 1 file changed, 23 insertions(+), 16 deletions(-) diff --git a

[PATCH 1/5] rtc: test: remove useless proc info

2018-05-31 Thread Alexandre Belloni
The rtc proc callback is useless for two reasosn: - the test RTC is often not the first RTC so it will never be used - all the info is available in the name file of the RTC sys folder Signed-off-by: Alexandre Belloni --- drivers/rtc/rtc-test.c | 11 --- 1 file changed, 11 deletions

[PATCH 2/5] rtc: test: allow registering many devices

2018-05-31 Thread Alexandre Belloni
Use a loop to register RTC devices Signed-off-by: Alexandre Belloni --- drivers/rtc/rtc-test.c | 48 +- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/drivers/rtc/rtc-test.c b/drivers/rtc/rtc-test.c index f0eb8e0c5055..796c45dee661 100644

[PATCH 5/5] rtc: test: remove irq sysfs file

2018-05-31 Thread Alexandre Belloni
Now that alarms are emulated, remove the irq sysfs file that could be used to send alarms. Signed-off-by: Alexandre Belloni --- drivers/rtc/rtc-test.c | 39 --- 1 file changed, 39 deletions(-) diff --git a/drivers/rtc/rtc-test.c b/drivers/rtc/rtc-test.c

Re: [PATCH] rtc: OMAP: Add support for rtc-only mode

2018-07-04 Thread Alexandre Belloni
mask = rtc_read(rtc, OMAP_RTC_INTERRUPTS_REG); > + mask &= OMAP_RTC_INTERRUPTS_IT_ALARM; > + rtc_write(rtc, OMAP_RTC_INTERRUPTS_REG, mask); > + } > + > rtc->type->lock(rtc); > } > > diff --git a/include/linux/rtc.h b/include/linux/rtc.h > index 6268208..f17bc6a 100644 > --- a/include/linux/rtc.h > +++ b/include/linux/rtc.h > @@ -85,6 +85,7 @@ struct rtc_class_ops { > int (*alarm_irq_enable)(struct device *, unsigned int enabled); > int (*read_offset)(struct device *, long *offset); > int (*set_offset)(struct device *, long offset); > + void (*power_off_program)(struct device *dev); > }; > > typedef struct rtc_task { > @@ -229,6 +230,7 @@ int rtc_timer_start(struct rtc_device *rtc, struct > rtc_timer *timer, > int rtc_read_offset(struct rtc_device *rtc, long *offset); > int rtc_set_offset(struct rtc_device *rtc, long offset); > void rtc_timer_do_work(struct work_struct *work); > +void rtc_power_off_program(struct rtc_device *rtc); > > static inline bool is_leap_year(unsigned int year) > { > -- > 1.9.1 > -- Alexandre Belloni, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering https://bootlin.com

Re: [PATCH v2] mtd: atmel-quadspi: add suspend/resume hooks

2018-07-04 Thread Alexandre Belloni
ybe_unused atmel_qspi_resume(struct device *dev) > > +{ > > + struct atmel_qspi *aq = dev_get_drvdata(dev); > > + > > + clk_prepare_enable(aq->clk); > > You missed to verify the return value of clk_prepare_enable. Otherwise looks Which will never fail, there is no point in

Re: [PATCH v5 2/6] clocksource/drivers: Add a new driver for the Atmel ARM TC blocks

2018-07-06 Thread Alexandre Belloni
t; + return IRQ_HANDLED; > > Isn't an clear irq missing ? > It is cleared on read. > > + } > > + > > + return IRQ_NONE; > > +} > > + > > +static void tc_clkevt2_suspend(struct clock_event_device *d) > > +{ > > + tce.cache.cmr = readl(tce.base + ATMEL_TC_CMR(tce.channel)); > > + tce.cache.imr = readl(tce.base + ATMEL_TC_IMR(tce.channel)); > > + tce.cache.rc = readl(tce.base + ATMEL_TC_RC(tce.channel)); > > + tce.cache.clken = !!(readl(tce.base + ATMEL_TC_SR(tce.channel)) & > > + ATMEL_TC_CLKSTA); > > Who is in charge of powering down the timer ? > The platform code stops all the clocks when going to suspend. -- Alexandre Belloni, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering https://bootlin.com

Re: [PATCH v5 4/5] ARM: dts: at91: sama5d2: add nodes for I2S controllers

2018-07-06 Thread Alexandre Belloni
dma-names = "tx", "rx"; > + clocks = <&i2s0_clk>, <&i2s0_gclk>, > <&audio_pll_pmc>, <&i2s0muxck>; > + clock-names = "pclk", "gclk", "aclk", "muxclk"; > + status = "disabled"; > + }; > + Can you resend the DTS patches after removing the unnecessary clocks? Thanks, -- Alexandre Belloni, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering https://bootlin.com

Re: [PATCH 3/3] rtc: ftrtc010: let the core handle range

2018-06-13 Thread Alexandre Belloni
On 13/06/2018 11:10:35+0200, Linus Walleij wrote: > On Mon, Jun 4, 2018 at 4:15 PM, Alexandre Belloni > wrote: > > The current range handling is highly suspicious. Anyway, let the core > > handle it. > > Hmmm. I have datasheets, do you need some input about the hardwa

Re: [PATCH v7 3/6] mfd: at91-usart: added mfd driver for usart

2018-06-14 Thread Alexandre Belloni
cell > > to mfd_add_device(). > > > > Regards > > > > Ludovic > > Hi Ludovic, > > Tnx. That's true. How is better to do if atmel,usart-mode has an invalid > value? To initialize cell with at91_usart_serial_subdev or to print an error > messag

Re: [PATCH 1/4] arm: dts: add support for Laird WB45N cpu module and DVK

2018-06-14 Thread Alexandre Belloni
t; at91sam9x25ek.dtb \ > - at91sam9x35ek.dtb > + at91sam9x35ek.dtb \ > + at91-wb45n.dtb The proper name for the file is -board.dtb so this should be at91sam9g25-wb45n.dtb. -- Alexandre Belloni, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering https://bootlin.com

Re: [PATCH 2/4] arm: dts: add support for Laird WB50N cpu module and DVK

2018-06-14 Thread Alexandre Belloni
mc node (the rework is not posted, this is just to remind me that this will have to be done). > + > +&usart1_clk { > + atmel,clk-output-range = <0 13200>; > +}; The datasheet explicitly states that 66 MHz is the maximum allowed frequency for the USART. Note that the new binding will not allow you to do that. However, I see the table disappeared from the latest datasheet. Maybe Nicolas can comment on that? -- Alexandre Belloni, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering https://bootlin.com

Re: [PATCH 1/4] arm: dts: add support for Laird WB45N cpu module and DVK

2018-06-14 Thread Alexandre Belloni
On 14/06/2018 11:07:33+0200, Alexandre Belloni wrote: > Hi, > > On 14/06/2018 09:51:54+0100, Ben Whitten wrote: > > This need a proper commit message. Maybe you can also add a link to the > technical brief for the platform? > > > Signed-off-by: Ben Whitten >

Re: [PATCH 1/4] arm: dts: add support for Laird WB45N cpu module and DVK

2018-06-14 Thread Alexandre Belloni
re that the @pb18 can be used like this. This address extension > must be used in a "reg" property in the node. dtc used with warning switch > on might trigger an error for this. > Indeed, no unit-address without a reg property. -- Alexandre Belloni, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering https://bootlin.com

[PATCH] uio: ensure class is registered before devices

2018-06-15 Thread Alexandre Belloni
the driver can register the device later. Signed-off-by: Alexandre Belloni --- Hi Greg, I'm not sure using struct class::p to test for class registration is really something we should do but this allows to have a small patch. The other solutions to fix this are: - use a similar change but w

[PATCH net-next ] net: mscc: Add SPDX identifier

2018-05-17 Thread Alexandre Belloni
ocelot_qsys.h is missing the SPDX identfier, fix that. Signed-off-by: Alexandre Belloni --- drivers/net/ethernet/mscc/ocelot_qsys.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/mscc/ocelot_qsys.h b/drivers/net/ethernet/mscc/ocelot_qsys.h index

Re: [PATCH net-next ] net: mscc: Add SPDX identifier

2018-05-17 Thread Alexandre Belloni
On 17/05/2018 12:28:59-0700, Joe Perches wrote: > On Thu, 2018-05-17 at 21:23 +0200, Alexandre Belloni wrote: > > ocelot_qsys.h is missing the SPDX identfier, fix that. > > > > Signed-off-by: Alexandre Belloni > > Only the copyright holders should ideally be modifyin

[PATCH] rtc: at91rm9200: add range

2018-05-17 Thread Alexandre Belloni
The at91rm9200 RTC can support dates from 1900-01-01 00:00:00 to 2099-12-31 23:59:59. Signed-off-by: Alexandre Belloni --- drivers/rtc/rtc-at91rm9200.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/rtc/rtc-at91rm9200.c b/drivers/rtc/rtc-at91rm9200.c index de81ecedd571

[PATCH 4/5] rtc: 88pm80x: let the core handle the RTC range

2018-05-17 Thread Alexandre Belloni
The 88pm80x RTC is storing the time as a 32bit offset from a 32bit counter so it can handle dates from 0 to U32_MAX. Signed-off-by: Alexandre Belloni --- drivers/rtc/rtc-88pm80x.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/rtc/rtc-88pm80x.c b/drivers/rtc

[PATCH 3/5] rtc: 88pm80x: fix possible race condition

2018-05-17 Thread Alexandre Belloni
The IRQ is requested before the struct rtc is allocated and registered, but this struct is used in the IRQ handler. This may lead to a NULL pointer dereference. Switch to devm_rtc_allocate_device/rtc_register_device to allocate the rtc before requesting the IRQ. Signed-off-by: Alexandre Belloni

[PATCH 2/5] rtc: 88pm80x: remove unused pm80x_rtc_info members

2018-05-17 Thread Alexandre Belloni
pm80x_rtc_info.calib_work and pm80x_rtc_info.vrtc are never used, remove them. Signed-off-by: Alexandre Belloni --- drivers/rtc/rtc-88pm80x.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/rtc/rtc-88pm80x.c b/drivers/rtc/rtc-88pm80x.c index 76df274f3e1a..f60c0d73c2f3 100644 --- a

[PATCH 1/5] rtc: 88pm80x: stop setting a default time

2018-05-17 Thread Alexandre Belloni
It doesn't make sense to set the RTC to a default value at probe time. Let the core handle invalid date and time. Signed-off-by: Alexandre Belloni --- drivers/rtc/rtc-88pm80x.c | 22 -- 1 file changed, 22 deletions(-) diff --git a/drivers/rtc/rtc-88pm80x.c b/drivers/rt

[PATCH 5/5] rtc: 88pm80x: convert to rtc_tm_to_time64/rtc_time64_to_tm

2018-05-17 Thread Alexandre Belloni
Now that the RTC range is properly checked, convert the driver to rtc_tm_to_time64/rtc_time64_to_tm Signed-off-by: Alexandre Belloni --- drivers/rtc/rtc-88pm80x.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/rtc/rtc-88pm80x.c b/drivers/rtc/rtc

[PATCH 2/2] rtc: ab-b5ze-s3: let the core handle the RTC range

2018-05-17 Thread Alexandre Belloni
The ab-b5ze-s3 RTC is storing the year in an 8bit bcd coded register so it can handle dates from year 2000 to year 2099. Signed-off-by: Alexandre Belloni --- drivers/rtc/rtc-ab-b5ze-s3.c | 11 ++- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/drivers/rtc/rtc-ab-b5ze-s3.c

[PATCH 1/2] rtc: ab-b5ze-s3: fix possible race conditions

2018-05-17 Thread Alexandre Belloni
IRQ and register the RTC as late as possible. Signed-off-by: Alexandre Belloni --- drivers/rtc/rtc-ab-b5ze-s3.c | 19 +++ 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/drivers/rtc/rtc-ab-b5ze-s3.c b/drivers/rtc/rtc-ab-b5ze-s3.c index 8dc451932446..f486912577e7 1006

[PATCH 2/3] rtc: tps65910: allow platform power up

2018-05-17 Thread Alexandre Belloni
Currently, the IRQs are disabled when the rtc driver is removed (e.g. when shutting down the platform). This means that the RTC will be unable to power up the platform. Signed-off-by: Alexandre Belloni --- drivers/rtc/rtc-tps65910.c | 12 1 file changed, 12 deletions(-) diff --git

[PATCH 3/3] rtc: tps65910: add range

2018-05-17 Thread Alexandre Belloni
The tps65910 RTC can support dates from 01/01/2000 to 31/12/2099. Signed-off-by: Alexandre Belloni --- drivers/rtc/rtc-tps65910.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/rtc/rtc-tps65910.c b/drivers/rtc/rtc-tps65910.c index 819d2d0957b4..a9bbd022aeef 100644 --- a/drivers

[PATCH 1/3] rtc: tps65910: fix possible race condition

2018-05-17 Thread Alexandre Belloni
The IRQ is requested before the struct rtc is allocated and registered, but this struct is used in the IRQ handler. This may lead to a NULL pointer dereference. Switch to devm_rtc_allocate_device/rtc_register_device to allocate the rtc before requesting the IRQ. Signed-off-by: Alexandre Belloni

[PATCH 3/7] rtc: rx8581: let the core handle rtc range

2018-05-17 Thread Alexandre Belloni
Let the core handle offsetting and windowing the RTC range. Signed-off-by: Alexandre Belloni --- drivers/rtc/rtc-rx8581.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/rtc/rtc-rx8581.c b/drivers/rtc/rtc-rx8581.c index c5ffd30ca672..171ee241bd2f 100644

[PATCH 7/7] rtc: rx8581: switch to regmap

2018-05-17 Thread Alexandre Belloni
Switch to regmap to simplify handling block read/write. Signed-off-by: Alexandre Belloni --- drivers/rtc/rtc-rx8581.c | 155 +++ 1 file changed, 42 insertions(+), 113 deletions(-) diff --git a/drivers/rtc/rtc-rx8581.c b/drivers/rtc/rtc-rx8581.c index

[PATCH 6/7] rtc: rx8581: error out when time invalid

2018-05-17 Thread Alexandre Belloni
Return an error when the date is unreliable because the battery is low. Signed-off-by: Alexandre Belloni --- drivers/rtc/rtc-rx8581.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/rtc/rtc-rx8581.c b/drivers/rtc/rtc-rx8581.c index 0a70f1ac5cc2

[PATCH 5/7] rtc: rx8581: remove useless declaration

2018-05-17 Thread Alexandre Belloni
The rx8581_driver forward declaration is useless, remove it. Signed-off-by: Alexandre Belloni --- drivers/rtc/rtc-rx8581.c | 33 +++-- 1 file changed, 15 insertions(+), 18 deletions(-) diff --git a/drivers/rtc/rtc-rx8581.c b/drivers/rtc/rtc-rx8581.c index

[PATCH 4/7] rtc: rx8581: remove useless indirection

2018-05-17 Thread Alexandre Belloni
rx8581_get_datetime and rx8581_set_datetime are only used after casting dev to an i2c_client. Remove that useless indirection. Signed-off-by: Alexandre Belloni --- drivers/rtc/rtc-rx8581.c | 16 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/drivers/rtc/rtc

[PATCH 2/7] rtc: rx8581: add RTC range

2018-05-17 Thread Alexandre Belloni
The rx8581 can support dates from 01/01/2000 to 31/12/2099. Signed-off-by: Alexandre Belloni --- drivers/rtc/rtc-rx8581.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/rtc/rtc-rx8581.c b/drivers/rtc/rtc-rx8581.c index c64911a08531..c5ffd30ca672 100644 --- a/drivers/rtc/rtc

[PATCH 1/7] rtc: rx8581: switch to rtc_register_device

2018-05-17 Thread Alexandre Belloni
This allows for future improvement of the driver. Signed-off-by: Alexandre Belloni --- drivers/rtc/rtc-rx8581.c | 13 + 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/drivers/rtc/rtc-rx8581.c b/drivers/rtc/rtc-rx8581.c index 32caadf912ca..c64911a08531 100644 --- a

[PATCH 1/2] rtc: vr41xx: fix possible race condition

2018-05-17 Thread Alexandre Belloni
freed struct module* */ Signed-off-by: Alexandre Belloni --- drivers/rtc/rtc-vr41xx.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/rtc/rtc-vr41xx.c b/drivers/rtc/rtc-vr41xx.c index 480cffe8d321..2f1212a25f7e 100644 --- a/drivers/rtc/rtc-vr41xx.c +

[PATCH 2/2] rtc: vr41xx: add range

2018-05-17 Thread Alexandre Belloni
The vr41xx RTC is a 48-bit counter counting at 32.768 kHz, giving a maximum value of 2^(48-15)-1 seconds. Signed-off-by: Alexandre Belloni --- drivers/rtc/rtc-vr41xx.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/rtc/rtc-vr41xx.c b/drivers/rtc/rtc-vr41xx.c index 2f1212a25f7e

[PATCH 2/2] rtc: tps6586x: let the core handle rtc range

2018-05-17 Thread Alexandre Belloni
). Signed-off-by: Alexandre Belloni --- drivers/rtc/rtc-tps6586x.c | 27 +-- 1 file changed, 5 insertions(+), 22 deletions(-) diff --git a/drivers/rtc/rtc-tps6586x.c b/drivers/rtc/rtc-tps6586x.c index 9b741143f131..d6434e514a52 100644 --- a/drivers/rtc/rtc-tps6586x.c +++ b

[PATCH 1/2] rtc: tps6586x: fix possible race condition

2018-05-17 Thread Alexandre Belloni
freed struct module* */ Signed-off-by: Alexandre Belloni --- drivers/rtc/rtc-tps6586x.c | 14 +++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/drivers/rtc/rtc-tps6586x.c b/drivers/rtc/rtc-tps6586x.c index 46a19adf9a96..9b741143f131 100644 --- a/drivers/rt

[PATCH 3/3] rtc: ls1x: add range

2018-05-17 Thread Alexandre Belloni
on 14 bits so with alarm support, the range will always be limited to 0 to 16383. Signed-off-by: Alexandre Belloni --- drivers/rtc/rtc-ls1x.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/rtc/rtc-ls1x.c b/drivers/rtc/rtc-ls1x.c index 8aa3f223621c..f4c248655edd 100644 --- a

[PATCH 2/3] rtc: ls1x: remove useless label and goto

2018-05-17 Thread Alexandre Belloni
The error handling in ls1x_rtc_probe used to release resources but since it is using devm functions, it only returns a value. Make the code clearer by returning directly instead of using goto. Signed-off-by: Alexandre Belloni --- drivers/rtc/rtc-ls1x.c | 11 +++ 1 file changed, 3

[PATCH 1/3] rtc: ls1x: switch to rtc_register_device

2018-05-17 Thread Alexandre Belloni
This allows for future improvement of the driver. Signed-off-by: Alexandre Belloni --- drivers/rtc/rtc-ls1x.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/rtc/rtc-ls1x.c b/drivers/rtc/rtc-ls1x.c index de86f9fabc11..609bd1d013f0 100644 --- a/drivers

[PATCH net-next 0/2] net: mscc; ocelot: add more features

2018-05-17 Thread Alexandre Belloni
Hi, This series adds link aggregation and VLAN filtering hardware offload support to the ocelot driver. PTP is also on the list of features but it will probably not be submitted this cycle. Alexandre Belloni (1): net: mscc: ocelot: add bonding support Antoine Tenart (1): net: mscc: ocelot

[PATCH net-next 2/2] net: mscc: ocelot: add VLAN filtering

2018-05-17 Thread Alexandre Belloni
From: Antoine Tenart Add hardware VLAN filtering offloading on ocelot. Signed-off-by: Antoine Tenart Signed-off-by: Alexandre Belloni --- drivers/net/ethernet/mscc/ocelot.c | 285 - 1 file changed, 283 insertions(+), 2 deletions(-) diff --git a/drivers/net

[PATCH net-next 1/2] net: mscc: ocelot: add bonding support

2018-05-17 Thread Alexandre Belloni
Add link aggregation hardware offload support for Ocelot. ocelot_get_link_ksettings() is not great but it does work until the driver is reworked to switch to phylink. Signed-off-by: Alexandre Belloni --- drivers/net/ethernet/mscc/ocelot.c | 177 + drivers/net

Re: [PATCH net-next ] net: mscc: Add SPDX identifier

2018-05-18 Thread Alexandre Belloni
On 17/05/2018 18:13:25-0700, Joe Perches wrote: > On Thu, 2018-05-17 at 21:39 +0200, Alexandre Belloni wrote: > > On 17/05/2018 12:28:59-0700, Joe Perches wrote: > > > On Thu, 2018-05-17 at 21:23 +0200, Alexandre Belloni wrote: > > > > ocelot_qsys.h is missin

Re: [PATCH net-next ] net: mscc: Add SPDX identifier

2018-05-18 Thread Alexandre Belloni
om the SPDX identifier. > The MIT license does allow sublicensing, so > it does seem you can choose what additional > license restrictions you can assert as long > as the original MIT license is also followed. > Then all is good. -- Alexandre Belloni, Bootlin (formerly Free

Re: [PATCH v5 0/5] rtc: isl1208: fixes, documentation and isl1219 support

2018-08-14 Thread Alexandre Belloni
ung > und/oder Publikation dieser E-Mail ist strengstens untersagt. > The contents of the above mentioned e-mail is not legally binding. This > e-mail contains confidential and/or legally protected information. Please > inform us if you have received this e-mail by > mistake and delet

Re: [PATCH 1/2] rtc: maxim: Add SPDX license identifiers

2018-08-14 Thread Alexandre Belloni
-- > drivers/rtc/rtc-max8998.c | 20 +++- > 3 files changed, 21 insertions(+), 39 deletions(-) > Applied, thanks. -- Alexandre Belloni, Bootlin Embedded Linux and Kernel engineering https://bootlin.com

Re: [PATCH 2/2] rtc: s5m: Add SPDX license identifier

2018-08-14 Thread Alexandre Belloni
-) > Applied, thanks. -- Alexandre Belloni, Bootlin Embedded Linux and Kernel engineering https://bootlin.com

Re: [PATCH 1/2] rtc:rtc-digicolor: Use PTR_ERR_OR_ZERO to replace the open code

2018-08-15 Thread Alexandre Belloni
On 15/08/2018 15:16:56+0800, zhong jiang wrote: > On 2018/8/15 0:15, Alexandre Belloni wrote: > > Hi, > > > > On 13/08/2018 19:31:24+0800, zhong jiang wrote: > >> PTR_ERR_OR_ZERO has implemented the if(IS_ERR(...)) + PTR_ERR, So > >> just replace the

[PATCH v2] uio: ensure class is registered before devices

2018-08-16 Thread Alexandre Belloni
can register the device later. Signed-off-by: Alexandre Belloni --- drivers/uio/uio.c | 9 + 1 file changed, 9 insertions(+) diff --git a/drivers/uio/uio.c b/drivers/uio/uio.c index 5d421d7e8904..55b523f7499b 100644 --- a/drivers/uio/uio.c +++ b/drivers/uio/uio.c @@ -275,6 +275,8 @@ static

<    2   3   4   5   6   7   8   9   10   11   >