All of lore.kernel.org
 help / color / mirror / Atom feed
From: Boris Brezillon <boris.brezillon-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
To: Thierry Reding
	<thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	linux-pwm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: Mike Turquette
	<mturquette-rdvid1DuHRBWk0Htik3J/w@public.gmane.org>,
	Stephen Boyd <sboyd-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>,
	linux-clk-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	Liam Girdwood <lgirdwood-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	Kamil Debski <k.debski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>,
	lm-sensors-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org,
	Jean Delvare <jdelvare-IBi9RG/b67k@public.gmane.org>,
	Guenter Roeck <linux-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>,
	Dmitry Torokhov
	<dmitry.torokhov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	linux-input-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Bryan Wu <cooloney-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	Richard Purdie <rpurdie-Fm38FmjxZ/leoWH0uzbU5w@public.gmane.org>,
	Jacek Anaszewski
	<j.anaszewski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>,
	linux-leds-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Maxime Ripard
	<maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>,
	Chen-Yu Tsai <wens-jdAy2FN1RRM@public.gmane.org>,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org,
	Joachim Eastwood
	<manabian-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	Thomas Petazzoni
	<thomas.petazzoni-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>,
	Heiko Stuebner <heiko-4mtYJXux2i+zQB+pC5nmwQ@public.gmane.org>,
	linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	Jingoo Han <jingoohan1-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	Lee Jones
	<lee.jones-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>linu
Subject: [PATCH v5 23/24] pwm: switch to the atomic API
Date: Thu, 14 Apr 2016 21:17:43 +0200	[thread overview]
Message-ID: <1460661464-11216-24-git-send-email-boris.brezillon@free-electrons.com> (raw)
In-Reply-To: <1460661464-11216-1-git-send-email-boris.brezillon-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>

Replace legacy pwm_get/set_xxx() and pwm_config/enable/disable() calls
by pwm_get/apply_state().

Signed-off-by: Boris Brezillon <boris.brezillon-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
---
 drivers/pwm/core.c  |  5 ++++-
 drivers/pwm/sysfs.c | 61 +++++++++++++++++++++++++++++++----------------------
 2 files changed, 40 insertions(+), 26 deletions(-)

