#include <linux/acpi.h>
#include <linux/device.h>
#include <linux/err.h>
#include <linux/i2c.h>
#include <linux/list.h>
#include <linux/module.h>
#include <linux/slab.h>
#include "i2c-core.h"
struct i2c_acpi_handler_data { … };
struct gsb_buffer { … } __packed;
struct i2c_acpi_lookup { … };
bool i2c_acpi_get_i2c_resource(struct acpi_resource *ares,
struct acpi_resource_i2c_serialbus **i2c)
{ … }
EXPORT_SYMBOL_GPL(…);
static int i2c_acpi_resource_count(struct acpi_resource *ares, void *data)
{ … }
int i2c_acpi_client_count(struct acpi_device *adev)
{ … }
EXPORT_SYMBOL_GPL(…);
static int i2c_acpi_fill_info(struct acpi_resource *ares, void *data)
{ … }
static const struct acpi_device_id i2c_acpi_ignored_device_ids[] = …;
struct i2c_acpi_irq_context { … };
static int i2c_acpi_do_lookup(struct acpi_device *adev,
struct i2c_acpi_lookup *lookup)
{ … }
static int i2c_acpi_add_irq_resource(struct acpi_resource *ares, void *data)
{ … }
int i2c_acpi_get_irq(struct i2c_client *client, bool *wake_capable)
{ … }
static int i2c_acpi_get_info(struct acpi_device *adev,
struct i2c_board_info *info,
struct i2c_adapter *adapter,
acpi_handle *adapter_handle)
{ … }
static void i2c_acpi_register_device(struct i2c_adapter *adapter,
struct acpi_device *adev,
struct i2c_board_info *info)
{ … }
static acpi_status i2c_acpi_add_device(acpi_handle handle, u32 level,
void *data, void **return_value)
{ … }
#define I2C_ACPI_MAX_SCAN_DEPTH …
void i2c_acpi_register_devices(struct i2c_adapter *adap)
{ … }
static const struct acpi_device_id i2c_acpi_force_400khz_device_ids[] = …;
static acpi_status i2c_acpi_lookup_speed(acpi_handle handle, u32 level,
void *data, void **return_value)
{ … }
u32 i2c_acpi_find_bus_speed(struct device *dev)
{ … }
EXPORT_SYMBOL_GPL(…);
struct i2c_adapter *i2c_acpi_find_adapter_by_handle(acpi_handle handle)
{ … }
EXPORT_SYMBOL_GPL(…);
static struct i2c_client *i2c_acpi_find_client_by_adev(struct acpi_device *adev)
{ … }
static struct i2c_adapter *i2c_acpi_find_adapter_by_adev(struct acpi_device *adev)
{ … }
static int i2c_acpi_notify(struct notifier_block *nb, unsigned long value,
void *arg)
{ … }
struct notifier_block i2c_acpi_notifier = …;
struct i2c_client *i2c_acpi_new_device_by_fwnode(struct fwnode_handle *fwnode,
int index,
struct i2c_board_info *info)
{ … }
EXPORT_SYMBOL_GPL(…);
bool i2c_acpi_waive_d0_probe(struct device *dev)
{ … }
EXPORT_SYMBOL_GPL(…);
#ifdef CONFIG_ACPI_I2C_OPREGION
static int acpi_gsb_i2c_read_bytes(struct i2c_client *client,
u8 cmd, u8 *data, u8 data_len)
{ … }
static int acpi_gsb_i2c_write_bytes(struct i2c_client *client,
u8 cmd, u8 *data, u8 data_len)
{ … }
static acpi_status
i2c_acpi_space_handler(u32 function, acpi_physical_address command,
u32 bits, u64 *value64,
void *handler_context, void *region_context)
{ … }
int i2c_acpi_install_space_handler(struct i2c_adapter *adapter)
{ … }
void i2c_acpi_remove_space_handler(struct i2c_adapter *adapter)
{ … }
#endif