[GIT PULL] RTC for 4.20

2018-10-26 Thread Alexandre Belloni
Alexandre Belloni (32): rtc: rv8803: fix the rv8803 id in the OF table rtc: rv8803: add Epson RX8803 support rtc: mt6397: fix possible race condition rtc: pl030: fix possible race condition rtc: pl031: switch to devm_rtc_allocate_device

Re: [PATCH] rtc: s35390a: Make buf an unsigned char in s35390a_init

2018-10-19 Thread Alexandre Belloni
has the advantage to be shorter :) > int ret; > unsigned initcount = 0; > > -- > 2.19.1 > -- Alexandre Belloni, Bootlin Embedded Linux and Kernel engineering https://bootlin.com

Re: [PATCH] rtc: ds1307: fix ds1339 wakealarm support

2018-10-22 Thread Alexandre Belloni
t;rtc: ds1340: Add support for trickle charger.") > Cc: sta...@vger.kernel.org > Signed-off-by: Soeren Moch > -- > Cc: Andrea Greco > Cc: Alessandro Zummo > Cc: Alexandre Belloni > Cc: linux-...@vger.kernel.org > Cc: linux-kernel@vger.kernel.org > --- > drivers/

Re: [PATCH] rtc: ds1307: fix ds1339 wakealarm support

2018-10-22 Thread Alexandre Belloni
On 22/10/2018 16:18:13+0200, Soeren Moch wrote: > Hi, > > Am 22.10.2018 um 15:57 schrieb Alexandre Belloni: > > Hello, > > > > On 22/10/2018 14:38:12+0200, Soeren Moch wrote: > >> Commit 51ed73eb998a1c79a2b0e9bed68f75a8a2c93b9b ("rtc: ds1340: Add support

Re: [PATCH v2] rtc: s35390a: Change buf's type to u8 in s35390a_init

2018-10-22 Thread Alexandre Belloni
> --- > > v1 -> v2: > > * Use u8 instead of unsigned char, as it's clearer that this is an > integer value and it's shorter. > > drivers/rtc/rtc-s35390a.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > Applied, thanks. -- Alexandre Belloni, Bootlin Embedded Linux and Kernel engineering https://bootlin.com

[PATCH] rtc: isl1208: avoid possible sysfs race

2018-09-15 Thread Alexandre Belloni
Use rtc_add_group to add the common sysfs group to avoid a possible race condition. Signed-off-by: Alexandre Belloni --- drivers/rtc/rtc-isl1208.c | 11 +-- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/drivers/rtc/rtc-isl1208.c b/drivers/rtc/rtc-isl1208.c index

Re: [PATCH] rtc: isl1208: fix error handling in isl1208_probe()

2018-09-15 Thread Alexandre Belloni
i2c_device_id *id) > } > } > > - return rtc_register_device(rtc); > + rc = rtc_register_device(rtc); > + if (rc) { > + sysfs_remove_group(&client->dev.kobj, &isl1208_rtc_sysfs_files); > + return rc; > + } >

[PATCH] rtc: reorder Makefile entries

2018-09-18 Thread Alexandre Belloni
A few entries are not placed correctly, reorder them. Signed-off-by: Alexandre Belloni --- drivers/rtc/Makefile | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/rtc/Makefile b/drivers/rtc/Makefile index 5ff2fc0c361a..290c1730fb0a 100644 --- a/drivers/rtc

[PATCH 2/2] rtc: isl1208: don't include core header file

2018-09-18 Thread Alexandre Belloni
The core header file is reserved for the core, stop including it. Also reorder includes alphabetically. Signed-off-by: Alexandre Belloni --- drivers/rtc/rtc-isl1208.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/rtc/rtc-isl1208.c b/drivers/rtc/rtc-isl1208

[PATCH 1/2] rtc: move rtc_add_group/s definitions

2018-09-18 Thread Alexandre Belloni
Move rtc_add_group and rtc_add_groups definition to rtc.h that is available for all RTC drivers. Signed-off-by: Alexandre Belloni --- drivers/rtc/rtc-core.h | 14 -- include/linux/rtc.h| 16 2 files changed, 16 insertions(+), 14 deletions(-) diff --git a

[PATCH] rtc: tx4939: fixup nvmem name and register size

2018-09-18 Thread Alexandre Belloni
The default word_size and stride of 1 are correct for the tx4939. Also fix the nvmem folder name. Signed-off-by: Alexandre Belloni --- drivers/rtc/rtc-tx4939.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/rtc/rtc-tx4939.c b/drivers/rtc/rtc-tx4939.c index

[PATCH 1/2] rtc: test: make license text and module license match.

2018-09-18 Thread Alexandre Belloni
The license text is specifying GPL v2 only but the MODULE_LICENSE is set to GPL which means GNU Public License v2 or later. When MODULE_LICENSE and boiler plate does not match, go for boiler plate license. Signed-off-by: Alexandre Belloni --- drivers/rtc/rtc-test.c | 2 +- 1 file changed, 1

[PATCH 2/2] rtc: test: Switch to SPDX identifier

2018-09-18 Thread Alexandre Belloni
Replace the license boilerplate by an SPDX identifier Signed-off-by: Alexandre Belloni --- drivers/rtc/rtc-test.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/rtc/rtc-test.c b/drivers/rtc/rtc-test.c index 93f1638fb8c8..6c5f09c815e8 100644 --- a/drivers/rtc/rtc

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

2018-07-16 Thread Alexandre Belloni
Hello, On 09/07/2018 16:29:43+0300, Codrin Ciubotariu wrote: > On 06.07.2018 22:39, Alexandre Belloni wrote: > > Hi Codrin, > > > > On 18/06/2018 17:12:38+0300, Codrin Ciubotariu wrote: > > > From: Cyrille Pitchen > > > > > > This patch adds D

