#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/interrupt.h>
#include <linux/slab.h>
#include <linux/err.h>
#include <linux/io.h>
#include <linux/sched.h>
#include <linux/pm_runtime.h>
#include <linux/of.h>
#include <linux/w1.h>
#define MOD_NAME …
#define OMAP_HDQ_REVISION …
#define OMAP_HDQ_TX_DATA …
#define OMAP_HDQ_RX_DATA …
#define OMAP_HDQ_CTRL_STATUS …
#define OMAP_HDQ_CTRL_STATUS_SINGLE …
#define OMAP_HDQ_CTRL_STATUS_INTERRUPTMASK …
#define OMAP_HDQ_CTRL_STATUS_CLOCKENABLE …
#define OMAP_HDQ_CTRL_STATUS_GO …
#define OMAP_HDQ_CTRL_STATUS_PRESENCE …
#define OMAP_HDQ_CTRL_STATUS_INITIALIZATION …
#define OMAP_HDQ_CTRL_STATUS_DIR …
#define OMAP_HDQ_INT_STATUS …
#define OMAP_HDQ_INT_STATUS_TXCOMPLETE …
#define OMAP_HDQ_INT_STATUS_RXCOMPLETE …
#define OMAP_HDQ_INT_STATUS_TIMEOUT …
#define OMAP_HDQ_FLAG_CLEAR …
#define OMAP_HDQ_FLAG_SET …
#define OMAP_HDQ_TIMEOUT …
#define OMAP_HDQ_MAX_USER …
static DECLARE_WAIT_QUEUE_HEAD(hdq_wait_queue);
static int w1_id;
module_param(w1_id, int, 0400);
MODULE_PARM_DESC(…) …;
struct hdq_data { … };
static inline u8 hdq_reg_in(struct hdq_data *hdq_data, u32 offset)
{ … }
static inline void hdq_reg_out(struct hdq_data *hdq_data, u32 offset, u8 val)
{ … }
static inline u8 hdq_reg_merge(struct hdq_data *hdq_data, u32 offset,
u8 val, u8 mask)
{ … }
static int hdq_wait_for_flag(struct hdq_data *hdq_data, u32 offset,
u8 flag, u8 flag_set, u8 *status)
{ … }
static u8 hdq_reset_irqstatus(struct hdq_data *hdq_data, u8 bits)
{ … }
static int hdq_write_byte(struct hdq_data *hdq_data, u8 val, u8 *status)
{ … }
static irqreturn_t hdq_isr(int irq, void *_hdq)
{ … }
static void omap_w1_search_bus(void *_hdq, struct w1_master *master_dev,
u8 search_type, w1_slave_found_callback slave_found)
{ … }
static int omap_hdq_break(struct hdq_data *hdq_data)
{ … }
static int hdq_read_byte(struct hdq_data *hdq_data, u8 *val)
{ … }
static u8 omap_w1_triplet(void *_hdq, u8 bdir)
{ … }
static u8 omap_w1_reset_bus(void *_hdq)
{ … }
static u8 omap_w1_read_byte(void *_hdq)
{ … }
static void omap_w1_write_byte(void *_hdq, u8 byte)
{ … }
static struct w1_bus_master omap_w1_master = …;
static int __maybe_unused omap_hdq_runtime_suspend(struct device *dev)
{ … }
static int __maybe_unused omap_hdq_runtime_resume(struct device *dev)
{ … }
static const struct dev_pm_ops omap_hdq_pm_ops = …;
static int omap_hdq_probe(struct platform_device *pdev)
{ … }
static void omap_hdq_remove(struct platform_device *pdev)
{ … }
static const struct of_device_id omap_hdq_dt_ids[] = …;
MODULE_DEVICE_TABLE(of, omap_hdq_dt_ids);
static struct platform_driver omap_hdq_driver = …;
module_platform_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;