#include <linux/io.h>
#include <linux/leds.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/spinlock.h>
#define BCM6328_REG_INIT …
#define BCM6328_REG_MODE_HI …
#define BCM6328_REG_MODE_LO …
#define BCM6328_REG_HWDIS …
#define BCM6328_REG_STROBE …
#define BCM6328_REG_LNKACTSEL_HI …
#define BCM6328_REG_LNKACTSEL_LO …
#define BCM6328_REG_RBACK …
#define BCM6328_REG_SERMUX …
#define BCM6328_LED_MAX_COUNT …
#define BCM6328_LED_DEF_DELAY …
#define BCM6328_LED_BLINK_DELAYS …
#define BCM6328_LED_BLINK_MS …
#define BCM6328_LED_BLINK_MASK …
#define BCM6328_LED_BLINK1_SHIFT …
#define BCM6328_LED_BLINK1_MASK …
#define BCM6328_LED_BLINK2_SHIFT …
#define BCM6328_LED_BLINK2_MASK …
#define BCM6328_SERIAL_LED_EN …
#define BCM6328_SERIAL_LED_MUX …
#define BCM6328_SERIAL_LED_CLK_NPOL …
#define BCM6328_SERIAL_LED_DATA_PPOL …
#define BCM6328_SERIAL_LED_SHIFT_DIR …
#define BCM6328_LED_SHIFT_TEST …
#define BCM6328_LED_TEST …
#define BCM6328_INIT_MASK …
#define BCM6328_LED_MODE_MASK …
#define BCM6328_LED_MODE_ON …
#define BCM6328_LED_MODE_BLINK1 …
#define BCM6328_LED_MODE_BLINK2 …
#define BCM6328_LED_MODE_OFF …
#define BCM6328_LED_SHIFT(X) …
struct bcm6328_led { … };
static void bcm6328_led_write(void __iomem *reg, unsigned long data)
{ … }
static unsigned long bcm6328_led_read(void __iomem *reg)
{ … }
static unsigned long bcm6328_pin2shift(unsigned long pin)
{ … }
static void bcm6328_led_mode(struct bcm6328_led *led, unsigned long value)
{ … }
static void bcm6328_led_set(struct led_classdev *led_cdev,
enum led_brightness value)
{ … }
static unsigned long bcm6328_blink_delay(unsigned long delay)
{ … }
static int bcm6328_blink_set(struct led_classdev *led_cdev,
unsigned long *delay_on, unsigned long *delay_off)
{ … }
static int bcm6328_hwled(struct device *dev, struct device_node *nc, u32 reg,
void __iomem *mem, spinlock_t *lock)
{ … }
static int bcm6328_led(struct device *dev, struct device_node *nc, u32 reg,
void __iomem *mem, spinlock_t *lock,
unsigned long *blink_leds, unsigned long *blink_delay)
{ … }
static int bcm6328_leds_probe(struct platform_device *pdev)
{ … }
static const struct of_device_id bcm6328_leds_of_match[] = …;
MODULE_DEVICE_TABLE(of, bcm6328_leds_of_match);
static struct platform_driver bcm6328_leds_driver = …;
module_platform_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;
MODULE_ALIAS(…) …;