Skip to content

Commit

Permalink
pwm: Reorder header file to get rid of struct pwm_capture forward dec…
Browse files Browse the repository at this point in the history
…laration

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>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
  • Loading branch information
Uwe Kleine-König authored and Thierry Reding committed Jun 22, 2022
1 parent f6bc65d commit ef2e35d
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions include/linux/pwm.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
#include <linux/mutex.h>
#include <linux/of.h>

struct pwm_capture;
struct seq_file;

struct pwm_chip;
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -300,16 +309,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);
Expand Down

0 comments on commit ef2e35d

Please sign in to comment.