All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] pwm: Reorder header file to get rid of struct pwm_capture forward declaration
@ 2022-05-23 17:45 Uwe Kleine-König
  2022-05-23 17:45 ` [PATCH 2/3] pwm: Drop unused forward declaration from pwm.h Uwe Kleine-König
  2022-05-23 17:45 ` [PATCH 3/3] pwm: Make capture support optional Uwe Kleine-König
  0 siblings, 2 replies; 10+ messages in thread
From: Uwe Kleine-König @ 2022-05-23 17:45 UTC (permalink / raw)
  To: Thierry Reding, Lee Jones; +Cc: linux-pwm, kernel

There is no cyclic dependency, so by reordering the forward declaration
can be dropped.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 include/linux/pwm.h | 21 ++++++++++-----------
 1 file changed, 10 insertions(+), 11 deletions(-)

diff --git a/include/linux/pwm.h b/include/linux/pwm.h
index 9771a0761a40..2aa6de03d7f2 100644
--- a/include/linux/pwm.h
+++ b/include/linux/pwm.h
@@ -6,7 +6,6 @@
 #include <linux/mutex.h>
 #include <linux/of.h>
 
-struct pwm_capture;
 struct seq_file;
 
 struct pwm_chip;
@@ -251,6 +250,16 @@ pwm_set_relative_duty_cycle(struct pwm_state *state, unsigned int duty_cycle,
 	return 0;
 }
 
+/**
+ * struct pwm_capture - PWM capture data
+ * @period: period of the PWM signal (in nanoseconds)
+ * @duty_cycle: duty cycle of the PWM signal (in nanoseconds)
+ */
+struct pwm_capture {
+	unsigned int period;
+	unsigned int duty_cycle;
+};
+
 /**
  * struct pwm_ops - PWM controller operations
  * @request: optional hook for requesting a PWM
@@ -312,16 +321,6 @@ struct pwm_chip {
 	struct pwm_device *pwms;
 };
 
-/**
- * struct pwm_capture - PWM capture data
- * @period: period of the PWM signal (in nanoseconds)
- * @duty_cycle: duty cycle of the PWM signal (in nanoseconds)
- */
-struct pwm_capture {
-	unsigned int period;
-	unsigned int duty_cycle;
-};
-
 #if IS_ENABLED(CONFIG_PWM)
 /* PWM user APIs */
 struct pwm_device *pwm_request(int pwm_id, const char *label);

base-commit: 3d593b6e80ad2c911b5645af28d83eabb96e7c1b
-- 
2.35.1


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

end of thread, other threads:[~2022-11-17 22:21 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-05-23 17:45 [PATCH 1/3] pwm: Reorder header file to get rid of struct pwm_capture forward declaration Uwe Kleine-König
2022-05-23 17:45 ` [PATCH 2/3] pwm: Drop unused forward declaration from pwm.h Uwe Kleine-König
2022-05-23 17:45 ` [PATCH 3/3] pwm: Make capture support optional Uwe Kleine-König
2022-06-22 13:46   ` Thierry Reding
2022-06-22 17:09     ` Uwe Kleine-König
2022-09-30 15:43       ` Uwe Kleine-König
2022-10-06 13:10         ` Thierry Reding
2022-10-06 14:35           ` Uwe Kleine-König
2022-10-07  9:58             ` Thierry Reding
2022-11-17 22:19       ` William Breathitt Gray

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.