#include <linux/cleanup.h>
#include <linux/container_of.h>
#include <linux/device.h>
#include <linux/err.h>
#include <linux/gpio/consumer.h>
#include <linux/hrtimer.h>
#include <linux/math.h>
#include <linux/module.h>
#include <linux/mod_devicetable.h>
#include <linux/platform_device.h>
#include <linux/property.h>
#include <linux/pwm.h>
#include <linux/spinlock.h>
#include <linux/time.h>
#include <linux/types.h>
struct pwm_gpio { … };
static void pwm_gpio_round(struct pwm_state *dest, const struct pwm_state *src)
{ … }
static u64 pwm_gpio_toggle(struct pwm_gpio *gpwm, bool level)
{ … }
static enum hrtimer_restart pwm_gpio_timer(struct hrtimer *gpio_timer)
{ … }
static int pwm_gpio_apply(struct pwm_chip *chip, struct pwm_device *pwm,
const struct pwm_state *state)
{ … }
static int pwm_gpio_get_state(struct pwm_chip *chip, struct pwm_device *pwm,
struct pwm_state *state)
{ … }
static const struct pwm_ops pwm_gpio_ops = …;
static void pwm_gpio_disable_hrtimer(void *data)
{ … }
static int pwm_gpio_probe(struct platform_device *pdev)
{ … }
static const struct of_device_id pwm_gpio_dt_ids[] = …;
MODULE_DEVICE_TABLE(of, pwm_gpio_dt_ids);
static struct platform_driver pwm_gpio_driver = …;
module_platform_driver(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;