#include <linux/acpi.h>
#include <linux/auxiliary_bus.h>
#include <linux/dev_printk.h>
#include <linux/kernel.h>
#include <linux/mod_devicetable.h>
#include <linux/module.h>
#include <linux/mutex.h>
#include <linux/slab.h>
#include <linux/spinlock.h>
#include <linux/types.h>
#include <linux/usb.h>
#include <linux/usb/ljca.h>
#include <asm/unaligned.h>
#define LJCA_ACK_FLAG …
#define LJCA_RESP_FLAG …
#define LJCA_CMPL_FLAG …
#define LJCA_MAX_PACKET_SIZE …
#define LJCA_MAX_PAYLOAD_SIZE …
#define LJCA_WRITE_TIMEOUT_MS …
#define LJCA_WRITE_ACK_TIMEOUT_MS …
#define LJCA_ENUM_CLIENT_TIMEOUT_MS …
enum ljca_client_type { … };
enum ljca_mng_cmd { … };
enum ljca_client_acpi_adr { … };
struct ljca_msg { … } __packed;
struct ljca_i2c_ctr_info { … } __packed;
struct ljca_i2c_descriptor { … } __packed;
struct ljca_spi_ctr_info { … } __packed;
struct ljca_spi_descriptor { … } __packed;
struct ljca_bank_descriptor { … } __packed;
struct ljca_gpio_descriptor { … } __packed;
struct ljca_adapter { … };
struct ljca_match_ids_walk_data { … };
static const struct acpi_device_id ljca_gpio_hids[] = …;
static const struct acpi_device_id ljca_i2c_hids[] = …;
static const struct acpi_device_id ljca_spi_hids[] = …;
static void ljca_handle_event(struct ljca_adapter *adap,
struct ljca_msg *header)
{ … }
static void ljca_handle_cmd_ack(struct ljca_adapter *adap, struct ljca_msg *header)
{ … }
static void ljca_recv(struct urb *urb)
{ … }
static int ljca_send(struct ljca_adapter *adap, u8 type, u8 cmd,
const u8 *obuf, u8 obuf_len, u8 *ibuf, u8 ibuf_len,
bool ack, unsigned long timeout)
{ … }
int ljca_transfer(struct ljca_client *client, u8 cmd, const u8 *obuf,
u8 obuf_len, u8 *ibuf, u8 ibuf_len)
{ … }
EXPORT_SYMBOL_NS_GPL(…);
int ljca_transfer_noack(struct ljca_client *client, u8 cmd, const u8 *obuf,
u8 obuf_len)
{ … }
EXPORT_SYMBOL_NS_GPL(…);
int ljca_register_event_cb(struct ljca_client *client, ljca_event_cb_t event_cb,
void *context)
{ … }
EXPORT_SYMBOL_NS_GPL(…);
void ljca_unregister_event_cb(struct ljca_client *client)
{ … }
EXPORT_SYMBOL_NS_GPL(…);
static int ljca_match_device_ids(struct acpi_device *adev, void *data)
{ … }
static void ljca_auxdev_acpi_bind(struct ljca_adapter *adap,
struct auxiliary_device *auxdev,
u64 adr, u8 id)
{ … }
static void ljca_auxdev_release(struct device *dev)
{ … }
static int ljca_new_client_device(struct ljca_adapter *adap, u8 type, u8 id,
char *name, void *data, u64 adr)
{ … }
static int ljca_enumerate_gpio(struct ljca_adapter *adap)
{ … }
static int ljca_enumerate_i2c(struct ljca_adapter *adap)
{ … }
static int ljca_enumerate_spi(struct ljca_adapter *adap)
{ … }
static int ljca_reset_handshake(struct ljca_adapter *adap)
{ … }
static int ljca_enumerate_clients(struct ljca_adapter *adap)
{ … }
static int ljca_probe(struct usb_interface *interface,
const struct usb_device_id *id)
{ … }
static void ljca_disconnect(struct usb_interface *interface)
{ … }
static int ljca_suspend(struct usb_interface *interface, pm_message_t message)
{ … }
static int ljca_resume(struct usb_interface *interface)
{ … }
static const struct usb_device_id ljca_table[] = …;
MODULE_DEVICE_TABLE(usb, ljca_table);
static struct usb_driver ljca_driver = …;
module_usb_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_AUTHOR(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;