All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/3] leds-pwm: Defer PWM calls if PWM can sleep
@ 2013-01-28 14:00 ` Florian Vaussard
  0 siblings, 0 replies; 38+ messages in thread
From: Florian Vaussard @ 2013-01-28 14:00 UTC (permalink / raw)
  To: Bryan Wu, Richard Purdie, Thierry Reding
  Cc: Peter Ujfalusi, linux-leds, linux-arm-kernel, linux-kernel,
	Florian Vaussard

Hello,

When using the leds-pwm module with external PWM chips connected through
I2C, the kernel will panic when settings a trigger. In this case, PWM
calls can sleep, and should be deferred.

Patch 1 and 2 add the necessary API to the PWM subsystem, and update
matching drivers. Patch 3 updates leds-pwm to use a worker if the PWM
chip can sleep, or performs direct calls otherwise.

This patchset is based on the for-next branch of the led subsystem [1],
as patch 3 depends on the recent work of Peter for DT bindings in leds-pwm.
The pwm patches should probably follow the same path.

Tested on Overo (OMAP3 + TWL4030) with device tree.

Best regards,

Florian

[1] git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/linux-leds.git

Changes from v2:
* pwm_cansleep -> pwm_can_sleep
* use bool for can_sleep member
* minor fixes

Changes from v1:
* pwm_can_sleep -> pwm_cansleep
* avoid duplicated code between the worker and the direct call
* cache the value of pwm_cansleep inside leds-pwm to avoid API calls

Florian Vaussard (3):
  pwm: Add pwm_can_sleep() as exported API to users
  pwm: Add can_sleep property to drivers
  leds: leds-pwm: Defer led_pwm_set() if PWM can sleep

 drivers/leds/leds-pwm.c   |   50 +++++++++++++++++++++++++++++++++++++-------
 drivers/pwm/core.c        |   12 ++++++++++
 drivers/pwm/pwm-twl-led.c |    1 +
 drivers/pwm/pwm-twl.c     |    1 +
 include/linux/pwm.h       |   10 +++++++++
 5 files changed, 66 insertions(+), 8 deletions(-)

-- 
1.7.5.4


^ permalink raw reply	[flat|nested] 38+ messages in thread

* [PATCH v3 0/3] leds-pwm: Defer PWM calls if PWM can sleep
@ 2013-01-28 14:00 ` Florian Vaussard
  0 siblings, 0 replies; 38+ messages in thread
From: Florian Vaussard @ 2013-01-28 14:00 UTC (permalink / raw)
  To: linux-arm-kernel

Hello,

When using the leds-pwm module with external PWM chips connected through
I2C, the kernel will panic when settings a trigger. In this case, PWM
calls can sleep, and should be deferred.

Patch 1 and 2 add the necessary API to the PWM subsystem, and update
matching drivers. Patch 3 updates leds-pwm to use a worker if the PWM
chip can sleep, or performs direct calls otherwise.

This patchset is based on the for-next branch of the led subsystem [1],
as patch 3 depends on the recent work of Peter for DT bindings in leds-pwm.
The pwm patches should probably follow the same path.

Tested on Overo (OMAP3 + TWL4030) with device tree.

Best regards,

Florian

[1] git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/linux-leds.git

Changes from v2:
* pwm_cansleep -> pwm_can_sleep
* use bool for can_sleep member
* minor fixes

Changes from v1:
* pwm_can_sleep -> pwm_cansleep
* avoid duplicated code between the worker and the direct call
* cache the value of pwm_cansleep inside leds-pwm to avoid API calls

Florian Vaussard (3):
  pwm: Add pwm_can_sleep() as exported API to users
  pwm: Add can_sleep property to drivers
  leds: leds-pwm: Defer led_pwm_set() if PWM can sleep

 drivers/leds/leds-pwm.c   |   50 +++++++++++++++++++++++++++++++++++++-------
 drivers/pwm/core.c        |   12 ++++++++++
 drivers/pwm/pwm-twl-led.c |    1 +
 drivers/pwm/pwm-twl.c     |    1 +
 include/linux/pwm.h       |   10 +++++++++
 5 files changed, 66 insertions(+), 8 deletions(-)

-- 
1.7.5.4

^ permalink raw reply	[flat|nested] 38+ messages in thread

* [PATCH v3 1/3] pwm: Add pwm_can_sleep() as exported API to users
  2013-01-28 14:00 ` Florian Vaussard
@ 2013-01-28 14:00   ` Florian Vaussard
  -1 siblings, 0 replies; 38+ messages in thread
From: Florian Vaussard @ 2013-01-28 14:00 UTC (permalink / raw)
  To: Bryan Wu, Richard Purdie, Thierry Reding
  Cc: Peter Ujfalusi, linux-leds, linux-arm-kernel, linux-kernel,
	Florian Vaussard

Calls to some external PWM chips can sleep. To help users,
add pwm_can_sleep() API.

Cc: Thierry Reding <thierry.reding@avionic-design.de>
Cc: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Florian Vaussard <florian.vaussard@epfl.ch>
---
 drivers/pwm/core.c  |   12 ++++++++++++
 include/linux/pwm.h |   10 ++++++++++
 2 files changed, 22 insertions(+), 0 deletions(-)

diff --git a/drivers/pwm/core.c b/drivers/pwm/core.c
index 4a13da4..41c0b0c 100644
--- a/drivers/pwm/core.c
+++ b/drivers/pwm/core.c
@@ -763,6 +763,18 @@ void devm_pwm_put(struct device *dev, struct pwm_device *pwm)
 }
 EXPORT_SYMBOL_GPL(devm_pwm_put);
 