Re: [PATCH v6 3/4] rtc: ds1307: add offset sysfs for mt41txx chips.

2018-07-16 Thread Alexandre Belloni
if (offset >= 0) { > + ctrl_reg = DIV_ROUND_CLOSEST(offset, > + M41TXX_POS_OFFSET_STEP_PPM); > + ctrl_reg |= M41TXX_BIT_CALIB_SIGN; > + } else { > + ctrl_reg = DIV_ROUND_CLOSEST(abs(offset), > +

Re: [PATCH v6 1/4] rtc: ds1307: fix data pointer to m41t0

2018-07-16 Thread Alexandre Belloni
ff-by: Giulio Benetti > --- > drivers/rtc/rtc-ds1307.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > Applied, thanks. -- Alexandre Belloni, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering https://bootlin.com

Re: [PATCH v6 2/4] rtc: ds1307: support m41t11 variant

2018-07-16 Thread Alexandre Belloni
/devicetree/bindings/rtc/rtc-ds1307.txt | 1 + > drivers/rtc/rtc-ds1307.c | 14 ++ > 2 files changed, 15 insertions(+) > Applied, thanks. -- Alexandre Belloni, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering https://bootlin.com

Re: [PATCH v5 1/2] dt-bindings: Add vendor prefix for Sancloud

2018-07-17 Thread Alexandre Belloni
@@ -314,6 +314,7 @@ rohm ROHM Semiconductor Co., Ltd > roofull Shenzhen Roofull Technology Co, Ltd > samsung Samsung Semiconductor > samtec Samtec/Softing company > +sancloud Sancloud Ltd > sandisk Sandisk Corporation > sbs Smart Battery System >

Re: [PATCH v5 1/2] dt-bindings: Add vendor prefix for Sancloud

2018-07-17 Thread Alexandre Belloni
On 17/07/2018 09:31:15+0200, Koen Kooi wrote: > > > > Op 17 jul. 2018, om 09:20 heeft Alexandre Belloni > > het volgende geschreven: > > > > Hi Koen, > > > > I'm not sure how you expect that to be merged but you should probably > > se

Re: [PATCH 4/4] ARM: at91: pm: configure wakeup sources for ULP1 mode

2018-07-17 Thread Alexandre Belloni
return; > + > + np = of_find_compatible_node(NULL, NULL, "atmel,sama5d2-shdwc"); > + if (!np) { > + pr_warn("%s: failed to find shdwc!\n", __func__); > + goto ulp1_default; > + } > + > + pm_data.shdwc = of_iomap(np, 0); > + of_node_put(np); > + > + ret = at91_pm_backup_init(); > + if (ret) { > + if (!at91_is_pm_mode_active(AT91_PM_ULP1)) > + goto unmap; > + else > + goto backup_default; > + } > + > + return; > + > +unmap: > + iounmap(pm_data.shdwc); > + pm_data.shdwc = NULL; > +ulp1_default: > + at91_pm_use_default_mode(AT91_PM_ULP1); > +backup_default: > + at91_pm_use_default_mode(AT91_PM_BACKUP); > +} > + > struct pmc_info { > unsigned long uhp_udp_mask; > }; > @@ -645,7 +766,7 @@ void __init sama5d2_pm_init(void) > if (!IS_ENABLED(CONFIG_SOC_SAMA5D2)) > return; > > - at91_pm_backup_init(); > + at91_pm_modes_init(); > sama5_pm_init(); > } > > -- > 2.7.4 > -- Alexandre Belloni, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering https://bootlin.com

[PATCH 5/5] mips: dts: mscc: enable i2c on ocelot_pcb123

2018-07-17 Thread Alexandre Belloni
Enable the i2c controller on ocelot PCB123. While there are no i2c devices on the board itself, it can be used to control the SFP transceivers. Signed-off-by: Alexandre Belloni --- arch/mips/boot/dts/mscc/ocelot_pcb123.dts | 5 + 1 file changed, 5 insertions(+) diff --git a/arch/mips/boot

[PATCH 0/5] Add support for MSCC Ocelot i2c

2018-07-17 Thread Alexandre Belloni
. Alexandre Belloni (5): i2c: designware: factorize setting SDA hold time i2c: designware: allow IP specific sda_hold_time i2c: designware: add MSCC Ocelot support mips: dts: mscc: Add i2c on ocelot mips: dts: mscc: enable i2c on ocelot_pcb123 .../bindings/i2c/i2c-designware.txt

[PATCH 4/5] mips: dts: mscc: Add i2c on ocelot

2018-07-17 Thread Alexandre Belloni
Ocelot has an i2c controller, add it. There is only one possible pinmux configuration so add it as well. Signed-off-by: Alexandre Belloni --- arch/mips/boot/dts/mscc/ocelot.dtsi | 19 +++ 1 file changed, 19 insertions(+) diff --git a/arch/mips/boot/dts/mscc/ocelot.dtsi b/arch

[PATCH 2/5] i2c: designware: allow IP specific sda_hold_time

2018-07-17 Thread Alexandre Belloni
Because some old designware IPs were not supporting setting an SDA hold time, vendors developed their own solution. Add a way for the final driver to provide its own SDA hold time handling. Signed-off-by: Alexandre Belloni --- drivers/i2c/busses/i2c-designware-common.c | 6 ++ drivers/i2c

[PATCH 1/5] i2c: designware: factorize setting SDA hold time

