#include <linux/platform_device.h>
#include <linux/slab.h>
#include <linux/init.h>
#include <linux/module.h>
#include <linux/types.h>
#include <linux/of.h>
#include <linux/mutex.h>
#include <linux/gpio/driver.h>
#include <linux/io.h>
#include <linux/clk.h>
#include <linux/err.h>
#define XWAY_STP_CON0 …
#define XWAY_STP_CON1 …
#define XWAY_STP_CPU0 …
#define XWAY_STP_CPU1 …
#define XWAY_STP_AR …
#define XWAY_STP_CON_SWU …
#define XWAY_STP_2HZ …
#define XWAY_STP_4HZ …
#define XWAY_STP_8HZ …
#define XWAY_STP_10HZ …
#define XWAY_STP_SPEED_MASK …
#define XWAY_STP_FPIS_VALUE …
#define XWAY_STP_FPIS_MASK …
#define XWAY_STP_UPD_FPI …
#define XWAY_STP_UPD_MASK …
#define XWAY_STP_ADSL_SHIFT …
#define XWAY_STP_ADSL_MASK …
#define XWAY_STP_PHY_MASK …
#define XWAY_STP_PHY1_SHIFT …
#define XWAY_STP_PHY2_SHIFT …
#define XWAY_STP_PHY3_SHIFT …
#define XWAY_STP_PHY4_SHIFT …
#define XWAY_STP_GROUP0 …
#define XWAY_STP_GROUP1 …
#define XWAY_STP_GROUP2 …
#define XWAY_STP_GROUP_MASK …
#define XWAY_STP_FALLING …
#define XWAY_STP_EDGE_MASK …
#define xway_stp_r32(m, reg) …
#define xway_stp_w32(m, val, reg) …
#define xway_stp_w32_mask(m, clear, set, reg) …
struct xway_stp { … };
static int xway_stp_get(struct gpio_chip *gc, unsigned int gpio)
{ … }
static void xway_stp_set(struct gpio_chip *gc, unsigned gpio, int val)
{ … }
static int xway_stp_dir_out(struct gpio_chip *gc, unsigned gpio, int val)
{ … }
static int xway_stp_request(struct gpio_chip *gc, unsigned gpio)
{ … }
static void xway_stp_hw_init(struct xway_stp *chip)
{ … }
static int xway_stp_probe(struct platform_device *pdev)
{ … }
static const struct of_device_id xway_stp_match[] = …;
MODULE_DEVICE_TABLE(of, xway_stp_match);
static struct platform_driver xway_stp_driver = …;
static int __init xway_stp_init(void)
{ … }
subsys_initcall(xway_stp_init);