#include <linux/bitfield.h>
#include <linux/clk.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/mod_devicetable.h>
#include <linux/pwm.h>
#include <linux/regmap.h>
#include <linux/reset.h>
#define LGM_PWM_FAN_CON0 …
#define LGM_PWM_FAN_EN_EN …
#define LGM_PWM_FAN_EN_DIS …
#define LGM_PWM_FAN_EN_MSK …
#define LGM_PWM_FAN_MODE_2WIRE …
#define LGM_PWM_FAN_MODE_MSK …
#define LGM_PWM_FAN_DC_MSK …
#define LGM_PWM_FAN_CON1 …
#define LGM_PWM_FAN_MAX_RPM_MSK …
#define LGM_PWM_MAX_RPM …
#define LGM_PWM_DEFAULT_RPM …
#define LGM_PWM_MAX_DUTY_CYCLE …
#define LGM_PWM_DC_BITS …
#define LGM_PWM_PERIOD_2WIRE_NS …
struct lgm_pwm_chip { … };
static inline struct lgm_pwm_chip *to_lgm_pwm_chip(struct pwm_chip *chip)
{ … }
static int lgm_pwm_enable(struct pwm_chip *chip, bool enable)
{ … }
static int lgm_pwm_apply(struct pwm_chip *chip, struct pwm_device *pwm,
const struct pwm_state *state)
{ … }
static int lgm_pwm_get_state(struct pwm_chip *chip, struct pwm_device *pwm,
struct pwm_state *state)
{ … }
static const struct pwm_ops lgm_pwm_ops = …;
static void lgm_pwm_init(struct lgm_pwm_chip *pc)
{ … }
static const struct regmap_config lgm_pwm_regmap_config = …;
static void lgm_clk_release(void *data)
{ … }
static int lgm_clk_enable(struct device *dev, struct clk *clk)
{ … }
static void lgm_reset_control_release(void *data)
{ … }
static int lgm_reset_control_deassert(struct device *dev, struct reset_control *rst)
{ … }
static int lgm_pwm_probe(struct platform_device *pdev)
{ … }
static const struct of_device_id lgm_pwm_of_match[] = …;
MODULE_DEVICE_TABLE(of, lgm_pwm_of_match);
static struct platform_driver lgm_pwm_driver = …;
module_platform_driver(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;