2018-07-17 Thread Alexandre Belloni
Signed-off-by: Alexandre Belloni --- drivers/i2c/busses/i2c-designware-common.c | 27 ++ drivers/i2c/busses/i2c-designware-core.h | 1 + drivers/i2c/busses/i2c-designware-master.c | 22 +- drivers/i2c/busses/i2c-designware-slave.c | 22 +

[PATCH 3/5] i2c: designware: add MSCC Ocelot support

2018-07-17 Thread Alexandre Belloni
The Microsemi Ocelot I2C controller is a designware IP. It also has a second set of registers to allow tweaking SDA hold time and spike filtering. Cc: Rob Herring Signed-off-by: Alexandre Belloni --- .../bindings/i2c/i2c-designware.txt | 5 - drivers/i2c/busses/i2c-designware

Re: [PATCH 1/5] i2c: designware: factorize setting SDA hold time

2018-07-17 Thread Alexandre Belloni
On 17/07/2018 15:11:50+0300, Andy Shevchenko wrote: > On Tue, 2018-07-17 at 13:48 +0200, Alexandre Belloni wrote: > > Factorize setting the SDA hold time in a new function > > i2c_dw_set_sda_hold_time() that is used for both master and slave > > mode. > > > > Th

Re: [PATCH 3/5] i2c: designware: add MSCC Ocelot support

2018-07-17 Thread Alexandre Belloni
On 17/07/2018 15:19:08+0300, Andy Shevchenko wrote: > On Tue, 2018-07-17 at 13:48 +0200, Alexandre Belloni wrote: > > The Microsemi Ocelot I2C controller is a designware IP. It also has a > > second set of registers to allow tweaking SDA hold time and spike > > filtering. >

Re: [PATCH 0/5] Add support for MSCC Ocelot i2c

2018-07-17 Thread Alexandre Belloni
On 17/07/2018 15:21:20+0300, Andy Shevchenko wrote: > On Tue, 2018-07-17 at 13:48 +0200, Alexandre Belloni wrote: > > Hi, > > > > Because the designware IP was not able to the the SDA hold time, MSCC > > has > > its own implementation. Add support for it and

[PATCH 5/5] mips: dts: mscc: enable spi and NOR flash support on ocelot PCB123

2018-07-17 Thread Alexandre Belloni
Ocelot PCB123 has a SPI NOR connected on its SPI bus. Signed-off-by: Alexandre Belloni --- arch/mips/boot/dts/mscc/ocelot_pcb123.dts | 10 ++ 1 file changed, 10 insertions(+) diff --git a/arch/mips/boot/dts/mscc/ocelot_pcb123.dts b/arch/mips/boot/dts/mscc/ocelot_pcb123.dts index

[PATCH 0/5] Add support for MSCC Ocelot SPI

2018-07-17 Thread Alexandre Belloni
throught the MIPS tree once patch 3 has been reviewed by the DT maintainers. Alexandre Belloni (5): spi: dw: fix possible race condition spi: dw: allow providing own set_cs callback spi: dw-mmio: add MSCC Ocelot support mips: dts: mscc: Add spi on Ocelot mips: dts: mscc: enable spi and

[PATCH 1/5] spi: dw: fix possible race condition

2018-07-17 Thread Alexandre Belloni
gt;] kernel_init_freeable+0x1ec/0x2ac [<80755310>] kernel_init+0x14/0x110 [<80106698>] ret_from_kernel_thread+0x14/0x1c Code: 8ca40050 8c820008 <8c420030> 000f 3042003f 1047 8ca20230 Signed-off-by: Alexandre Belloni --- drivers/spi/spi-dw.c | 3 ++-

[PATCH 2/5] spi: dw: allow providing own set_cs callback

2018-07-17 Thread Alexandre Belloni
Allow platform specific drivers to provide their own set_cs callback when the IP integration requires it. Signed-off-by: Alexandre Belloni --- drivers/spi/spi-dw.c | 3 +++ drivers/spi/spi-dw.h | 1 + 2 files changed, 4 insertions(+) diff --git a/drivers/spi/spi-dw.c b/drivers/spi/spi-dw.c

[PATCH 3/5] spi: dw-mmio: add MSCC Ocelot support

2018-07-17 Thread Alexandre Belloni
those pins by using the SPI boot controller so use it to set the chip selects. At init time, it is also necessary to give control of the SPI interface to the Designware IP. Cc: Rob Herring Signed-off-by: Alexandre Belloni --- .../bindings/spi/snps,dw-apb-ssi.txt | 5 +- drivers/spi/spi

[PATCH 4/5] mips: dts: mscc: Add spi on Ocelot

2018-07-17 Thread Alexandre Belloni
Add support for the SPI controller Signed-off-by: Alexandre Belloni --- arch/mips/boot/dts/mscc/ocelot.dtsi | 11 +++ 1 file changed, 11 insertions(+) diff --git a/arch/mips/boot/dts/mscc/ocelot.dtsi b/arch/mips/boot/dts/mscc/ocelot.dtsi index 4f33dbc67348..f7616a476247 100644 --- a

Re: [PATCH 0/4] rework ULP1 patches

