Re: [PATCH v5 08/46] hwmon: pwm-fan: use pwm_get_args() where appropriate

2016-03-30 Thread Guenter Roeck
On Wed, Mar 30, 2016 at 10:03:31PM +0200, Boris Brezillon wrote: > The PWM framework has clarified the concept of reference PWM config > (the platform dependent config retrieved from the DT or the PWM > lookup table) and real PWM state. > > Use pwm_get_args() when the PWM user wants to retrieve

Re: [PATCH v5 34/46] clk: pwm: switch to the atomic API

2016-03-30 Thread Stephen Boyd
On 03/30, Boris Brezillon wrote: > diff --git a/drivers/clk/clk-pwm.c b/drivers/clk/clk-pwm.c > index ebcd738..49ec5b1 100644 > --- a/drivers/clk/clk-pwm.c > +++ b/drivers/clk/clk-pwm.c > @@ -28,15 +28,29 @@ static inline struct clk_pwm *to_clk_pwm(struct clk_hw > *hw) > static int

Re: [PATCH v5 05/46] pwm: introduce the pwm_args concept

2016-03-30 Thread Stephen Boyd
On 03/30, Boris Brezillon wrote: > @@ -74,6 +74,23 @@ enum pwm_polarity { > PWM_POLARITY_INVERSED, > }; > > +/** > + * struct pwm_args - PWM arguments > + * @period: reference period > + * @polarity: reference polarity > + * > + * This structure describe board-dependent arguments attached

Re: [PATCH v5 30/46] regulator: pwm: retrieve correct voltage

2016-03-30 Thread Mark Brown
On Wed, Mar 30, 2016 at 10:03:53PM +0200, Boris Brezillon wrote: > The continuous PWM voltage regulator is caching the voltage value in > the ->volt_uV field. While most of the time this value should reflect the > real voltage, sometime it can be sightly different if the PWM device > rounded the

Re: [PATCH v5 28/46] regulator: pwm: swith to the atomic PWM API

2016-03-30 Thread Mark Brown
On Wed, Mar 30, 2016 at 10:03:51PM +0200, Boris Brezillon wrote: > pwm_config/enable/disable() have been deprecated in favor of > pwm_apply_state(). > Replace all those calls with the equivalent pwm_get/apply_state(). Acked-by: Mark Brown signature.asc Description: PGP

Re: [PATCH v5 27/46] regulator: pwm: adjust PWM config at probe time

2016-03-30 Thread Mark Brown
On Wed, Mar 30, 2016 at 10:03:50PM +0200, Boris Brezillon wrote: > The PWM attached to a PWM regulator device might have been previously > configured by the bootloader. > Make sure the bootloader and linux config are in sync, and adjust the PWM > config if that's not the case. Acked-by: Mark

[PATCH v5 01/46] pwm: rcar: make use of pwm_is_enabled()

2016-03-30 Thread Boris Brezillon
Commit 5c31252c4a86 ("pwm: Add the pwm_is_enabled() helper") introduced a new function to test whether a PWM device is enabled or not without manipulating PWM internal fields. Hiding this is necessary if we want to smoothly move to the atomic PWM config approach without impacting PWM drivers. Fix

[PATCH v5 03/46] backlight: lm3630a_bl: stop messing with the pwm->period field

2016-03-30 Thread Boris Brezillon
pwm->period field is not supposed to be changed by PWM users. The only ones authorized to change it are the PWM core and PWM drivers. Signed-off-by: Boris Brezillon --- drivers/video/backlight/lm3630a_bl.c | 3 +-- 1 file changed, 1 insertion(+), 2

Re: [PATCH v5 00/46] pwm: add support for atomic update

2016-03-30 Thread Boris Brezillon
+Doug (sorry, I forgot to add you in to the recipient list) On Wed, 30 Mar 2016 22:03:23 +0200 Boris Brezillon wrote: > Hello, > > This series adds support for atomic PWM update, or IOW, the capability > to update all the parameters of a PWM device

[PATCH v5 06/46] pwm: use pwm_get/set_xxx() helpers where appropriate

2016-03-30 Thread Boris Brezillon
Use pwm_get/set_xxx() helpers instead of directly accessing the pwm->xxx field. Doing that will ease adaptation of the PWM framework to support atomic update. Signed-off-by: Boris Brezillon --- Patch generated with the following coccinelle script: --->8---

[PATCH v5 09/46] misc: max77693-haptic: use pwm_get_args() where appropriate

2016-03-30 Thread Boris Brezillon
The PWM framework has clarified the concept of reference PWM config (the platform dependent config retrieved from the DT or the PWM lookup table) and real PWM state. Use pwm_get_args() when the PWM user wants to retrieve this reference config and not the current state. This is part of the rework

[PATCH v5 07/46] clk: pwm: use pwm_get_args() where appropriate

2016-03-30 Thread Boris Brezillon
The PWM framework has clarified the concept of reference PWM config (the platform dependent config retrieved from the DT or the PWM lookup table) and real PWM state. Use pwm_get_args() when the PWM user wants to retrieve this reference config and not the current state. This is part of the rework

[PATCH v5 05/46] pwm: introduce the pwm_args concept

2016-03-30 Thread Boris Brezillon
Currently the PWM core mixes the current PWM state with the per-platform reference config (specified through the PWM lookup table, DT definition or directly hardcoded in PWM drivers). Create a pwm_args struct to store this reference config, so that PWM users can differentiate the current config

[PATCH v5 04/46] pwm: get rid of pwm->lock

2016-03-30 Thread Boris Brezillon
PWM devices are not protected against concurrent accesses. The lock in pwm_device might let PWM users think it is, but it's actually only protecting the enabled state. Removing this lock should be fine as long as all PWM users are aware that accesses to the PWM device have to be serialized, which

[PATCH v5 02/46] backlight: pwm_bl: remove useless call to pwm_set_period()

2016-03-30 Thread Boris Brezillon
The PWM period will be set when calling pwm_config. Remove this useless call to pwm_set_period(), which might mess up with the internal PWM state. Signed-off-by: Boris Brezillon Acked-by: Lee Jones --- drivers/video/backlight/pwm_bl.c |

[PATCH v5 10/46] leds: pwm: use pwm_get_args() where appropriate

2016-03-30 Thread Boris Brezillon
The PWM framework has clarified the concept of reference PWM config (the platform dependent config retrieved from the DT or the PWM lookup table) and real PWM state. Use pwm_get_args() when the PWM user wants to retrieve this reference config and not the current state. This is part of the rework

[PATCH v5 12/46] fbdev: ssd1307fb: use pwm_get_args() where appropriate

2016-03-30 Thread Boris Brezillon
The PWM framework has clarified the concept of reference PWM config (the platform dependent config retrieved from the DT or the PWM lookup table) and real PWM state. Use pwm_get_args() when the PWM user wants to retrieve this reference config and not the current state. This is part of the rework

[PATCH v5 13/46] backlight: pwm_bl: use pwm_get_args() where appropriate

2016-03-30 Thread Boris Brezillon
The PWM framework has clarified the concept of reference PWM config (the platform dependent config retrieved from the DT or the PWM lookup table) and real PWM state. Use pwm_get_args() when the PWM user wants to retrieve this reference config and not the current state. This is part of the rework

[PATCH v5 08/46] hwmon: pwm-fan: use pwm_get_args() where appropriate

2016-03-30 Thread Boris Brezillon
The PWM framework has clarified the concept of reference PWM config (the platform dependent config retrieved from the DT or the PWM lookup table) and real PWM state. Use pwm_get_args() when the PWM user wants to retrieve this reference config and not the current state. This is part of the rework

[PATCH v5 14/46] pwm: keep PWM state in sync with hardware state

2016-03-30 Thread Boris Brezillon
Before the introduction of pwm_args, the core and some drivers were resetting the PWM period and polarity states to the reference values (those provided through the DT, a PWM lookup table or hardcoded in the driver). Now that all PWM users are correctly using pwm_args to configure their PWM

[PATCH v5 18/46] pwm: add the core infrastructure to allow atomic update

2016-03-30 Thread Boris Brezillon
Add an ->apply() method to the pwm_ops struct to allow PWM drivers to implement atomic update. This method will be preferred over the ->enable(), ->disable() and ->config() methods if available. Add the pwm_apply_state() function to the PWM user API. Note that the pwm_apply_state() does not

[PATCH v5 16/46] pwm: move the enabled/disabled info into pwm_state

2016-03-30 Thread Boris Brezillon
Prepare the transition to PWM atomic update by moving the enabled/disabled state into the pwm_state struct. This way we can easily update the whole PWM state by copying the new state in the ->state field. Signed-off-by: Boris Brezillon --- drivers/pwm/core.c

[PATCH v5 22/46] pwm: rockchip: avoid glitches on already running PWMs

2016-03-30 Thread Boris Brezillon
The current logic will disable the PWM clk even if the PWM was left enabled by the bootloader (because it's controlling a critical device like a regulator for example). Keep the PWM clk enabled if the PWM is enabled to avoid any glitches. Signed-off-by: Boris Brezillon

[PATCH v5 33/46] pwm: replace pwm_disable() by pwm_apply_state()

2016-03-30 Thread Boris Brezillon
Some PWM drivers are calling the deprecated pwm_disable() function in their pwm->free() or pdev->remove() function. Replace those calls by the pwm_apply_state(). Signed-off-by: Boris Brezillon --- drivers/pwm/pwm-lpc18xx-sct.c | 7 +--

[PATCH v5 26/46] pwm: sun4i: implement hardware readout

2016-03-30 Thread Boris Brezillon
Implement ->get_state() instead of only initializing the polarity in the probe function. This implementation also takes care of keeping the PWM clk enabled if at least one of the PWM exported by the PWM chip is already enabled, which should prevent glitches. Signed-off-by: Boris Brezillon

[PATCH v5 28/46] regulator: pwm: swith to the atomic PWM API

2016-03-30 Thread Boris Brezillon
pwm_config/enable/disable() have been deprecated in favor of pwm_apply_state(). Replace all those calls with the equivalent pwm_get/apply_state(). Signed-off-by: Boris Brezillon --- drivers/regulator/pwm-regulator.c | 54

[PATCH v5 29/46] regulator: pwm: properly initialize the ->state field

2016-03-30 Thread Boris Brezillon
The ->state field is currently initialized to 0, thus referencing the voltage selector at index 0, which might not reflect the current voltage value. If possible, retrieve the current voltage selector from the PWM state, else return -EINVAL. Signed-off-by: Boris Brezillon

[PATCH v5 27/46] regulator: pwm: adjust PWM config at probe time

2016-03-30 Thread Boris Brezillon
The PWM attached to a PWM regulator device might have been previously configured by the bootloader. Make sure the bootloader and linux config are in sync, and adjust the PWM config if that's not the case. Signed-off-by: Boris Brezillon ---

[PATCH v5 23/46] pwm: rockchip: add support for atomic update

2016-03-30 Thread Boris Brezillon
Implement the ->apply() function to add support for atomic update. Signed-off-by: Boris Brezillon Tested-by: Heiko Stuebner --- drivers/pwm/pwm-rockchip.c | 63 -- 1 file changed, 39 insertions(+),

[PATCH v5 34/46] clk: pwm: switch to the atomic API

2016-03-30 Thread Boris Brezillon
pwm_config/enable/disable() have been deprecated and should be replaced by pwm_apply_state(). Signed-off-by: Boris Brezillon --- drivers/clk/clk-pwm.c | 26 +++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git

[PATCH v5 32/46] pwm: deprecate pwm_config(), pwm_enable() and pwm_disable()

2016-03-30 Thread Boris Brezillon
Prefix those function as deprecated to encourage all existing users to switch to pwm_apply_state(). Signed-off-by: Boris Brezillon --- include/linux/pwm.h | 24 1 file changed, 12 insertions(+), 12 deletions(-) diff --git

[PATCH v5 35/46] hwmon: pwm-fan: switch to the atomic API

2016-03-30 Thread Boris Brezillon
pwm_config/enable/disable() have been deprecated and should be replaced by pwm_apply_state(). Signed-off-by: Boris Brezillon --- drivers/hwmon/pwm-fan.c | 81 - 1 file changed, 46 insertions(+), 35 deletions(-)

[PATCH v5 39/46] leds: pwm: switch to the atomic PWM API

2016-03-30 Thread Boris Brezillon
pwm_config/enable/disable() have been deprecated and should be replaced by pwm_apply_state(). Signed-off-by: Boris Brezillon --- drivers/leds/leds-pwm.c | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/drivers/leds/leds-pwm.c

[PATCH v5 36/46] input: misc: max77693: switch to the atomic API

2016-03-30 Thread Boris Brezillon
pwm_config/enable/disable() have been deprecated and should be replaced by pwm_apply_state(). Signed-off-by: Boris Brezillon --- drivers/input/misc/max77693-haptic.c | 23 +-- 1 file changed, 17 insertions(+), 6 deletions(-) diff --git

[PATCH v5 43/46] backlight: pwm_bl: switch to the atomic PWM API

2016-03-30 Thread Boris Brezillon
pwm_config/enable/disable() have been deprecated and should be replaced by pwm_apply_state(). Signed-off-by: Boris Brezillon --- drivers/video/backlight/pwm_bl.c | 43 ++-- 1 file changed, 24 insertions(+), 19 deletions(-)

[PATCH v5 41/46] backlight: lp855x: switch to the atomic PWM API

2016-03-30 Thread Boris Brezillon
pwm_config/enable/disable() have been deprecated and should be replaced by pwm_apply_state(). Signed-off-by: Boris Brezillon --- drivers/video/backlight/lp855x_bl.c | 15 +-- 1 file changed, 9 insertions(+), 6 deletions(-) diff --git

[PATCH v5 40/46] backlight: lm3630a: switch to the atomic PWM API

2016-03-30 Thread Boris Brezillon
pwm_config/enable/disable() have been deprecated and should be replaced by pwm_apply_state(). Signed-off-by: Boris Brezillon --- drivers/video/backlight/lm3630a_bl.c | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff --git

[PATCH v5 38/46] input: misc: pwm-beeper: switch to the atomic PWM API

2016-03-30 Thread Boris Brezillon
pwm_config/enable/disable() have been deprecated and should be replaced by pwm_apply_state(). Signed-off-by: Boris Brezillon --- drivers/input/misc/pwm-beeper.c | 46 +++-- 1 file changed, 31 insertions(+), 15 deletions(-)

[PATCH v5 44/46] video: ssd1307fb: switch to the atomic PWM API

2016-03-30 Thread Boris Brezillon
pwm_config/enable/disable() have been deprecated and should be replaced by pwm_apply_state(). Signed-off-by: Boris Brezillon --- drivers/video/fbdev/ssd1307fb.c | 24 +++- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git

[PATCH v5 45/46] drm: i915: switch to the atomic PWM API

2016-03-30 Thread Boris Brezillon
pwm_config/enable/disable() have been deprecated and should be replaced by pwm_apply_state(). Signed-off-by: Boris Brezillon --- drivers/gpu/drm/i915/intel_panel.c | 39 +- 1 file changed, 26 insertions(+), 13 deletions(-)

[PATCH v5 42/46] backlight: lp8788: switch to the atomic PWM API

2016-03-30 Thread Boris Brezillon
pwm_config/enable/disable() have been deprecated and should be replaced by pwm_apply_state(). Signed-off-by: Boris Brezillon --- drivers/video/backlight/lp8788_bl.c | 17 + 1 file changed, 9 insertions(+), 8 deletions(-) diff --git

[PATCH v5 46/46] ARM: s3c24xx: rx1950: switch to the atomic PWM API

2016-03-30 Thread Boris Brezillon
Replace pwm_disable/enable/config() by pwm_apply_state(). Signed-off-by: Boris Brezillon --- arch/arm/mach-s3c24xx/mach-rx1950.c | 17 ++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/arch/arm/mach-s3c24xx/mach-rx1950.c

[PATCH v5 25/46] pwm: sti: avoid glitches on already running PWMs

2016-03-30 Thread Boris Brezillon
The current logic will disable the PWM clk even if a PWM was left enabled by the bootloader (because it's controlling a critical device like a regulator for example). Keep the PWM clk enabled if at least one PWM is enabled to avoid any glitches. Signed-off-by: Boris Brezillon

[PATCH v5 00/46] pwm: add support for atomic update

2016-03-30 Thread Boris Brezillon
Hello, This series adds support for atomic PWM update, or IOW, the capability to update all the parameters of a PWM device (enabled/disabled, period, duty and polarity) in one go. It also adds support for initial PWM state retrieval (or hardware readout), which should allow smooth handover

[PATCH 6/7] ARM: socfpga: Enable Arria10 OCRAM ECC on startup

2016-03-30 Thread tthayer
From: Thor Thayer Enable ECC for Arria10 On-Chip RAM on machine startup. The ECC has to be enabled before data is stored in memory otherwise the ECC will fail on reads. Signed-off-by: Thor Thayer --- arch/arm/mach-socfpga/core.h

[PATCH 2/7] EDAC, altera: Add register offset for ECC Enable

2016-03-30 Thread tthayer
From: Thor Thayer In preparation for the Arria10 peripheral ECCs, a register offset from the ECC base was added to the private data structure to index to the ECC enable register. Signed-off-by: Thor Thayer ---

[PATCH 1/7] EDAC, altera: New file operations for Arria10 ECC modules

2016-03-30 Thread tthayer
From: Thor Thayer In preparation for the Arria10 peripheral ECCs, new file operations are used because the Arria10 IRQ trigger mechanism is different than Cyclone5/Arria5 and Arria10 L2 cache. Add new pointer for file operations function to ecc data structure and

[PATCH 3/7] EDAC, altera: Make OCRAM ECC dependency check generic

2016-03-30 Thread tthayer
From: Thor Thayer In preparation for the Arria10 peripheral ECCs, the OCRAM ECC dependency check was moved into the general ECC area since this same function can be used by other memories. Signed-off-by: Thor Thayer ---

[PATCH 5/7] EDAC, altera: Addition of Arria10 OCRAM ECC

2016-03-30 Thread tthayer
From: Thor Thayer Addition of the Arria10 On-Chip RAM ECC handling. Addition of private data structure for Arria10 OCRAM ECC and the ECC module and memory initialization functions which are shared between memory modules such as NAND, Ethernet, etc. Addition of a

[PATCH 7/7] ARM: dts: Add Altera Arria10 OCRAM EDAC devicetree entry

2016-03-30 Thread tthayer
From: Thor Thayer Add the device tree entries needed to support the Altera On-Chip RAM EDAC on the Arria10 chip. Signed-off-by: Thor Thayer --- arch/arm/boot/dts/socfpga_arria10.dtsi |5 + 1 file changed, 5 insertions(+)

[PATCH 4/7] Documentation: dt: socfpga: Add Altera Arria10 OCRAM binding

2016-03-30 Thread tthayer
From: Thor Thayer Add the device tree bindings needed to support the Altera On-Chip RAM ECC on the Arria10 chip. Signed-off-by: Thor Thayer --- .../bindings/arm/altera/socfpga-eccmgr.txt | 10 ++ 1 file changed,

[PATCH] Addition of Altera Arria10 On-Chip RAM ECC

2016-03-30 Thread tthayer
This series of patches adds the Arria10 OCRAM EDAC support. [PATCH 1/7] EDAC, altera: New file operations for Arria10 ECC [PATCH 2/7] EDAC, altera: Add register offset for ECC Enable [PATCH 3/7] EDAC, altera: Make OCRAM ECC dependency check generic [PATCH 4/7] Documentation: dt: socfpga: Add

Re: [PATCH] ARM: kexec: fix crashkernel= handling

2016-03-30 Thread Vivek Goyal
On Wed, Mar 30, 2016 at 02:05:30PM +0100, Russell King - ARM Linux wrote: > On Wed, Mar 30, 2016 at 06:09:22PM +0530, Pratyush Anand wrote: > > On 30/03/2016:09:46:38 AM, Dave Young wrote: > > > Hi, Russell > > > > > > A long standing issue, but nobody tried to do it. Thank you for bringing > >

Re: [PATCH] ARM: kexec: fix crashkernel= handling

2016-03-30 Thread Russell King - ARM Linux
On Wed, Mar 30, 2016 at 06:09:22PM +0530, Pratyush Anand wrote: > On 30/03/2016:09:46:38 AM, Dave Young wrote: > > Hi, Russell > > > > A long standing issue, but nobody tried to do it. Thank you for bringing up. > > > > On 03/29/16 at 11:10am, Russell King wrote: > > > When the kernel

Re: [PATCH] ARM: kexec: fix crashkernel= handling

2016-03-30 Thread Pratyush Anand
On 30/03/2016:09:46:38 AM, Dave Young wrote: > Hi, Russell > > A long standing issue, but nobody tried to do it. Thank you for bringing up. > > On 03/29/16 at 11:10am, Russell King wrote: > > When the kernel crashkernel parameter is specified with just a size, we > > are supposed to allocate a

[PATCHv4 11/12] scripts/gdb: Add documentation example for radix tree

2016-03-30 Thread Kieran Bingham
Provide a worked example for utilising the lx_radix_tree_lookup function Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Signed-off-by: Kieran Bingham --- Documentation/gdb-kernel-debugging.txt | 21 + 1 file changed, 21