+/**
+  * pwm_can_sleep() - report whether PWM access will sleep
+  * @pwm: PWM device
+  *
+  * It returns true if accessing the PWM can sleep, false otherwise.
+  */
+bool pwm_can_sleep(struct pwm_device *pwm)
+{
+	return pwm->chip->can_sleep;
+}
+EXPORT_SYMBOL_GPL(pwm_can_sleep);
+
 #ifdef CONFIG_DEBUG_FS
 static void pwm_dbg_show(struct pwm_chip *chip, struct seq_file *s)
 {
diff --git a/include/linux/pwm.h b/include/linux/pwm.h
index 70655a2..747c657 100644
--- a/include/linux/pwm.h
+++ b/include/linux/pwm.h
@@ -146,6 +146,8 @@ struct pwm_ops {
  * @base: number of first PWM controlled by this chip
  * @npwm: number of PWMs controlled by this chip
  * @pwms: array of PWM devices allocated by the framework
+ * @can_sleep: flag must be set iff config()/enable()/disable() methods sleep,
+ *      as they must while accessing PWM chips over I2C or SPI
  */
 struct pwm_chip {
 	struct device		*dev;
@@ -159,6 +161,7 @@ struct pwm_chip {
 	struct pwm_device *	(*of_xlate)(struct pwm_chip *pc,
 					    const struct of_phandle_args *args);
 	unsigned int		of_pwm_n_cells;
+	bool			can_sleep;
 };
 
 #if IS_ENABLED(CONFIG_PWM)
@@ -182,6 +185,8 @@ struct pwm_device *devm_pwm_get(struct device *dev, const char *con_id);
 struct pwm_device *devm_of_pwm_get(struct device *dev, struct device_node *np,
 				   const char *con_id);
 void devm_pwm_put(struct device *dev, struct pwm_device *pwm);
+
+bool pwm_can_sleep(struct pwm_device *pwm);
 #else
 static inline int pwm_set_chip_data(struct pwm_device *pwm, void *data)
 {
@@ -242,6 +247,11 @@ static inline struct pwm_device *devm_of_pwm_get(struct device *dev,
 static inline void devm_pwm_put(struct device *dev, struct pwm_device *pwm)
 {
 }
+
+static inline bool pwm_can_sleep(struct pwm_device *pwm)
+{
+	return false;
+}
 #endif
 
 struct pwm_lookup {
-- 
1.7.5.4


^ permalink raw reply related	[flat|nested] 38+ messages in thread

* [PATCH v3 1/3] pwm: Add pwm_can_sleep() as exported API to users
@ 2013-01-28 14:00   ` Florian Vaussard
  0 siblings, 0 replies; 38+ messages in thread
From: Florian Vaussard @ 2013-01-28 14:00 UTC (permalink / raw)
  To: linux-arm-kernel

Calls to some external PWM chips can sleep. To help users,
add pwm_can_sleep() API.

Cc: Thierry Reding <thierry.reding@avionic-design.de>
Cc: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Florian Vaussard <florian.vaussard@epfl.ch>
---
 drivers/pwm/core.c  |   12 ++++++++++++
 include/linux/pwm.h |   10 ++++++++++
 2 files changed, 22 insertions(+), 0 deletions(-)

diff --git a/drivers/pwm/core.c b/drivers/pwm/core.c
index 4a13da4..41c0b0c 100644
--- a/drivers/pwm/core.c
+++ b/drivers/pwm/core.c
@@ -763,6 +763,18 @@ void devm_pwm_put(struct device *dev, struct pwm_device *pwm)
 }
 EXPORT_SYMBOL_GPL(devm_pwm_put);
 
+/**
+  * pwm_can_sleep() - report whether PWM access will sleep
+  * @pwm: PWM device
+  *
+  * It returns true if accessing the PWM can sleep, false otherwise.
+  */
+bool pwm_can_sleep(struct pwm_device *pwm)
+{
+	return pwm->chip->can_sleep;
+}
+EXPORT_SYMBOL_GPL(pwm_can_sleep);
+
 #ifdef CONFIG_DEBUG_FS
 static void pwm_dbg_show(struct pwm_chip *chip, struct seq_file *s)
 {
diff --git a/include/linux/pwm.h b/include/linux/pwm.h
index 70655a2..747c657 100644
--- a/include/linux/pwm.h
+++ b/include/linux/pwm.h
@@ -146,6 +146,8 @@ struct pwm_ops {
  * @base: number of first PWM controlled by this chip
  * @npwm: number of PWMs controlled by this chip
  * @pwms: array of PWM devices allocated by the framework
+ * @can_sleep: flag must be set iff config()/enable()/disable() methods sleep,
+ *      as they must while accessing PWM chips over I2C or SPI
  */
 struct pwm_chip {
 	struct device		*dev;
@@ -159,6 +161,7 @@ struct pwm_chip {
 	struct pwm_device *	(*of_xlate)(struct pwm_chip *pc,
 					    const struct of_phandle_args *args);
 	unsigned int		of_pwm_n_cells;
+	bool			can_sleep;
 };
 
 #if IS_ENABLED(CONFIG_PWM)
@@ -182,6 +185,8 @@ struct pwm_device *devm_pwm_get(struct device *dev, const char *con_id);
 struct pwm_device *devm_of_pwm_get(struct device *dev, struct device_node *np,
 				   const char *con_id);
 void devm_pwm_put(struct device *dev, struct pwm_device *pwm);
+
+bool pwm_can_sleep(struct pwm_device *pwm);
 #else
 static inline int pwm_set_chip_data(struct pwm_device *pwm, void *data)
 {
@@ -242,6 +247,11 @@ static inline struct pwm_device *devm_of_pwm_get(struct device *dev,
 static inline void devm_pwm_put(struct device *dev, struct pwm_device *pwm)
 {
 }
+
+static inline bool pwm_can_sleep(struct pwm_device *pwm)
+{
+	return false;
+}
 #endif
 
 struct pwm_lookup {
-- 
1.7.5.4

^ permalink raw reply related	[flat|nested] 38+ messages in thread

* [PATCH v3 2/3] pwm: Add can_sleep property to drivers
  2013-01-28 14:00 ` Florian Vaussard
@ 2013-01-28 14:00   ` Florian Vaussard
  -1 siblings, 0 replies; 38+ messages in thread
From: Florian Vaussard @ 2013-01-28 14:00 UTC (permalink / raw)
  To: Bryan Wu, Richard Purdie, Thierry Reding
  Cc: Peter Ujfalusi, linux-leds, linux-arm-kernel, linux-kernel,
	Florian Vaussard

Calls to PWM drivers connected through I2C can sleep.
Use the new can_sleep property.

Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Florian Vaussard <florian.vaussard@epfl.ch>
---
 drivers/pwm/pwm-twl-led.c |    1 +
 drivers/pwm/pwm-twl.c     |    1 +
 2 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/pwm/pwm-twl-led.c b/drivers/pwm/pwm-twl-led.c
index 9dfa0f3..83e25d4 100644
--- a/drivers/pwm/pwm-twl-led.c
+++ b/drivers/pwm/pwm-twl-led.c
@@ -300,6 +300,7 @@ static int twl_pwmled_probe(struct platform_device *pdev)
 
 	twl->chip.dev = &pdev->dev;
 	twl->chip.base = -1;
+	twl->chip.can_sleep = true;
 
 	mutex_init(&twl->mutex);
 
diff --git a/drivers/pwm/pwm-twl.c b/drivers/pwm/pwm-twl.c
index e65db95..f783efc 100644
--- a/drivers/pwm/pwm-twl.c
+++ b/drivers/pwm/pwm-twl.c
@@ -315,6 +315,7 @@ static int twl_pwm_probe(struct platform_device *pdev)
 	twl->chip.dev = &pdev->dev;
 	twl->chip.base = -1;
 	twl->chip.npwm = 2;
+	twl->chip.can_sleep = true;
 
 	mutex_init(&twl->mutex);
 
-- 
1.7.5.4


^ permalink raw reply related	[flat|nested] 38+ messages in thread

* [PATCH v3 2/3] pwm: Add can_sleep property to drivers
@ 2013-01-28 14:00   ` Florian Vaussard
  0 siblings, 0 replies; 38+ messages in thread
From: Florian Vaussard @ 2013-01-28 14:00 UTC (permalink / raw)
  To: linux-arm-kernel

Calls to PWM drivers connected through I2C can sleep.
Use the new can_sleep property.

Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Florian Vaussard <florian.vaussard@epfl.ch>
---
 drivers/pwm/pwm-twl-led.c |    1 +
 drivers/pwm/pwm-twl.c     |    1 +
 2 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/pwm/pwm-twl-led.c b/drivers/pwm/pwm-twl-led.c
index 9dfa0f3..83e25d4 100644
--- a/drivers/pwm/pwm-twl-led.c
+++ b/drivers/pwm/pwm-twl-led.c
@@ -300,6 +300,7 @@ static int twl_pwmled_probe(struct platform_device *pdev)
 
 	twl->chip.dev = &pdev->dev;
 	twl->chip.base = -1;
+	twl->chip.can_sleep = true;
 
 	mutex_init(&twl->mutex);
 
diff --git a/drivers/pwm/pwm-twl.c b/drivers/pwm/pwm-twl.c
index e65db95..f783efc 100644
--- a/drivers/pwm/pwm-twl.c
+++ b/drivers/pwm/pwm-twl.c
@@ -315,6 +315,7 @@ static int twl_pwm_probe(struct platform_device *pdev)
 	twl->chip.dev = &pdev->dev;
 	twl->chip.base = -1;
 	twl->chip.npwm = 2;
+	twl->chip.can_sleep = true;
 
 	mutex_init(&twl->mutex);
 
-- 
1.7.5.4

^ permalink raw reply related	[flat|nested] 38+ messages in thread

* [PATCH v3 3/3] leds: leds-pwm: Defer led_pwm_set() if PWM can sleep
  2013-01-28 14:00 ` Florian Vaussard
@ 2013-01-28 14:00   ` Florian Vaussard
  -1 siblings, 0 replies; 38+ messages in thread
From: Florian Vaussard @ 2013-01-28 14:00 UTC (permalink / raw)
  To: Bryan Wu, Richard Purdie, Thierry Reding
  Cc: Peter Ujfalusi, linux-leds, linux-arm-kernel, linux-kernel,
	Florian Vaussard

Call to led_pwm_set() can happen inside atomic context, like triggers.
If the PWM call can sleep, defer using a worker.

Cc: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Florian Vaussard <florian.vaussard@epfl.ch>
---
 drivers/leds/leds-pwm.c |   50 +++++++++++++++++++++++++++++++++++++++-------
 1 files changed, 42 insertions(+), 8 deletions(-)

diff --git a/drivers/leds/leds-pwm.c b/drivers/leds/leds-pwm.c
index a1ea5f6..faf52c0 100644
--- a/drivers/leds/leds-pwm.c
+++ b/drivers/leds/leds-pwm.c
@@ -23,12 +23,16 @@
 #include <linux/pwm.h>
 #include <linux/leds_pwm.h>
 #include <linux/slab.h>
+#include <linux/workqueue.h>
 
 struct led_pwm_data {
 	struct led_classdev	cdev;
 	struct pwm_device	*pwm;
+	struct work_struct	work;
 	unsigned int		active_low;
 	unsigned int		period;
+	int			duty;
+	bool			can_sleep;
 };
 
 struct led_pwm_priv {
@@ -36,6 +40,26 @@ struct led_pwm_priv {
 	struct led_pwm_data leds[0];
 };
 
+static void __led_pwm_set(struct led_pwm_data *led_dat)
+{
+	int new_duty = led_dat->duty;
+
+	pwm_config(led_dat->pwm, new_duty, led_dat->period);
+
+	if (new_duty == 0)
+		pwm_disable(led_dat->pwm);
+	else
+		pwm_enable(led_dat->pwm);
+}
+
+static void led_pwm_work(struct work_struct *work)
+{
+	struct led_pwm_data *led_dat =
+		container_of(work, struct led_pwm_data, work);
+
+	__led_pwm_set(led_dat);
+}
+
 static void led_pwm_set(struct led_classdev *led_cdev,
 	enum led_brightness brightness)
 {
@@ -44,13 +68,12 @@ static void led_pwm_set(struct led_classdev *led_cdev,
 	unsigned int max = led_dat->cdev.max_brightness;
 	unsigned int period =  led_dat->period;
 
-	if (brightness == 0) {
-		pwm_config(led_dat->pwm, 0, period);
-		pwm_disable(led_dat->pwm);
-	} else {
-		pwm_config(led_dat->pwm, brightness * period / max, period);
-		pwm_enable(led_dat->pwm);
-	}
+	led_dat->duty = brightness * period / max;
+
+	if (led_dat->can_sleep)
+		schedule_work(&led_dat->work);
+	else
+		__led_pwm_set(led_dat);
 }
 
 static inline size_t sizeof_pwm_leds_priv(int num_leds)
@@ -100,6 +123,10 @@ static struct led_pwm_priv *led_pwm_create_of(struct platform_device *pdev)
 		led_dat->cdev.brightness = LED_OFF;
 		led_dat->cdev.flags |= LED_CORE_SUSPENDRESUME;
 
+		led_dat->can_sleep = pwm_can_sleep(led_dat->pwm);
+		if (led_dat->can_sleep)
+			INIT_WORK(&led_dat->work, led_pwm_work);
+
 		ret = led_classdev_register(&pdev->dev, &led_dat->cdev);
 		if (ret < 0) {
 			dev_err(&pdev->dev, "failed to register for %s\n",
@@ -153,6 +180,10 @@ static int led_pwm_probe(struct platform_device *pdev)
 			led_dat->cdev.max_brightness = cur_led->max_brightness;
 			led_dat->cdev.flags |= LED_CORE_SUSPENDRESUME;
 
+			led_dat->can_sleep = pwm_can_sleep(led_dat->pwm);
+			if (led_dat->can_sleep)
+				INIT_WORK(&led_dat->work, led_pwm_work);
+
 			ret = led_classdev_register(&pdev->dev, &led_dat->cdev);
 			if (ret < 0)
 				goto err;
@@ -180,8 +211,11 @@ static int led_pwm_remove(struct platform_device *pdev)
 	struct led_pwm_priv *priv = platform_get_drvdata(pdev);
 	int i;
 
-	for (i = 0; i < priv->num_leds; i++)
+	for (i = 0; i < priv->num_leds; i++) {
 		led_classdev_unregister(&priv->leds[i].cdev);
+		if (priv->leds[i].can_sleep)
+			cancel_work_sync(&priv->leds[i].work);
+	}
 
 	return 0;
 }
-- 
1.7.5.4


^ permalink raw reply related	[flat|nested] 38+ messages in thread

* [PATCH v3 3/3] leds: leds-pwm: Defer led_pwm_set() if PWM can sleep
@ 2013-01-28 14:00   ` Florian Vaussard
  0 siblings, 0 replies; 38+ messages in thread
From: Florian Vaussard @ 2013-01-28 14:00 UTC (permalink / raw)
  To: linux-arm-kernel

Call to led_pwm_set() can happen inside atomic context, like triggers.
If the PWM call can sleep, defer using a worker.

Cc: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Florian Vaussard <florian.vaussard@epfl.ch>
---
 drivers/leds/leds-pwm.c |   50 +++++++++++++++++++++++++++++++++++++++-------
 1 files changed, 42 insertions(+), 8 deletions(-)

diff --git a/drivers/leds/leds-pwm.c b/drivers/leds/leds-pwm.c
index a1ea5f6..faf52c0 100644
--- a/drivers/leds/leds-pwm.c
+++ b/drivers/leds/leds-pwm.c
@@ -23,12 +23,16 @@
 #include <linux/pwm.h>
 #include <linux/leds_pwm.h>
 #include <linux/slab.h>
+#include <linux/workqueue.h>
 
 struct led_pwm_data {
 	struct led_classdev	cdev;
 	struct pwm_device	*pwm;
+	struct work_struct	work;
 	unsigned int		active_low;
 	unsigned int		period;
+	int			duty;
+	bool			can_sleep;
 };
 
 struct led_pwm_priv {
@@ -36,6 +40,26 @@ struct led_pwm_priv {
 	struct led_pwm_data leds[0];
 };
 
+static void __led_pwm_set(struct led_pwm_data *led_dat)
+{
+	int new_duty = led_dat->duty;
+
+	pwm_config(led_dat->pwm, new_duty, led_dat->period);
+
+	if (new_duty == 0)
+		pwm_disable(led_dat->pwm);
+	else
+		pwm_enable(led_dat->pwm);
+}
+
+static void led_pwm_work(struct work_struct *work)
+{
+	struct led_pwm_data *led_dat =
+		container_of(work, struct led_pwm_data, work);
+
+	__led_pwm_set(led_dat);
+}
+
 static void led_pwm_set(struct led_classdev *led_cdev,
 	enum led_brightness brightness)
 {
@@ -44,13 +68,12 @@ static void led_pwm_set(struct led_classdev *led_cdev,
 	unsigned int max = led_dat->cdev.max_brightness;
 	unsigned int period =  led_dat->period;
 
-	if (brightness == 0) {
-		pwm_config(led_dat->pwm, 0, period);
-		pwm_disable(led_dat->pwm);
-	} else {
-		pwm_config(led_dat->pwm, brightness * period / max, period);
-		pwm_enable(led_dat->pwm);
-	}
+	led_dat->duty = brightness * period / max;
+
+	if (led_dat->can_sleep)
+		schedule_work(&led_dat->work);
+	else
+		__led_pwm_set(led_dat);
 }
 
 static inline size_t sizeof_pwm_leds_priv(int num_leds)
@@ -100,6 +123,10 @@ static struct led_pwm_priv *led_pwm_create_of(struct platform_device *pdev)
 		led_dat->cdev.brightness = LED_OFF;
 		led_dat->cdev.flags |= LED_CORE_SUSPENDRESUME;
 
+		led_dat->can_sleep = pwm_can_sleep(led_dat->pwm);
+		if (led_dat->can_sleep)
+			INIT_WORK(&led_dat->work, led_pwm_work);
+
 		ret = led_classdev_register(&pdev->dev, &led_dat->cdev);
 		if (ret < 0) {
 			dev_err(&pdev->dev, "failed to register for %s\n",
@@ -153,6 +180,10 @@ static int led_pwm_probe(struct platform_device *pdev)
 			led_dat->cdev.max_brightness = cur_led->max_brightness;
 			led_dat->cdev.flags |= LED_CORE_SUSPENDRESUME;
 
+			led_dat->can_sleep = pwm_can_sleep(led_dat->pwm);
+			if (led_dat->can_sleep)
+				INIT_WORK(&led_dat->work, led_pwm_work);
+
 			ret = led_classdev_register(&pdev->dev, &led_dat->cdev);
 			if (ret < 0)
 				goto err;
@@ -180,8 +211,11 @@ static int led_pwm_remove(struct platform_device *pdev)
 	struct led_pwm_priv *priv = platform_get_drvdata(pdev);
 	int i;
 
-	for (i = 0; i < priv->num_leds; i++)
+	for (i = 0; i < priv->num_leds; i++) {
 		led_classdev_unregister(&priv->leds[i].cdev);
+		if (priv->leds[i].can_sleep)
+			cancel_work_sync(&priv->leds[i].work);
+	}
 
 	return 0;
 }
-- 
1.7.5.4

^ permalink raw reply related	[flat|nested] 38+ messages in thread

* Re: [PATCH v3 1/3] pwm: Add pwm_can_sleep() as exported API to users
  2013-01-28 14:00   ` Florian Vaussard
@ 2013-01-29  8:20     ` Peter Ujfalusi
  -1 siblings, 0 replies; 38+ messages in thread
From: Peter Ujfalusi @ 2013-01-29  8:20 UTC (permalink / raw)
  To: Florian Vaussard
  Cc: Bryan Wu, Richard Purdie, Thierry Reding, linux-leds,
	linux-arm-kernel, linux-kernel

On 01/28/2013 03:00 PM, Florian Vaussard wrote:
> Calls to some external PWM chips can sleep. To help users,
> add pwm_can_sleep() API.
> 
> Cc: Thierry Reding <thierry.reding@avionic-design.de>
> Cc: Peter Ujfalusi <peter.ujfalusi@ti.com>
> Signed-off-by: Florian Vaussard <florian.vaussard@epfl.ch>

Reviewed-by: Peter Ujfalusi <peter.ujfalusi@ti.com>

> ---
>  drivers/pwm/core.c  |   12 ++++++++++++
>  include/linux/pwm.h |   10 ++++++++++
>  2 files changed, 22 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/pwm/core.c b/drivers/pwm/core.c
> index 4a13da4..41c0b0c 100644
> --- a/drivers/pwm/core.c
> +++ b/drivers/pwm/core.c
> @@ -763,6 +763,18 @@ void devm_pwm_put(struct device *dev, struct pwm_device *pwm)
>  }
>  EXPORT_SYMBOL_GPL(devm_pwm_put);
>  
> +/**
> +  * pwm_can_sleep() - report whether PWM access will sleep
> +  * @pwm: PWM device
> +  *
> +  * It returns true if accessing the PWM can sleep, false otherwise.
> +  */
> +bool pwm_can_sleep(struct pwm_device *pwm)
> +{
> +	return pwm->chip->can_sleep;
> +}
> +EXPORT_SYMBOL_GPL(pwm_can_sleep);
> +
>  #ifdef CONFIG_DEBUG_FS
>  static void pwm_dbg_show(struct pwm_chip *chip, struct seq_file *s)
>  {
> diff --git a/include/linux/pwm.h b/include/linux/pwm.h
> index 70655a2..747c657 100644
> --- a/include/linux/pwm.h
> +++ b/include/linux/pwm.h
> @@ -146,6 +146,8 @@ struct pwm_ops {
>   * @base: number of first PWM controlled by this chip
>   * @npwm: number of PWMs controlled by this chip
>   * @pwms: array of PWM devices allocated by the framework
> + * @can_sleep: flag must be set iff config()/enable()/disable() methods sleep,
> + *      as they must while accessing PWM chips over I2C or SPI
>   */
>  struct pwm_chip {
>  	struct device		*dev;
> @@ -159,6 +161,7 @@ struct pwm_chip {
>  	struct pwm_device *	(*of_xlate)(struct pwm_chip *pc,
>  					    const struct of_phandle_args *args);
>  	unsigned int		of_pwm_n_cells;
> +	bool			can_sleep;
>  };
>  
>  #if IS_ENABLED(CONFIG_PWM)
> @@ -182,6 +185,8 @@ struct pwm_device *devm_pwm_get(struct device *dev, const char *con_id);
>  struct pwm_device *devm_of_pwm_get(struct device *dev, struct device_node *np,
>  				   const char *con_id);
>  void devm_pwm_put(struct device *dev, struct pwm_device *pwm);
> +
> +bool pwm_can_sleep(struct pwm_device *pwm);
>  #else
>  static inline int pwm_set_chip_data(struct pwm_device *pwm, void *data)
>  {
> @@ -242,6 +247,11 @@ static inline struct pwm_device *devm_of_pwm_get(struct device *dev,
>  static inline void devm_pwm_put(struct device *dev, struct pwm_device *pwm)
>  {
>  }
> +
> +static inline bool pwm_can_sleep(struct pwm_device *pwm)
> +{
> +	return false;
> +}
>  #endif
>  
>  struct pwm_lookup {
> 


-- 
Péter

^ permalink raw reply	[flat|nested] 38+ messages in thread

* [PATCH v3 1/3] pwm: Add pwm_can_sleep() as exported API to users
@ 2013-01-29  8:20     ` Peter Ujfalusi
  0 siblings, 0 replies; 38+ messages in thread
From: Peter Ujfalusi @ 2013-01-29  8:20 UTC (permalink / raw)
  To: linux-arm-kernel

On 01/28/2013 03:00 PM, Florian Vaussard wrote:
> Calls to some external PWM chips can sleep. To help users,
> add pwm_can_sleep() API.
> 
> Cc: Thierry Reding <thierry.reding@avionic-design.de>
> Cc: Peter Ujfalusi <peter.ujfalusi@ti.com>
> Signed-off-by: Florian Vaussard <florian.vaussard@epfl.ch>

Reviewed-by: Peter Ujfalusi <peter.ujfalusi@ti.com>

> ---
>  drivers/pwm/core.c  |   12 ++++++++++++
>  include/linux/pwm.h |   10 ++++++++++
>  2 files changed, 22 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/pwm/core.c b/drivers/pwm/core.c
> index 4a13da4..41c0b0c 100644
> --- a/drivers/pwm/core.c
> +++ b/drivers/pwm/core.c
> @@ -763,6 +763,18 @@ void devm_pwm_put(struct device *dev, struct pwm_device *pwm)
>  }
>  EXPORT_SYMBOL_GPL(devm_pwm_put);
>  
> +/**
> +  * pwm_can_sleep() - report whether PWM access will sleep
> +  * @pwm: PWM device
> +  *
> +  * It returns true if accessing the PWM can sleep, false otherwise.
> +  */
> +bool pwm_can_sleep(struct pwm_device *pwm)
> +{
> +	return pwm->chip->can_sleep;
> +}
> +EXPORT_SYMBOL_GPL(pwm_can_sleep);
> +
>  #ifdef CONFIG_DEBUG_FS
>  static void pwm_dbg_show(struct pwm_chip *chip, struct seq_file *s)
>  {
> diff --git a/include/linux/pwm.h b/include/linux/pwm.h
> index 70655a2..747c657 100644
> --- a/include/linux/pwm.h
> +++ b/include/linux/pwm.h
> @@ -146,6 +146,8 @@ struct pwm_ops {
>   * @base: number of first PWM controlled by this chip
>   * @npwm: number of PWMs controlled by this chip
>   * @pwms: array of PWM devices allocated by the framework
> + * @can_sleep: flag must be set iff config()/enable()/disable() methods sleep,
> + *      as they must while accessing PWM chips over I2C or SPI
>   */
>  struct pwm_chip {
>  	struct device		*dev;
> @@ -159,6 +161,7 @@ struct pwm_chip {
>  	struct pwm_device *	(*of_xlate)(struct pwm_chip *pc,
>  					    const struct of_phandle_args *args);
>  	unsigned int		of_pwm_n_cells;
> +	bool			can_sleep;
>  };
>  
>  #if IS_ENABLED(CONFIG_PWM)
> @@ -182,6 +185,8 @@ struct pwm_device *devm_pwm_get(struct device *dev, const char *con_id);
>  struct pwm_device *devm_of_pwm_get(struct device *dev, struct device_node *np,
>  				   const char *con_id);
>  void devm_pwm_put(struct device *dev, struct pwm_device *pwm);
> +
> +bool pwm_can_sleep(struct pwm_device *pwm);
>  #else
>  static inline int pwm_set_chip_data(struct pwm_device *pwm, void *data)
>  {
> @@ -242,6 +247,11 @@ static inline struct pwm_device *devm_of_pwm_get(struct device *dev,
>  static inline void devm_pwm_put(struct device *dev, struct pwm_device *pwm)
>  {
>  }
> +
> +static inline bool pwm_can_sleep(struct pwm_device *pwm)
> +{
> +	return false;
> +}
>  #endif
>  
>  struct pwm_lookup {
> 


-- 
P?ter

^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: [PATCH v3 3/3] leds: leds-pwm: Defer led_pwm_set() if PWM can sleep
  2013-01-28 14:00   ` Florian Vaussard
@ 2013-01-29  8:20     ` Peter Ujfalusi
  -1 siblings, 0 replies; 38+ messages in thread
From: Peter Ujfalusi @ 2013-01-29  8:20 UTC (permalink / raw)
  To: Florian Vaussard
  Cc: Bryan Wu, Richard Purdie, Thierry Reding, linux-leds,
	linux-arm-kernel, linux-kernel

On 01/28/2013 03:00 PM, Florian Vaussard wrote:
> Call to led_pwm_set() can happen inside atomic context, like triggers.
> If the PWM call can sleep, defer using a worker.
> 
> Cc: Peter Ujfalusi <peter.ujfalusi@ti.com>
> Signed-off-by: Florian Vaussard <florian.vaussard@epfl.ch>

Reviewed-by: Peter Ujfalusi <peter.ujfalusi@ti.com>

> ---
>  drivers/leds/leds-pwm.c |   50 +++++++++++++++++++++++++++++++++++++++-------
>  1 files changed, 42 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/leds/leds-pwm.c b/drivers/leds/leds-pwm.c
> index a1ea5f6..faf52c0 100644
> --- a/drivers/leds/leds-pwm.c
> +++ b/drivers/leds/leds-pwm.c
> @@ -23,12 +23,16 @@
>  #include <linux/pwm.h>
>  #include <linux/leds_pwm.h>
>  #include <linux/slab.h>
> +#include <linux/workqueue.h>
>  
>  struct led_pwm_data {
>  	struct led_classdev	cdev;
>  	struct pwm_device	*pwm;
> +	struct work_struct	work;
>  	unsigned int		active_low;
>  	unsigned int		period;
> +	int			duty;
> +	bool			can_sleep;
>  };
>  
>  struct led_pwm_priv {
> @@ -36,6 +40,26 @@ struct led_pwm_priv {
>  	struct led_pwm_data leds[0];
>  };
>  
> +static void __led_pwm_set(struct led_pwm_data *led_dat)
> +{
> +	int new_duty = led_dat->duty;
> +
> +	pwm_config(led_dat->pwm, new_duty, led_dat->period);
> +
> +	if (new_duty == 0)
> +		pwm_disable(led_dat->pwm);
> +	else
> +		pwm_enable(led_dat->pwm);
> +}
> +
> +static void led_pwm_work(struct work_struct *work)
> +{
> +	struct led_pwm_data *led_dat =
> +		container_of(work, struct led_pwm_data, work);
> +
> +	__led_pwm_set(led_dat);
> +}
> +
>  static void led_pwm_set(struct led_classdev *led_cdev,
>  	enum led_brightness brightness)
>  {
> @@ -44,13 +68,12 @@ static void led_pwm_set(struct led_classdev *led_cdev,
>  	unsigned int max = led_dat->cdev.max_brightness;
>  	unsigned int period =  led_dat->period;
>  
> -	if (brightness == 0) {
> -		pwm_config(led_dat->pwm, 0, period);
> -		pwm_disable(led_dat->pwm);
> -	} else {
> -		pwm_config(led_dat->pwm, brightness * period / max, period);
> -		pwm_enable(led_dat->pwm);
> -	}
> +	led_dat->duty = brightness * period / max;
> +
> +	if (led_dat->can_sleep)
> +		schedule_work(&led_dat->work);
> +	else
> +		__led_pwm_set(led_dat);
>  }
>  
>  static inline size_t sizeof_pwm_leds_priv(int num_leds)
> @@ -100,6 +123,10 @@ static struct led_pwm_priv *led_pwm_create_of(struct platform_device *pdev)
>  		led_dat->cdev.brightness = LED_OFF;
>  		led_dat->cdev.flags |= LED_CORE_SUSPENDRESUME;
>  
> +		led_dat->can_sleep = pwm_can_sleep(led_dat->pwm);
> +		if (led_dat->can_sleep)
> +			INIT_WORK(&led_dat->work, led_pwm_work);
> +
>  		ret = led_classdev_register(&pdev->dev, &led_dat->cdev);
>  		if (ret < 0) {
>  			dev_err(&pdev->dev, "failed to register for %s\n",
> @@ -153,6 +180,10 @@ static int led_pwm_probe(struct platform_device *pdev)
>  			led_dat->cdev.max_brightness = cur_led->max_brightness;
>  			led_dat->cdev.flags |= LED_CORE_SUSPENDRESUME;
>  
> +			led_dat->can_sleep = pwm_can_sleep(led_dat->pwm);
> +			if (led_dat->can_sleep)
> +				INIT_WORK(&led_dat->work, led_pwm_work);
> +
>  			ret = led_classdev_register(&pdev->dev, &led_dat->cdev);
>  			if (ret < 0)
>  				goto err;
> @@ -180,8 +211,11 @@ static int led_pwm_remove(struct platform_device *pdev)
>  	struct led_pwm_priv *priv = platform_get_drvdata(pdev);
>  	int i;
>  
> -	for (i = 0; i < priv->num_leds; i++)
> +	for (i = 0; i < priv->num_leds; i++) {
>  		led_classdev_unregister(&priv->leds[i].cdev);
> +		if (priv->leds[i].can_sleep)
> +			cancel_work_sync(&priv->leds[i].work);
> +	}
>  
>  	return 0;
>  }
> 


-- 
Péter

^ permalink raw reply	[flat|nested] 38+ messages in thread

* [PATCH v3 3/3] leds: leds-pwm: Defer led_pwm_set() if PWM can sleep
@ 2013-01-29  8:20     ` Peter Ujfalusi
  0 siblings, 0 replies; 38+ messages in thread
From: Peter Ujfalusi @ 2013-01-29  8:20 UTC (permalink / raw)
  To: linux-arm-kernel

On 01/28/2013 03:00 PM, Florian Vaussard wrote:
> Call to led_pwm_set() can happen inside atomic context, like triggers.
> If the PWM call can sleep, defer using a worker.
> 
> Cc: Peter Ujfalusi <peter.ujfalusi@ti.com>
> Signed-off-by: Florian Vaussard <florian.vaussard@epfl.ch>

Reviewed-by: Peter Ujfalusi <peter.ujfalusi@ti.com>

> ---
>  drivers/leds/leds-pwm.c |   50 +++++++++++++++++++++++++++++++++++++++-------
>  1 files changed, 42 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/leds/leds-pwm.c b/drivers/leds/leds-pwm.c
> index a1ea5f6..faf52c0 100644
> --- a/drivers/leds/leds-pwm.c
> +++ b/drivers/leds/leds-pwm.c
> @@ -23,12 +23,16 @@
>  #include <linux/pwm.h>
>  #include <linux/leds_pwm.h>
>  #include <linux/slab.h>
> +#include <linux/workqueue.h>
>  
>  struct led_pwm_data {
>  	struct led_classdev	cdev;
>  	struct pwm_device	*pwm;
> +	struct work_struct	work;
>  	unsigned int		active_low;
>  	unsigned int		period;
> +	int			duty;
> +	bool			can_sleep;
>  };
>  
>  struct led_pwm_priv {
> @@ -36,6 +40,26 @@ struct led_pwm_priv {
>  	struct led_pwm_data leds[0];
>  };
>  
> +static void __led_pwm_set(struct led_pwm_data *led_dat)
> +{
> +	int new_duty = led_dat->duty;
> +
> +	pwm_config(led_dat->pwm, new_duty, led_dat->period);
> +
> +	if (new_duty == 0)
> +		pwm_disable(led_dat->pwm);
> +	else
> +		pwm_enable(led_dat->pwm);
> +}
> +
> +static void led_pwm_work(struct work_struct *work)
> +{
> +	struct led_pwm_data *led_dat =
> +		container_of(work, struct led_pwm_data, work);
> +
> +	__led_pwm_set(led_dat);
> +}
> +
>  static void led_pwm_set(struct led_classdev *led_cdev,
>  	enum led_brightness brightness)
>  {
> @@ -44,13 +68,12 @@ static void led_pwm_set(struct led_classdev *led_cdev,
>  	unsigned int max = led_dat->cdev.max_brightness;
>  	unsigned int period =  led_dat->period;
>  
> -	if (brightness == 0) {
> -		pwm_config(led_dat->pwm, 0, period);
> -		pwm_disable(led_dat->pwm);
> -	} else {
> -		pwm_config(led_dat->pwm, brightness * period / max, period);
> -		pwm_enable(led_dat->pwm);
> -	}
> +	led_dat->duty = brightness * period / max;
> +
> +	if (led_dat->can_sleep)
> +		schedule_work(&led_dat->work);
> +	else
> +		__led_pwm_set(led_dat);
>  }
>  
>  static inline size_t sizeof_pwm_leds_priv(int num_leds)
> @@ -100,6 +123,10 @@ static struct led_pwm_priv *led_pwm_create_of(struct platform_device *pdev)
>  		led_dat->cdev.brightness = LED_OFF;
>  		led_dat->cdev.flags |= LED_CORE_SUSPENDRESUME;
>  
> +		led_dat->can_sleep = pwm_can_sleep(led_dat->pwm);
> +		if (led_dat->can_sleep)
> +			INIT_WORK(&led_dat->work, led_pwm_work);
> +
>  		ret = led_classdev_register(&pdev->dev, &led_dat->cdev);
>  		if (ret < 0) {
>  			dev_err(&pdev->dev, "failed to register for %s\n",
> @@ -153,6 +180,10 @@ static int led_pwm_probe(struct platform_device *pdev)
>  			led_dat->cdev.max_brightness = cur_led->max_brightness;
>  			led_dat->cdev.flags |= LED_CORE_SUSPENDRESUME;
>  
> +			led_dat->can_sleep = pwm_can_sleep(led_dat->pwm);
> +			if (led_dat->can_sleep)
> +				INIT_WORK(&led_dat->work, led_pwm_work);
> +
>  			ret = led_classdev_register(&pdev->dev, &led_dat->cdev);
>  			if (ret < 0)
>  				goto err;
> @@ -180,8 +211,11 @@ static int led_pwm_remove(struct platform_device *pdev)
>  	struct led_pwm_priv *priv = platform_get_drvdata(pdev);
>  	int i;
>  
> -	for (i = 0; i < priv->num_leds; i++)
> +	for (i = 0; i < priv->num_leds; i++) {
>  		led_classdev_unregister(&priv->leds[i].cdev);
> +		if (priv->leds[i].can_sleep)
> +			cancel_work_sync(&priv->leds[i].work);
> +	}
>  
>  	return 0;
>  }
> 


-- 
P?ter

^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: [PATCH v3 1/3] pwm: Add pwm_can_sleep() as exported API to users
  2013-01-28 14:00   ` Florian Vaussard
@ 2013-01-30  8:14     ` Thierry Reding
  -1 siblings, 0 replies; 38+ messages in thread
From: Thierry Reding @ 2013-01-30  8:14 UTC (permalink / raw)
  To: Florian Vaussard
  Cc: Bryan Wu, Richard Purdie, Peter Ujfalusi, linux-leds,
	linux-arm-kernel, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 550 bytes --]

On Mon, Jan 28, 2013 at 03:00:57PM +0100, Florian Vaussard wrote:
> Calls to some external PWM chips can sleep. To help users,
> add pwm_can_sleep() API.
> 
> Cc: Thierry Reding <thierry.reding@avionic-design.de>
> Cc: Peter Ujfalusi <peter.ujfalusi@ti.com>
> Signed-off-by: Florian Vaussard <florian.vaussard@epfl.ch>
> ---
>  drivers/pwm/core.c  |   12 ++++++++++++
>  include/linux/pwm.h |   10 ++++++++++
>  2 files changed, 22 insertions(+), 0 deletions(-)

Applied (with a minor fixup to the kerneldoc comment), thanks.

Thierry

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 38+ messages in thread

* [PATCH v3 1/3] pwm: Add pwm_can_sleep() as exported API to users
@ 2013-01-30  8:14     ` Thierry Reding
  0 siblings, 0 replies; 38+ messages in thread
From: Thierry Reding @ 2013-01-30  8:14 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Jan 28, 2013 at 03:00:57PM +0100, Florian Vaussard wrote:
> Calls to some external PWM chips can sleep. To help users,
> add pwm_can_sleep() API.
> 
> Cc: Thierry Reding <thierry.reding@avionic-design.de>
> Cc: Peter Ujfalusi <peter.ujfalusi@ti.com>
> Signed-off-by: Florian Vaussard <florian.vaussard@epfl.ch>
> ---
>  drivers/pwm/core.c  |   12 ++++++++++++
>  include/linux/pwm.h |   10 ++++++++++
>  2 files changed, 22 insertions(+), 0 deletions(-)

Applied (with a minor fixup to the kerneldoc comment), thanks.

Thierry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20130130/ea77a483/attachment.sig>

^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: [PATCH v3 2/3] pwm: Add can_sleep property to drivers
  2013-01-28 14:00   ` Florian Vaussard
@ 2013-01-30  8:15     ` Thierry Reding
  -1 siblings, 0 replies; 38+ messages in thread
From: Thierry Reding @ 2013-01-30  8:15 UTC (permalink / raw)
  To: Florian Vaussard
  Cc: Bryan Wu, Richard Purdie, Peter Ujfalusi, linux-leds,
	linux-arm-kernel, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 446 bytes --]

On Mon, Jan 28, 2013 at 03:00:58PM +0100, Florian Vaussard wrote:
> Calls to PWM drivers connected through I2C can sleep.
> Use the new can_sleep property.
> 
> Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
> Signed-off-by: Florian Vaussard <florian.vaussard@epfl.ch>
> ---
>  drivers/pwm/pwm-twl-led.c |    1 +
>  drivers/pwm/pwm-twl.c     |    1 +
>  2 files changed, 2 insertions(+), 0 deletions(-)

Applied, thanks.

Thierry

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 38+ messages in thread

* [PATCH v3 2/3] pwm: Add can_sleep property to drivers
@ 2013-01-30  8:15     ` Thierry Reding
  0 siblings, 0 replies; 38+ messages in thread
From: Thierry Reding @ 2013-01-30  8:15 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Jan 28, 2013 at 03:00:58PM +0100, Florian Vaussard wrote:
> Calls to PWM drivers connected through I2C can sleep.
> Use the new can_sleep property.
> 
> Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
> Signed-off-by: Florian Vaussard <florian.vaussard@epfl.ch>
> ---
>  drivers/pwm/pwm-twl-led.c |    1 +
>  drivers/pwm/pwm-twl.c     |    1 +
>  2 files changed, 2 insertions(+), 0 deletions(-)

Applied, thanks.

Thierry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20130130/a2d8738d/attachment.sig>

^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: [PATCH v3 3/3] leds: leds-pwm: Defer led_pwm_set() if PWM can sleep
  2013-01-28 14:00   ` Florian Vaussard
@ 2013-01-30  8:17     ` Thierry Reding
  -1 siblings, 0 replies; 38+ messages in thread
From: Thierry Reding @ 2013-01-30  8:17 UTC (permalink / raw)
  To: Florian Vaussard
  Cc: Bryan Wu, Richard Purdie, Peter Ujfalusi, linux-leds,
	linux-arm-kernel, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 718 bytes --]

On Mon, Jan 28, 2013 at 03:00:59PM +0100, Florian Vaussard wrote:
> Call to led_pwm_set() can happen inside atomic context, like triggers.
> If the PWM call can sleep, defer using a worker.
> 
> Cc: Peter Ujfalusi <peter.ujfalusi@ti.com>
> Signed-off-by: Florian Vaussard <florian.vaussard@epfl.ch>
> ---
>  drivers/leds/leds-pwm.c |   50 +++++++++++++++++++++++++++++++++++++++-------
>  1 files changed, 42 insertions(+), 8 deletions(-)

Bryan, I assume that you'll be taking this? It doesn't apply cleanly to
my tree, probably because of Peter's recent changes that you took
through your tree and Florian based his patches on top of that. The
conflict resolution should be trivial, though.

Thierry

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 38+ messages in thread

* [PATCH v3 3/3] leds: leds-pwm: Defer led_pwm_set() if PWM can sleep
@ 2013-01-30  8:17     ` Thierry Reding
  0 siblings, 0 replies; 38+ messages in thread
From: Thierry Reding @ 2013-01-30  8:17 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Jan 28, 2013 at 03:00:59PM +0100, Florian Vaussard wrote:
> Call to led_pwm_set() can happen inside atomic context, like triggers.
> If the PWM call can sleep, defer using a worker.
> 
> Cc: Peter Ujfalusi <peter.ujfalusi@ti.com>
> Signed-off-by: Florian Vaussard <florian.vaussard@epfl.ch>
> ---
>  drivers/leds/leds-pwm.c |   50 +++++++++++++++++++++++++++++++++++++++-------
>  1 files changed, 42 insertions(+), 8 deletions(-)

Bryan, I assume that you'll be taking this? It doesn't apply cleanly to
my tree, probably because of Peter's recent changes that you took
through your tree and Florian based his patches on top of that. The
conflict resolution should be trivial, though.

Thierry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20130130/68110b04/attachment.sig>

^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: [PATCH v3 3/3] leds: leds-pwm: Defer led_pwm_set() if PWM can sleep
  2013-01-30  8:17     ` Thierry Reding
@ 2013-02-04  8:53       ` Florian Vaussard
  -1 siblings, 0 replies; 38+ messages in thread
From: Florian Vaussard @ 2013-02-04  8:53 UTC (permalink / raw)
  To: Thierry Reding, Bryan Wu
  Cc: Richard Purdie, Peter Ujfalusi, linux-leds, linux-arm-kernel,
	linux-kernel

On 01/30/2013 09:17 AM, Thierry Reding wrote:
> On Mon, Jan 28, 2013 at 03:00:59PM +0100, Florian Vaussard wrote:
>> Call to led_pwm_set() can happen inside atomic context, like triggers.
>> If the PWM call can sleep, defer using a worker.
>>
>> Cc: Peter Ujfalusi <peter.ujfalusi@ti.com>
>> Signed-off-by: Florian Vaussard <florian.vaussard@epfl.ch>
>> ---
>>   drivers/leds/leds-pwm.c |   50 +++++++++++++++++++++++++++++++++++++++-------
>>   1 files changed, 42 insertions(+), 8 deletions(-)
>
> Bryan, I assume that you'll be taking this? It doesn't apply cleanly to
> my tree, probably because of Peter's recent changes that you took
> through your tree and Florian based his patches on top of that. The
> conflict resolution should be trivial, though.
>

Thank you Thierry. Indeed, this patchset was based on linux-leds due to the
dependancy with Peter's patches.

Bryan, can you take this patch?

Regards,

Florian


^ permalink raw reply	[flat|nested] 38+ messages in thread

* [PATCH v3 3/3] leds: leds-pwm: Defer led_pwm_set() if PWM can sleep
@ 2013-02-04  8:53       ` Florian Vaussard
  0 siblings, 0 replies; 38+ messages in thread
From: Florian Vaussard @ 2013-02-04  8:53 UTC (permalink / raw)
  To: linux-arm-kernel

On 01/30/2013 09:17 AM, Thierry Reding wrote:
> On Mon, Jan 28, 2013 at 03:00:59PM +0100, Florian Vaussard wrote:
>> Call to led_pwm_set() can happen inside atomic context, like triggers.
>> If the PWM call can sleep, defer using a worker.
>>
>> Cc: Peter Ujfalusi <peter.ujfalusi@ti.com>
>> Signed-off-by: Florian Vaussard <florian.vaussard@epfl.ch>
>> ---
>>   drivers/leds/leds-pwm.c |   50 +++++++++++++++++++++++++++++++++++++++-------
>>   1 files changed, 42 insertions(+), 8 deletions(-)
>
> Bryan, I assume that you'll be taking this? It doesn't apply cleanly to
> my tree, probably because of Peter's recent changes that you took
> through your tree and Florian based his patches on top of that. The
> conflict resolution should be trivial, though.
>

Thank you Thierry. Indeed, this patchset was based on linux-leds due to the
dependancy with Peter's patches.

Bryan, can you take this patch?

Regards,

Florian

^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: [PATCH v3 3/3] leds: leds-pwm: Defer led_pwm_set() if PWM can sleep
  2013-01-30  8:17     ` Thierry Reding
@ 2013-02-27 16:08       ` Florian Vaussard
  -1 siblings, 0 replies; 38+ messages in thread
From: Florian Vaussard @ 2013-02-27 16:08 UTC (permalink / raw)
  To: Bryan Wu
  Cc: Thierry Reding, Richard Purdie, Peter Ujfalusi, linux-leds,
	linux-arm-kernel, linux-kernel

Hi Bryan,

On 01/30/2013 09:17 AM, Thierry Reding wrote:
> On Mon, Jan 28, 2013 at 03:00:59PM +0100, Florian Vaussard wrote:
>> Call to led_pwm_set() can happen inside atomic context, like triggers.
>> If the PWM call can sleep, defer using a worker.
>>
>> Cc: Peter Ujfalusi <peter.ujfalusi@ti.com>
>> Signed-off-by: Florian Vaussard <florian.vaussard@epfl.ch>
>> ---
>>   drivers/leds/leds-pwm.c |   50 +++++++++++++++++++++++++++++++++++++++-------
>>   1 files changed, 42 insertions(+), 8 deletions(-)
>
> Bryan, I assume that you'll be taking this? It doesn't apply cleanly to
> my tree, probably because of Peter's recent changes that you took
> through your tree and Florian based his patches on top of that. The
> conflict resolution should be trivial, though.
>

It seems that this patch was not taken. Could you pull it, as the other
part is already in linux-pwm? Or is there any show stopper?

Many thanks.

Florian

^ permalink raw reply	[flat|nested] 38+ messages in thread

* [PATCH v3 3/3] leds: leds-pwm: Defer led_pwm_set() if PWM can sleep
@ 2013-02-27 16:08       ` Florian Vaussard
  0 siblings, 0 replies; 38+ messages in thread
From: Florian Vaussard @ 2013-02-27 16:08 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Bryan,

On 01/30/2013 09:17 AM, Thierry Reding wrote:
> On Mon, Jan 28, 2013 at 03:00:59PM +0100, Florian Vaussard wrote:
>> Call to led_pwm_set() can happen inside atomic context, like triggers.
>> If the PWM call can sleep, defer using a worker.
>>
>> Cc: Peter Ujfalusi <peter.ujfalusi@ti.com>
>> Signed-off-by: Florian Vaussard <florian.vaussard@epfl.ch>
>> ---
>>   drivers/leds/leds-pwm.c |   50 +++++++++++++++++++++++++++++++++++++++-------
>>   1 files changed, 42 insertions(+), 8 deletions(-)
>
> Bryan, I assume that you'll be taking this? It doesn't apply cleanly to
> my tree, probably because of Peter's recent changes that you took
> through your tree and Florian based his patches on top of that. The
> conflict resolution should be trivial, though.
>

It seems that this patch was not taken. Could you pull it, as the other
part is already in linux-pwm? Or is there any show stopper?

Many thanks.

Florian

^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: [PATCH v3 3/3] leds: leds-pwm: Defer led_pwm_set() if PWM can sleep
  2013-02-27 16:08       ` Florian Vaussard
@ 2013-03-04 10:44         ` Florian Vaussard
  -1 siblings, 0 replies; 38+ messages in thread
From: Florian Vaussard @ 2013-03-04 10:44 UTC (permalink / raw)
  To: Bryan Wu, Richard Purdie
  Cc: Thierry Reding, Peter Ujfalusi, linux-leds, linux-arm-kernel,
	linux-kernel

Hi Bryan, Richard,

> On 01/30/2013 09:17 AM, Thierry Reding wrote:
>> On Mon, Jan 28, 2013 at 03:00:59PM +0100, Florian Vaussard wrote:
>>> Call to led_pwm_set() can happen inside atomic context, like triggers.
>>> If the PWM call can sleep, defer using a worker.
>>>
>>> Cc: Peter Ujfalusi <peter.ujfalusi@ti.com>
>>> Signed-off-by: Florian Vaussard <florian.vaussard@epfl.ch>
>>> ---
>>>   drivers/leds/leds-pwm.c |   50
>>> +++++++++++++++++++++++++++++++++++++++-------
>>>   1 files changed, 42 insertions(+), 8 deletions(-)
>>
>> Bryan, I assume that you'll be taking this? It doesn't apply cleanly to
>> my tree, probably because of Peter's recent changes that you took
>> through your tree and Florian based his patches on top of that. The
>> conflict resolution should be trivial, though.
>>
>
> It seems that this patch was not taken. Could you pull it, as the other
> part is already in linux-pwm? Or is there any show stopper?
>

Ping? Who should merge this?

Many thanks!

Florian

^ permalink raw reply	[flat|nested] 38+ messages in thread

* [PATCH v3 3/3] leds: leds-pwm: Defer led_pwm_set() if PWM can sleep
@ 2013-03-04 10:44         ` Florian Vaussard
  0 siblings, 0 replies; 38+ messages in thread
From: Florian Vaussard @ 2013-03-04 10:44 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Bryan, Richard,

> On 01/30/2013 09:17 AM, Thierry Reding wrote:
>> On Mon, Jan 28, 2013 at 03:00:59PM +0100, Florian Vaussard wrote:
>>> Call to led_pwm_set() can happen inside atomic context, like triggers.
>>> If the PWM call can sleep, defer using a worker.
>>>
>>> Cc: Peter Ujfalusi <peter.ujfalusi@ti.com>
>>> Signed-off-by: Florian Vaussard <florian.vaussard@epfl.ch>
>>> ---
>>>   drivers/leds/leds-pwm.c |   50
>>> +++++++++++++++++++++++++++++++++++++++-------
>>>   1 files changed, 42 insertions(+), 8 deletions(-)
>>
>> Bryan, I assume that you'll be taking this? It doesn't apply cleanly to
>> my tree, probably because of Peter's recent changes that you took
>> through your tree and Florian based his patches on top of that. The
>> conflict resolution should be trivial, though.
>>
>
> It seems that this patch was not taken. Could you pull it, as the other
> part is already in linux-pwm? Or is there any show stopper?
>

Ping? Who should merge this?

Many thanks!

Florian

^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: [PATCH v3 3/3] leds: leds-pwm: Defer led_pwm_set() if PWM can sleep
  2013-03-04 10:44         ` Florian Vaussard
@ 2013-03-04 10:58           ` Thierry Reding
  -1 siblings, 0 replies; 38+ messages in thread
From: Thierry Reding @ 2013-03-04 10:58 UTC (permalink / raw)
  To: Florian Vaussard
  Cc: Bryan Wu, Richard Purdie, Peter Ujfalusi, linux-leds,
	linux-arm-kernel, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1218 bytes --]

On Mon, Mar 04, 2013 at 11:44:22AM +0100, Florian Vaussard wrote:
> Hi Bryan, Richard,
> 
> >On 01/30/2013 09:17 AM, Thierry Reding wrote:
> >>On Mon, Jan 28, 2013 at 03:00:59PM +0100, Florian Vaussard wrote:
> >>>Call to led_pwm_set() can happen inside atomic context, like triggers.
> >>>If the PWM call can sleep, defer using a worker.
> >>>
> >>>Cc: Peter Ujfalusi <peter.ujfalusi@ti.com>
> >>>Signed-off-by: Florian Vaussard <florian.vaussard@epfl.ch>
> >>>---
> >>>  drivers/leds/leds-pwm.c |   50
> >>>+++++++++++++++++++++++++++++++++++++++-------
> >>>  1 files changed, 42 insertions(+), 8 deletions(-)
> >>
> >>Bryan, I assume that you'll be taking this? It doesn't apply cleanly to
> >>my tree, probably because of Peter's recent changes that you took
> >>through your tree and Florian based his patches on top of that. The
> >>conflict resolution should be trivial, though.
> >>
> >
> >It seems that this patch was not taken. Could you pull it, as the other
> >part is already in linux-pwm? Or is there any show stopper?
> >
> 
> Ping? Who should merge this?

I assume Bryan will take it through the LED tree? Patches 1 & 2 went
into v3.9-rc1 through the PWM tree.

Thierry

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 38+ messages in thread

* [PATCH v3 3/3] leds: leds-pwm: Defer led_pwm_set() if PWM can sleep
@ 2013-03-04 10:58           ` Thierry Reding
  0 siblings, 0 replies; 38+ messages in thread
From: Thierry Reding @ 2013-03-04 10:58 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Mar 04, 2013 at 11:44:22AM +0100, Florian Vaussard wrote:
> Hi Bryan, Richard,
> 
> >On 01/30/2013 09:17 AM, Thierry Reding wrote:
> >>On Mon, Jan 28, 2013 at 03:00:59PM +0100, Florian Vaussard wrote:
> >>>Call to led_pwm_set() can happen inside atomic context, like triggers.
> >>>If the PWM call can sleep, defer using a worker.
> >>>
> >>>Cc: Peter Ujfalusi <peter.ujfalusi@ti.com>
> >>>Signed-off-by: Florian Vaussard <florian.vaussard@epfl.ch>
> >>>---
> >>>  drivers/leds/leds-pwm.c |   50
> >>>+++++++++++++++++++++++++++++++++++++++-------
> >>>  1 files changed, 42 insertions(+), 8 deletions(-)
> >>
> >>Bryan, I assume that you'll be taking this? It doesn't apply cleanly to
> >>my tree, probably because of Peter's recent changes that you took
> >>through your tree and Florian based his patches on top of that. The
> >>conflict resolution should be trivial, though.
> >>
> >
> >It seems that this patch was not taken. Could you pull it, as the other
> >part is already in linux-pwm? Or is there any show stopper?
> >
> 
> Ping? Who should merge this?

I assume Bryan will take it through the LED tree? Patches 1 & 2 went
into v3.9-rc1 through the PWM tree.

Thierry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20130304/d8be0d3b/attachment.sig>

^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: [PATCH v3 3/3] leds: leds-pwm: Defer led_pwm_set() if PWM can sleep
  2013-03-04 10:58           ` Thierry Reding
@ 2013-03-05 15:39             ` Florian Vaussard
  -1 siblings, 0 replies; 38+ messages in thread
From: Florian Vaussard @ 2013-03-05 15:39 UTC (permalink / raw)
  To: Thierry Reding
  Cc: Bryan Wu, Richard Purdie, Peter Ujfalusi, linux-leds,
	linux-arm-kernel, linux-kernel, Florian Vaussard


On 03/04/2013 11:58 AM, Thierry Reding wrote:
> On Mon, Mar 04, 2013 at 11:44:22AM +0100, Florian Vaussard wrote:
>> Hi Bryan, Richard,
>>
>>> On 01/30/2013 09:17 AM, Thierry Reding wrote:
>>>> On Mon, Jan 28, 2013 at 03:00:59PM +0100, Florian Vaussard wrote:
>>>>> Call to led_pwm_set() can happen inside atomic context, like triggers.
>>>>> If the PWM call can sleep, defer using a worker.
>>>>>
>>>>> Cc: Peter Ujfalusi <peter.ujfalusi@ti.com>
>>>>> Signed-off-by: Florian Vaussard <florian.vaussard@epfl.ch>
>>>>> ---
>>>>>   drivers/leds/leds-pwm.c |   50
>>>>> +++++++++++++++++++++++++++++++++++++++-------
>>>>>   1 files changed, 42 insertions(+), 8 deletions(-)
>>>>
>>>> Bryan, I assume that you'll be taking this? It doesn't apply cleanly to
>>>> my tree, probably because of Peter's recent changes that you took
>>>> through your tree and Florian based his patches on top of that. The
>>>> conflict resolution should be trivial, though.
>>>>
>>>
>>> It seems that this patch was not taken. Could you pull it, as the other
>>> part is already in linux-pwm? Or is there any show stopper?
>>>
>>
>> Ping? Who should merge this?
>
> I assume Bryan will take it through the LED tree? Patches 1 & 2 went
> into v3.9-rc1 through the PWM tree.
>

This was also my assumption, but I never got the feedback from Brian on 
this patch.
The crach is still there, and the patch missed the merge window :)

Cheers,

Florian

^ permalink raw reply	[flat|nested] 38+ messages in thread

* [PATCH v3 3/3] leds: leds-pwm: Defer led_pwm_set() if PWM can sleep
@ 2013-03-05 15:39             ` Florian Vaussard
  0 siblings, 0 replies; 38+ messages in thread
From: Florian Vaussard @ 2013-03-05 15:39 UTC (permalink / raw)
  To: linux-arm-kernel


On 03/04/2013 11:58 AM, Thierry Reding wrote:
> On Mon, Mar 04, 2013 at 11:44:22AM +0100, Florian Vaussard wrote:
>> Hi Bryan, Richard,
>>
>>> On 01/30/2013 09:17 AM, Thierry Reding wrote:
>>>> On Mon, Jan 28, 2013 at 03:00:59PM +0100, Florian Vaussard wrote:
>>>>> Call to led_pwm_set() can happen inside atomic context, like triggers.
>>>>> If the PWM call can sleep, defer using a worker.
>>>>>
>>>>> Cc: Peter Ujfalusi <peter.ujfalusi@ti.com>
>>>>> Signed-off-by: Florian Vaussard <florian.vaussard@epfl.ch>
>>>>> ---
>>>>>   drivers/leds/leds-pwm.c |   50
>>>>> +++++++++++++++++++++++++++++++++++++++-------
>>>>>   1 files changed, 42 insertions(+), 8 deletions(-)
>>>>
>>>> Bryan, I assume that you'll be taking this? It doesn't apply cleanly to
>>>> my tree, probably because of Peter's recent changes that you took
>>>> through your tree and Florian based his patches on top of that. The
>>>> conflict resolution should be trivial, though.
>>>>
>>>
>>> It seems that this patch was not taken. Could you pull it, as the other
>>> part is already in linux-pwm? Or is there any show stopper?
>>>
>>
>> Ping? Who should merge this?
>
> I assume Bryan will take it through the LED tree? Patches 1 & 2 went
> into v3.9-rc1 through the PWM tree.
>

This was also my assumption, but I never got the feedback from Brian on 
this patch.
The crach is still there, and the patch missed the merge window :)

Cheers,

Florian

^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: [PATCH v3 3/3] leds: leds-pwm: Defer led_pwm_set() if PWM can sleep
  2013-03-04 10:58           ` Thierry Reding
@ 2013-03-12 10:06             ` Florian Vaussard
  -1 siblings, 0 replies; 38+ messages in thread
From: Florian Vaussard @ 2013-03-12 10:06 UTC (permalink / raw)
  To: Bryan Wu
  Cc: Thierry Reding, Richard Purdie, Peter Ujfalusi, linux-leds,
	linux-arm-kernel, linux-kernel, Florian Vaussard

Hi Bryan,

>>>>
>>>> Bryan, I assume that you'll be taking this? It doesn't apply cleanly to
>>>> my tree, probably because of Peter's recent changes that you took
>>>> through your tree and Florian based his patches on top of that. The
>>>> conflict resolution should be trivial, though.
>>>>
>>>
>>> It seems that this patch was not taken. Could you pull it, as the other
>>> part is already in linux-pwm? Or is there any show stopper?
>>>
>>
>> Ping? Who should merge this?
>
> I assume Bryan will take it through the LED tree? Patches 1 & 2 went
> into v3.9-rc1 through the PWM tree.
>

Ping ?

Florian

^ permalink raw reply	[flat|nested] 38+ messages in thread

* [PATCH v3 3/3] leds: leds-pwm: Defer led_pwm_set() if PWM can sleep
@ 2013-03-12 10:06             ` Florian Vaussard
  0 siblings, 0 replies; 38+ messages in thread
From: Florian Vaussard @ 2013-03-12 10:06 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Bryan,

>>>>
>>>> Bryan, I assume that you'll be taking this? It doesn't apply cleanly to
>>>> my tree, probably because of Peter's recent changes that you took
>>>> through your tree and Florian based his patches on top of that. The
>>>> conflict resolution should be trivial, though.
>>>>
>>>
>>> It seems that this patch was not taken. Could you pull it, as the other
>>> part is already in linux-pwm? Or is there any show stopper?
>>>
>>
>> Ping? Who should merge this?
>
> I assume Bryan will take it through the LED tree? Patches 1 & 2 went
> into v3.9-rc1 through the PWM tree.
>

Ping ?

Florian

^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: [PATCH v3 3/3] leds: leds-pwm: Defer led_pwm_set() if PWM can sleep
  2013-03-12 10:06             ` Florian Vaussard
@ 2013-03-15 17:08               ` Bryan Wu
  -1 siblings, 0 replies; 38+ messages in thread
From: Bryan Wu @ 2013-03-15 17:08 UTC (permalink / raw)
  To: florian.vaussard
  Cc: Thierry Reding, Richard Purdie, Peter Ujfalusi, linux-leds,
	linux-arm-kernel, linux-kernel

On Tue, Mar 12, 2013 at 3:06 AM, Florian Vaussard
<florian.vaussard@epfl.ch> wrote:
> Hi Bryan,
>
>
>>>>>
>>>>> Bryan, I assume that you'll be taking this? It doesn't apply cleanly to
>>>>> my tree, probably because of Peter's recent changes that you took
>>>>> through your tree and Florian based his patches on top of that. The
>>>>> conflict resolution should be trivial, though.
>>>>>
>>>>
>>>> It seems that this patch was not taken. Could you pull it, as the other
>>>> part is already in linux-pwm? Or is there any show stopper?
>>>>
>>>
>>> Ping? Who should merge this?
>>
>>
>> I assume Bryan will take it through the LED tree? Patches 1 & 2 went
>> into v3.9-rc1 through the PWM tree.
>>
>
> Ping ?
>

Hi Florian and Thierry,

Sorry, guys. My bad! I'm using GMAIL filtering my emails. This email
goes into my arm-linux mail list archive and I totally missed it.

I can merge this patch into my for-next branch, but it will be in 3.10
not 3.9-rcX.

Or Thierry, can you merge that to 3.9-rcX through your tree with my Ack?

Thanks,
-Bryan

^ permalink raw reply	[flat|nested] 38+ messages in thread

* [PATCH v3 3/3] leds: leds-pwm: Defer led_pwm_set() if PWM can sleep
@ 2013-03-15 17:08               ` Bryan Wu
  0 siblings, 0 replies; 38+ messages in thread
From: Bryan Wu @ 2013-03-15 17:08 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Mar 12, 2013 at 3:06 AM, Florian Vaussard
<florian.vaussard@epfl.ch> wrote:
> Hi Bryan,
>
>
>>>>>
>>>>> Bryan, I assume that you'll be taking this? It doesn't apply cleanly to
>>>>> my tree, probably because of Peter's recent changes that you took
>>>>> through your tree and Florian based his patches on top of that. The
>>>>> conflict resolution should be trivial, though.
>>>>>
>>>>
>>>> It seems that this patch was not taken. Could you pull it, as the other
>>>> part is already in linux-pwm? Or is there any show stopper?
>>>>
>>>
>>> Ping? Who should merge this?
>>
>>
>> I assume Bryan will take it through the LED tree? Patches 1 & 2 went
>> into v3.9-rc1 through the PWM tree.
>>
>
> Ping ?
>

Hi Florian and Thierry,

Sorry, guys. My bad! I'm using GMAIL filtering my emails. This email
goes into my arm-linux mail list archive and I totally missed it.

I can merge this patch into my for-next branch, but it will be in 3.10
not 3.9-rcX.

Or Thierry, can you merge that to 3.9-rcX through your tree with my Ack?

Thanks,
-Bryan

^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: [PATCH v3 3/3] leds: leds-pwm: Defer led_pwm_set() if PWM can sleep
  2013-03-15 17:08               ` Bryan Wu
@ 2013-03-15 18:59                 ` Thierry Reding
  -1 siblings, 0 replies; 38+ messages in thread
From: Thierry Reding @ 2013-03-15 18:59 UTC (permalink / raw)
  To: Bryan Wu
  Cc: florian.vaussard, Richard Purdie, Peter Ujfalusi, linux-leds,
	linux-arm-kernel, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1521 bytes --]

On Fri, Mar 15, 2013 at 10:08:57AM -0700, Bryan Wu wrote:
> On Tue, Mar 12, 2013 at 3:06 AM, Florian Vaussard
> <florian.vaussard@epfl.ch> wrote:
> > Hi Bryan,
> >
> >
> >>>>>
> >>>>> Bryan, I assume that you'll be taking this? It doesn't apply cleanly to
> >>>>> my tree, probably because of Peter's recent changes that you took
> >>>>> through your tree and Florian based his patches on top of that. The
> >>>>> conflict resolution should be trivial, though.
> >>>>>
> >>>>
> >>>> It seems that this patch was not taken. Could you pull it, as the other
> >>>> part is already in linux-pwm? Or is there any show stopper?
> >>>>
> >>>
> >>> Ping? Who should merge this?
> >>
> >>
> >> I assume Bryan will take it through the LED tree? Patches 1 & 2 went
> >> into v3.9-rc1 through the PWM tree.
> >>
> >
> > Ping ?
> >
> 
> Hi Florian and Thierry,
> 
> Sorry, guys. My bad! I'm using GMAIL filtering my emails. This email
> goes into my arm-linux mail list archive and I totally missed it.
> 
> I can merge this patch into my for-next branch, but it will be in 3.10
> not 3.9-rcX.
> 
> Or Thierry, can you merge that to 3.9-rcX through your tree with my Ack?

I think 3.10 would be fine. We missed the merge window on this one and
it isn't really a fix so it's a bit late for 3.9 now.

If Florian really absolutely needs this it can probably be done, but if
he can wait another few weeks it's certainly worth taking it through
linux-next for a while just to be safe.

Thierry

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 38+ messages in thread

* [PATCH v3 3/3] leds: leds-pwm: Defer led_pwm_set() if PWM can sleep
@ 2013-03-15 18:59                 ` Thierry Reding
  0 siblings, 0 replies; 38+ messages in thread
From: Thierry Reding @ 2013-03-15 18:59 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Mar 15, 2013 at 10:08:57AM -0700, Bryan Wu wrote:
> On Tue, Mar 12, 2013 at 3:06 AM, Florian Vaussard
> <florian.vaussard@epfl.ch> wrote:
> > Hi Bryan,
> >
> >
> >>>>>
> >>>>> Bryan, I assume that you'll be taking this? It doesn't apply cleanly to
> >>>>> my tree, probably because of Peter's recent changes that you took
> >>>>> through your tree and Florian based his patches on top of that. The
> >>>>> conflict resolution should be trivial, though.
> >>>>>
> >>>>
> >>>> It seems that this patch was not taken. Could you pull it, as the other
> >>>> part is already in linux-pwm? Or is there any show stopper?
> >>>>
> >>>
> >>> Ping? Who should merge this?
> >>
> >>
> >> I assume Bryan will take it through the LED tree? Patches 1 & 2 went
> >> into v3.9-rc1 through the PWM tree.
> >>
> >
> > Ping ?
> >
> 
> Hi Florian and Thierry,
> 
> Sorry, guys. My bad! I'm using GMAIL filtering my emails. This email
> goes into my arm-linux mail list archive and I totally missed it.
> 
> I can merge this patch into my for-next branch, but it will be in 3.10
> not 3.9-rcX.
> 
> Or Thierry, can you merge that to 3.9-rcX through your tree with my Ack?

I think 3.10 would be fine. We missed the merge window on this one and
it isn't really a fix so it's a bit late for 3.9 now.

If Florian really absolutely needs this it can probably be done, but if
he can wait another few weeks it's certainly worth taking it through
linux-next for a while just to be safe.

Thierry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20130315/5b9a96ce/attachment.sig>

^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: [PATCH v3 3/3] leds: leds-pwm: Defer led_pwm_set() if PWM can sleep
  2013-03-15 18:59                 ` Thierry Reding
@ 2013-03-15 20:09                   ` Florian Vaussard
  -1 siblings, 0 replies; 38+ messages in thread
From: Florian Vaussard @ 2013-03-15 20:09 UTC (permalink / raw)
  To: Thierry Reding
  Cc: Bryan Wu, Richard Purdie, Peter Ujfalusi, linux-leds,
	linux-arm-kernel, linux-kernel, Florian Vaussard

Hi,

On 03/15/2013 07:59 PM, Thierry Reding wrote:
>>
>> Hi Florian and Thierry,
>>
>> Sorry, guys. My bad! I'm using GMAIL filtering my emails. This email
>> goes into my arm-linux mail list archive and I totally missed it.
>>
>> I can merge this patch into my for-next branch, but it will be in 3.10
>> not 3.9-rcX.
>>
>> Or Thierry, can you merge that to 3.9-rcX through your tree with my Ack?
>
> I think 3.10 would be fine. We missed the merge window on this one and
> it isn't really a fix so it's a bit late for 3.9 now.
>
> If Florian really absolutely needs this it can probably be done, but if
> he can wait another few weeks it's certainly worth taking it through
> linux-next for a while just to be safe.
>

I agree, another few weeks is not a problem :) Bryan, I let you merge 
this, ok?

Thank you,

Florian

^ permalink raw reply	[flat|nested] 38+ messages in thread

* [PATCH v3 3/3] leds: leds-pwm: Defer led_pwm_set() if PWM can sleep
@ 2013-03-15 20:09                   ` Florian Vaussard
  0 siblings, 0 replies; 38+ messages in thread
From: Florian Vaussard @ 2013-03-15 20:09 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

On 03/15/2013 07:59 PM, Thierry Reding wrote:
>>
>> Hi Florian and Thierry,
>>
>> Sorry, guys. My bad! I'm using GMAIL filtering my emails. This email
>> goes into my arm-linux mail list archive and I totally missed it.
>>
>> I can merge this patch into my for-next branch, but it will be in 3.10
>> not 3.9-rcX.
>>
>> Or Thierry, can you merge that to 3.9-rcX through your tree with my Ack?
>
> I think 3.10 would be fine. We missed the merge window on this one and
> it isn't really a fix so it's a bit late for 3.9 now.
>
> If Florian really absolutely needs this it can probably be done, but if
> he can wait another few weeks it's certainly worth taking it through
> linux-next for a while just to be safe.
>

I agree, another few weeks is not a problem :) Bryan, I let you merge 
this, ok?

Thank you,

Florian

^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: [PATCH v3 3/3] leds: leds-pwm: Defer led_pwm_set() if PWM can sleep
  2013-03-15 20:09                   ` Florian Vaussard
@ 2013-03-15 21:02                     ` Bryan Wu
  -1 siblings, 0 replies; 38+ messages in thread
From: Bryan Wu @ 2013-03-15 21:02 UTC (permalink / raw)
  To: florian.vaussard
  Cc: Thierry Reding, Richard Purdie, Peter Ujfalusi, linux-leds,
	linux-arm-kernel, linux-kernel

On Fri, Mar 15, 2013 at 1:09 PM, Florian Vaussard
<florian.vaussard@epfl.ch> wrote:
> Hi,
>
>
> On 03/15/2013 07:59 PM, Thierry Reding wrote:
>>>
>>>
>>> Hi Florian and Thierry,
>>>
>>> Sorry, guys. My bad! I'm using GMAIL filtering my emails. This email
>>> goes into my arm-linux mail list archive and I totally missed it.
>>>
>>> I can merge this patch into my for-next branch, but it will be in 3.10
>>> not 3.9-rcX.
>>>
>>> Or Thierry, can you merge that to 3.9-rcX through your tree with my Ack?
>>
>>
>> I think 3.10 would be fine. We missed the merge window on this one and
>> it isn't really a fix so it's a bit late for 3.9 now.
>>
>> If Florian really absolutely needs this it can probably be done, but if
>> he can wait another few weeks it's certainly worth taking it through
>> linux-next for a while just to be safe.
>>
>
> I agree, another few weeks is not a problem :) Bryan, I let you merge this,
> ok?
>

Cool, I merged it into my for-next branch and it will be in linux-next soon.

Thanks,
-Bryan

^ permalink raw reply	[flat|nested] 38+ messages in thread

* [PATCH v3 3/3] leds: leds-pwm: Defer led_pwm_set() if PWM can sleep
@ 2013-03-15 21:02                     ` Bryan Wu
  0 siblings, 0 replies; 38+ messages in thread
From: Bryan Wu @ 2013-03-15 21:02 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Mar 15, 2013 at 1:09 PM, Florian Vaussard
<florian.vaussard@epfl.ch> wrote:
> Hi,
>
>
> On 03/15/2013 07:59 PM, Thierry Reding wrote:
>>>
>>>
>>> Hi Florian and Thierry,
>>>
>>> Sorry, guys. My bad! I'm using GMAIL filtering my emails. This email
>>> goes into my arm-linux mail list archive and I totally missed it.
>>>
>>> I can merge this patch into my for-next branch, but it will be in 3.10
>>> not 3.9-rcX.
>>>
>>> Or Thierry, can you merge that to 3.9-rcX through your tree with my Ack?
>>
>>
>> I think 3.10 would be fine. We missed the merge window on this one and
>> it isn't really a fix so it's a bit late for 3.9 now.
>>
>> If Florian really absolutely needs this it can probably be done, but if
>> he can wait another few weeks it's certainly worth taking it through
>> linux-next for a while just to be safe.
>>
>
> I agree, another few weeks is not a problem :) Bryan, I let you merge this,
> ok?
>

Cool, I merged it into my for-next branch and it will be in linux-next soon.

Thanks,
-Bryan

^ permalink raw reply	[flat|nested] 38+ messages in thread

end of thread, other threads:[~2013-03-15 21:02 UTC | newest]

Thread overview: 38+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-28 14:00 [PATCH v3 0/3] leds-pwm: Defer PWM calls if PWM can sleep Florian Vaussard
2013-01-28 14:00 ` Florian Vaussard
2013-01-28 14:00 ` [PATCH v3 1/3] pwm: Add pwm_can_sleep() as exported API to users Florian Vaussard
2013-01-28 14:00   ` Florian Vaussard
2013-01-29  8:20   ` Peter Ujfalusi
2013-01-29  8:20     ` Peter Ujfalusi
2013-01-30  8:14   ` Thierry Reding
2013-01-30  8:14     ` Thierry Reding
2013-01-28 14:00 ` [PATCH v3 2/3] pwm: Add can_sleep property to drivers Florian Vaussard
2013-01-28 14:00   ` Florian Vaussard
2013-01-30  8:15   ` Thierry Reding
2013-01-30  8:15     ` Thierry Reding
2013-01-28 14:00 ` [PATCH v3 3/3] leds: leds-pwm: Defer led_pwm_set() if PWM can sleep Florian Vaussard
2013-01-28 14:00   ` Florian Vaussard
2013-01-29  8:20   ` Peter Ujfalusi
2013-01-29  8:20     ` Peter Ujfalusi
2013-01-30  8:17   ` Thierry Reding
2013-01-30  8:17     ` Thierry Reding
2013-02-04  8:53     ` Florian Vaussard
2013-02-04  8:53       ` Florian Vaussard
2013-02-27 16:08     ` Florian Vaussard
2013-02-27 16:08       ` Florian Vaussard
2013-03-04 10:44       ` Florian Vaussard
2013-03-04 10:44         ` Florian Vaussard
2013-03-04 10:58         ` Thierry Reding
2013-03-04 10:58           ` Thierry Reding
2013-03-05 15:39           ` Florian Vaussard
2013-03-05 15:39             ` Florian Vaussard
2013-03-12 10:06           ` Florian Vaussard
2013-03-12 10:06             ` Florian Vaussard
2013-03-15 17:08             ` Bryan Wu
2013-03-15 17:08               ` Bryan Wu
2013-03-15 18:59               ` Thierry Reding
2013-03-15 18:59                 ` Thierry Reding
2013-03-15 20:09                 ` Florian Vaussard
2013-03-15 20:09                   ` Florian Vaussard
2013-03-15 21:02                   ` Bryan Wu
2013-03-15 21:02                     ` Bryan Wu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.