aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2022-08-02 11:04:41 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2022-08-02 11:04:41 -0700
commit530c28df03e701618949bedf445b1c3c90854ea9 (patch)
treefae58617b02952525f258b17fcb63a3c84acee8c /include
parentMerge tag 'spi-v5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi (diff)
parentpwm: lpc18xx: Fix period handling (diff)
downloadwireguard-linux-530c28df03e701618949bedf445b1c3c90854ea9.tar.xz
wireguard-linux-530c28df03e701618949bedf445b1c3c90854ea9.zip
Merge tag 'pwm/for-5.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm
Pull pwm updates from Thierry Reding: "After v5.19 had all drivers converted to the new atomic API and nobody has reported any breakage, this set of changes starts by dropping the legacy support. Some existing drivers get improvements and broader chip support and a new driver is added that emulates a PWM controller using a clock output. Other than that there's the usual bits of cleanups and minor fixes" * tag 'pwm/for-5.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm: (21 commits) pwm: lpc18xx: Fix period handling pwm: lpc18xx: Convert to use dev_err_probe() pwm: twl-led: Document some limitations and link to the reference manual MAINTAINERS: Remove myself as PWM maintainer MAINTAINERS: Add include/dt-bindings/pwm to PWM SUBSYSTEM dt-bindings: pwm: mediatek: Add compatible string for MT8195 pwm: Add clock based PWM output driver dt-bindings: pwm: Document clk based PWM controller pwm: sifive: Shut down hardware only after pwmchip_remove() completed pwm: sifive: Ensure the clk is enabled exactly once per running PWM pwm: sifive: Simplify clk handling pwm: sifive: Enable clk only after period check in .apply() pwm: sifive: Reduce time the controller lock is held pwm: sifive: Fold pwm_sifive_enable() into its only caller pwm: sifive: Simplify offset calculation for PWMCMP registers pwm: mediatek: Add MT8365 support dt-bindings: pwm: Add MT8365 SoC binding pwm: Drop unused forward declaration from pwm.h pwm: Reorder header file to get rid of struct pwm_capture forward declaration pwm: atmel-tcb: Fix typo in comment ...
Diffstat (limited to 'include')
-rw-r--r--include/linux/pwm.h35
1 files changed, 10 insertions, 25 deletions
diff --git a/include/linux/pwm.h b/include/linux/pwm.h
index 9771a0761a40..9429930c5566 100644
--- a/include/linux/pwm.h
+++ b/include/linux/pwm.h
@@ -6,9 +6,6 @@
#include <linux/mutex.h>
#include <linux/of.h>
-struct pwm_capture;
-struct seq_file;
-
struct pwm_chip;
/**
@@ -252,6 +249,16 @@ pwm_set_relative_duty_cycle(struct pwm_state *state, unsigned int duty_cycle,
}
/**
+ * 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
* @free: optional hook for freeing a PWM
@@ -261,10 +268,6 @@ pwm_set_relative_duty_cycle(struct pwm_state *state, unsigned int duty_cycle,
* called once per PWM device when the PWM chip is
* registered.
* @owner: helps prevent removal of modules exporting active PWMs
- * @config: configure duty cycles and period length for this PWM
- * @set_polarity: configure the polarity of this PWM
- * @enable: enable PWM output toggling
- * @disable: disable PWM output toggling
*/
struct pwm_ops {
int (*request)(struct pwm_chip *chip, struct pwm_device *pwm);
@@ -276,14 +279,6 @@ struct pwm_ops {
void (*get_state)(struct pwm_chip *chip, struct pwm_device *pwm,
struct pwm_state *state);
struct module *owner;
-
- /* Only used by legacy drivers */
- int (*config)(struct pwm_chip *chip, struct pwm_device *pwm,
- int duty_ns, int period_ns);
- int (*set_polarity)(struct pwm_chip *chip, struct pwm_device *pwm,
- enum pwm_polarity polarity);
- int (*enable)(struct pwm_chip *chip, struct pwm_device *pwm);
- void (*disable)(struct pwm_chip *chip, struct pwm_device *pwm);
};
/**
@@ -312,16 +307,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);