[PATCH] clk: let clk_disable() return immediately if clk is NULL or error

2015-12-04 Thread Masahiro Yamada
The clk_disable() in the common clock framework (drivers/clk/clk.c) returns immediately if the given clk is NULL or an error pointer. It allows drivers to call clk_disable() (and clk_disable_unprepare()) with a clock that might be NULL or an error pointer as long as the drivers are only used along

Re: [PATCH] clk: fix codying style of if ... else blocks

2015-12-04 Thread Masahiro Yamada
Hi Stephen, No value for this patch, or just you missed this? 2015-11-05 17:59 GMT+09:00 Masahiro Yamada : > This code is unreadable due to the blank line between if and else > blocks. > > Signed-off-by: Masahiro Yamada > --- > > drivers/clk/clk-mux.c | 5 ++--- > 1 file changed, 2 insertions(

Re: [PATCH v6 4/5] clk: shmobile: Add new CPG/MSSR driver core

2015-12-04 Thread Laurent Pinchart
Hi Geert, Thank you for the patch. On Thursday 12 November 2015 16:54:45 Geert Uytterhoeven wrote: > Add the common core for the new Renesas Clock Pulse Generator / Module > Standby and Software Reset driver. > > Signed-off-by: Geert Uytterhoeven > --- > v6: > - No changes, > > v5: > - Con

Re: [PATCH RFC RFT 0/3] clk: detect per-user enable imbalances and implement hand-off

2015-12-04 Thread Michael Turquette
Heiko Stübner wrote: > Hi Mike, > > Am Freitag, 7. August 2015, 12:09:27 schrieb Michael Turquette: > > This is an alternative solution to Lee's "clk: Provide support for > > always-on clocks" series[0]. > > > > The first two patches introduce run-time checks to ensure that clock > > consumer dri

[GIT PULL] rockchip clock changes for 4.5

2015-12-04 Thread Heiko Stübner
Hi Mike, Stephen, as discusses previously, here is round 1 of rockchip clock changes for 4.5. This already includes the clock-id branch shared with the armsoc- specific changes. Thanks Heiko The following changes since commit 8005c49d9aea74d382f474ce11afbbc7d7130bec: Linux 4.4-rc1 (2015-11-1

Re: [PATCH 1/2] clk: Add brcm,bcm63xx-gate-clk device tree binding

2015-12-04 Thread Simon Arlott
On Fri, December 4, 2015 14:30, Rob Herring wrote: > On Mon, Nov 30, 2015 at 08:52:55PM +, Simon Arlott wrote: >> +periph_clk: periph_clk { >> +compatible = "brcm,bcm63168-gate-clk", "brcm,bcm63xx-gate-clk"; >> +regmap = <&periph_cntl>; > > What else is in periph_cntrl? Could this all j

Re: [PATCH v2 2/3] clk: bcm2835: Support for clock parent selection

2015-12-04 Thread Remi Pommarel
On Thu, Dec 03, 2015 at 04:37:07PM -0800, Eric Anholt wrote: > Remi Pommarel writes: > > > On Wed, Nov 18, 2015 at 10:30:17AM -0800, Eric Anholt wrote: > > > > [...] > > > >> > +static int bcm2835_clock_determine_rate(struct clk_hw *hw, > >> > +struct clk_rate_request *req) > >> >

[PATCH v3 03/13] clk: at91: clk-main: factorize irq handling

2015-12-04 Thread Alexandre Belloni
The three different irq handlers are doing the same thing, factorize their code in a generic irq handler. Signed-off-by: Alexandre Belloni --- drivers/clk/at91/clk-main.c | 144 +++- 1 file changed, 63 insertions(+), 81 deletions(-) diff --git a/drivers/c

[PATCH v3 04/13] clk: at91: make IRQ optional and register them later

2015-12-04 Thread Alexandre Belloni
The AT91 clock drivers make use of IRQs to avoid polling when waiting for some clocks to be enabled. Unfortunately, this leads to a crash when those IRQs are threaded (which happens when using preempt-rt) because they are registered before thread creation is possible. Use polling on those clocks u

[PATCH v3 02/13] clk: at91: make use of syscon/regmap internally

2015-12-04 Thread Alexandre Belloni
From: Boris Brezillon Use the regmap coming from syscon to access the registers instead of using pmc_read/pmc_write. This allows to avoid passing the at91_pmc structure to the child nodes of the PMC. The final benefit is to have each clock register itself instead of having to iterate over the ch

[PATCH v3 05/13] clk: at91: only disable available IRQs

2015-12-04 Thread Alexandre Belloni
From: Boris Brezillon Only disable available IRQs in case writing to a reserved bit has a harmful effect. Signed-off-by: Boris Brezillon Signed-off-by: Alexandre Belloni --- drivers/clk/at91/pmc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/clk/at91/pmc.c b/dri

[PATCH v3 06/13] clk: at91: pmc: merge at91_pmc_init in atmel_pmc_probe

2015-12-04 Thread Alexandre Belloni
at91_pmc_init() doesn't do much anymore, merge it in atmel_pmc_probe(). Signed-off-by: Alexandre Belloni --- drivers/clk/at91/pmc.c | 31 ++- 1 file changed, 6 insertions(+), 25 deletions(-) diff --git a/drivers/clk/at91/pmc.c b/drivers/clk/at91/pmc.c index 2f8b95031

[PATCH v3 07/13] clk: at91: pmc: move pmc structures to C file

2015-12-04 Thread Alexandre Belloni
pmc.c is now the only user of struct at91_pmc*, move their definition in the C file. Signed-off-by: Alexandre Belloni --- drivers/clk/at91/pmc.c | 12 drivers/clk/at91/pmc.h | 12 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/drivers/clk/at91/pmc.c b/

[PATCH v3 10/13] ARM: at91: pm: move idle functions to pm.c

2015-12-04 Thread Alexandre Belloni
Avoid using code from clk/at91 for PM. This also has the bonus effect of setting arm_pm_idle for sama5 platforms. Signed-off-by: Alexandre Belloni --- arch/arm/mach-at91/at91rm9200.c | 2 -- arch/arm/mach-at91/at91sam9.c | 2 -- arch/arm/mach-at91/generic.h| 6 ++ arch/arm/mach-at91

[PATCH v3 09/13] ARM: at91: pm: find and remap the pmc

2015-12-04 Thread Alexandre Belloni
To avoid relying on at91_pmc_read(), find the pmc node and remap it locally. Signed-off-by: Alexandre Belloni --- arch/arm/mach-at91/pm.c | 33 +++-- 1 file changed, 27 insertions(+), 6 deletions(-) diff --git a/arch/arm/mach-at91/pm.c b/arch/arm/mach-at91/pm.c index

[PATCH v3 08/13] ARM: at91: pm: simply call at91_pm_init

2015-12-04 Thread Alexandre Belloni
at91_pm_init() doesn't return a value, as is the case for its callers, simply call it instead of returning its non-existent return value. Signed-off-by: Alexandre Belloni --- arch/arm/mach-at91/pm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/arm/mach-at91/pm.c

[PATCH v3 11/13] ARM: at91: remove useless includes and function prototypes

2015-12-04 Thread Alexandre Belloni
Remove leftover from the previous cleanup Signed-off-by: Alexandre Belloni --- arch/arm/mach-at91/generic.h | 7 --- 1 file changed, 7 deletions(-) diff --git a/arch/arm/mach-at91/generic.h b/arch/arm/mach-at91/generic.h index d224e195706a..28ca57a2060f 100644 --- a/arch/arm/mach-at91/gener

[PATCH 2/3] clk: tegra210: Fix sparse warnings for functions not declared as static

2015-12-04 Thread Jon Hunter
Sparse reports the following warnings for functions in clk-tegra210.c that should be declared as static: drivers/clk/tegra/clk-tegra210.c:460:6: warning: symbol 'tegra210_pllcx_set_defaults' was not declared. Should it be static? drivers/clk/tegra/clk-tegra210.c:485:6: warning: symbol '_pllc_set

[PATCH 1/3] clk: tegra: Fix sparse warning for pll_m

2015-12-04 Thread Jon Hunter
Sparse generates the following warning for the pll_m params structure: drivers/clk/tegra/clk-tegra210.c:1569:10: warning: Initializer entry defined twice drivers/clk/tegra/clk-tegra210.c:1570:10: also defined here Fix this by correcting the index for the MISC1 register. Fixes: b31eba5ff3f7 ("

[PATCH 3/3] clk: tegra-super: Fix sparse warnings for functions not declared as static

2015-12-04 Thread Jon Hunter
Sparse reports the following warnings for structures and functions that should be declared static: drivers/clk/tegra/clk-tegra-super-gen4.c:70:35: warning: symbol 'tegra_super_gen_info_gen4' was not declared. Should it be static? drivers/clk/tegra/clk-tegra-super-gen4.c:96:35: warning: symbol 't

[PATCH v3 13/13] clk: at91: pmc: drop at91_pmc_base

2015-12-04 Thread Alexandre Belloni
at91_pmc_base is not used anymore, remove it along with at91_pmc_read and at91_pmc_write. Signed-off-by: Alexandre Belloni --- drivers/clk/at91/pmc.c | 5 - include/linux/clk/at91_pmc.h | 12 2 files changed, 17 deletions(-) diff --git a/drivers/clk/at91/pmc.c b/drivers/

[PATCH v3 12/13] usb: gadget: atmel: access the PMC using regmap

2015-12-04 Thread Alexandre Belloni
Use regmap to access the PMC to avoid using at91_pmc_read and at91_pmc_write. Signed-off-by: Alexandre Belloni Acked-by: Felipe Balbi --- drivers/usb/gadget/udc/atmel_usba_udc.c | 20 ++-- drivers/usb/gadget/udc/atmel_usba_udc.h | 2 ++ 2 files changed, 12 insertions(+), 10 del

[PATCH v3 00/13] ARM: at91: PMC driver rework

2015-12-04 Thread Alexandre Belloni
Hi, This patch set is a cleanup that properly separate drivers needing to access the PMC (PM and USB) from the clock driver by exposing the PMC as a syscon. This also allows to implement a fix for preempt-rt. Currently, at91 platform are crashing when using preempt-rt because the irq handler are

[PATCH v3 01/13] clk: at91: make use of syscon to share PMC registers in several drivers

2015-12-04 Thread Alexandre Belloni
From: Boris Brezillon The PMC block is providing several functionnalities: - system clk management - cpuidle - platform suspend Replace the void __iomem *regs field by a regmap (retrieved using syscon) so that we can later share the regmap across several drivers without exporting a new specif

Re: [PATCH 3/3] dt-bindings: regulator/mfd: Reorganize S2MPA01 bindings

2015-12-04 Thread Rob Herring
On Fri, Dec 04, 2015 at 10:10:05AM +0900, Krzysztof Kozlowski wrote: > The mfd/s2mpa01.txt duplicates some of the information about bindings > with old mfd/s2mps11.txt. Now common part exists entirely in > mfd/samsung,sec-core.txt so: > - add company prefix to file name (regulator/samsung,s2mpa01.

Re: [PATCH 2/3] dt-bindings: regulator/mfd: Reorganize S5M8767 bindings

2015-12-04 Thread Rob Herring
On Fri, Dec 04, 2015 at 10:10:04AM +0900, Krzysztof Kozlowski wrote: > The regulator/s5m8767-regulator.txt duplicates some of the information > about bindings with old mfd/s2mps11.txt. Now common part exists entirely > in mfd/samsung,sec-core.txt so: > - add company prefix to file name (regulator/

Re: [PATCH 1/3] dt-bindings: regulator/clock/mfd: Reorganize S2MPS-family bindings

2015-12-04 Thread Rob Herring
On Fri, Dec 04, 2015 at 10:10:03AM +0900, Krzysztof Kozlowski wrote: > Bindings for Samsung S2M and S5M family PMICs are in mess. They are > spread over different files and subdirectories in a non-consistent way. > The devices and respective drivers for them share a lot in common so > everything co

Re: [PATCH v2 2/7] dt-bindings: Amlogic: Document the CPU reset controller for Meson8b

2015-12-04 Thread Rob Herring
On Wed, Dec 02, 2015 at 06:22:28PM +0100, Carlo Caione wrote: > From: Carlo Caione > > The clock controller on Amlogic Meson8b SoCs has been extended with a > reset controller used to reset the CPU cores. It is used during SMP > bringup. > > With this patch we extend the clock controller documen

Re: [PATCH v2 7/7] ARM: DTS: Amlogic: Add SMP related nodes for Meson8b

2015-12-04 Thread Rob Herring
On Wed, Dec 02, 2015 at 06:22:33PM +0100, Carlo Caione wrote: > From: Carlo Caione > > Add nodes for: SCU, PMU and SRAM. Set also the enable-method for SMP > bringup. > > Signed-off-by: Carlo Caione > --- > arch/arm/boot/dts/meson8b.dtsi | 24 > 1 file changed, 24 inse

Re: [PATCH v2 5/7] dt-bindings: Amlogic: Add SMP related documentation

2015-12-04 Thread Rob Herring
On Wed, Dec 02, 2015 at 06:22:31PM +0100, Carlo Caione wrote: > From: Carlo Caione > > With this patch we add documentation for: > > * power-management-unit: the PMU is used to bring up the cores during > SMP operations > * sram: among other things the sram is used to store the first code >

Re: [PATCH 1/2] clk: Add brcm,bcm63xx-gate-clk device tree binding

2015-12-04 Thread Rob Herring
On Mon, Nov 30, 2015 at 08:52:55PM +, Simon Arlott wrote: > Add device tree binding for the BCM63xx's gated clocks. > > The BCM63xx contains clocks gated with a register. Clocks are indexed > by bits in the register and are active high. Clock gate bits are > interleaved with other status bits

Re: [PATCH 3/3] dt-bindings: regulator/mfd: Reorganize S2MPA01 bindings

2015-12-04 Thread Mark Brown
On Fri, Dec 04, 2015 at 10:10:05AM +0900, Krzysztof Kozlowski wrote: > The mfd/s2mpa01.txt duplicates some of the information about bindings > with old mfd/s2mps11.txt. Now common part exists entirely in > mfd/samsung,sec-core.txt so: Acked-by: Mark Brown > - add company prefix to file name (re

Re: [PATCH 2/3] dt-bindings: regulator/mfd: Reorganize S5M8767 bindings

2015-12-04 Thread Mark Brown
On Fri, Dec 04, 2015 at 10:10:04AM +0900, Krzysztof Kozlowski wrote: > The regulator/s5m8767-regulator.txt duplicates some of the information > about bindings with old mfd/s2mps11.txt. Now common part exists entirely > in mfd/samsung,sec-core.txt so: Acked-by: Mark Brown signature.asc Descripti

Re: [PATCH 1/3] dt-bindings: regulator/clock/mfd: Reorganize S2MPS-family bindings

2015-12-04 Thread Mark Brown
On Fri, Dec 04, 2015 at 10:10:03AM +0900, Krzysztof Kozlowski wrote: > Bindings for Samsung S2M and S5M family PMICs are in mess. They are > spread over different files and subdirectories in a non-consistent way. > The devices and respective drivers for them share a lot in common so > everything co

Re: [PATCH v2 1/9] clk: hi3519: add dt-binding document and header file

2015-12-04 Thread Arnd Bergmann
On Friday 04 December 2015 11:21:28 xuejiancheng wrote: > Hi Arnd, > > On 2015/12/3 17:44, Arnd Bergmann wrote: > > On Thursday 03 December 2015 10:39:24 Jiancheng Xue wrote: > >> +#ifndef __DTS_HI3519_CLOCK_H > >> +#define __DTS_HI3519_CLOCK_H > > > > Please try to avoid adding headers like this

Re: clk: scpi: Fix checking return value of platform_device_register_simple()

2015-12-04 Thread Sudeep Holla
Hi Stephen, Mike, Can you pick up this fix for your next pull request ? On 04/12/15 06:51, Axel Lin wrote: platform_device_register_simple() returns ERR_PTR on error. Signed-off-by: Axel Lin Acked-by: Sudeep Holla -- Regards, Sudeep -- To unsubscribe from this list: send the line "unsubsc

Re: [PATCH v6 0/5] clk: shmobile: Add new CPG/MSSR driver

2015-12-04 Thread Geert Uytterhoeven
On Thu, Nov 12, 2015 at 4:54 PM, Geert Uytterhoeven wrote: > This series adds a new driver for the Renesas CPG (Clock Pulse > Generator) and MSSR (Module Standby and Software Reset) blocks for R-Car > H3 (r8a7795). This is supposed to be more in-line with current CCF best > practices, and allows