#include <linux/bitops.h>
#include <linux/compiler.h>
#include <linux/err.h>
#include <linux/init.h>
#include <linux/io.h>
#include <linux/ioport.h>
#include <linux/log2.h>
#include <linux/mod_devicetable.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/property.h>
#include <linux/slab.h>
#include <linux/spinlock.h>
#include <linux/types.h>
#include <linux/gpio/driver.h>
#include "gpiolib.h"
static void bgpio_write8(void __iomem *reg, unsigned long data)
{ … }
static unsigned long bgpio_read8(void __iomem *reg)
{ … }
static void bgpio_write16(void __iomem *reg, unsigned long data)
{ … }
static unsigned long bgpio_read16(void __iomem *reg)
{ … }
static void bgpio_write32(void __iomem *reg, unsigned long data)
{ … }
static unsigned long bgpio_read32(void __iomem *reg)
{ … }
#if BITS_PER_LONG >= 64
static void bgpio_write64(void __iomem *reg, unsigned long data)
{ … }
static unsigned long bgpio_read64(void __iomem *reg)
{ … }
#endif
static void bgpio_write16be(void __iomem *reg, unsigned long data)
{ … }
static unsigned long bgpio_read16be(void __iomem *reg)
{ … }
static void bgpio_write32be(void __iomem *reg, unsigned long data)
{ … }
static unsigned long bgpio_read32be(void __iomem *reg)
{ … }
static unsigned long bgpio_line2mask(struct gpio_chip *gc, unsigned int line)
{ … }
static int bgpio_get_set(struct gpio_chip *gc, unsigned int gpio)
{ … }
static int bgpio_get_set_multiple(struct gpio_chip *gc, unsigned long *mask,
unsigned long *bits)
{ … }
static int bgpio_get(struct gpio_chip *gc, unsigned int gpio)
{ … }
static int bgpio_get_multiple(struct gpio_chip *gc, unsigned long *mask,
unsigned long *bits)
{ … }
static int bgpio_get_multiple_be(struct gpio_chip *gc, unsigned long *mask,
unsigned long *bits)
{ … }
static void bgpio_set_none(struct gpio_chip *gc, unsigned int gpio, int val)
{ … }
static void bgpio_set(struct gpio_chip *gc, unsigned int gpio, int val)
{ … }
static void bgpio_set_with_clear(struct gpio_chip *gc, unsigned int gpio,
int val)
{ … }
static void bgpio_set_set(struct gpio_chip *gc, unsigned int gpio, int val)
{ … }
static void bgpio_multiple_get_masks(struct gpio_chip *gc,
unsigned long *mask, unsigned long *bits,
unsigned long *set_mask,
unsigned long *clear_mask)
{ … }
static void bgpio_set_multiple_single_reg(struct gpio_chip *gc,
unsigned long *mask,
unsigned long *bits,
void __iomem *reg)
{ … }
static void bgpio_set_multiple(struct gpio_chip *gc, unsigned long *mask,
unsigned long *bits)
{ … }
static void bgpio_set_multiple_set(struct gpio_chip *gc, unsigned long *mask,
unsigned long *bits)
{ … }
static void bgpio_set_multiple_with_clear(struct gpio_chip *gc,
unsigned long *mask,
unsigned long *bits)
{ … }
static int bgpio_simple_dir_in(struct gpio_chip *gc, unsigned int gpio)
{ … }
static int bgpio_dir_out_err(struct gpio_chip *gc, unsigned int gpio,
int val)
{ … }
static int bgpio_simple_dir_out(struct gpio_chip *gc, unsigned int gpio,
int val)
{ … }
static int bgpio_dir_in(struct gpio_chip *gc, unsigned int gpio)
{ … }
static int bgpio_get_dir(struct gpio_chip *gc, unsigned int gpio)
{ … }
static void bgpio_dir_out(struct gpio_chip *gc, unsigned int gpio, int val)
{ … }
static int bgpio_dir_out_dir_first(struct gpio_chip *gc, unsigned int gpio,
int val)
{ … }
static int bgpio_dir_out_val_first(struct gpio_chip *gc, unsigned int gpio,
int val)
{ … }
static int bgpio_setup_accessors(struct device *dev,
struct gpio_chip *gc,
bool byte_be)
{ … }
static int bgpio_setup_io(struct gpio_chip *gc,
void __iomem *dat,
void __iomem *set,
void __iomem *clr,
unsigned long flags)
{ … }
static int bgpio_setup_direction(struct gpio_chip *gc,
void __iomem *dirout,
void __iomem *dirin,
unsigned long flags)
{ … }
static int bgpio_request(struct gpio_chip *chip, unsigned gpio_pin)
{ … }
int bgpio_init(struct gpio_chip *gc, struct device *dev,
unsigned long sz, void __iomem *dat, void __iomem *set,
void __iomem *clr, void __iomem *dirout, void __iomem *dirin,
unsigned long flags)
{ … }
EXPORT_SYMBOL_GPL(…);
#if IS_ENABLED(CONFIG_GPIO_GENERIC_PLATFORM)
static void __iomem *bgpio_map(struct platform_device *pdev,
const char *name,
resource_size_t sane_sz)
{ … }
static const struct of_device_id bgpio_of_match[] = …;
MODULE_DEVICE_TABLE(of, bgpio_of_match);
static struct bgpio_pdata *bgpio_parse_fw(struct device *dev, unsigned long *flags)
{ … }
static int bgpio_pdev_probe(struct platform_device *pdev)
{ … }
static const struct platform_device_id bgpio_id_table[] = …;
MODULE_DEVICE_TABLE(platform, bgpio_id_table);
static struct platform_driver bgpio_driver = …;
module_platform_driver(…) …;
#endif
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;