2018-07-17 Thread Alexandre Belloni
On 17/07/2018 11:26:53+0300, Claudiu Beznea wrote: > Hi, > > Based on the discussion at [1] and private discussion I had with Alexandre > Belloni on IRC, I reworked ULP1 patches to remove device tree bindings > proposed in [1]. > > The implementation from this patches (mostl

Re: [PATCH v2] ARM: dts: at91: fix typos for SSC TD functions

2018-07-17 Thread Alexandre Belloni
boot/dts/sama5d2-pinfunc.h | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > Applied, thanks. -- Alexandre Belloni, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering https://bootlin.com

Re: [PATCH] ARM: early_printk: respect keep parameter

2018-07-17 Thread Alexandre Belloni
On 17/07/2018 16:16:44-0400, Nicolas Pitre wrote: > On Wed, 11 Jul 2018, Alexandre Belloni wrote: > > > Parse and use the keep parameter of earlyprintk to avoid having the kernel > > output stop with: > > > > Console: colour dummy device 80x30 > > co

Re: [PATCH 3/5] spi: dw-mmio: add MSCC Ocelot support

2018-07-17 Thread Alexandre Belloni
On 18/07/2018 00:34:37+0300, Andy Shevchenko wrote: > On Tue, Jul 17, 2018 at 5:23 PM, Alexandre Belloni > wrote: > > Because the SPI controller deasserts the chip select when the TX fifo is > > empty (which may happen in the middle of a transfer), the CS should be &g

Re: [PATCH 1/5] spi: dw: fix possible race condition

2018-07-17 Thread Alexandre Belloni
On 18/07/2018 00:30:49+0300, Andy Shevchenko wrote: > On Wed, Jul 18, 2018 at 12:30 AM, Andy Shevchenko > wrote: > > On Tue, Jul 17, 2018 at 5:23 PM, Alexandre Belloni > > wrote: > > > Reviewed-by: Andy Shevchenko > > > >> Signed-off-by: Alexandre B

Re: [PATCH 1/5] spi: dw: fix possible race condition

2018-07-17 Thread Alexandre Belloni
On 18/07/2018 00:54:21+0300, Andy Shevchenko wrote: > On Wed, Jul 18, 2018 at 12:42 AM, Alexandre Belloni > wrote: > > On 18/07/2018 00:30:49+0300, Andy Shevchenko wrote: > >> On Wed, Jul 18, 2018 at 12:30 AM, Andy Shevchenko > >> wrote: > >> > On Tue,

[PATCH 02/16] clk: at91: generated: SSCs don't have a gclk

2018-07-17 Thread Alexandre Belloni
As the SSCs don't have gclk, don't check for their ID to allow them to set the audio pll rate. Signed-off-by: Alexandre Belloni --- drivers/clk/at91/clk-generated.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/clk/at91/clk-generated.c b/drivers/cl

[PATCH 04/16] clk: at91: audio-pll: separate registration from DT parsing

2018-07-17 Thread Alexandre Belloni
Separate registration out of of_sama5d2_clk_audio_pll*_setup to allow other code to use it. Signed-off-by: Alexandre Belloni --- drivers/clk/at91/clk-audio-pll.c | 147 +++ 1 file changed, 109 insertions(+), 38 deletions(-) diff --git a/drivers/clk/at91/clk-audio

[PATCH 11/16] clk: at91: add sama5d2 PMC driver

2018-07-17 Thread Alexandre Belloni
Add a driver for the PMC clocks of the sama5d2 Signed-off-by: Alexandre Belloni --- drivers/clk/at91/Makefile | 1 + drivers/clk/at91/sama5d2.c | 333 + 2 files changed, 334 insertions(+) create mode 100644 drivers/clk/at91/sama5d2.c diff --git a/drivers

[PATCH 13/16] clk: at91: move DT compatibility code to its own file

2018-07-17 Thread Alexandre Belloni
Move all the DT backward compatibility code to its own file so it can be deleted later. Signed-off-by: Alexandre Belloni --- drivers/clk/at91/Makefile | 2 +- drivers/clk/at91/clk-audio-pll.c| 70 -- drivers/clk/at91/clk-generated.c| 65 -- drivers/clk/at91/clk-h32mx.c

[PATCH 15/16] ARM: dts: at91: sama5d2: switch to new binding

2018-07-17 Thread Alexandre Belloni
Switch sama5d2 boards to the new PMC clock bindings. Signed-off-by: Alexandre Belloni --- arch/arm/boot/dts/at91-sama5d27_som1_ek.dts | 12 +- arch/arm/boot/dts/at91-sama5d2_ptc_ek.dts | 2 +- arch/arm/boot/dts/at91-sama5d2_xplained.dts | 4 +- arch/arm/boot/dts/sama5d2.dtsi

[PATCH 03/16] clk: at91: h32mx: separate registration from DT parsing

2018-07-17 Thread Alexandre Belloni
Separate registration out of of_sama5d4_clk_h32mx_setup to allow other code to use it. Signed-off-by: Alexandre Belloni --- drivers/clk/at91/clk-h32mx.c | 40 1 file changed, 27 insertions(+), 13 deletions(-) diff --git a/drivers/clk/at91/clk-h32mx.c b

[PATCH 16/16] ARM: dts: at91: at91sam9x5: switch to new clock bindings

2018-07-17 Thread Alexandre Belloni
Switch at91sam9x5 boards to the new PMC clock bindings. Signed-off-by: Alexandre Belloni --- arch/arm/boot/dts/at91sam9g15.dtsi | 4 + arch/arm/boot/dts/at91sam9g25.dtsi | 4 + arch/arm/boot/dts/at91sam9g25ek.dts | 4 +- arch/arm/boot/dts/at91sam9g35.dtsi | 4

[PATCH 14/16] ARM: dts: at91: sama5d4: switch to new clock bindings

2018-07-17 Thread Alexandre Belloni
Switch sama5d4 boards to the new PMC clock bindings. Signed-off-by: Alexandre Belloni --- arch/arm/boot/dts/at91-sama5d4ek.dts | 2 +- arch/arm/boot/dts/sama5d4.dtsi | 535 +++ 2 files changed, 49 insertions(+), 488 deletions(-) diff --git a/arch/arm/boot/dts

[PATCH 12/16] clk: at91: add at91sam9x5 PMCs driver

2018-07-17 Thread Alexandre Belloni
Add a driver for the PMC clocks of the at91sam9x5 SoCs Signed-off-by: Alexandre Belloni --- drivers/clk/at91/Makefile | 1 + drivers/clk/at91/at91sam9x5.c | 302 ++ 2 files changed, 303 insertions(+) create mode 100644 drivers/clk/at91/at91sam9x5.c diff

[PATCH 08/16] dt-bindings: clk: at91: Document new PMC binding

2018-07-17 Thread Alexandre Belloni
Document the new PMC binding with only one PMC node for all the PMC clocks instead of one node per clock as this proved to be problematic. Signed-off-by: Alexandre Belloni --- .../devicetree/bindings/clock/at91-clock.txt | 523 +- 1 file changed, 21 insertions(+), 502 deletions

[PATCH 07/16] clk: at91: add pmc_data struct and helpers

2018-07-17 Thread Alexandre Belloni
Add a new strut to handle references to all the PMC clocks and implement allocation/free helpers. Signed-off-by: Alexandre Belloni --- drivers/clk/at91/pmc.c | 44 ++ drivers/clk/at91/pmc.h | 15 ++ 2 files changed, 59 insertions(+) diff

[PATCH 10/16] clk: at91: add sama5d4 pmc driver

2018-07-17 Thread Alexandre Belloni
Add a driver for the PMC clocks of the sama5d4 Signed-off-by: Alexandre Belloni --- drivers/clk/at91/Makefile | 1 + drivers/clk/at91/sama5d4.c | 262 + 2 files changed, 263 insertions(+) create mode 100644 drivers/clk/at91/sama5d4.c diff --git a/drivers

[PATCH 09/16] clk: at91: add new DT lookup function

2018-07-17 Thread Alexandre Belloni
Add a new DT lookup function to lookup for PMC clocks. Note that the #ifndef AT91_PMC_MOSCS section will be removed once all the platforms are converted. Signed-off-by: Alexandre Belloni --- drivers/clk/at91/pmc.c | 34 include/dt-bindings/clock/at91

[PATCH 05/16] clk: at91: generated: set audio_pll_allowed in at91_clk_register_generated()

2018-07-17 Thread Alexandre Belloni
ake gclk determine audio_pll rate") Signed-off-by: Alexandre Belloni --- drivers/clk/at91/clk-generated.c | 27 ++- 1 file changed, 10 insertions(+), 17 deletions(-) diff --git a/drivers/clk/at91/clk-generated.c b/drivers/clk/at91/clk-generated.c index e709a12269c0.

[PATCH 06/16] clk: at91: allow clock registration from C code

2018-07-17 Thread Alexandre Belloni
Remove static keyword to allow functions to be used from other units. Also move some struct and function declarations to pmc.h Signed-off-by: Alexandre Belloni --- drivers/clk/at91/clk-generated.c| 2 +- drivers/clk/at91/clk-i2s-mux.c | 2 +- drivers/clk/at91/clk-main.c

[PATCH 00/16] clk: at91: Rework DT bindings

2018-07-17 Thread Alexandre Belloni
re 39438 32 741 402119d13 after 28300 32 741 290737191 without dt-compat Alexandre Belloni (16): clk: at91: audio-pll: fix audio pmc type clk: at91: generated: SSCs don't have a gclk clk: at91: h32mx: separate registration from DT parsing clk: at91: audi

[PATCH 01/16] clk: at91: audio-pll: fix audio pmc type

2018-07-17 Thread Alexandre Belloni
The allocation for the audio pmc is using the size of struct clk_audio_pad instead of struct clk_audio_pmc. This works fine because the former is larger than the latter but it is safer to be correct. Fixes: ("0865805d82d4 clk: at91: add audio pll clock drivers") Signed-off-by: Alexand

Re: [PATCH v4 1/5] rtc: sysfs: facilitate attribute add to rtc device

2018-07-18 Thread Alexandre Belloni
if (old != rtc_attr_groups) > + devm_kfree(&rtc->dev, old); > + > + return 0; > +} > + > +int rtc_add_group(struct rtc_device *rtc, const struct attribute_group *grp) > +{ > + return rtc->dev.kobj.state_in_sysfs ? > + devm_device_

Re: [PATCH v4 5/5] rtc: isl1219: add device tree docu

2018-07-18 Thread Alexandre Belloni
RTC chip. > + - "isil,ev-evienb": if present bit can be set to disable event input pull-up I would use a clearer name for that property like isil,ev-pull-up-enabled. Also make it an int so 0 is disabling the pull-up (EVIENB set to 1) 1 is enabling the pull-up (EVIENB set to 0) and do nothing when the property is not present. -- Alexandre Belloni, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering https://bootlin.com

Re: [PATCH v4 2/5] rtc: isl1208: add support for isl1219 with tamper detection

2018-07-18 Thread Alexandre Belloni
Verteilung > 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 delete it in such a case. Each unauthorized reproduction, > disclosure, alteration, distribution and/or publication of this e-mail is > strictly prohibited. -- Alexandre Belloni, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering https://bootlin.com

Re: [RFC PATCH v3 7/7] virtio_rtc: Add RTC class driver

2024-03-08 Thread Alexandre Belloni
locate_device(parent_dev); > + if (IS_ERR(rtc)) > + return ERR_PTR(PTR_ERR(rtc)); > + > + viortc_class->rtc = rtc; > + > + clear_bit(RTC_FEATURE_UPDATE_INTERRUPT, rtc->features); > + > + rtc->ops = have_alarm ? &viortc_class_with_alarm_ops : > + &viortc_class_no_alarm_ops; Don't do this, simply clear the alarm feature. -- Alexandre Belloni, co-owner and COO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com

Re: [RFC PATCH v3 7/7] virtio_rtc: Add RTC class driver

2024-03-11 Thread Alexandre Belloni
rtc; > >> + > >> + viortc_class = > >> + devm_kzalloc(parent_dev, sizeof(*viortc_class), > >> GFP_KERNEL); > >> + if (!viortc_class) > >> + return ERR_PTR(-ENOMEM); > >> + > >> + viortc_class->viortc = viortc; > >> + > >> + rtc = devm_rtc_allocate_device(parent_dev); > >> + if (IS_ERR(rtc)) > >> + return ERR_PTR(PTR_ERR(rtc)); > >> + > >> + viortc_class->rtc = rtc; > >> + > >> + clear_bit(RTC_FEATURE_UPDATE_INTERRUPT, rtc->features); > >> + > >> + rtc->ops = have_alarm ? &viortc_class_with_alarm_ops : > >> + &viortc_class_no_alarm_ops; > > > > Don't do this, simply clear the alarm feature. > > > > OK (sorry, was obviously very inelegant). > > Best regards, > > Peter -- Alexandre Belloni, co-owner and COO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com

Re: [RFC PATCH v3 0/7] Add virtio_rtc module and related changes

2024-03-13 Thread Alexandre Belloni
ementations. > I still don't know anything about virtio but under Linux, an RTC is always UTC (or localtime when dual booting but let's not care) and never accounts for leap seconds. Having an RTC and RTC driver behaving differently would be super inconvenient. Why don't you leave

