#define pr_fmt(fmt) …
#include <linux/atomic.h>
#include <linux/errno.h>
#include <linux/interrupt.h>
#include <linux/io.h>
#include <linux/mfd/syscon.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/regmap.h>
#include <linux/slab.h>
#include "kcs_bmc_device.h"
#define DEVICE_NAME …
#define KCS_CHANNEL_MAX …
#define KCS1ST …
#define KCS2ST …
#define KCS3ST …
#define KCS1DO …
#define KCS2DO …
#define KCS3DO …
#define KCS1DI …
#define KCS2DI …
#define KCS3DI …
#define KCS1CTL …
#define KCS2CTL …
#define KCS3CTL …
#define KCS_CTL_IBFIE …
#define KCS_CTL_OBEIE …
#define KCS1IE …
#define KCS2IE …
#define KCS3IE …
#define KCS_IE_IRQE …
#define KCS_IE_HIRQE …
struct npcm7xx_kcs_reg { … };
struct npcm7xx_kcs_bmc { … };
static const struct npcm7xx_kcs_reg npcm7xx_kcs_reg_tbl[KCS_CHANNEL_MAX] = …;
static inline struct npcm7xx_kcs_bmc *to_npcm7xx_kcs_bmc(struct kcs_bmc_device *kcs_bmc)
{ … }
static u8 npcm7xx_kcs_inb(struct kcs_bmc_device *kcs_bmc, u32 reg)
{ … }
static void npcm7xx_kcs_outb(struct kcs_bmc_device *kcs_bmc, u32 reg, u8 data)
{ … }
static void npcm7xx_kcs_updateb(struct kcs_bmc_device *kcs_bmc, u32 reg, u8 mask, u8 data)
{ … }
static void npcm7xx_kcs_enable_channel(struct kcs_bmc_device *kcs_bmc, bool enable)
{ … }
static void npcm7xx_kcs_irq_mask_update(struct kcs_bmc_device *kcs_bmc, u8 mask, u8 state)
{ … }
static irqreturn_t npcm7xx_kcs_irq(int irq, void *arg)
{ … }
static int npcm7xx_kcs_config_irq(struct kcs_bmc_device *kcs_bmc,
struct platform_device *pdev)
{ … }
static const struct kcs_bmc_device_ops npcm7xx_kcs_ops = …;
static int npcm7xx_kcs_probe(struct platform_device *pdev)
{ … }
static void npcm7xx_kcs_remove(struct platform_device *pdev)
{ … }
static const struct of_device_id npcm_kcs_bmc_match[] = …;
MODULE_DEVICE_TABLE(of, npcm_kcs_bmc_match);
static struct platform_driver npcm_kcs_bmc_driver = …;
module_platform_driver(…) …;
MODULE_LICENSE(…) …;
MODULE_AUTHOR(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;