#include <linux/acpi.h>
#include <linux/completion.h>
#include <linux/delay.h>
#include <linux/i2c.h>
#include <linux/interrupt.h>
#include <linux/irq.h>
#include <linux/irqdomain.h>
#include <linux/mfd/intel_soc_pmic.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/power/bq24190_charger.h>
#include <linux/power/bq25890_charger.h>
#include <linux/slab.h>
#define CHT_WC_I2C_CTRL …
#define CHT_WC_I2C_CTRL_WR …
#define CHT_WC_I2C_CTRL_RD …
#define CHT_WC_I2C_CLIENT_ADDR …
#define CHT_WC_I2C_REG_OFFSET …
#define CHT_WC_I2C_WRDATA …
#define CHT_WC_I2C_RDDATA …
#define CHT_WC_EXTCHGRIRQ …
#define CHT_WC_EXTCHGRIRQ_CLIENT_IRQ …
#define CHT_WC_EXTCHGRIRQ_WRITE_IRQ …
#define CHT_WC_EXTCHGRIRQ_READ_IRQ …
#define CHT_WC_EXTCHGRIRQ_NACK_IRQ …
#define CHT_WC_EXTCHGRIRQ_ADAP_IRQMASK …
#define CHT_WC_EXTCHGRIRQ_MSK …
struct cht_wc_i2c_adap { … };
static irqreturn_t cht_wc_i2c_adap_thread_handler(int id, void *data)
{ … }
static u32 cht_wc_i2c_adap_func(struct i2c_adapter *adap)
{ … }
static int cht_wc_i2c_adap_smbus_xfer(struct i2c_adapter *_adap, u16 addr,
unsigned short flags, char read_write,
u8 command, int size,
union i2c_smbus_data *data)
{ … }
static const struct i2c_algorithm cht_wc_i2c_adap_algo = …;
static void cht_wc_i2c_adap_lock_bus(struct i2c_adapter *adapter,
unsigned int flags)
{ … }
static int cht_wc_i2c_adap_trylock_bus(struct i2c_adapter *adapter,
unsigned int flags)
{ … }
static void cht_wc_i2c_adap_unlock_bus(struct i2c_adapter *adapter,
unsigned int flags)
{ … }
static const struct i2c_lock_operations cht_wc_i2c_adap_lock_ops = …;
static void cht_wc_i2c_irq_lock(struct irq_data *data)
{ … }
static void cht_wc_i2c_irq_sync_unlock(struct irq_data *data)
{ … }
static void cht_wc_i2c_irq_enable(struct irq_data *data)
{ … }
static void cht_wc_i2c_irq_disable(struct irq_data *data)
{ … }
static const struct irq_chip cht_wc_i2c_irq_chip = …;
static const char * const bq24190_suppliers[] = …;
static const struct property_entry bq24190_props[] = …;
static const struct software_node bq24190_node = …;
static struct regulator_consumer_supply fusb302_consumer = …;
static const struct regulator_init_data bq24190_vbus_init_data = …;
static struct bq24190_platform_data bq24190_pdata = …;
static struct i2c_board_info gpd_win_board_info = …;
static struct regulator_consumer_supply bq2589x_vbus_consumer = …;
static const struct regulator_init_data bq2589x_vbus_init_data = …;
static struct bq25890_platform_data bq2589x_pdata = …;
static const struct property_entry xiaomi_mipad2_props[] = …;
static const struct software_node xiaomi_mipad2_node = …;
static struct i2c_board_info xiaomi_mipad2_board_info = …;
static const char * const lenovo_yb1_bq25892_suppliers[] = …;
static const struct property_entry lenovo_yb1_bq25892_props[] = …;
static const struct software_node lenovo_yb1_bq25892_node = …;
static struct i2c_board_info lenovo_yogabook1_board_info = …;
static const char * const lenovo_yt3_bq25892_1_suppliers[] = …;
static const struct property_entry lenovo_yt3_bq25892_1_props[] = …;
static const struct software_node lenovo_yt3_bq25892_1_node = …;
static struct i2c_board_info lenovo_yoga_tab3_board_info = …;
static int cht_wc_i2c_adap_i2c_probe(struct platform_device *pdev)
{ … }
static void cht_wc_i2c_adap_i2c_remove(struct platform_device *pdev)
{ … }
static const struct platform_device_id cht_wc_i2c_adap_id_table[] = …;
MODULE_DEVICE_TABLE(platform, cht_wc_i2c_adap_id_table);
static struct platform_driver cht_wc_i2c_adap_driver = …;
module_platform_driver(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;