#include <linux/device.h>
#include <linux/leds.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/slab.h>
#include <linux/usb.h>
#include <linux/usb/of.h>
struct usbport_trig_data { … };
struct usbport_trig_port { … };
static bool usbport_trig_usb_dev_observed(struct usbport_trig_data *usbport_data,
struct usb_device *usb_dev)
{ … }
static int usbport_trig_usb_dev_check(struct usb_device *usb_dev, void *data)
{ … }
static void usbport_trig_update_count(struct usbport_trig_data *usbport_data)
{ … }
static ssize_t usbport_trig_port_show(struct device *dev,
struct device_attribute *attr, char *buf)
{ … }
static ssize_t usbport_trig_port_store(struct device *dev,
struct device_attribute *attr,
const char *buf, size_t size)
{ … }
static struct attribute *ports_attrs[] = …;
static const struct attribute_group ports_group = …;
static bool usbport_trig_port_observed(struct usbport_trig_data *usbport_data,
struct usb_device *usb_dev, int port1)
{ … }
static int usbport_trig_add_port(struct usbport_trig_data *usbport_data,
struct usb_device *usb_dev,
const char *hub_name, int portnum)
{ … }
static int usbport_trig_add_usb_dev_ports(struct usb_device *usb_dev,
void *data)
{ … }
static void usbport_trig_remove_port(struct usbport_trig_data *usbport_data,
struct usbport_trig_port *port)
{ … }
static void usbport_trig_remove_usb_dev_ports(struct usbport_trig_data *usbport_data,
struct usb_device *usb_dev)
{ … }
static int usbport_trig_notify(struct notifier_block *nb, unsigned long action,
void *data)
{ … }
static int usbport_trig_activate(struct led_classdev *led_cdev)
{ … }
static void usbport_trig_deactivate(struct led_classdev *led_cdev)
{ … }
static struct led_trigger usbport_led_trigger = …;
module_led_trigger(…);
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;