Philippe Rétornaz | 7fdcef8 | 2010-05-19 09:24:31 +0200 | [diff] [blame] | 1 | /* |
Alexander Shiyan | a59ce65 | 2014-01-31 22:36:28 -0800 | [diff] [blame] | 2 | * LEDs driver for Freescale MC13783/MC13892/MC34708 |
Philippe Rétornaz | 7fdcef8 | 2010-05-19 09:24:31 +0200 | [diff] [blame] | 3 | * |
| 4 | * Copyright (C) 2010 Philippe Rétornaz |
| 5 | * |
| 6 | * Based on leds-da903x: |
| 7 | * Copyright (C) 2008 Compulab, Ltd. |
| 8 | * Mike Rapoport <mike@compulab.co.il> |
| 9 | * |
| 10 | * Copyright (C) 2006-2008 Marvell International Ltd. |
| 11 | * Eric Miao <eric.miao@marvell.com> |
| 12 | * |
| 13 | * This program is free software; you can redistribute it and/or modify |
| 14 | * it under the terms of the GNU General Public License version 2 as |
| 15 | * published by the Free Software Foundation. |
| 16 | */ |
| 17 | |
| 18 | #include <linux/module.h> |
| 19 | #include <linux/kernel.h> |
| 20 | #include <linux/init.h> |
| 21 | #include <linux/platform_device.h> |
| 22 | #include <linux/leds.h> |
| 23 | #include <linux/workqueue.h> |
David Jander | f3ca078 | 2011-08-24 15:28:20 +0200 | [diff] [blame] | 24 | #include <linux/mfd/mc13xxx.h> |
Philippe Rétornaz | 7fdcef8 | 2010-05-19 09:24:31 +0200 | [diff] [blame] | 25 | |
Alexander Shiyan | 9d263813 | 2013-06-10 09:59:30 -0700 | [diff] [blame] | 26 | struct mc13xxx_led_devtype { |
| 27 | int led_min; |
| 28 | int led_max; |
| 29 | int num_regs; |
Alexander Shiyan | a59ce65 | 2014-01-31 22:36:28 -0800 | [diff] [blame] | 30 | u32 ledctrl_base; |
Alexander Shiyan | 9d263813 | 2013-06-10 09:59:30 -0700 | [diff] [blame] | 31 | }; |
| 32 | |
| 33 | struct mc13xxx_led { |
Philippe Rétornaz | 7fdcef8 | 2010-05-19 09:24:31 +0200 | [diff] [blame] | 34 | struct led_classdev cdev; |
| 35 | struct work_struct work; |
Philippe Rétornaz | 7fdcef8 | 2010-05-19 09:24:31 +0200 | [diff] [blame] | 36 | enum led_brightness new_brightness; |
| 37 | int id; |
Alexander Shiyan | a59ce65 | 2014-01-31 22:36:28 -0800 | [diff] [blame] | 38 | struct mc13xxx_leds *leds; |
Philippe Rétornaz | 7fdcef8 | 2010-05-19 09:24:31 +0200 | [diff] [blame] | 39 | }; |
| 40 | |
Alexander Shiyan | 9d263813 | 2013-06-10 09:59:30 -0700 | [diff] [blame] | 41 | struct mc13xxx_leds { |
Alexander Shiyan | a59ce65 | 2014-01-31 22:36:28 -0800 | [diff] [blame] | 42 | struct mc13xxx *master; |
Alexander Shiyan | 9d263813 | 2013-06-10 09:59:30 -0700 | [diff] [blame] | 43 | struct mc13xxx_led_devtype *devtype; |
| 44 | int num_leds; |
| 45 | struct mc13xxx_led led[0]; |
| 46 | }; |
Philippe Rétornaz | 7fdcef8 | 2010-05-19 09:24:31 +0200 | [diff] [blame] | 47 | |
Alexander Shiyan | 677d13f | 2014-01-31 22:36:30 -0800 | [diff] [blame] | 48 | static unsigned int mc13xxx_max_brightness(int id) |
| 49 | { |
| 50 | if (id >= MC13783_LED_MD && id <= MC13783_LED_KP) |
| 51 | return 0x0f; |
| 52 | else if (id >= MC13783_LED_R1 && id <= MC13783_LED_B3) |
| 53 | return 0x1f; |
| 54 | |
| 55 | return 0x3f; |
| 56 | } |
| 57 | |
Alexander Shiyan | 9d263813 | 2013-06-10 09:59:30 -0700 | [diff] [blame] | 58 | static void mc13xxx_led_work(struct work_struct *work) |
Philippe Rétornaz | 7fdcef8 | 2010-05-19 09:24:31 +0200 | [diff] [blame] | 59 | { |
Alexander Shiyan | 9d263813 | 2013-06-10 09:59:30 -0700 | [diff] [blame] | 60 | struct mc13xxx_led *led = container_of(work, struct mc13xxx_led, work); |
Alexander Shiyan | a59ce65 | 2014-01-31 22:36:28 -0800 | [diff] [blame] | 61 | struct mc13xxx_leds *leds = led->leds; |
Alexander Shiyan | 677d13f | 2014-01-31 22:36:30 -0800 | [diff] [blame] | 62 | unsigned int reg, bank, off, shift; |
Philippe Rétornaz | 7fdcef8 | 2010-05-19 09:24:31 +0200 | [diff] [blame] | 63 | |
| 64 | switch (led->id) { |
| 65 | case MC13783_LED_MD: |
Philippe Rétornaz | 7fdcef8 | 2010-05-19 09:24:31 +0200 | [diff] [blame] | 66 | case MC13783_LED_AD: |
Philippe Rétornaz | 7fdcef8 | 2010-05-19 09:24:31 +0200 | [diff] [blame] | 67 | case MC13783_LED_KP: |
Alexander Shiyan | a59ce65 | 2014-01-31 22:36:28 -0800 | [diff] [blame] | 68 | reg = 2; |
| 69 | shift = 9 + (led->id - MC13783_LED_MD) * 4; |
Philippe Rétornaz | 7fdcef8 | 2010-05-19 09:24:31 +0200 | [diff] [blame] | 70 | break; |
| 71 | case MC13783_LED_R1: |
| 72 | case MC13783_LED_G1: |
| 73 | case MC13783_LED_B1: |
| 74 | case MC13783_LED_R2: |
| 75 | case MC13783_LED_G2: |
| 76 | case MC13783_LED_B2: |
| 77 | case MC13783_LED_R3: |
| 78 | case MC13783_LED_G3: |
| 79 | case MC13783_LED_B3: |
| 80 | off = led->id - MC13783_LED_R1; |
Alexander Shiyan | 9d263813 | 2013-06-10 09:59:30 -0700 | [diff] [blame] | 81 | bank = off / 3; |
Alexander Shiyan | a59ce65 | 2014-01-31 22:36:28 -0800 | [diff] [blame] | 82 | reg = 3 + bank; |
Alexander Shiyan | 9d263813 | 2013-06-10 09:59:30 -0700 | [diff] [blame] | 83 | shift = (off - bank * 3) * 5 + 6; |
Philippe Rétornaz | 7fdcef8 | 2010-05-19 09:24:31 +0200 | [diff] [blame] | 84 | break; |
Alexander Shiyan | ae6cdb0 | 2013-06-10 09:59:31 -0700 | [diff] [blame] | 85 | case MC13892_LED_MD: |
Alexander Shiyan | ae6cdb0 | 2013-06-10 09:59:31 -0700 | [diff] [blame] | 86 | case MC13892_LED_AD: |
Alexander Shiyan | ae6cdb0 | 2013-06-10 09:59:31 -0700 | [diff] [blame] | 87 | case MC13892_LED_KP: |
Alexander Shiyan | a59ce65 | 2014-01-31 22:36:28 -0800 | [diff] [blame] | 88 | reg = (led->id - MC13892_LED_MD) / 2; |
| 89 | shift = 3 + (led->id - MC13892_LED_MD) * 12; |
Alexander Shiyan | ae6cdb0 | 2013-06-10 09:59:31 -0700 | [diff] [blame] | 90 | break; |
| 91 | case MC13892_LED_R: |
| 92 | case MC13892_LED_G: |
| 93 | case MC13892_LED_B: |
| 94 | off = led->id - MC13892_LED_R; |
| 95 | bank = off / 2; |
Alexander Shiyan | a59ce65 | 2014-01-31 22:36:28 -0800 | [diff] [blame] | 96 | reg = 2 + bank; |
Alexander Shiyan | ae6cdb0 | 2013-06-10 09:59:31 -0700 | [diff] [blame] | 97 | shift = (off - bank * 2) * 12 + 3; |
Alexander Shiyan | ae6cdb0 | 2013-06-10 09:59:31 -0700 | [diff] [blame] | 98 | break; |
Alexander Shiyan | a59ce65 | 2014-01-31 22:36:28 -0800 | [diff] [blame] | 99 | case MC34708_LED_R: |
| 100 | case MC34708_LED_G: |
| 101 | reg = 0; |
| 102 | shift = 3 + (led->id - MC34708_LED_R) * 12; |
Alexander Shiyan | a59ce65 | 2014-01-31 22:36:28 -0800 | [diff] [blame] | 103 | break; |
Alexander Shiyan | 9d263813 | 2013-06-10 09:59:30 -0700 | [diff] [blame] | 104 | default: |
| 105 | BUG(); |
Philippe Rétornaz | 7fdcef8 | 2010-05-19 09:24:31 +0200 | [diff] [blame] | 106 | } |
| 107 | |
Alexander Shiyan | a59ce65 | 2014-01-31 22:36:28 -0800 | [diff] [blame] | 108 | mc13xxx_reg_rmw(leds->master, leds->devtype->ledctrl_base + reg, |
Alexander Shiyan | 677d13f | 2014-01-31 22:36:30 -0800 | [diff] [blame] | 109 | mc13xxx_max_brightness(led->id) << shift, |
| 110 | led->new_brightness << shift); |
Philippe Rétornaz | 7fdcef8 | 2010-05-19 09:24:31 +0200 | [diff] [blame] | 111 | } |
| 112 | |
Alexander Shiyan | 9d263813 | 2013-06-10 09:59:30 -0700 | [diff] [blame] | 113 | static void mc13xxx_led_set(struct led_classdev *led_cdev, |
| 114 | enum led_brightness value) |
Philippe Rétornaz | 7fdcef8 | 2010-05-19 09:24:31 +0200 | [diff] [blame] | 115 | { |
Alexander Shiyan | 9d263813 | 2013-06-10 09:59:30 -0700 | [diff] [blame] | 116 | struct mc13xxx_led *led = |
| 117 | container_of(led_cdev, struct mc13xxx_led, cdev); |
Philippe Rétornaz | 7fdcef8 | 2010-05-19 09:24:31 +0200 | [diff] [blame] | 118 | |
Philippe Rétornaz | 7fdcef8 | 2010-05-19 09:24:31 +0200 | [diff] [blame] | 119 | led->new_brightness = value; |
| 120 | schedule_work(&led->work); |
| 121 | } |
| 122 | |
Alexander Shiyan | 9d263813 | 2013-06-10 09:59:30 -0700 | [diff] [blame] | 123 | static int __init mc13xxx_led_probe(struct platform_device *pdev) |
Philippe Rétornaz | 7fdcef8 | 2010-05-19 09:24:31 +0200 | [diff] [blame] | 124 | { |
Alexander Shiyan | a59ce65 | 2014-01-31 22:36:28 -0800 | [diff] [blame] | 125 | struct device *dev = &pdev->dev; |
| 126 | struct mc13xxx_leds_platform_data *pdata = dev_get_platdata(dev); |
| 127 | struct mc13xxx *mcdev = dev_get_drvdata(dev->parent); |
Alexander Shiyan | 9d263813 | 2013-06-10 09:59:30 -0700 | [diff] [blame] | 128 | struct mc13xxx_led_devtype *devtype = |
| 129 | (struct mc13xxx_led_devtype *)pdev->id_entry->driver_data; |
| 130 | struct mc13xxx_leds *leds; |
Alexander Shiyan | cf3b1c2 | 2013-07-02 08:17:17 -0700 | [diff] [blame] | 131 | int i, id, num_leds, ret = -ENODATA; |
Alexander Shiyan | a59ce65 | 2014-01-31 22:36:28 -0800 | [diff] [blame] | 132 | u32 init_led = 0; |
Philippe Rétornaz | 7fdcef8 | 2010-05-19 09:24:31 +0200 | [diff] [blame] | 133 | |
Alexander Shiyan | 9d263813 | 2013-06-10 09:59:30 -0700 | [diff] [blame] | 134 | if (!pdata) { |
Alexander Shiyan | a59ce65 | 2014-01-31 22:36:28 -0800 | [diff] [blame] | 135 | dev_err(dev, "Missing platform data\n"); |
Philippe Rétornaz | 7fdcef8 | 2010-05-19 09:24:31 +0200 | [diff] [blame] | 136 | return -ENODEV; |
| 137 | } |
| 138 | |
Alexander Shiyan | 9d263813 | 2013-06-10 09:59:30 -0700 | [diff] [blame] | 139 | num_leds = pdata->num_leds; |
| 140 | |
| 141 | if ((num_leds < 1) || |
| 142 | (num_leds > (devtype->led_max - devtype->led_min + 1))) { |
Alexander Shiyan | a59ce65 | 2014-01-31 22:36:28 -0800 | [diff] [blame] | 143 | dev_err(dev, "Invalid LED count %d\n", num_leds); |
Philippe Rétornaz | 7fdcef8 | 2010-05-19 09:24:31 +0200 | [diff] [blame] | 144 | return -EINVAL; |
| 145 | } |
| 146 | |
Alexander Shiyan | a59ce65 | 2014-01-31 22:36:28 -0800 | [diff] [blame] | 147 | leds = devm_kzalloc(dev, num_leds * sizeof(struct mc13xxx_led) + |
Alexander Shiyan | 9d263813 | 2013-06-10 09:59:30 -0700 | [diff] [blame] | 148 | sizeof(struct mc13xxx_leds), GFP_KERNEL); |
| 149 | if (!leds) |
Philippe Rétornaz | 7fdcef8 | 2010-05-19 09:24:31 +0200 | [diff] [blame] | 150 | return -ENOMEM; |
Philippe Rétornaz | 7fdcef8 | 2010-05-19 09:24:31 +0200 | [diff] [blame] | 151 | |
Alexander Shiyan | 9d263813 | 2013-06-10 09:59:30 -0700 | [diff] [blame] | 152 | leds->devtype = devtype; |
| 153 | leds->num_leds = num_leds; |
Alexander Shiyan | a59ce65 | 2014-01-31 22:36:28 -0800 | [diff] [blame] | 154 | leds->master = mcdev; |
Alexander Shiyan | 9d263813 | 2013-06-10 09:59:30 -0700 | [diff] [blame] | 155 | platform_set_drvdata(pdev, leds); |
| 156 | |
Alexander Shiyan | 9d263813 | 2013-06-10 09:59:30 -0700 | [diff] [blame] | 157 | for (i = 0; i < devtype->num_regs; i++) { |
Alexander Shiyan | a59ce65 | 2014-01-31 22:36:28 -0800 | [diff] [blame] | 158 | ret = mc13xxx_reg_write(mcdev, leds->devtype->ledctrl_base + i, |
| 159 | pdata->led_control[i]); |
Alexander Shiyan | 9d263813 | 2013-06-10 09:59:30 -0700 | [diff] [blame] | 160 | if (ret) |
Alexander Shiyan | 3df22c0 | 2013-12-06 22:22:19 -0800 | [diff] [blame] | 161 | return ret; |
Philippe Rétornaz | 7fdcef8 | 2010-05-19 09:24:31 +0200 | [diff] [blame] | 162 | } |
| 163 | |
Alexander Shiyan | 9d263813 | 2013-06-10 09:59:30 -0700 | [diff] [blame] | 164 | for (i = 0; i < num_leds; i++) { |
| 165 | const char *name, *trig; |
Philippe Rétornaz | 7fdcef8 | 2010-05-19 09:24:31 +0200 | [diff] [blame] | 166 | |
Alexander Shiyan | 9d263813 | 2013-06-10 09:59:30 -0700 | [diff] [blame] | 167 | ret = -EINVAL; |
| 168 | |
| 169 | id = pdata->led[i].id; |
| 170 | name = pdata->led[i].name; |
| 171 | trig = pdata->led[i].default_trigger; |
Alexander Shiyan | 9d263813 | 2013-06-10 09:59:30 -0700 | [diff] [blame] | 172 | |
| 173 | if ((id > devtype->led_max) || (id < devtype->led_min)) { |
Alexander Shiyan | a59ce65 | 2014-01-31 22:36:28 -0800 | [diff] [blame] | 174 | dev_err(dev, "Invalid ID %i\n", id); |
Alexander Shiyan | 9d263813 | 2013-06-10 09:59:30 -0700 | [diff] [blame] | 175 | break; |
Philippe Rétornaz | 7fdcef8 | 2010-05-19 09:24:31 +0200 | [diff] [blame] | 176 | } |
| 177 | |
Alexander Shiyan | 9d263813 | 2013-06-10 09:59:30 -0700 | [diff] [blame] | 178 | if (init_led & (1 << id)) { |
Alexander Shiyan | a59ce65 | 2014-01-31 22:36:28 -0800 | [diff] [blame] | 179 | dev_warn(dev, "LED %i already initialized\n", id); |
Alexander Shiyan | 9d263813 | 2013-06-10 09:59:30 -0700 | [diff] [blame] | 180 | break; |
Philippe Rétornaz | 7fdcef8 | 2010-05-19 09:24:31 +0200 | [diff] [blame] | 181 | } |
| 182 | |
Alexander Shiyan | 9d263813 | 2013-06-10 09:59:30 -0700 | [diff] [blame] | 183 | init_led |= 1 << id; |
| 184 | leds->led[i].id = id; |
Alexander Shiyan | a59ce65 | 2014-01-31 22:36:28 -0800 | [diff] [blame] | 185 | leds->led[i].leds = leds; |
Alexander Shiyan | 9d263813 | 2013-06-10 09:59:30 -0700 | [diff] [blame] | 186 | leds->led[i].cdev.name = name; |
| 187 | leds->led[i].cdev.default_trigger = trig; |
Alexander Shiyan | 02e9e11 | 2014-01-31 22:36:29 -0800 | [diff] [blame] | 188 | leds->led[i].cdev.flags = LED_CORE_SUSPENDRESUME; |
Alexander Shiyan | 9d263813 | 2013-06-10 09:59:30 -0700 | [diff] [blame] | 189 | leds->led[i].cdev.brightness_set = mc13xxx_led_set; |
Alexander Shiyan | 677d13f | 2014-01-31 22:36:30 -0800 | [diff] [blame] | 190 | leds->led[i].cdev.max_brightness = mc13xxx_max_brightness(id); |
Philippe Rétornaz | 7fdcef8 | 2010-05-19 09:24:31 +0200 | [diff] [blame] | 191 | |
Alexander Shiyan | 9d263813 | 2013-06-10 09:59:30 -0700 | [diff] [blame] | 192 | INIT_WORK(&leds->led[i].work, mc13xxx_led_work); |
Philippe Rétornaz | 7fdcef8 | 2010-05-19 09:24:31 +0200 | [diff] [blame] | 193 | |
Alexander Shiyan | a59ce65 | 2014-01-31 22:36:28 -0800 | [diff] [blame] | 194 | ret = led_classdev_register(dev->parent, &leds->led[i].cdev); |
Philippe Rétornaz | 7fdcef8 | 2010-05-19 09:24:31 +0200 | [diff] [blame] | 195 | if (ret) { |
Alexander Shiyan | a59ce65 | 2014-01-31 22:36:28 -0800 | [diff] [blame] | 196 | dev_err(dev, "Failed to register LED %i\n", id); |
Alexander Shiyan | 9d263813 | 2013-06-10 09:59:30 -0700 | [diff] [blame] | 197 | break; |
Philippe Rétornaz | 7fdcef8 | 2010-05-19 09:24:31 +0200 | [diff] [blame] | 198 | } |
| 199 | } |
| 200 | |
Alexander Shiyan | 9d263813 | 2013-06-10 09:59:30 -0700 | [diff] [blame] | 201 | if (ret) |
| 202 | while (--i >= 0) { |
| 203 | led_classdev_unregister(&leds->led[i].cdev); |
| 204 | cancel_work_sync(&leds->led[i].work); |
| 205 | } |
Philippe Rétornaz | 7fdcef8 | 2010-05-19 09:24:31 +0200 | [diff] [blame] | 206 | |
Philippe Rétornaz | 7fdcef8 | 2010-05-19 09:24:31 +0200 | [diff] [blame] | 207 | return ret; |
| 208 | } |
| 209 | |
Alexander Shiyan | 9d263813 | 2013-06-10 09:59:30 -0700 | [diff] [blame] | 210 | static int mc13xxx_led_remove(struct platform_device *pdev) |
Philippe Rétornaz | 7fdcef8 | 2010-05-19 09:24:31 +0200 | [diff] [blame] | 211 | { |
Alexander Shiyan | 9d263813 | 2013-06-10 09:59:30 -0700 | [diff] [blame] | 212 | struct mc13xxx_leds *leds = platform_get_drvdata(pdev); |
Philippe Rétornaz | 7fdcef8 | 2010-05-19 09:24:31 +0200 | [diff] [blame] | 213 | int i; |
| 214 | |
Alexander Shiyan | 9d263813 | 2013-06-10 09:59:30 -0700 | [diff] [blame] | 215 | for (i = 0; i < leds->num_leds; i++) { |
| 216 | led_classdev_unregister(&leds->led[i].cdev); |
| 217 | cancel_work_sync(&leds->led[i].work); |
Philippe Rétornaz | 7fdcef8 | 2010-05-19 09:24:31 +0200 | [diff] [blame] | 218 | } |
| 219 | |
Philippe Rétornaz | 7fdcef8 | 2010-05-19 09:24:31 +0200 | [diff] [blame] | 220 | return 0; |
| 221 | } |
| 222 | |
Alexander Shiyan | 9d263813 | 2013-06-10 09:59:30 -0700 | [diff] [blame] | 223 | static const struct mc13xxx_led_devtype mc13783_led_devtype = { |
| 224 | .led_min = MC13783_LED_MD, |
| 225 | .led_max = MC13783_LED_B3, |
| 226 | .num_regs = 6, |
Alexander Shiyan | a59ce65 | 2014-01-31 22:36:28 -0800 | [diff] [blame] | 227 | .ledctrl_base = 51, |
Philippe Rétornaz | 7fdcef8 | 2010-05-19 09:24:31 +0200 | [diff] [blame] | 228 | }; |
| 229 | |
Alexander Shiyan | ae6cdb0 | 2013-06-10 09:59:31 -0700 | [diff] [blame] | 230 | static const struct mc13xxx_led_devtype mc13892_led_devtype = { |
| 231 | .led_min = MC13892_LED_MD, |
| 232 | .led_max = MC13892_LED_B, |
| 233 | .num_regs = 4, |
Alexander Shiyan | a59ce65 | 2014-01-31 22:36:28 -0800 | [diff] [blame] | 234 | .ledctrl_base = 51, |
| 235 | }; |
| 236 | |
| 237 | static const struct mc13xxx_led_devtype mc34708_led_devtype = { |
| 238 | .led_min = MC34708_LED_R, |
| 239 | .led_max = MC34708_LED_G, |
| 240 | .num_regs = 1, |
| 241 | .ledctrl_base = 54, |
Alexander Shiyan | ae6cdb0 | 2013-06-10 09:59:31 -0700 | [diff] [blame] | 242 | }; |
| 243 | |
Alexander Shiyan | 9d263813 | 2013-06-10 09:59:30 -0700 | [diff] [blame] | 244 | static const struct platform_device_id mc13xxx_led_id_table[] = { |
| 245 | { "mc13783-led", (kernel_ulong_t)&mc13783_led_devtype, }, |
Alexander Shiyan | ae6cdb0 | 2013-06-10 09:59:31 -0700 | [diff] [blame] | 246 | { "mc13892-led", (kernel_ulong_t)&mc13892_led_devtype, }, |
Alexander Shiyan | a59ce65 | 2014-01-31 22:36:28 -0800 | [diff] [blame] | 247 | { "mc34708-led", (kernel_ulong_t)&mc34708_led_devtype, }, |
Alexander Shiyan | 9d263813 | 2013-06-10 09:59:30 -0700 | [diff] [blame] | 248 | { } |
| 249 | }; |
| 250 | MODULE_DEVICE_TABLE(platform, mc13xxx_led_id_table); |
Philippe Rétornaz | 7fdcef8 | 2010-05-19 09:24:31 +0200 | [diff] [blame] | 251 | |
Alexander Shiyan | 9d263813 | 2013-06-10 09:59:30 -0700 | [diff] [blame] | 252 | static struct platform_driver mc13xxx_led_driver = { |
| 253 | .driver = { |
| 254 | .name = "mc13xxx-led", |
| 255 | .owner = THIS_MODULE, |
| 256 | }, |
| 257 | .remove = mc13xxx_led_remove, |
| 258 | .id_table = mc13xxx_led_id_table, |
| 259 | }; |
| 260 | module_platform_driver_probe(mc13xxx_led_driver, mc13xxx_led_probe); |
| 261 | |
| 262 | MODULE_DESCRIPTION("LEDs driver for Freescale MC13XXX PMIC"); |
Philippe Rétornaz | 7fdcef8 | 2010-05-19 09:24:31 +0200 | [diff] [blame] | 263 | MODULE_AUTHOR("Philippe Retornaz <philippe.retornaz@epfl.ch>"); |
| 264 | MODULE_LICENSE("GPL"); |