#include <linux/clk.h>
#include <linux/debugfs.h>
#include <linux/errno.h>
#include <linux/hwspinlock.h>
#include <linux/io.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/reset.h>
#include <linux/slab.h>
#include <linux/spinlock.h>
#include <linux/types.h>
#include "hwspinlock_internal.h"
#define DRIVER_NAME …
#define SPINLOCK_BASE_ID …
#define SPINLOCK_SYSSTATUS_REG …
#define SPINLOCK_LOCK_REGN …
#define SPINLOCK_NOTTAKEN …
struct sun6i_hwspinlock_data { … };
#ifdef CONFIG_DEBUG_FS
static int hwlocks_supported_show(struct seq_file *seqf, void *unused)
{ … }
DEFINE_SHOW_ATTRIBUTE(…);
static void sun6i_hwspinlock_debugfs_init(struct sun6i_hwspinlock_data *priv)
{ … }
#else
static void sun6i_hwspinlock_debugfs_init(struct sun6i_hwspinlock_data *priv)
{
}
#endif
static int sun6i_hwspinlock_trylock(struct hwspinlock *lock)
{ … }
static void sun6i_hwspinlock_unlock(struct hwspinlock *lock)
{ … }
static const struct hwspinlock_ops sun6i_hwspinlock_ops = …;
static void sun6i_hwspinlock_disable(void *data)
{ … }
static int sun6i_hwspinlock_probe(struct platform_device *pdev)
{ … }
static const struct of_device_id sun6i_hwspinlock_ids[] = …;
MODULE_DEVICE_TABLE(of, sun6i_hwspinlock_ids);
static struct platform_driver sun6i_hwspinlock_driver = …;
module_platform_driver(…) …;
MODULE_LICENSE(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;