#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/pwm.h>
#include <linux/greybus.h>
#include "gbphy.h"
struct gb_pwm_chip { … };
static inline struct gb_pwm_chip *pwm_chip_to_gb_pwm_chip(struct pwm_chip *chip)
{ … }
static int gb_pwm_get_npwm(struct gb_connection *connection)
{ … }
static int gb_pwm_activate_operation(struct pwm_chip *chip, u8 which)
{ … }
static int gb_pwm_deactivate_operation(struct pwm_chip *chip, u8 which)
{ … }
static int gb_pwm_config_operation(struct pwm_chip *chip,
u8 which, u32 duty, u32 period)
{ … }
static int gb_pwm_set_polarity_operation(struct pwm_chip *chip,
u8 which, u8 polarity)
{ … }
static int gb_pwm_enable_operation(struct pwm_chip *chip, u8 which)
{ … }
static int gb_pwm_disable_operation(struct pwm_chip *chip, u8 which)
{ … }
static int gb_pwm_request(struct pwm_chip *chip, struct pwm_device *pwm)
{
return gb_pwm_activate_operation(chip, pwm->hwpwm);
};
static void gb_pwm_free(struct pwm_chip *chip, struct pwm_device *pwm)
{ … }
static int gb_pwm_apply(struct pwm_chip *chip, struct pwm_device *pwm,
const struct pwm_state *state)
{ … }
static const struct pwm_ops gb_pwm_ops = …;
static int gb_pwm_probe(struct gbphy_device *gbphy_dev,
const struct gbphy_device_id *id)
{ … }
static void gb_pwm_remove(struct gbphy_device *gbphy_dev)
{ … }
static const struct gbphy_device_id gb_pwm_id_table[] = …;
MODULE_DEVICE_TABLE(gbphy, gb_pwm_id_table);
static struct gbphy_driver pwm_driver = …;
module_gbphy_driver(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;