#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/i2c.h>
#include <linux/init.h>
#include <linux/time.h>
#include <linux/interrupt.h>
#include <linux/delay.h>
#include <linux/errno.h>
#include <linux/err.h>
#include <linux/platform_device.h>
#include <linux/pm_runtime.h>
#include <linux/clk.h>
#include <linux/cpufreq.h>
#include <linux/slab.h>
#include <linux/io.h>
#include <linux/of.h>
#include <linux/gpio/consumer.h>
#include <linux/pinctrl/consumer.h>
#include <linux/mfd/syscon.h>
#include <linux/regmap.h>
#include <asm/irq.h>
#include <linux/platform_data/i2c-s3c2410.h>
#define S3C2410_IICCON …
#define S3C2410_IICSTAT …
#define S3C2410_IICADD …
#define S3C2410_IICDS …
#define S3C2440_IICLC …
#define S3C2410_IICCON_ACKEN …
#define S3C2410_IICCON_TXDIV_16 …
#define S3C2410_IICCON_TXDIV_512 …
#define S3C2410_IICCON_IRQEN …
#define S3C2410_IICCON_IRQPEND …
#define S3C2410_IICCON_SCALE(x) …
#define S3C2410_IICCON_SCALEMASK …
#define S3C2410_IICSTAT_MASTER_RX …
#define S3C2410_IICSTAT_MASTER_TX …
#define S3C2410_IICSTAT_SLAVE_RX …
#define S3C2410_IICSTAT_SLAVE_TX …
#define S3C2410_IICSTAT_MODEMASK …
#define S3C2410_IICSTAT_START …
#define S3C2410_IICSTAT_BUSBUSY …
#define S3C2410_IICSTAT_TXRXEN …
#define S3C2410_IICSTAT_ARBITR …
#define S3C2410_IICSTAT_ASSLAVE …
#define S3C2410_IICSTAT_ADDR0 …
#define S3C2410_IICSTAT_LASTBIT …
#define S3C2410_IICLC_SDA_DELAY0 …
#define S3C2410_IICLC_SDA_DELAY5 …
#define S3C2410_IICLC_SDA_DELAY10 …
#define S3C2410_IICLC_SDA_DELAY15 …
#define S3C2410_IICLC_SDA_DELAY_MASK …
#define S3C2410_IICLC_FILTER_ON …
#define QUIRK_S3C2440 …
#define QUIRK_HDMIPHY …
#define QUIRK_NO_GPIO …
#define QUIRK_POLL …
#define QUIRK_ATOMIC …
#define S3C2410_IDLE_TIMEOUT …
#define EXYNOS5_SYS_I2C_CFG …
enum s3c24xx_i2c_state { … };
struct s3c24xx_i2c { … };
static const struct platform_device_id s3c24xx_driver_ids[] = …;
MODULE_DEVICE_TABLE(platform, s3c24xx_driver_ids);
static void i2c_s3c_irq_nextbyte(struct s3c24xx_i2c *i2c, unsigned long iicstat);
#ifdef CONFIG_OF
static const struct of_device_id s3c24xx_i2c_match[] = …;
MODULE_DEVICE_TABLE(of, s3c24xx_i2c_match);
#endif
static inline kernel_ulong_t s3c24xx_get_device_quirks(struct platform_device *pdev)
{ … }
static inline void s3c24xx_i2c_master_complete(struct s3c24xx_i2c *i2c, int ret)
{ … }
static inline void s3c24xx_i2c_disable_ack(struct s3c24xx_i2c *i2c)
{ … }
static inline void s3c24xx_i2c_enable_ack(struct s3c24xx_i2c *i2c)
{ … }
static inline void s3c24xx_i2c_disable_irq(struct s3c24xx_i2c *i2c)
{ … }
static inline void s3c24xx_i2c_enable_irq(struct s3c24xx_i2c *i2c)
{ … }
static bool is_ack(struct s3c24xx_i2c *i2c)
{ … }
static void s3c24xx_i2c_message_start(struct s3c24xx_i2c *i2c,
struct i2c_msg *msg)
{ … }
static inline void s3c24xx_i2c_stop(struct s3c24xx_i2c *i2c, int ret)
{ … }
static inline int is_lastmsg(struct s3c24xx_i2c *i2c)
{ … }
static inline int is_msglast(struct s3c24xx_i2c *i2c)
{ … }
static inline int is_msgend(struct s3c24xx_i2c *i2c)
{ … }
static void i2c_s3c_irq_nextbyte(struct s3c24xx_i2c *i2c, unsigned long iicstat)
{ … }
static irqreturn_t s3c24xx_i2c_irq(int irqno, void *dev_id)
{ … }
static inline void s3c24xx_i2c_disable_bus(struct s3c24xx_i2c *i2c)
{ … }
static int s3c24xx_i2c_set_master(struct s3c24xx_i2c *i2c)
{ … }
static void s3c24xx_i2c_wait_idle(struct s3c24xx_i2c *i2c)
{ … }
static int s3c24xx_i2c_doxfer(struct s3c24xx_i2c *i2c,
struct i2c_msg *msgs, int num)
{ … }
static int s3c24xx_i2c_xfer(struct i2c_adapter *adap,
struct i2c_msg *msgs, int num)
{ … }
static int s3c24xx_i2c_xfer_atomic(struct i2c_adapter *adap,
struct i2c_msg *msgs, int num)
{ … }
static u32 s3c24xx_i2c_func(struct i2c_adapter *adap)
{ … }
static const struct i2c_algorithm s3c24xx_i2c_algorithm = …;
static int s3c24xx_i2c_calcdivisor(unsigned long clkin, unsigned int wanted,
unsigned int *div1, unsigned int *divs)
{ … }
static int s3c24xx_i2c_clockrate(struct s3c24xx_i2c *i2c, unsigned int *got)
{ … }
#ifdef CONFIG_OF
static int s3c24xx_i2c_parse_dt_gpio(struct s3c24xx_i2c *i2c)
{ … }
#else
static int s3c24xx_i2c_parse_dt_gpio(struct s3c24xx_i2c *i2c)
{
return 0;
}
#endif
static int s3c24xx_i2c_init(struct s3c24xx_i2c *i2c)
{ … }
#ifdef CONFIG_OF
static void
s3c24xx_i2c_parse_dt(struct device_node *np, struct s3c24xx_i2c *i2c)
{ … }
#else
static void
s3c24xx_i2c_parse_dt(struct device_node *np, struct s3c24xx_i2c *i2c) { }
#endif
static int s3c24xx_i2c_probe(struct platform_device *pdev)
{ … }
static void s3c24xx_i2c_remove(struct platform_device *pdev)
{ … }
static int s3c24xx_i2c_suspend_noirq(struct device *dev)
{ … }
static int s3c24xx_i2c_resume_noirq(struct device *dev)
{ … }
static const struct dev_pm_ops s3c24xx_i2c_dev_pm_ops = …;
static struct platform_driver s3c24xx_i2c_driver = …;
static int __init i2c_adap_s3c_init(void)
{ … }
subsys_initcall(i2c_adap_s3c_init);
static void __exit i2c_adap_s3c_exit(void)
{ … }
module_exit(i2c_adap_s3c_exit);
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;