[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 <boris.bre

[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 <boris.brezil...@free-electrons.com> --- drivers/hwmon/pwm-fan.c | 81 - 1 file changed, 46 insertions(+), 35 del

[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 <boris.brezil...@free-electrons.com> --- drivers/input/misc/max77693-haptic.c | 23 +-- 1 file changed, 17 insertions(+), 6 deletions(-) diff

[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 <boris.brezil...@free-electrons.com> --- drivers/leds/leds-pwm.c | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/drivers/leds/leds-p

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

2016-03-30 Thread Boris Brezillon
state() does not guarantee the atomicity of the update operation, it all depends on the availability and implementation of the ->apply() method. pwm_enable/disable/set_polarity/config() are now implemented as wrappers around the pwm_apply_state() function. Signed-off-by: Boris Brezillon <bo

[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 <boris.brezil...@free-electrons.com> --- drivers/p

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

2016-03-30 Thread Boris Brezillon
allowing the PWM framework to support hardware readout and expose real PWM state even when the PWM has just been requested (before the user calls pwm_config/enable/disable()). Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- drivers/video/fbdev/ssd1307fb.c | 4 +++-

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

2016-03-30 Thread Boris Brezillon
allowing the PWM framework to support hardware readout and expose real PWM state even when the PWM has just been requested (before the user calls pwm_config/enable/disable()). Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- drivers/video/backlight/pwm_bl.c | 4 +++-

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

2016-03-30 Thread Boris Brezillon
allowing the PWM framework to support hardware readout and expose real PWM state even when the PWM has just been requested (before the user calls pwm_config/enable/disable()). Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- drivers/hwmon/pwm-fan.

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

2016-03-30 Thread Boris Brezillon
device, we can safely remove some pwm_set_period/polarity() calls. Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- drivers/pwm/core.c | 5 - drivers/pwm/pwm-clps711x.c | 1 - drivers/pwm/pwm-pxa.c | 1 - 3 files changed, 7 deletions(-) diff --git a/drive

[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 <boris.brezil...@free-electrons.com> --- 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 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 <boris.brezil...@free-electrons.com> --- include/linux/pwm.h | 24 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/i

[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 <boris.brezil...@free-electrons.com> --- drivers/clk/clk-pwm.c | 26 +++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/drive

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

2016-03-30 Thread Boris Brezillon
allowing the PWM framework to support hardware readout and expose real PWM state even when the PWM has just been requested (before the user calls pwm_config/enable/disable()). Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- drivers/leds/leds-pwm.c | 4 +++- 1 file c

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

2016-03-30 Thread Boris Brezillon
seems to be the case for all of them except the sysfs interface. Patch the sysfs code by adding a lock to the pwm_export struct and making sure it's taken for all accesses to the exported PWM device. Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- drivers/pwm/core.c

[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 <boris.brezil...@free-electrons.com> Acked-by: Lee Jones <lee.jo...@linaro.org> --- drivers/video/backli

[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 <boris.brezil...@free-electrons.com> --- drivers/video/fbdev/ssd1307fb.c | 24 +++- 1 file changed, 19 insertions(+), 5 deletions(-) diff

[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 <boris.brezil...@free-electrons.com> --- drivers/gpu/drm/i915/intel_panel.c | 39 +- 1 file changed, 26 insertions(+), 13 del

[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 <boris.brezil...@free-electrons.com> --- drivers/video/backlight/lp8788_bl.c | 17 + 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/d

[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 Brezil

[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 <boris.brezil..

[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 <boris.brezil...@free-electrons.com> --- drivers/regulator/pwm-regulator.

[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 <boris.brezil...@free-electrons.com> Tested-by: Heiko Stuebner <he...@sntech.de> --- drivers/pwm/pwm-rockchip.c | 63 -- 1 file changed

[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 <boris.brezil...@free-electrons.com> --- drivers/reg

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

2016-03-30 Thread Boris Brezillon
should be submitted separately) *** BLURB HERE *** Boris Brezillon (45): pwm: rcar: make use of pwm_is_enabled() backlight: pwm_bl: remove useless call to pwm_set_period() backlight: lm3630a_bl: stop messing with the pwm->period field pwm: get rid of pwm->lock pwm: introduce the pwm_

[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 <boris.brezil...@f

[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 <boris.brezil...@free-electrons.com> --- drivers/pwm/pwm-lpc18xx-sct.c | 7 +-- dri

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 <boris.brezil...@free-electrons.com> wrote: > Hello, > > This series adds support for atomic PWM update, or IOW, the capability > to update all the parameters of a P

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

2016-03-30 Thread Boris Brezillon
allowing the PWM framework to support hardware readout and expose real PWM state even when the PWM has just been requested (before the user calls pwm_config/enable/disable()). Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- drivers/input/misc/max77693-haptic.

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

2016-03-30 Thread Boris Brezillon
allowing the PWM framework to support hardware readout and expose real PWM state even when the PWM has just been requested (before the user calls pwm_config/enable/disable()). Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- drivers/clk/clk-pwm.c | 12 +++-

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

2016-03-30 Thread Boris Brezillon
from the reference one. Patch all places where pwm->args should be initialized. We keep the pwm_set_polarity/period() calls until all PWM users are patched to use pwm_args instead of pwm_get_period/polarity(). Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- dr

[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 <boris.brezil...@free-electrons.com> --- Patch generated with the following coccinelle scrip

[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 <boris.brezil...@free-electrons.com> --- drivers/video/backlight/lp855x_bl.c | 15 +-- 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/d

[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 <boris.brezil...@free-electrons.com> --- drivers/video/backlight/lm3630a_bl.c | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/d

[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 <boris.brezil...@free-electrons.com> --- drivers/input/misc/pwm-beeper.c | 46 +++-- 1 file changed, 31 insertions(+), 15 del

[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 <boris.brezil...@free-electrons.com> --- drivers/video/backlight/pwm_bl.c | 43 ++-- 1 file changed, 24 insertions(+), 19 del

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

2016-03-30 Thread Boris Brezillon
ivers. Fix this driver to use pwm_is_enabled() instead of directly accessing the ->flags field. Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- drivers/pwm/pwm-rcar.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pwm/pwm-rcar.c b/dri

[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 <boris.brezil...@free-electrons.com> --- drivers/video/backlight/lm3630a_bl.c | 3 +-- 1 file changed, 1 insertion(+), 2

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

2016-03-31 Thread Boris Brezillon
Hi Guenter, On Wed, 30 Mar 2016 15:52:44 -0700 Guenter Roeck <li...@roeck-us.net> wrote: > 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 f

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

2016-03-31 Thread Boris Brezillon
On Wed, 30 Mar 2016 14:55:10 -0700 Stephen Boyd <sb...@codeaurora.org> wrote: > On 03/30, Boris Brezillon wrote: > > @@ -74,6 +74,23 @@ enum pwm_polarity { > > PWM_POLARITY_INVERSED, > > }; > > > > +/** > > + * struct pwm_args - PW

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

2016-03-31 Thread Boris Brezillon
On Wed, 30 Mar 2016 14:55:10 -0700 Stephen Boyd <sb...@codeaurora.org> wrote: > On 03/30, Boris Brezillon wrote: > > @@ -74,6 +74,23 @@ enum pwm_polarity { > > PWM_POLARITY_INVERSED, > > }; > > > > +/** > > + * struct pwm_args - PW

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

2016-04-07 Thread Boris Brezillon
Hi Mark, On Wed, 30 Mar 2016 14:24:10 -0700 Mark Brown <broo...@kernel.org> wrote: > 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 t

Re: [PATCH 05/20] mfd: atmel-hlcdc: Use devm_mfd_add_devices() for mfd_device registration

2016-04-05 Thread Boris Brezillon
<ldewan...@nvidia.com> > CC: Boris Brezillon <boris.brezil...@free-electrons.com> Acked-by: Boris Brezillon <boris.brezil...@free-electrons.com> > --- > drivers/mfd/atmel-hlcdc.c | 10 +- > 1 file changed, 1 insertion(+), 9 deletions(-) > > diff --gi

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

2016-04-12 Thread Boris Brezillon
Hi Mark, On Tue, 12 Apr 2016 05:42:03 +0100 Mark Brown <broo...@kernel.org> wrote: > On Thu, Apr 07, 2016 at 11:54:31PM +0200, Boris Brezillon wrote: > > > Is there any reason for calling set_machine_constraints() after > > device_register() in regulator_register()? &

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

2016-04-12 Thread Boris Brezillon
Hi Thierry, On Tue, 12 Apr 2016 13:22:46 +0200 Thierry Reding <thierry.red...@gmail.com> wrote: > On Wed, Mar 30, 2016 at 10:03:27PM +0200, Boris Brezillon wrote: > > PWM devices are not protected against concurrent accesses. The lock in > > pwm_device might let PWM users

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

2016-04-12 Thread Boris Brezillon
On Tue, 12 Apr 2016 13:39:12 +0200 Thierry Reding <thierry.red...@gmail.com> wrote: > On Wed, Mar 30, 2016 at 10:03:28PM +0200, Boris Brezillon wrote: > > Currently the PWM core mixes the current PWM state with the per-platform > > reference config (specified through the

Re: [PATCH v5 15/46] pwm: introduce the pwm_state concept

2016-04-12 Thread Boris Brezillon
On Tue, 12 Apr 2016 13:49:04 +0200 Thierry Reding <thierry.red...@gmail.com> wrote: > On Wed, Mar 30, 2016 at 10:03:38PM +0200, Boris Brezillon wrote: > > The PWM state, represented by its period, duty_cycle and polarity, > > is currently directly stored in the PWM device. &g

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

2016-04-12 Thread Boris Brezillon
On Tue, 12 Apr 2016 13:39:12 +0200 Thierry Reding <thierry.red...@gmail.com> wrote: > On Wed, Mar 30, 2016 at 10:03:28PM +0200, Boris Brezillon wrote: > > Currently the PWM core mixes the current PWM state with the per-platform > > reference config (specified through the

Re: [PATCH v5 15/46] pwm: introduce the pwm_state concept

2016-04-12 Thread Boris Brezillon
On Tue, 12 Apr 2016 14:21:41 +0200 Thierry Reding <thierry.red...@gmail.com> wrote: > On Tue, Apr 12, 2016 at 02:17:18PM +0200, Boris Brezillon wrote: > > On Tue, 12 Apr 2016 13:49:04 +0200 > > Thierry Reding <thierry.red...@gmail.com> wrote: > > > > >

Re: [PATCH v5 15/46] pwm: introduce the pwm_state concept

2016-04-12 Thread Boris Brezillon
On Tue, 12 Apr 2016 16:05:46 +0200 Thierry Reding <thierry.red...@gmail.com> wrote: > On Tue, Apr 12, 2016 at 03:26:44PM +0200, Boris Brezillon wrote: > > On Tue, 12 Apr 2016 15:11:18 +0200 > > Thierry Reding <thierry.red...@gmail.com> wrote: > > > > >

Re: [PATCH v5 15/46] pwm: introduce the pwm_state concept

2016-04-12 Thread Boris Brezillon
On Tue, 12 Apr 2016 15:11:18 +0200 Thierry Reding <thierry.red...@gmail.com> wrote: > On Tue, Apr 12, 2016 at 02:45:08PM +0200, Boris Brezillon wrote: > > On Tue, 12 Apr 2016 14:21:41 +0200 > > Thierry Reding <thierry.red...@gmail.com> wrote: > > > > >

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

2016-04-11 Thread Boris Brezillon
Hi Thierry, On Wed, 30 Mar 2016 22:03:23 +0200 Boris Brezillon <boris.brezil...@free-electrons.com> wrote: > 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 an

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

2016-03-31 Thread Boris Brezillon
On Thu, 31 Mar 2016 10:48:01 -0700 Dmitry Torokhov <dmitry.torok...@gmail.com> wrote: > Hi Boris, > > On Wed, Mar 30, 2016 at 10:03:59PM +0200, Boris Brezillon wrote: > > pwm_config/enable/disable() have been deprecated and should be replaced > > by pwm_apply_s

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

2016-03-31 Thread Boris Brezillon
Hi Dmitry, On Thu, 31 Mar 2016 10:38:58 -0700 Dmitry Torokhov <dmitry.torok...@gmail.com> wrote: > Hi Boris, > > On Wed, Mar 30, 2016 at 10:03:55PM +0200, Boris Brezillon wrote: > > Prefix those function as deprecated to encourage all existing users to > > switch to

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

2016-04-14 Thread Boris Brezillon
Hi Thierry On Tue, 12 Apr 2016 13:01:52 +0200 Thierry Reding <thierry.red...@gmail.com> wrote: > On Wed, Mar 30, 2016 at 10:03:24PM +0200, Boris Brezillon wrote: > > Commit 5c31252c4a86 ("pwm: Add the pwm_is_enabled() helper") introduced a > > new function to test

[PATCH v5 19/24] pwm: move the enabled/disabled info into pwm_state

2016-04-14 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 <boris.brezil...@free-electrons.com> --- drivers/p

[PATCH v5 18/24] pwm: introduce the pwm_state concept

2016-04-14 Thread Boris Brezillon
implemented as wrappers around pwm_get_state(). Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- drivers/pwm/core.c | 8 include/linux/pwm.h | 54 + 2 files changed, 46 insertions(+), 16 deletions(-) diff

[PATCH v5 22/24] pwm: update documentation

2016-04-14 Thread Boris Brezillon
Update the PWM subsystem documentation to reflect the atomic PWM changes. Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- Documentation/pwm.txt | 30 -- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/Documentation/pwm

[PATCH v5 20/24] pwm: add the PWM initial state retrieval infra

2016-04-14 Thread Boris Brezillon
Add a ->get_state() function to the pwm_ops struct to let PWM drivers initialize the PWM state attached to a PWM device. Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- drivers/pwm/core.c | 3 +++ include/linux/pwm.h | 28 2 file

[PATCH v5 01/24] pwm: introduce the pwm_args concept

2016-04-14 Thread Boris Brezillon
from the reference one. Patch all places where pwm->args should be initialized. We keep the pwm_set_polarity/period() calls until all PWM users are patched to use pwm_args instead of pwm_get_period/polarity(). Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- dr

[PATCH v5 02/24] pwm: use pwm_get/set_xxx() helpers where appropriate

2016-04-14 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 <boris.brezil...@free-electrons.com> --- Patch generated with the following coccinelle scrip

[PATCH v5 13/24] input: misc: max8997: explicitly apply PWM config extracted from pwm_args

2016-04-14 Thread Boris Brezillon
makes use of it. Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- drivers/input/misc/max8997_haptic.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/input/misc/max8997_haptic.c b/drivers/input/misc/max8997_haptic.c index a806ba3..bf17f65

[PATCH v5 10/24] backlight: lp8788: explicitly apply PWM config extracted from pwm_args

2016-04-14 Thread Boris Brezillon
makes use of it. Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- drivers/video/backlight/lp8788_bl.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/video/backlight/lp8788_bl.c b/drivers/video/backlight/lp8788_bl.c index 5d583d7..cf869ec

[PATCH v5 15/24] drm: i915: explicitly apply PWM config extracted from pwm_args

2016-04-14 Thread Boris Brezillon
makes use of it. Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- drivers/gpu/drm/i915/intel_panel.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/gpu/drm/i915/intel_panel.c b/drivers/gpu/drm/i915/intel_panel.c index 21ee647..dc3a2e4 100644 --- a/d

[PATCH v5 12/24] backlight: lm3630a: explicitly apply PWM config extracted from pwm_args

2016-04-14 Thread Boris Brezillon
makes use of it. Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- drivers/video/backlight/lm3630a_bl.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/video/backlight/lm3630a_bl.c b/drivers/video/backlight/lm3630a_bl.c index 3d16bd6..60d6c2a

[PATCH v5 09/24] backlight: pwm_bl: use pwm_get_args() where appropriate

2016-04-14 Thread Boris Brezillon
allowing the PWM framework to support hardware readout and expose real PWM state even when the PWM has just been requested (before the user calls pwm_config/enable/disable()). Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- drivers/video/backlight/pwm_bl.

[PATCH v5 24/24] pwm: add information about polarity, duty cycle and period to debugfs

2016-04-14 Thread Boris Brezillon
ry pwm. Signed-off-by: Heiko Stuebner <he...@sntech.de> Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- drivers/pwm/core.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/pwm/core.c b/drivers/pwm/core.c index aefffcf..9f4e97e 100644 --- a/driver

[PATCH v5 21/24] pwm: add the core infrastructure to allow atomic update

2016-04-14 Thread Boris Brezillon
andover between the bootloader and the kernel. This function tries to adapt the current PWM state to the PWM arguments coming from a PWM lookup table or a DT definition without changing the duty_cycle/period proportion. Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- driv

Re: [PATCH v5 13/24] input: misc: max8997: explicitly apply PWM config extracted from pwm_args

2016-04-17 Thread Boris Brezillon
Hi Dmitry, On Sun, 17 Apr 2016 05:45:48 -0700 Dmitry Torokhov <dmitry.torok...@gmail.com> wrote: > On Thu, Apr 14, 2016 at 09:17:33PM +0200, Boris Brezillon wrote: > > Call pwm_apply_args() just after requesting the PWM device so that the > > polarity and period are

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

2016-04-14 Thread Boris Brezillon
added Heiko's patch to display more information in debugfs - dropped pwm-regulator patches (should be submitted separately) Boris Brezillon (23): pwm: introduce the pwm_args concept pwm: use pwm_get/set_xxx() helpers where appropriate clk: pwm: use pwm_get_args() where appropriate hwmon: pwm-fa

[PATCH v5 08/24] fbdev: ssd1307fb: use pwm_get_args() where appropriate

2016-04-14 Thread Boris Brezillon
allowing the PWM framework to support hardware readout and expose real PWM state even when the PWM has just been requested (before the user calls pwm_config/enable/disable()). Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- drivers/video/fbdev/ssd1307fb.

[PATCH v5 11/24] backlight: lp855x: explicitly apply PWM config extracted from pwm_args

2016-04-14 Thread Boris Brezillon
makes use of it. Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- drivers/video/backlight/lp855x_bl.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/video/backlight/lp855x_bl.c b/drivers/video/backlight/lp855x_bl.c index daca9e6..e5b14f5

[PATCH v5 07/24] regulator: pwm: use pwm_get_args() where appropriate

2016-04-14 Thread Boris Brezillon
allowing the PWM framework to support hardware readout and expose real PWM state even when the PWM has just been requested (before the user calls pwm_config/enable/disable()). Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- drivers/regulator/pwm-regulator.

[PATCH v5 05/24] input: misc: max77693: use pwm_get_args() where appropriate

2016-04-14 Thread Boris Brezillon
allowing the PWM framework to support hardware readout and expose real PWM state even when the PWM has just been requested (before the user calls pwm_config/enable/disable()). Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- drivers/input/misc/max77693-haptic.

[PATCH v5 06/24] leds: pwm: use pwm_get_args() where appropriate

2016-04-14 Thread Boris Brezillon
allowing the PWM framework to support hardware readout and expose real PWM state even when the PWM has just been requested (before the user calls pwm_config/enable/disable()). Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> Acked-by: Jacek Anaszewski <j.anaszew...@sa

Re: [v7, 1/3] nand: pl353: Add basic driver for arm pl353 smc nand interface

2016-10-24 Thread Boris Brezillon
Hi Punnaih, On Sun, 23 Oct 2016 17:37:42 +0530 punnaiah choudary kalluri wrote: > Hi Boris and Jason, > > I am doing rework on these patches to accommodate recent changes with > respect to ooblayout. Also some of the comments that i have received > from Boris as part of

[RFC 4/5] i3c: master: Add driver for Cadence IP

2017-07-31 Thread Boris Brezillon
Add a driver for Cadence I3C master IP. Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- drivers/i3c/master/Kconfig |4 + drivers/i3c/master/Makefile |1 + drivers/i3c/master/i3c-master-cdns.c | 1382 ++ 3

[RFC 1/5] i2c: Export of_i2c_get_board_info()

2017-07-31 Thread Boris Brezillon
core parse the I2C device nodes by itself and initialize the bus. Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- drivers/i2c/i2c-core-base.c | 2 +- drivers/i2c/i2c-core-of.c | 64 ++--- include/linux/i2c.h | 10

[RFC 0/5] Add I3C subsystem

2017-07-31 Thread Boris Brezillon
tion are relevant to user-space applications. If you know other people that might be interested by this patchset, just let me know and I'll Cc them on the next version. Thanks, Boris [1]https://www.mipi.org/specifications/i3c-sensor-specification Boris Brezillon (5): i2c: Export of_i2c_get_board_

[RFC 3/5] dt-bindings: i3c: Document core bindings

2017-07-31 Thread Boris Brezillon
A new I3C subsystem has been added and a generic description has been created to represent the I3C bus and the devices connected on it. Document this generic representation. Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- Documentation/devicetree/bindings/i3c/i

Re: [RFC 2/5] i3c: Add core I3C infrastructure

2017-07-31 Thread Boris Brezillon
Le Mon, 31 Jul 2017 21:17:21 +0200, Wolfram Sang a écrit : > > +This document is just a brief introduction to the I3C protocol and the > > concepts > > +it brings on the table. If you need more information, please refer to the > > MIPI > > +I3C specification. > > I wish

Re: [RFC 0/5] Add I3C subsystem

2017-07-31 Thread Boris Brezillon
Hi Wolfram, Le Mon, 31 Jul 2017 21:17:45 +0200, Wolfram Sang a écrit : > Hi Boris, > > > This patch series is a proposal for a new I3C [1] subsystem. > > Nice. Good luck with that! > > Some hi-level comments from me related to I2C. I can't say a lot more > because the

Re: [RFC 2/5] i3c: Add core I3C infrastructure

2017-08-03 Thread Boris Brezillon
On Tue, 1 Aug 2017 17:20:41 +0200 Boris Brezillon <boris.brezil...@free-electrons.com> wrote: > On Tue, 1 Aug 2017 17:01:08 +0200 > Wolfram Sang <w...@the-dreams.de> wrote: > > > > I do not know of any real devices as of today (all my tests have been > >

Re: [RFC 2/5] i3c: Add core I3C infrastructure

2017-08-01 Thread Boris Brezillon
Hi Greg, Le Tue, 1 Aug 2017 10:51:33 -0700, Greg Kroah-Hartman <gre...@linuxfoundation.org> a écrit : > On Tue, Aug 01, 2017 at 12:48:01PM +0200, Boris Brezillon wrote: > > > > +static DEFINE_MUTEX(i3c_core_lock); > > > > + > > > > +void i3c

Re: [RFC 2/5] i3c: Add core I3C infrastructure

2017-08-01 Thread Boris Brezillon
Le Tue, 1 Aug 2017 19:27:03 +0200, Wolfram Sang a écrit : > > I'm surprised they didn't allow for slave clock stretching when > > communicating with a legacy i2c device, it will prohibit use of a rather > > large class of devices. :( > > Yes, but I3C is push/pull IIRC. It

Re: [PATCH v5 04/19] crypto: marvell/cesa: remove redundant backlog checks on EBUSY

2017-08-15 Thread Boris Brezillon
-by: Gilad Ben-Yossef <gi...@benyossef.com> Acked-by: Boris Brezillon <boris.brezil...@free-electrons.com> > --- > drivers/crypto/marvell/cesa.c | 3 +-- > drivers/crypto/marvell/cesa.h | 2 +- > 2 files changed, 2 insertions(+), 3 deletions(-) > > diff --git a/dri

Re: [RFC 3/5] dt-bindings: i3c: Document core bindings

2017-08-10 Thread Boris Brezillon
Hi Rob, Le Wed, 9 Aug 2017 18:43:02 -0500, Rob Herring <r...@kernel.org> a écrit : > On Mon, Jul 31, 2017 at 06:24:48PM +0200, Boris Brezillon wrote: > > A new I3C subsystem has been added and a generic description has been > > created to represent the I3C bus and

Re: [RFC 2/5] i3c: Add core I3C infrastructure

2017-08-17 Thread Boris Brezillon
Le Wed, 16 Aug 2017 23:03:55 +0200, Geert Uytterhoeven a écrit : > On Tue, Aug 1, 2017 at 5:01 PM, Wolfram Sang wrote: > >> I'm perfectly fine with the I3C / I2C framework separation. The only > >> minor problem I had with that was the inaccuracy of the

Re: [RFC 2/5] i3c: Add core I3C infrastructure

2017-08-17 Thread Boris Brezillon
Le Thu, 17 Aug 2017 11:03:10 +0200, Linus Walleij <linus.wall...@linaro.org> a écrit : > On Mon, Jul 31, 2017 at 6:24 PM, Boris Brezillon > <boris.brezil...@free-electrons.com> wrote: > > > This infrastructure is not complete yet and will be extended over > >

Re: [RFC 2/5] i3c: Add core I3C infrastructure

2017-08-01 Thread Boris Brezillon
On Tue, 1 Aug 2017 16:12:18 +0200 Wolfram Sang wrote: > > > The second way is to have a number of #ifdef and complex > > > Kconfig dependencies for the driver to only register the > > > device_driver objects for the buses that are enabled. This > > > is also doable, but

Re: [RFC 2/5] i3c: Add core I3C infrastructure

2017-08-01 Thread Boris Brezillon
On Tue, 1 Aug 2017 16:22:21 +0200 Arnd Bergmann <a...@arndb.de> wrote: > On Tue, Aug 1, 2017 at 3:58 PM, Boris Brezillon > <boris.brezil...@free-electrons.com> wrote: > > On Tue, 1 Aug 2017 15:34:14 +0200 > > Boris Brezillon <boris.brezil...@free-electrons.com>

Re: [RFC 2/5] i3c: Add core I3C infrastructure

2017-07-31 Thread Boris Brezillon
Hi Arnd, Le Mon, 31 Jul 2017 22:16:42 +0200, Arnd Bergmann <a...@arndb.de> a écrit : > On Mon, Jul 31, 2017 at 6:24 PM, Boris Brezillon > <boris.brezil...@free-electrons.com> wrote: > > Add core infrastructure to support I3C in Linux and document it. > > >

Re: [RFC 2/5] i3c: Add core I3C infrastructure

2017-08-01 Thread Boris Brezillon
On Tue, 1 Aug 2017 15:34:14 +0200 Boris Brezillon <boris.brezil...@free-electrons.com> wrote: > On Tue, 1 Aug 2017 15:11:44 +0200 > Arnd Bergmann <a...@arndb.de> wrote: > > > On Tue, Aug 1, 2017 at 2:29 PM, Boris Brezillon > > <boris.brezil...@free-electro

Re: [RFC 2/5] i3c: Add core I3C infrastructure

2017-08-01 Thread Boris Brezillon
Hello Greg, On Mon, 31 Jul 2017 18:40:21 -0700 Greg Kroah-Hartman <gre...@linuxfoundation.org> wrote: > On Mon, Jul 31, 2017 at 06:24:47PM +0200, Boris Brezillon wrote: > > Add core infrastructure to support I3C in Linux and document it. > > > > This infrast

Re: [RFC 2/5] i3c: Add core I3C infrastructure

2017-08-01 Thread Boris Brezillon
On Tue, 1 Aug 2017 14:00:05 +0200 Arnd Bergmann <a...@arndb.de> wrote: > On Mon, Jul 31, 2017 at 11:15 PM, Boris Brezillon > <boris.brezil...@free-electrons.com> wrote: > > Hi Arnd, > > > > Le Mon, 31 Jul 2017 22:16:42 +0200, > > Arnd Bergmann <a...@

Re: [RFC 2/5] i3c: Add core I3C infrastructure

2017-08-01 Thread Boris Brezillon
On Tue, 1 Aug 2017 15:11:44 +0200 Arnd Bergmann <a...@arndb.de> wrote: > On Tue, Aug 1, 2017 at 2:29 PM, Boris Brezillon > <boris.brezil...@free-electrons.com> wrote: > > On Tue, 1 Aug 2017 14:00:05 +0200 > > Arnd Bergmann <a...@arndb.de> wrote: > > &g

Re: [PATCH 0/5] Convert more books to ReST

2017-05-15 Thread Boris Brezillon
On Sat, 13 May 2017 08:10:53 -0300 Mauro Carvalho Chehab wrote: > This patch series convert the following books to ReST: > - librs > - mtdnand > - sh > > And it is based on my previous series of conversion patches. > > After this series, there will

Re: [PATCH v2 37/53] docs-rst: convert mtdnand book to ReST

2017-05-16 Thread Boris Brezillon
ro Carvalho Chehab <mche...@s-opensource.com> Acked-by: Boris Brezillon <boris.brezil...@free-electrons.com> > --- > Documentation/DocBook/Makefile |1 - > Documentation/DocBook/mtdnand.tmpl | 1291 > -- > Documentation/driv

Re: [PATCH v2 38/53] mtdnand.rst: group the "::" with previous line

2017-05-16 Thread Boris Brezillon
adorned with ore or metal") > by: > OR-ed > > To reflect its true meaning. > > Signed-off-by: Mauro Carvalho Chehab <mche...@s-opensource.com> Acked-by: Boris Brezillon <boris.brezil...@free-electrons.com> > --- > Documentation/driver-api/mtdnand.rst |

Re: [PATCH v2 39/53] mtd: adjust kernel-docs to avoid Sphinx/kerneldoc warnings

2017-05-16 Thread Boris Brezillon
Chehab <mche...@s-opensource.com> Acked-by: Boris Brezillon <boris.brezil...@free-electrons.com> > --- > Documentation/driver-api/mtdnand.rst | 3 --- > drivers/mtd/nand/nand_base.c | 7 +-- > include/linux/mtd/nand.h | 2 +- > 3 files changed, 6 i

  1   2   >