Re: [RFC PATCH v3 0/7] Add virtio_rtc module and related changes

2024-03-13 Thread Alexandre Belloni
On 13/03/2024 12:29:38+, David Woodhouse wrote: > On Wed, 2024-03-13 at 12:18 +0100, Alexandre Belloni wrote: > > > > I still don't know anything about virtio but under Linux, an RTC is > > always UTC (or localtime when dual booting but let's not care) and neve

Re: [RFC PATCH v3 0/7] Add virtio_rtc module and related changes

2024-03-13 Thread Alexandre Belloni
his driver or to have to special case this driver later on because it is incompatible with some evolution of the subsystem. -- Alexandre Belloni, co-owner and COO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com

Re: [PATCH v5 1/3] dt-bindings: reset: microchip sparx5 reset driver bindings

2021-02-15 Thread Alexandre Belloni
t; + - compatible > + - reg > + - reg-names > + - "#reset-cells" > + > +additionalProperties: false > + > +examples: > + - | > +reset: reset-controller@0 { > +compatible = "microchip,sparx5-switch-reset"; > +#reset-cells = <1>; > +reg = <0x0 0xd0>, > + <0x1101 0x1>; > +reg-names = "cpu", "gcb"; > +}; > + > -- > 2.30.0 > -- Alexandre Belloni, Bootlin Embedded Linux and Kernel engineering https://bootlin.com

Re: [PATCH] memory: atmel-sdramc: check of_device_get_match_data() return value

2021-04-07 Thread Alexandre Belloni
@@ -45,6 +45,8 @@ static int atmel_ramc_probe(struct platform_device *pdev) > struct clk *clk; > > caps = of_device_get_match_data(&pdev->dev); > + if (!caps) > + return -EINVAL; > > if (caps->has_ddrck) { > clk = dev

Re: [PATCH 3/3] ARM: at91: Kconfig: select PLL, generic clock and utmi support

2021-04-07 Thread Alexandre Belloni
l "SAMA7G5 family" > depends on ARCH_MULTI_V7 > + select HAVE_AT91_GENERATED_CLK > + select HAVE_AT91_SAM9X60_PLL > + select HAVE_AT91_UTMI Shouldn't that be squashed in 1/3? > select SOC_SAMA7 > help > Select this if you ar

Re: New 'make dtbs_check W=1' warnings

2021-04-08 Thread Alexandre Belloni
x another warning. I guess this is because Documentation/devicetree/bindings/arm/coresight.txt is not yaml yet. -- Alexandre Belloni, co-owner and COO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com

Re: [PATCH 22/24] ARM: at91: sama7: introduce sama7 SoC family

2021-04-08 Thread Alexandre Belloni
On 08/04/2021 17:24:39+0200, Nicolas Ferre wrote: > On 01/04/2021 at 12:24, Claudiu Beznea - M18063 wrote: > > On 01.04.2021 12:38, Claudiu Beznea - M18063 wrote: > > > On 31.03.2021 19:01, Alexandre Belloni wrote: > > > > EXTERNAL EMAIL: Do not click links or op

[PATCH] ARM: configs: at91_dt: add rm9200 ethernet support

2015-01-05 Thread Alexandre Belloni
There is now only on defconfig for the at91rm9200 and at91sam9. Add ethernet support for the rm9200. Signed-off-by: Alexandre Belloni --- arch/arm/configs/at91_dt_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/configs/at91_dt_defconfig b/arch/arm/configs

[PATCH 2/8] mfd: Add atmel-st driver

2015-01-05 Thread Alexandre Belloni
The Atmel System Timer IP available on the at91rm9200 exposes both a timer and a watchdog. Signed-off-by: Alexandre Belloni --- drivers/mfd/Kconfig | 7 drivers/mfd/Makefile | 1 + drivers/mfd/atmel-st.c | 77 include

[PATCH 7/8] clocksource: atmel-st: use syscon/regmap

2015-01-05 Thread Alexandre Belloni
The register range from the system timer is also used by the watchdog driver. Use a regmap to handle concurrent accesses. Signed-off-by: Alexandre Belloni --- drivers/clocksource/timer-atmel-st.c | 103 +-- 1 file changed, 39 insertions(+), 64 deletions(-) diff

[PATCH 5/8] ARM: at91: move the restart function to the system timer driver

2015-01-05 Thread Alexandre Belloni
Restarting on an at91rm9200 is handled by using the system timer. Move that function to the system timer driver. Signed-off-by: Alexandre Belloni --- arch/arm/mach-at91/at91rm9200.c | 11 --- drivers/clocksource/timer-atmel-st.c | 12 2 files changed, 12 insertions

[PATCH 8/8] ARM: at91: remove useless include

2015-01-05 Thread Alexandre Belloni
Both drivers using the system timer are now converted to an MFD. mach/at91_st.h is now useless. Signed-off-by: Alexandre Belloni --- arch/arm/mach-at91/include/mach/at91_st.h | 61 --- 1 file changed, 61 deletions(-) delete mode 100644 arch/arm/mach-at91/include

[PATCH 1/8] ARM: at91/dt: declare atmel,at91rm9200-st as a syscon

2015-01-05 Thread Alexandre Belloni
The system timer register range is also used for the watchdog. Declare it as a syscon to be able to get a regmap early enough in the boot process Signed-off-by: Alexandre Belloni --- Documentation/devicetree/bindings/arm/atmel-at91.txt | 2 +- arch/arm/boot/dts/at91rm9200.dtsi

[PATCH 6/8] clocksource: atmel-st: properly initialize driver

2015-01-05 Thread Alexandre Belloni
Use clocksource_of_init to initialize the system timer instead of relying on a custom function. Signed-off-by: Alexandre Belloni --- arch/arm/mach-at91/board-dt-rm9200.c | 7 --- arch/arm/mach-at91/generic.h | 3 --- drivers/clocksource/timer-atmel-st.c | 4 +++- 3 files changed, 3

[PATCH 0/8] Atmel System Timer cleanups

2015-01-05 Thread Alexandre Belloni
This patch sets cleans up the system timer driver. The main goal is to get rid of the mach/ headers dependency. At the same time, it introduces proper probing and locking (using a regmap) for the watchdog driver. Alexandre Belloni (8): ARM: at91/dt: declare atmel,at91rm9200-st as a syscon

[PATCH 3/8] watchdog: at91rm9200: use the regmap from mfd

2015-01-05 Thread Alexandre Belloni
The system timer MFD driver is providing a regmap. Use it to access the registers. Signed-off-by: Alexandre Belloni --- drivers/watchdog/Kconfig | 2 +- drivers/watchdog/at91rm9200_wdt.c | 22 +- 2 files changed, 10 insertions(+), 14 deletions(-) diff --git a

[PATCH 4/8] ARM: at91: time: move the system timer driver to drivers/clocksource

2015-01-05 Thread Alexandre Belloni
Import at91rm9200_time.c from mach-at91 as timer-atmel-st.c. Further cleanup is required to get rid of the mach-at91 headers. Signed-off-by: Alexandre Belloni --- arch/arm/mach-at91/Makefile | 2 +- drivers/clocksource/Kconfig

[PATCH] sound: soc: atmel sam9g20_wm8731: remove useless include

2015-01-06 Thread Alexandre Belloni
A mach/ header is included but never used. Simply remove it. Signed-off-by: Alexandre Belloni --- sound/soc/atmel/sam9g20_wm8731.c | 1 - 1 file changed, 1 deletion(-) diff --git a/sound/soc/atmel/sam9g20_wm8731.c b/sound/soc/atmel/sam9g20_wm8731.c index 66b66d0e7514..531728975bbb 100644 --- a

[PATCH] ASoC: sam9g20_wm8731: drop machine_is_xxx

2015-01-06 Thread Alexandre Belloni
Atmel based boards can now only be used with device tree. Drop non DT initialization. Signed-off-by: Alexandre Belloni --- sound/soc/atmel/sam9g20_wm8731.c | 68 ++-- 1 file changed, 31 insertions(+), 37 deletions(-) diff --git a/sound/soc/atmel

Re: [PATCH] sound: soc: atmel sam9g20_wm8731: remove useless include

2015-01-06 Thread Alexandre Belloni
Hi Bo, On 06/01/2015 at 18:14:12 +0800, Bo Shen wrote : > > > > #include > > Btw, do you consider to remove this also? > I just sent a patch for that. Feel free to squash both. > >-#include > > > > #include "../codecs/wm8731.h" > >

Re: [PATCH] ASoC: sam9g20_wm8731: drop machine_is_xxx

2015-01-06 Thread Alexandre Belloni
Hi, On 06/01/2015 at 12:00:49 +, Mark Brown wrote : > On Tue, Jan 06, 2015 at 12:14:32PM +0100, Alexandre Belloni wrote: > > Atmel based boards can now only be used with device tree. Drop non DT > > initialization. > > This doesn't apply against current code, pl

Re: [PATCH v2] ALSA: atmel: fix building the ac97 driver for at91-multiplatform

2014-12-25 Thread Alexandre Belloni
Hi, On 25/12/2014 at 11:19:04 +0100, Takashi Iwai wrote : > At Sun, 21 Dec 2014 12:18:09 +0100, > Alexandre Belloni wrote: > > > > From: Arnd Bergmann > > > > at91 will no longer export the mach/cpu.h and mach/hardware.h header files > > in the future,

[PATCH v3] ALSA: atmel: fix building the ac97 driver for at91-multiplatform

2014-12-26 Thread Alexandre Belloni
case. Signed-off-by: Arnd Bergmann Link: http://www.spinics.net/lists/arm-kernel/msg382068.html Signed-off-by: Alexandre Belloni --- Changes in v3: - added my SoB sound/atmel/ac97c.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sound/atmel/ac97c.c b/sound/atmel

Re: [PATCH 10/17] ARM: at91: merge SOC_AT91SAM9xxx

2015-01-22 Thread Alexandre Belloni
On 22/01/2015 at 11:22:21 +0100, Nicolas Ferre wrote : > Le 15/01/2015 22:58, Alexandre Belloni a écrit : > > Only use SOC_AT91SAM9 for all the at91sam9 SoCs. > > > > It enables HAVE_AT91_SMD and HAVE_AT91_UTMI for all the sam9 SoCs but this > > only > > re

Re: [PATCH v2] ARM: at91: fix PM initialization for newer SoCs

2015-01-23 Thread Alexandre Belloni
> + /* Maintainer: Atmel */ > > + .map_io = at91_map_io, > > + .init_early = at91_dt_initialize, > > + .init_machine = sam9x5_dt_device_init, > > + .dt_compat = at91_9x5_board_compat, > > +MACHINE_END > > why a second START inste

Re: [PATCH 05/12] ARM: at91: move select SRAM to ARCH_AT91

2015-01-23 Thread Alexandre Belloni
On 20/01/2015 at 16:16:58 +0800, Wenyou Yang wrote : > Because the CONFIG_AT91_SLOW_CLOCK will be removed > to simply the PM config, so move select SRAM. > > Signed-off-by: Wenyou Yang Acked-by: Alexandre Belloni > --- > arch/arm/mach-at91/Kconfig |2 +- > 1 file

Re: [PATCH 07/12] pm: at91: the standby mode uses the same sram function as the suspend to memory mode

2015-01-23 Thread Alexandre Belloni
ode, the master clock doesn't > switch to the slow clock, and the main oscillator doesn't > turn off as well. > > Signed-off-by: Wenyou Yang That looks quite better, thanks. Acked-by: Alexandre Belloni > --- > arch/arm/mach-at91/pm.c | 81 >

Re: [PATCH 07/12] pm: at91: the standby mode uses the same sram function as the suspend to memory mode

2015-01-23 Thread Alexandre Belloni
<1421945805-31129-1-git-send-email-sylvain.roc...@finsecur.com> > > We are not going to change any clock for STANDBY target, there is no > clock to check, so we don't need to call at91_pm_verify_clocks() for > this target. > I think we should actually stop checking those

Re: [PATCH 07/12] pm: at91: the standby mode uses the same sram function as the suspend to memory mode

2015-01-23 Thread Alexandre Belloni
doing that you removed the condition "if (slow_clock)". > > But slow_clock can still be NULL, see commit d2e4679, there are multiple > reasons which ends up with a NULL slow_clock. > I would fix that by not calling suspend_set_ops(&at91_pm_ops) when slow_clock is NULL

Re: [PATCH 08/12] pm: at91: rename file name: pm_slowclock.S -->pm_suspend.S

2015-01-23 Thread Alexandre Belloni
4f > 3: > str tmp1, [pmc, #AT91_PMC_PCER] > 4: > > /* Enable DDR clock */ > mov tmp1, #AT91_PMC_SYS_DDR > str tmp1, [pmc, #AT91_PMC_SCER] > > This is a rework, what is part of linux-3.10-at91 and not yet present in mainline should be p

Re: [GIT PULL] at91: cleanup/soc for 3.20 #3

2015-01-23 Thread Alexandre Belloni
> I also have the feeling that multi-platform would be hard to reach for 3.20... > If I'm not mistaken, rc6 is on sunday, so anything else is probably too late. -- Alexandre Belloni, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com -- To unsub

Re: [PATCH 05/11] usb: gadget: at91_udc: Remove non-DT handling code

2015-01-13 Thread Alexandre Belloni
ut. I would prefer not to miss 3.20, can I resend the patches now so you can review and ack them? Then they could go through the mfd tree. -- Alexandre Belloni, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com -- To unsubscribe from this list: send the line

[PATCH v3 5/6] ARM: at91/dt: Add a dtsi for at91sam9xe

2015-01-13 Thread Alexandre Belloni
at91sam9xe is slightly different from at91sam9260, in particular it has a different SRAM size and location. Signed-off-by: Alexandre Belloni Acked-by: Boris Brezillon --- .../devicetree/bindings/arm/atmel-at91.txt | 1 + arch/arm/boot/dts/at91sam9xe.dtsi | 60

[PATCH v3 6/6] ARM: at91/dt: ethernut5: use at91sam9xe.dtsi

2015-01-13 Thread Alexandre Belloni
The ethernut5 is actually based on an at91sam9xe, use the correct dts include. Cc: Martin Reimann Cc: Tim Schendekehl Signed-off-by: Alexandre Belloni Acked-by: Boris Brezillon --- arch/arm/boot/dts/ethernut5.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm

[PATCH v3 2/6] ARM: at91/dt: rm9200: add RTC node

2015-01-13 Thread Alexandre Belloni
Add a node for the RTC available on at91rm9200. Signed-off-by: Alexandre Belloni Acked-by: Boris Brezillon --- arch/arm/boot/dts/at91rm9200.dtsi | 7 +++ 1 file changed, 7 insertions(+) diff --git a/arch/arm/boot/dts/at91rm9200.dtsi b/arch/arm/boot/dts/at91rm9200.dtsi index 6c97d4af61ee

[PATCH v3 4/6] ARM: at91/dt: add SRAM nodes

2015-01-13 Thread Alexandre Belloni
Add nodes for the SRAM available on atmel SoCs For the at91sam9260 and the at91sam9g20, address mirroring is used to create a single contiguous SRAM range instead of declaring two separate banks. Also remove leftover TODOs in the sam9g45 file Signed-off-by: Alexandre Belloni Acked-by: Boris

<    4   5   6   7   8   9   10   11   12   13   >