#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/platform_device.h>
#include <linux/leds.h>
#include <linux/of.h>
#include <linux/mfd/mc13xxx.h>
struct mc13xxx_led_devtype { … };
struct mc13xxx_led { … };
struct mc13xxx_leds { … };
static unsigned int mc13xxx_max_brightness(int id)
{ … }
static int mc13xxx_led_set(struct led_classdev *led_cdev,
enum led_brightness value)
{ … }
#ifdef CONFIG_OF
static struct mc13xxx_leds_platform_data __init *mc13xxx_led_probe_dt(
struct platform_device *pdev)
{ … }
#else
static inline struct mc13xxx_leds_platform_data __init *mc13xxx_led_probe_dt(
struct platform_device *pdev)
{
return ERR_PTR(-ENOSYS);
}
#endif
static int __init mc13xxx_led_probe(struct platform_device *pdev)
{ … }
static void mc13xxx_led_remove(struct platform_device *pdev)
{ … }
static const struct mc13xxx_led_devtype mc13783_led_devtype = …;
static const struct mc13xxx_led_devtype mc13892_led_devtype = …;
static const struct mc13xxx_led_devtype mc34708_led_devtype = …;
static const struct platform_device_id mc13xxx_led_id_table[] = …;
MODULE_DEVICE_TABLE(platform, mc13xxx_led_id_table);
static struct platform_driver mc13xxx_led_driver = …;
module_platform_driver_probe(…);
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;