diff --git a/drivers/pwm/core.c b/drivers/pwm/core.c
index 112a696..aefffcf 100644
--- a/drivers/pwm/core.c
+++ b/drivers/pwm/core.c
@@ -947,13 +947,16 @@ static void pwm_dbg_show(struct pwm_chip *chip, struct seq_file *s)
 
 	for (i = 0; i < chip->npwm; i++) {
 		struct pwm_device *pwm = &chip->pwms[i];
+		struct pwm_state state;
+
+		pwm_get_state(pwm, &state);
 
 		seq_printf(s, " pwm-%-3d (%-20.20s):", i, pwm->label);
 
 		if (test_bit(PWMF_REQUESTED, &pwm->flags))
 			seq_puts(s, " requested");
 
-		if (pwm_is_enabled(pwm))
+		if (state.enabled)
 			seq_puts(s, " enabled");
 
 		seq_puts(s, "\n");
diff --git a/drivers/pwm/sysfs.c b/drivers/pwm/sysfs.c
index ab28c89..40daf1c 100644
--- a/drivers/pwm/sysfs.c
+++ b/drivers/pwm/sysfs.c
@@ -47,13 +47,13 @@ static ssize_t period_show(struct device *child,
 {
 	struct pwm_export *export = child_to_pwm_export(child);
 	const struct pwm_device *pwm = export->pwm;
-	unsigned int period;
+	struct pwm_state state;
 
 	mutex_lock(&export->lock);
-	period = pwm_get_period(pwm);
+	pwm_get_state(pwm, &state);
 	mutex_unlock(&export->lock);
 
-	return sprintf(buf, "%u\n", period);
+	return sprintf(buf, "%u\n", state.period);
 }
 
 static ssize_t period_store(struct device *child,
@@ -62,6 +62,7 @@ static ssize_t period_store(struct device *child,
 {
 	struct pwm_export *export = child_to_pwm_export(child);
 	struct pwm_device *pwm = export->pwm;
+	struct pwm_state state;
 	unsigned int val;
 	int ret;
 
@@ -70,7 +71,9 @@ static ssize_t period_store(struct device *child,
 		return ret;
 
 	mutex_lock(&export->lock);
-	ret = pwm_config(pwm, pwm_get_duty_cycle(pwm), val);
+	pwm_get_state(pwm, &state);
+	state.period = val;
+	ret = pwm_apply_state(pwm, &state);
 	mutex_unlock(&export->lock);
 
 	return ret ? : size;
@@ -82,13 +85,13 @@ static ssize_t duty_cycle_show(struct device *child,
 {
 	struct pwm_export *export = child_to_pwm_export(child);
 	const struct pwm_device *pwm = export->pwm;
-	unsigned int duty;
+	struct pwm_state state;
 
 	mutex_lock(&export->lock);
-	duty = pwm_get_duty_cycle(pwm);
+	pwm_get_state(pwm, &state);
 	mutex_unlock(&export->lock);
 
-	return sprintf(buf, "%u\n", duty);
+	return sprintf(buf, "%u\n", state.duty_cycle);
 }
 
 static ssize_t duty_cycle_store(struct device *child,
@@ -97,6 +100,7 @@ static ssize_t duty_cycle_store(struct device *child,
 {
 	struct pwm_export *export = child_to_pwm_export(child);
 	struct pwm_device *pwm = export->pwm;
+	struct pwm_state state;
 	unsigned int val;
 	int ret;
 
@@ -105,7 +109,9 @@ static ssize_t duty_cycle_store(struct device *child,
 		return ret;
 
 	mutex_lock(&export->lock);
-	ret = pwm_config(pwm, val, pwm_get_period(pwm));
+	pwm_get_state(pwm, &state);
+	state.duty_cycle = val;
+	ret = pwm_apply_state(pwm, &state);
 	mutex_unlock(&export->lock);
 
 	return ret ? : size;
@@ -117,13 +123,13 @@ static ssize_t enable_show(struct device *child,
 {
 	struct pwm_export *export = child_to_pwm_export(child);
 	const struct pwm_device *pwm = export->pwm;
-	bool enabled;
+	struct pwm_state state;
 
 	mutex_lock(&export->lock);
-	enabled = pwm_is_enabled(pwm);
+	pwm_get_state(pwm, &state);
 	mutex_unlock(&export->lock);
 
-	return sprintf(buf, "%d\n", enabled);
+	return sprintf(buf, "%d\n", state.enabled);
 }
 
 static ssize_t enable_store(struct device *child,
@@ -132,24 +138,20 @@ static ssize_t enable_store(struct device *child,
 {
 	struct pwm_export *export = child_to_pwm_export(child);
 	struct pwm_device *pwm = export->pwm;
+	struct pwm_state state;
 	int val, ret;
 
 	ret = kstrtoint(buf, 0, &val);
 	if (ret)
 		return ret;
 
+	if (val != 0 && val != 1)
+		return -EINVAL;
+
 	mutex_lock(&export->lock);
-	switch (val) {
-	case 0:
-		pwm_disable(pwm);
-		break;
-	case 1:
-		ret = pwm_enable(pwm);
-		break;
-	default:
-		ret = -EINVAL;
-		break;
-	}
+	pwm_get_state(pwm, &state);
+	state.enabled = val;
+	ret = pwm_apply_state(pwm, &state);
 	mutex_unlock(&export->lock);
 
 	return ret ? : size;
@@ -162,9 +164,13 @@ static ssize_t polarity_show(struct device *child,
 	struct pwm_export *export = child_to_pwm_export(child);
 	const struct pwm_device *pwm = export->pwm;
 	const char *polarity = "unknown";
+	struct pwm_state state;
 
 	mutex_lock(&export->lock);
-	switch (pwm_get_polarity(pwm)) {
+	pwm_get_state(pwm, &state);
+	mutex_unlock(&export->lock);
+
+	switch (state.polarity) {
 	case PWM_POLARITY_NORMAL:
 		polarity = "normal";
 		break;
@@ -173,7 +179,6 @@ static ssize_t polarity_show(struct device *child,
 		polarity = "inversed";
 		break;
 	}
-	mutex_unlock(&export->lock);
 
 	return sprintf(buf, "%s\n", polarity);
 }
@@ -185,6 +190,7 @@ static ssize_t polarity_store(struct device *child,
 	struct pwm_export *export = child_to_pwm_export(child);
 	struct pwm_device *pwm = export->pwm;
 	enum pwm_polarity polarity;
+	struct pwm_state state;
 	int ret;
 
 	if (sysfs_streq(buf, "normal"))
@@ -195,7 +201,12 @@ static ssize_t polarity_store(struct device *child,
 		return -EINVAL;
 
 	mutex_lock(&export->lock);
-	ret = pwm_set_polarity(pwm, polarity);
+	pwm_get_state(pwm, &state);
+	state.polarity = polarity;
+	if (state.enabled)
+		ret = -EBUSY;
+	else
+		ret = pwm_apply_state(pwm, &state);
 	mutex_unlock(&export->lock);
 
 	return ret ? : size;
-- 
2.5.0

WARNING: multiple messages have this Message-ID (diff)
From: Boris Brezillon <boris.brezillon@free-electrons.com>
To: Thierry Reding <thierry.reding@gmail.com>, linux-pwm@vger.kernel.org
Cc: Mike Turquette <mturquette@baylibre.com>,
	Stephen Boyd <sboyd@codeaurora.org>,
	linux-clk@vger.kernel.org, Mark Brown <broonie@kernel.org>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Kamil Debski <k.debski@samsung.com>,
	lm-sensors@lm-sensors.org, Jean Delvare <jdelvare@suse.com>,
	Guenter Roeck <linux@roeck-us.net>,
	Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	linux-input@vger.kernel.org, Bryan Wu <cooloney@gmail.com>,
	Richard Purdie <rpurdie@rpsys.net>,
	Jacek Anaszewski <j.anaszewski@samsung.com>,
	linux-leds@vger.kernel.org,
	Maxime Ripard <maxime.ripard@free-electrons.com>,
	Chen-Yu Tsai <wens@csie.org>,
	linux-sunxi@googlegroups.com,
	Joachim Eastwood <manabian@gmail.com>,
	Thomas Petazzoni <thomas.petazzoni@free-electrons.com>,
	Heiko Stuebner <heiko@sntech.de>,
	linux-rockchip@lists.infradead.org,
	Jingoo Han <jingoohan1@gmail.com>,
	Lee Jones <lee.jones@linaro.org>,
	linux-fbdev@vger.kernel.org,
	Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>,
	Tomi Valkeinen <tomi.valkeinen@ti.com>,
	Robert Jarzmik <robert.jarzmik@free.fr>,
	Alexandre Belloni <alexandre.belloni@free-electrons.com>,
	Kukjin Kim <kgene@kernel.org>,
	Krzysztof Kozlowski <k.kozlowski@samsung.com>,
	linux-samsung-soc@vger.kernel.org,
	intel-gfx@lists.freedesktop.org,
	Daniel Vetter <daniel.vetter@intel.com>,
	Jani Nikula <jani.nikula@linux.intel.com>,
	Jonathan Corbet <corbet@lwn.net>,
	linux-doc@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org,
	Hartley Sweeten <hsweeten@visionengravers.com>,
	Ryan Mallon <rmallon@gmail.com>,
	Alexander Shiyan <shc_work@mail.ru>, Milo Kim <milo.kim@ti.com>,
	Doug Anderson <dianders@google.com>,
	Caesar Wang <wxt@rock-chips.com>,
	Stephen Barber <smbarber@chromium.org>,
	Boris Brezillon <boris.brezillon@free-electrons.com>
Subject: [PATCH v5 23/24] pwm: switch to the atomic API
Date: Thu, 14 Apr 2016 21:17:43 +0200	[thread overview]
Message-ID: <1460661464-11216-24-git-send-email-boris.brezillon@free-electrons.com> (raw)
In-Reply-To: <1460661464-11216-1-git-send-email-boris.brezillon@free-electrons.com>

Replace legacy pwm_get/set_xxx() and pwm_config/enable/disable() calls
by pwm_get/apply_state().

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
---
 drivers/pwm/core.c  |  5 ++++-
 drivers/pwm/sysfs.c | 61 +++++++++++++++++++++++++++++++----------------------
 2 files changed, 40 insertions(+), 26 deletions(-)

diff --git a/drivers/pwm/core.c b/drivers/pwm/core.c
index 112a696..aefffcf 100644
--- a/drivers/pwm/core.c
+++ b/drivers/pwm/core.c
@@ -947,13 +947,16 @@ static void pwm_dbg_show(struct pwm_chip *chip, struct seq_file *s)
 
 	for (i = 0; i < chip->npwm; i++) {
 		struct pwm_device *pwm = &chip->pwms[i];
+		struct pwm_state state;
+
+		pwm_get_state(pwm, &state);
 
 		seq_printf(s, " pwm-%-3d (%-20.20s):", i, pwm->label);
 
 		if (test_bit(PWMF_REQUESTED, &pwm->flags))
 			seq_puts(s, " requested");
 
-		if (pwm_is_enabled(pwm))
+		if (state.enabled)
 			seq_puts(s, " enabled");
 
 		seq_puts(s, "\n");
diff --git a/drivers/pwm/sysfs.c b/drivers/pwm/sysfs.c
index ab28c89..40daf1c 100644
--- a/drivers/pwm/sysfs.c
+++ b/drivers/pwm/sysfs.c
@@ -47,13 +47,13 @@ static ssize_t period_show(struct device *child,
 {
 	struct pwm_export *export = child_to_pwm_export(child);
 	const struct pwm_device *pwm = export->pwm;
-	unsigned int period;
+	struct pwm_state state;
 
 	mutex_lock(&export->lock);
-	period = pwm_get_period(pwm);
+	pwm_get_state(pwm, &state);
 	mutex_unlock(&export->lock);
 
-	return sprintf(buf, "%u\n", period);
+	return sprintf(buf, "%u\n", state.period);
 }
 
 static ssize_t period_store(struct device *child,
@@ -62,6 +62,7 @@ static ssize_t period_store(struct device *child,
 {
 	struct pwm_export *export = child_to_pwm_export(child);
 	struct pwm_device *pwm = export->pwm;
+	struct pwm_state state;
 	unsigned int val;
 	int ret;
 
@@ -70,7 +71,9 @@ static ssize_t period_store(struct device *child,
 		return ret;
 
 	mutex_lock(&export->lock);
-	ret = pwm_config(pwm, pwm_get_duty_cycle(pwm), val);
+	pwm_get_state(pwm, &state);
+	state.period = val;
+	ret = pwm_apply_state(pwm, &state);
 	mutex_unlock(&export->lock);
 
 	return ret ? : size;
@@ -82,13 +85,13 @@ static ssize_t duty_cycle_show(struct device *child,
 {
 	struct pwm_export *export = child_to_pwm_export(child);
 	const struct pwm_device *pwm = export->pwm;
-	unsigned int duty;
+	struct pwm_state state;
 
 	mutex_lock(&export->lock);
-	duty = pwm_get_duty_cycle(pwm);
+	pwm_get_state(pwm, &state);
 	mutex_unlock(&export->lock);
 
-	return sprintf(buf, "%u\n", duty);
+	return sprintf(buf, "%u\n", state.duty_cycle);
 }
 
 static ssize_t duty_cycle_store(struct device *child,
@@ -97,6 +100,7 @@ static ssize_t duty_cycle_store(struct device *child,
 {
 	struct pwm_export *export = child_to_pwm_export(child);
 	struct pwm_device *pwm = export->pwm;
+	struct pwm_state state;
 	unsigned int val;
 	int ret;
 
@@ -105,7 +109,9 @@ static ssize_t duty_cycle_store(struct device *child,
 		return ret;
 
 	mutex_lock(&export->lock);
-	ret = pwm_config(pwm, val, pwm_get_period(pwm));
+	pwm_get_state(pwm, &state);
+	state.duty_cycle = val;
+	ret = pwm_apply_state(pwm, &state);
 	mutex_unlock(&export->lock);
 
 	return ret ? : size;
@@ -117,13 +123,13 @@ static ssize_t enable_show(struct device *child,
 {
 	struct pwm_export *export = child_to_pwm_export(child);
 	const struct pwm_device *pwm = export->pwm;
-	bool enabled;
+	struct pwm_state state;
 
 	mutex_lock(&export->lock);
-	enabled = pwm_is_enabled(pwm);
+	pwm_get_state(pwm, &state);
 	mutex_unlock(&export->lock);
 
-	return sprintf(buf, "%d\n", enabled);
+	return sprintf(buf, "%d\n", state.enabled);
 }
 
 static ssize_t enable_store(struct device *child,
@@ -132,24 +138,20 @@ static ssize_t enable_store(struct device *child,
 {
 	struct pwm_export *export = child_to_pwm_export(child);
 	struct pwm_device *pwm = export->pwm;
+	struct pwm_state state;
 	int val, ret;
 
 	ret = kstrtoint(buf, 0, &val);
 	if (ret)
 		return ret;
 
+	if (val != 0 && val != 1)
+		return -EINVAL;
+
 	mutex_lock(&export->lock);
-	switch (val) {
-	case 0:
-		pwm_disable(pwm);
-		break;
-	case 1:
-		ret = pwm_enable(pwm);
-		break;
-	default:
-		ret = -EINVAL;
-		break;
-	}
+	pwm_get_state(pwm, &state);
+	state.enabled = val;
+	ret = pwm_apply_state(pwm, &state);
 	mutex_unlock(&export->lock);
 
 	return ret ? : size;
@@ -162,9 +164,13 @@ static ssize_t polarity_show(struct device *child,
 	struct pwm_export *export = child_to_pwm_export(child);
 	const struct pwm_device *pwm = export->pwm;
 	const char *polarity = "unknown";
+	struct pwm_state state;
 
 	mutex_lock(&export->lock);
-	switch (pwm_get_polarity(pwm)) {
+	pwm_get_state(pwm, &state);
+	mutex_unlock(&export->lock);
+
+	switch (state.polarity) {
 	case PWM_POLARITY_NORMAL:
 		polarity = "normal";
 		break;
@@ -173,7 +179,6 @@ static ssize_t polarity_show(struct device *child,
 		polarity = "inversed";
 		break;
 	}
-	mutex_unlock(&export->lock);
 
 	return sprintf(buf, "%s\n", polarity);
 }
@@ -185,6 +190,7 @@ static ssize_t polarity_store(struct device *child,
 	struct pwm_export *export = child_to_pwm_export(child);
 	struct pwm_device *pwm = export->pwm;
 	enum pwm_polarity polarity;
+	struct pwm_state state;
 	int ret;
 
 	if (sysfs_streq(buf, "normal"))
@@ -195,7 +201,12 @@ static ssize_t polarity_store(struct device *child,
 		return -EINVAL;
 
 	mutex_lock(&export->lock);
-	ret = pwm_set_polarity(pwm, polarity);
+	pwm_get_state(pwm, &state);
+	state.polarity = polarity;
+	if (state.enabled)
+		ret = -EBUSY;
+	else
+		ret = pwm_apply_state(pwm, &state);
 	mutex_unlock(&export->lock);
 
 	return ret ? : size;
-- 
2.5.0

WARNING: multiple messages have this Message-ID (diff)
From: Boris Brezillon <boris.brezillon@free-electrons.com>
To: Thierry Reding
	<thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	linux-pwm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: Mike Turquette
	<mturquette-rdvid1DuHRBWk0Htik3J/w@public.gmane.org>,
	Stephen Boyd <sboyd-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>,
	linux-clk-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	Liam Girdwood <lgirdwood-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	Kamil Debski <k.debski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>,
	lm-sensors-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org,
	Jean Delvare <jdelvare-IBi9RG/b67k@public.gmane.org>,
	Guenter Roeck <linux-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>,
	Dmitry Torokhov
	<dmitry.torokhov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	linux-input-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Bryan Wu <cooloney-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	Richard Purdie <rpurdie-Fm38FmjxZ/leoWH0uzbU5w@public.gmane.org>,
	Jacek Anaszewski
	<j.anaszewski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>,
	linux-leds-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Maxime Ripard
	<maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>,
	Chen-Yu Tsai <wens-jdAy2FN1RRM@public.gmane.org>,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org,
	Joachim Eastwood
	<manabian-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	Thomas Petazzoni
	<thomas.petazzoni-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>,
	Heiko Stuebner <heiko-4mtYJXux2i+zQB+pC5nmwQ@public.gmane.org>,
	linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	Jingoo Han <jingoohan1-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	Lee Jones <lee.jones-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
Subject: [PATCH v5 23/24] pwm: switch to the atomic API
Date: Thu, 14 Apr 2016 19:17:43 +0000	[thread overview]
Message-ID: <1460661464-11216-24-git-send-email-boris.brezillon@free-electrons.com> (raw)
In-Reply-To: <1460661464-11216-1-git-send-email-boris.brezillon-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>

Replace legacy pwm_get/set_xxx() and pwm_config/enable/disable() calls
by pwm_get/apply_state().

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
---
 drivers/pwm/core.c  |  5 ++++-
 drivers/pwm/sysfs.c | 61 +++++++++++++++++++++++++++++++----------------------
 2 files changed, 40 insertions(+), 26 deletions(-)

diff --git a/drivers/pwm/core.c b/drivers/pwm/core.c
index 112a696..aefffcf 100644
--- a/drivers/pwm/core.c
+++ b/drivers/pwm/core.c
@@ -947,13 +947,16 @@ static void pwm_dbg_show(struct pwm_chip *chip, struct seq_file *s)
 
 	for (i = 0; i < chip->npwm; i++) {
 		struct pwm_device *pwm = &chip->pwms[i];
+		struct pwm_state state;
+
+		pwm_get_state(pwm, &state);
 
 		seq_printf(s, " pwm-%-3d (%-20.20s):", i, pwm->label);
 
 		if (test_bit(PWMF_REQUESTED, &pwm->flags))
 			seq_puts(s, " requested");
 
-		if (pwm_is_enabled(pwm))
+		if (state.enabled)
 			seq_puts(s, " enabled");
 
 		seq_puts(s, "\n");
diff --git a/drivers/pwm/sysfs.c b/drivers/pwm/sysfs.c
index ab28c89..40daf1c 100644
--- a/drivers/pwm/sysfs.c
+++ b/drivers/pwm/sysfs.c
@@ -47,13 +47,13 @@ static ssize_t period_show(struct device *child,
 {
 	struct pwm_export *export = child_to_pwm_export(child);
 	const struct pwm_device *pwm = export->pwm;
-	unsigned int period;
+	struct pwm_state state;
 
 	mutex_lock(&export->lock);
-	period = pwm_get_period(pwm);
+	pwm_get_state(pwm, &state);
 	mutex_unlock(&export->lock);
 
-	return sprintf(buf, "%u\n", period);
+	return sprintf(buf, "%u\n", state.period);
 }
 
 static ssize_t period_store(struct device *child,
@@ -62,6 +62,7 @@ static ssize_t period_store(struct device *child,
 {
 	struct pwm_export *export = child_to_pwm_export(child);
 	struct pwm_device *pwm = export->pwm;
+	struct pwm_state state;
 	unsigned int val;
 	int ret;
 
@@ -70,7 +71,9 @@ static ssize_t period_store(struct device *child,
 		return ret;
 
 	mutex_lock(&export->lock);
-	ret = pwm_config(pwm, pwm_get_duty_cycle(pwm), val);
+	pwm_get_state(pwm, &state);
+	state.period = val;
+	ret = pwm_apply_state(pwm, &state);
 	mutex_unlock(&export->lock);
 
 	return ret ? : size;
@@ -82,13 +85,13 @@ static ssize_t duty_cycle_show(struct device *child,
 {
 	struct pwm_export *export = child_to_pwm_export(child);
 	const struct pwm_device *pwm = export->pwm;
-	unsigned int duty;
+	struct pwm_state state;
 
 	mutex_lock(&export->lock);
-	duty = pwm_get_duty_cycle(pwm);
+	pwm_get_state(pwm, &state);
 	mutex_unlock(&export->lock);
 
-	return sprintf(buf, "%u\n", duty);
+	return sprintf(buf, "%u\n", state.duty_cycle);
 }
 
 static ssize_t duty_cycle_store(struct device *child,
@@ -97,6 +100,7 @@ static ssize_t duty_cycle_store(struct device *child,
 {
 	struct pwm_export *export = child_to_pwm_export(child);
 	struct pwm_device *pwm = export->pwm;
+	struct pwm_state state;
 	unsigned int val;
 	int ret;
 
@@ -105,7 +109,9 @@ static ssize_t duty_cycle_store(struct device *child,
 		return ret;
 
 	mutex_lock(&export->lock);
-	ret = pwm_config(pwm, val, pwm_get_period(pwm));
+	pwm_get_state(pwm, &state);
+	state.duty_cycle = val;
+	ret = pwm_apply_state(pwm, &state);
 	mutex_unlock(&export->lock);
 
 	return ret ? : size;
@@ -117,13 +123,13 @@ static ssize_t enable_show(struct device *child,
 {
 	struct pwm_export *export = child_to_pwm_export(child);
 	const struct pwm_device *pwm = export->pwm;
-	bool enabled;
+	struct pwm_state state;
 
 	mutex_lock(&export->lock);
-	enabled = pwm_is_enabled(pwm);
+	pwm_get_state(pwm, &state);
 	mutex_unlock(&export->lock);
 
-	return sprintf(buf, "%d\n", enabled);
+	return sprintf(buf, "%d\n", state.enabled);
 }
 
 static ssize_t enable_store(struct device *child,
@@ -132,24 +138,20 @@ static ssize_t enable_store(struct device *child,
 {
 	struct pwm_export *export = child_to_pwm_export(child);
 	struct pwm_device *pwm = export->pwm;
+	struct pwm_state state;
 	int val, ret;
 
 	ret = kstrtoint(buf, 0, &val);
 	if (ret)
 		return ret;
 
+	if (val != 0 && val != 1)
+		return -EINVAL;
+
 	mutex_lock(&export->lock);
-	switch (val) {
-	case 0:
-		pwm_disable(pwm);
-		break;
-	case 1:
-		ret = pwm_enable(pwm);
-		break;
-	default:
-		ret = -EINVAL;
-		break;
-	}
+	pwm_get_state(pwm, &state);
+	state.enabled = val;
+	ret = pwm_apply_state(pwm, &state);
 	mutex_unlock(&export->lock);
 
 	return ret ? : size;
@@ -162,9 +164,13 @@ static ssize_t polarity_show(struct device *child,
 	struct pwm_export *export = child_to_pwm_export(child);
 	const struct pwm_device *pwm = export->pwm;
 	const char *polarity = "unknown";
+	struct pwm_state state;
 
 	mutex_lock(&export->lock);
-	switch (pwm_get_polarity(pwm)) {
+	pwm_get_state(pwm, &state);
+	mutex_unlock(&export->lock);
+
+	switch (state.polarity) {
 	case PWM_POLARITY_NORMAL:
 		polarity = "normal";
 		break;
@@ -173,7 +179,6 @@ static ssize_t polarity_show(struct device *child,
 		polarity = "inversed";
 		break;
 	}
-	mutex_unlock(&export->lock);
 
 	return sprintf(buf, "%s\n", polarity);
 }
@@ -185,6 +190,7 @@ static ssize_t polarity_store(struct device *child,
 	struct pwm_export *export = child_to_pwm_export(child);
 	struct pwm_device *pwm = export->pwm;
 	enum pwm_polarity polarity;
+	struct pwm_state state;
 	int ret;
 
 	if (sysfs_streq(buf, "normal"))
@@ -195,7 +201,12 @@ static ssize_t polarity_store(struct device *child,
 		return -EINVAL;
 
 	mutex_lock(&export->lock);
-	ret = pwm_set_polarity(pwm, polarity);
+	pwm_get_state(pwm, &state);
+	state.polarity = polarity;
+	if (state.enabled)
+		ret = -EBUSY;
+	else
+		ret = pwm_apply_state(pwm, &state);
 	mutex_unlock(&export->lock);
 
 	return ret ? : size;
-- 
2.5.0


WARNING: multiple messages have this Message-ID (diff)
From: boris.brezillon@free-electrons.com (Boris Brezillon)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v5 23/24] pwm: switch to the atomic API
Date: Thu, 14 Apr 2016 21:17:43 +0200	[thread overview]
Message-ID: <1460661464-11216-24-git-send-email-boris.brezillon@free-electrons.com> (raw)
In-Reply-To: <1460661464-11216-1-git-send-email-boris.brezillon@free-electrons.com>

Replace legacy pwm_get/set_xxx() and pwm_config/enable/disable() calls
by pwm_get/apply_state().

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
---
 drivers/pwm/core.c  |  5 ++++-
 drivers/pwm/sysfs.c | 61 +++++++++++++++++++++++++++++++----------------------
 2 files changed, 40 insertions(+), 26 deletions(-)

diff --git a/drivers/pwm/core.c b/drivers/pwm/core.c
index 112a696..aefffcf 100644
--- a/drivers/pwm/core.c
+++ b/drivers/pwm/core.c
@@ -947,13 +947,16 @@ static void pwm_dbg_show(struct pwm_chip *chip, struct seq_file *s)
 
 	for (i = 0; i < chip->npwm; i++) {
 		struct pwm_device *pwm = &chip->pwms[i];
+		struct pwm_state state;
+
+		pwm_get_state(pwm, &state);
 
 		seq_printf(s, " pwm-%-3d (%-20.20s):", i, pwm->label);
 
 		if (test_bit(PWMF_REQUESTED, &pwm->flags))
 			seq_puts(s, " requested");
 
-		if (pwm_is_enabled(pwm))
+		if (state.enabled)
 			seq_puts(s, " enabled");
 
 		seq_puts(s, "\n");
diff --git a/drivers/pwm/sysfs.c b/drivers/pwm/sysfs.c
index ab28c89..40daf1c 100644
--- a/drivers/pwm/sysfs.c
+++ b/drivers/pwm/sysfs.c
@@ -47,13 +47,13 @@ static ssize_t period_show(struct device *child,
 {
 	struct pwm_export *export = child_to_pwm_export(child);
 	const struct pwm_device *pwm = export->pwm;
-	unsigned int period;
+	struct pwm_state state;
 
 	mutex_lock(&export->lock);
-	period = pwm_get_period(pwm);
+	pwm_get_state(pwm, &state);
 	mutex_unlock(&export->lock);
 
-	return sprintf(buf, "%u\n", period);
+	return sprintf(buf, "%u\n", state.period);
 }
 
 static ssize_t period_store(struct device *child,
@@ -62,6 +62,7 @@ static ssize_t period_store(struct device *child,
 {
 	struct pwm_export *export = child_to_pwm_export(child);
 	struct pwm_device *pwm = export->pwm;
+	struct pwm_state state;
 	unsigned int val;
 	int ret;
 
@@ -70,7 +71,9 @@ static ssize_t period_store(struct device *child,
 		return ret;
 
 	mutex_lock(&export->lock);
-	ret = pwm_config(pwm, pwm_get_duty_cycle(pwm), val);
+	pwm_get_state(pwm, &state);
+	state.period = val;
+	ret = pwm_apply_state(pwm, &state);
 	mutex_unlock(&export->lock);
 
 	return ret ? : size;
@@ -82,13 +85,13 @@ static ssize_t duty_cycle_show(struct device *child,
 {
 	struct pwm_export *export = child_to_pwm_export(child);
 	const struct pwm_device *pwm = export->pwm;
-	unsigned int duty;
+	struct pwm_state state;
 
 	mutex_lock(&export->lock);
-	duty = pwm_get_duty_cycle(pwm);
+	pwm_get_state(pwm, &state);
 	mutex_unlock(&export->lock);
 
-	return sprintf(buf, "%u\n", duty);
+	return sprintf(buf, "%u\n", state.duty_cycle);
 }
 
 static ssize_t duty_cycle_store(struct device *child,
@@ -97,6 +100,7 @@ static ssize_t duty_cycle_store(struct device *child,
 {
 	struct pwm_export *export = child_to_pwm_export(child);
 	struct pwm_device *pwm = export->pwm;
+	struct pwm_state state;
 	unsigned int val;
 	int ret;
 
@@ -105,7 +109,9 @@ static ssize_t duty_cycle_store(struct device *child,
 		return ret;
 
 	mutex_lock(&export->lock);
-	ret = pwm_config(pwm, val, pwm_get_period(pwm));
+	pwm_get_state(pwm, &state);
+	state.duty_cycle = val;
+	ret = pwm_apply_state(pwm, &state);
 	mutex_unlock(&export->lock);
 
 	return ret ? : size;
@@ -117,13 +123,13 @@ static ssize_t enable_show(struct device *child,
 {
 	struct pwm_export *export = child_to_pwm_export(child);
 	const struct pwm_device *pwm = export->pwm;
-	bool enabled;
+	struct pwm_state state;
 
 	mutex_lock(&export->lock);
-	enabled = pwm_is_enabled(pwm);
+	pwm_get_state(pwm, &state);
 	mutex_unlock(&export->lock);
 
-	return sprintf(buf, "%d\n", enabled);
+	return sprintf(buf, "%d\n", state.enabled);
 }
 
 static ssize_t enable_store(struct device *child,
@@ -132,24 +138,20 @@ static ssize_t enable_store(struct device *child,
 {
 	struct pwm_export *export = child_to_pwm_export(child);
 	struct pwm_device *pwm = export->pwm;
+	struct pwm_state state;
 	int val, ret;
 
 	ret = kstrtoint(buf, 0, &val);
 	if (ret)
 		return ret;
 
+	if (val != 0 && val != 1)
+		return -EINVAL;
+
 	mutex_lock(&export->lock);
-	switch (val) {
-	case 0:
-		pwm_disable(pwm);
-		break;
-	case 1:
-		ret = pwm_enable(pwm);
-		break;
-	default:
-		ret = -EINVAL;
-		break;
-	}
+	pwm_get_state(pwm, &state);
+	state.enabled = val;
+	ret = pwm_apply_state(pwm, &state);
 	mutex_unlock(&export->lock);
 
 	return ret ? : size;
@@ -162,9 +164,13 @@ static ssize_t polarity_show(struct device *child,
 	struct pwm_export *export = child_to_pwm_export(child);
 	const struct pwm_device *pwm = export->pwm;
 	const char *polarity = "unknown";
+	struct pwm_state state;
 
 	mutex_lock(&export->lock);
-	switch (pwm_get_polarity(pwm)) {
+	pwm_get_state(pwm, &state);
+	mutex_unlock(&export->lock);
+
+	switch (state.polarity) {
 	case PWM_POLARITY_NORMAL:
 		polarity = "normal";
 		break;
@@ -173,7 +179,6 @@ static ssize_t polarity_show(struct device *child,
 		polarity = "inversed";
 		break;
 	}
-	mutex_unlock(&export->lock);
 
 	return sprintf(buf, "%s\n", polarity);
 }
@@ -185,6 +190,7 @@ static ssize_t polarity_store(struct device *child,
 	struct pwm_export *export = child_to_pwm_export(child);
 	struct pwm_device *pwm = export->pwm;
 	enum pwm_polarity polarity;
+	struct pwm_state state;
 	int ret;
 
 	if (sysfs_streq(buf, "normal"))
@@ -195,7 +201,12 @@ static ssize_t polarity_store(struct device *child,
 		return -EINVAL;
 
 	mutex_lock(&export->lock);
-	ret = pwm_set_polarity(pwm, polarity);
+	pwm_get_state(pwm, &state);
+	state.polarity = polarity;
+	if (state.enabled)
+		ret = -EBUSY;
+	else
+		ret = pwm_apply_state(pwm, &state);
 	mutex_unlock(&export->lock);
 
 	return ret ? : size;
-- 
2.5.0

  parent reply	other threads:[~2016-04-14 19:17 UTC|newest]

Thread overview: 122+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-14 19:17 [PATCH v5 00/24] pwm: add support for atomic update Boris Brezillon
2016-04-14 19:17 ` Boris Brezillon
2016-04-14 19:17 ` Boris Brezillon
2016-04-14 19:17 ` Boris Brezillon
2016-04-14 19:17 ` [PATCH v5 02/24] pwm: use pwm_get/set_xxx() helpers where appropriate Boris Brezillon
2016-04-14 19:17   ` Boris Brezillon
2016-04-14 19:17   ` Boris Brezillon
2016-04-14 19:17   ` Boris Brezillon
     [not found]   ` <1460661464-11216-3-git-send-email-boris.brezillon-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
2016-04-14 19:24     ` Joachim Eastwood
2016-04-14 19:24       ` Joachim Eastwood
2016-04-14 19:24       ` Joachim Eastwood
2016-04-14 19:24       ` Joachim Eastwood
2016-04-14 19:24       ` Joachim Eastwood
2016-04-14 19:17 ` [PATCH v5 04/24] hwmon: pwm-fan: use pwm_get_args() " Boris Brezillon
2016-04-14 19:17   ` Boris Brezillon
2016-04-14 19:17   ` Boris Brezillon
2016-04-14 19:17   ` Boris Brezillon
2016-04-14 19:17 ` [PATCH v5 14/24] input: misc: pwm-beeper: explicitly apply PWM config extracted from pwm_args Boris Brezillon
2016-04-14 19:17   ` Boris Brezillon
2016-04-14 19:17   ` Boris Brezillon
2016-04-14 19:17   ` Boris Brezillon
     [not found] ` <1460661464-11216-1-git-send-email-boris.brezillon-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
2016-04-14 19:17   ` [PATCH v5 01/24] pwm: introduce the pwm_args concept Boris Brezillon
2016-04-14 19:17     ` Boris Brezillon
2016-04-14 19:17     ` Boris Brezillon
2016-04-14 19:17     ` Boris Brezillon
2016-04-14 19:17   ` [PATCH v5 03/24] clk: pwm: use pwm_get_args() where appropriate Boris Brezillon
2016-04-14 19:17     ` Boris Brezillon
2016-04-14 19:17     ` Boris Brezillon
2016-04-14 19:17     ` Boris Brezillon
2016-04-14 19:17   ` [PATCH v5 05/24] input: misc: max77693: " Boris Brezillon
2016-04-14 19:17     ` Boris Brezillon
2016-04-14 19:17     ` Boris Brezillon
2016-04-14 19:17     ` Boris Brezillon
2016-04-14 19:17   ` [PATCH v5 06/24] leds: pwm: " Boris Brezillon
2016-04-14 19:17     ` Boris Brezillon
2016-04-14 19:17     ` Boris Brezillon
2016-04-14 19:17     ` Boris Brezillon
2016-04-14 19:17   ` [PATCH v5 07/24] regulator: " Boris Brezillon
2016-04-14 19:17     ` Boris Brezillon
2016-04-14 19:17     ` Boris Brezillon
2016-04-14 19:17     ` Boris Brezillon
     [not found]     ` <1460661464-11216-8-git-send-email-boris.brezillon-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
2016-04-15  6:54       ` Mark Brown
2016-04-15  6:54         ` Mark Brown
2016-04-15  6:54         ` Mark Brown
2016-04-15  6:54         ` Mark Brown
2016-04-14 19:17   ` [PATCH v5 08/24] fbdev: ssd1307fb: " Boris Brezillon
2016-04-14 19:17     ` Boris Brezillon
2016-04-14 19:17     ` Boris Brezillon
2016-04-14 19:17     ` Boris Brezillon
2016-04-14 19:17   ` [PATCH v5 09/24] backlight: pwm_bl: " Boris Brezillon
2016-04-14 19:17     ` Boris Brezillon
2016-04-14 19:17     ` Boris Brezillon
2016-04-14 19:17     ` Boris Brezillon
2016-04-14 19:17   ` [PATCH v5 10/24] backlight: lp8788: explicitly apply PWM config extracted from pwm_args Boris Brezillon
2016-04-14 19:17     ` Boris Brezillon
2016-04-14 19:17     ` Boris Brezillon
2016-04-14 19:17     ` Boris Brezillon
2016-04-14 19:17   ` [PATCH v5 11/24] backlight: lp855x: " Boris Brezillon
2016-04-14 19:17     ` Boris Brezillon
2016-04-14 19:17     ` Boris Brezillon
2016-04-14 19:17     ` Boris Brezillon
2016-04-14 19:17   ` [PATCH v5 12/24] backlight: lm3630a: " Boris Brezillon
2016-04-14 19:17     ` Boris Brezillon
2016-04-14 19:17     ` Boris Brezillon
2016-04-14 19:17     ` Boris Brezillon
2016-04-14 19:17   ` [PATCH v5 13/24] input: misc: max8997: " Boris Brezillon
2016-04-14 19:17     ` Boris Brezillon
2016-04-14 19:17     ` Boris Brezillon
2016-04-14 19:17     ` Boris Brezillon
     [not found]     ` <1460661464-11216-14-git-send-email-boris.brezillon-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
2016-04-17 12:45       ` Dmitry Torokhov
2016-04-17 12:45         ` Dmitry Torokhov
2016-04-17 12:45         ` Dmitry Torokhov
2016-04-17 12:45         ` Dmitry Torokhov
2016-04-17 15:39         ` Boris Brezillon
2016-04-17 15:39           ` Boris Brezillon
2016-04-17 15:39           ` Boris Brezillon
2016-04-17 15:39           ` Boris Brezillon
2016-04-14 19:17   ` [PATCH v5 15/24] drm: i915: " Boris Brezillon
2016-04-14 19:17     ` Boris Brezillon
2016-04-14 19:17     ` Boris Brezillon
2016-04-14 19:17     ` Boris Brezillon
2016-04-14 19:17   ` [PATCH v5 16/24] ARM: " Boris Brezillon
2016-04-14 19:17     ` Boris Brezillon
2016-04-14 19:17     ` Boris Brezillon
2016-04-14 19:17     ` Boris Brezillon
     [not found]     ` <1460661464-11216-17-git-send-email-boris.brezillon-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
2016-04-15  8:17       ` Krzysztof Kozlowski
2016-04-15  8:17         ` Krzysztof Kozlowski
2016-04-15  8:17         ` Krzysztof Kozlowski
2016-04-15  8:17         ` Krzysztof Kozlowski
2016-04-14 19:17   ` [PATCH v5 17/24] pwm: keep PWM state in sync with hardware state Boris Brezillon
2016-04-14 19:17     ` Boris Brezillon
2016-04-14 19:17     ` Boris Brezillon
2016-04-14 19:17     ` Boris Brezillon
2016-04-14 19:17   ` [PATCH v5 19/24] pwm: move the enabled/disabled info into pwm_state Boris Brezillon
2016-04-14 19:17     ` Boris Brezillon
2016-04-14 19:17     ` Boris Brezillon
2016-04-14 19:17     ` Boris Brezillon
2016-04-14 19:17   ` [PATCH v5 20/24] pwm: add the PWM initial state retrieval infra Boris Brezillon
2016-04-14 19:17     ` Boris Brezillon
2016-04-14 19:17     ` Boris Brezillon
2016-04-14 19:17     ` Boris Brezillon
2016-04-14 19:17   ` [PATCH v5 21/24] pwm: add the core infrastructure to allow atomic update Boris Brezillon
2016-04-14 19:17     ` Boris Brezillon
2016-04-14 19:17     ` Boris Brezillon
2016-04-14 19:17     ` Boris Brezillon
2016-04-14 19:17   ` [PATCH v5 22/24] pwm: update documentation Boris Brezillon
2016-04-14 19:17     ` Boris Brezillon
2016-04-14 19:17     ` Boris Brezillon
2016-04-14 19:17     ` Boris Brezillon
2016-04-14 19:17   ` Boris Brezillon [this message]
2016-04-14 19:17     ` [PATCH v5 23/24] pwm: switch to the atomic API Boris Brezillon
2016-04-14 19:17     ` Boris Brezillon
2016-04-14 19:17     ` Boris Brezillon
2016-04-14 19:17 ` [PATCH v5 18/24] pwm: introduce the pwm_state concept Boris Brezillon
2016-04-14 19:17   ` Boris Brezillon
2016-04-14 19:17   ` Boris Brezillon
2016-04-14 19:17   ` Boris Brezillon
2016-04-14 19:17 ` [PATCH v5 24/24] pwm: add information about polarity, duty cycle and period to debugfs Boris Brezillon
2016-04-14 19:17   ` Boris Brezillon
2016-04-14 19:17   ` Boris Brezillon
2016-04-14 19:17   ` Boris Brezillon
2016-04-15  7:22 ` ✗ Fi.CI.BAT: failure for pwm: add support for atomic update (rev2) Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1460661464-11216-24-git-send-email-boris.brezillon@free-electrons.com \
    --to=boris.brezillon-wi1+55scjutkeb57/3fjtnbpr1lh4cv8@public.gmane.org \
    --cc=broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=cooloney-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=dmitry.torokhov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=heiko-4mtYJXux2i+zQB+pC5nmwQ@public.gmane.org \
    --cc=j.anaszewski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org \
    --cc=jdelvare-IBi9RG/b67k@public.gmane.org \
    --cc=jingoohan1-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=k.debski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org \
    --cc=lee.jones-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    --cc=lgirdwood-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=linux-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org \
    --cc=linux-clk-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-input-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-leds-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-pwm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=linux-sunxi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org \
    --cc=lm-sensors-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org \
    --cc=manabian-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org \
    --cc=mturquette-rdvid1DuHRBWk0Htik3J/w@public.gmane.org \
    --cc=rpurdie-Fm38FmjxZ/leoWH0uzbU5w@public.gmane.org \
    --cc=sboyd-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
    --cc=thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=thomas.petazzoni-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org \
    --cc=wens-jdAy2FN1RRM@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.