blob: 536a229bde7111104d8f2be3487305fcfc731659 [file] [log] [blame]
Bamvor Jian Zhang0f98dd12016-08-31 11:45:46 +02001/*
2 * GPIO Testing Device Driver
3 *
4 * Copyright (C) 2014 Kamlakant Patel <kamlakant.patel@broadcom.com>
5 * Copyright (C) 2015-2016 Bamvor Jian Zhang <bamvor.zhangjian@linaro.org>
Bartosz Golaszewskic60c7f42017-06-09 13:41:31 +02006 * Copyright (C) 2017 Bartosz Golaszewski <brgl@bgdev.pl>
Bamvor Jian Zhang0f98dd12016-08-31 11:45:46 +02007 *
8 * This program is free software; you can redistribute it and/or modify it
9 * under the terms of the GNU General Public License as published by the
10 * Free Software Foundation; either version 2 of the License, or (at your
11 * option) any later version.
12 *
13 */
14
15#include <linux/init.h>
16#include <linux/module.h>
17#include <linux/gpio/driver.h>
Bartosz Golaszewski9202ba22017-02-06 15:11:08 +010018#include <linux/gpio/consumer.h>
Bamvor Jian Zhang0f98dd12016-08-31 11:45:46 +020019#include <linux/platform_device.h>
Bartosz Golaszewski8a68ea02017-02-06 13:10:37 +010020#include <linux/slab.h>
Bartosz Golaszewskie2ff7402017-02-06 15:11:07 +010021#include <linux/interrupt.h>
22#include <linux/irq.h>
23#include <linux/irq_work.h>
Bartosz Golaszewski9202ba22017-02-06 15:11:08 +010024#include <linux/debugfs.h>
25#include <linux/uaccess.h>
26
27#include "gpiolib.h"
Bamvor Jian Zhang0f98dd12016-08-31 11:45:46 +020028
Bartosz Golaszewskica4091602017-02-06 13:10:35 +010029#define GPIO_MOCKUP_NAME "gpio-mockup"
30#define GPIO_MOCKUP_MAX_GC 10
Bartosz Golaszewskib6523362017-06-09 13:41:28 +020031/*
32 * We're storing two values per chip: the GPIO base and the number
33 * of GPIO lines.
34 */
35#define GPIO_MOCKUP_MAX_RANGES (GPIO_MOCKUP_MAX_GC * 2)
Bamvor Jian Zhang0f98dd12016-08-31 11:45:46 +020036
Bartosz Golaszewskica4091602017-02-06 13:10:35 +010037enum {
Bartosz Golaszewskic650c002017-05-25 10:33:39 +020038 GPIO_MOCKUP_DIR_OUT = 0,
39 GPIO_MOCKUP_DIR_IN = 1,
Bamvor Jian Zhang0f98dd12016-08-31 11:45:46 +020040};
41
42/*
43 * struct gpio_pin_status - structure describing a GPIO status
44 * @dir: Configures direction of gpio as "in" or "out", 0=in, 1=out
45 * @value: Configures status of the gpio as 0(low) or 1(high)
46 */
Bartosz Golaszewskica4091602017-02-06 13:10:35 +010047struct gpio_mockup_line_status {
48 int dir;
Bamvor Jian Zhang0f98dd12016-08-31 11:45:46 +020049 bool value;
Bartosz Golaszewskic7f5326fb2017-05-25 10:33:41 +020050 bool irq_enabled;
Bamvor Jian Zhang0f98dd12016-08-31 11:45:46 +020051};
52
Bartosz Golaszewskie2ff7402017-02-06 15:11:07 +010053struct gpio_mockup_irq_context {
54 struct irq_work work;
55 int irq;
56};
57
Bartosz Golaszewskica4091602017-02-06 13:10:35 +010058struct gpio_mockup_chip {
Bamvor Jian Zhang0f98dd12016-08-31 11:45:46 +020059 struct gpio_chip gc;
Bartosz Golaszewskica4091602017-02-06 13:10:35 +010060 struct gpio_mockup_line_status *lines;
Bartosz Golaszewskie2ff7402017-02-06 15:11:07 +010061 struct gpio_mockup_irq_context irq_ctx;
Bartosz Golaszewski9202ba22017-02-06 15:11:08 +010062 struct dentry *dbg_dir;
63};
64
65struct gpio_mockup_dbgfs_private {
66 struct gpio_mockup_chip *chip;
67 struct gpio_desc *desc;
68 int offset;
Bamvor Jian Zhang0f98dd12016-08-31 11:45:46 +020069};
70
Bartosz Golaszewskib6523362017-06-09 13:41:28 +020071static int gpio_mockup_ranges[GPIO_MOCKUP_MAX_RANGES];
Bamvor Jian Zhang0f98dd12016-08-31 11:45:46 +020072static int gpio_mockup_params_nr;
73module_param_array(gpio_mockup_ranges, int, &gpio_mockup_params_nr, 0400);
74
Bartosz Golaszewski8a68ea02017-02-06 13:10:37 +010075static bool gpio_mockup_named_lines;
76module_param_named(gpio_mockup_named_lines,
77 gpio_mockup_named_lines, bool, 0400);
78
Bartosz Golaszewskica4091602017-02-06 13:10:35 +010079static const char gpio_mockup_name_start = 'A';
Bartosz Golaszewski9202ba22017-02-06 15:11:08 +010080static struct dentry *gpio_mockup_dbg_dir;
Bamvor Jian Zhang0f98dd12016-08-31 11:45:46 +020081
Bartosz Golaszewskica4091602017-02-06 13:10:35 +010082static int gpio_mockup_get(struct gpio_chip *gc, unsigned int offset)
Bamvor Jian Zhang0f98dd12016-08-31 11:45:46 +020083{
Bartosz Golaszewskica4091602017-02-06 13:10:35 +010084 struct gpio_mockup_chip *chip = gpiochip_get_data(gc);
Bamvor Jian Zhang0f98dd12016-08-31 11:45:46 +020085
Bartosz Golaszewskica4091602017-02-06 13:10:35 +010086 return chip->lines[offset].value;
Bamvor Jian Zhang0f98dd12016-08-31 11:45:46 +020087}
88
Bartosz Golaszewskica4091602017-02-06 13:10:35 +010089static void gpio_mockup_set(struct gpio_chip *gc, unsigned int offset,
Bamvor Jian Zhang0f98dd12016-08-31 11:45:46 +020090 int value)
91{
Bartosz Golaszewskica4091602017-02-06 13:10:35 +010092 struct gpio_mockup_chip *chip = gpiochip_get_data(gc);
Bamvor Jian Zhang0f98dd12016-08-31 11:45:46 +020093
Bartosz Golaszewskica4091602017-02-06 13:10:35 +010094 chip->lines[offset].value = !!value;
Bamvor Jian Zhang0f98dd12016-08-31 11:45:46 +020095}
96
Bartosz Golaszewskica4091602017-02-06 13:10:35 +010097static int gpio_mockup_dirout(struct gpio_chip *gc, unsigned int offset,
Bamvor Jian Zhang0f98dd12016-08-31 11:45:46 +020098 int value)
99{
Bartosz Golaszewskica4091602017-02-06 13:10:35 +0100100 struct gpio_mockup_chip *chip = gpiochip_get_data(gc);
Bamvor Jian Zhang0f98dd12016-08-31 11:45:46 +0200101
Bartosz Golaszewskica4091602017-02-06 13:10:35 +0100102 gpio_mockup_set(gc, offset, value);
Bartosz Golaszewskic650c002017-05-25 10:33:39 +0200103 chip->lines[offset].dir = GPIO_MOCKUP_DIR_OUT;
Bartosz Golaszewskica4091602017-02-06 13:10:35 +0100104
Bamvor Jian Zhang0f98dd12016-08-31 11:45:46 +0200105 return 0;
106}
107
Bartosz Golaszewskica4091602017-02-06 13:10:35 +0100108static int gpio_mockup_dirin(struct gpio_chip *gc, unsigned int offset)
Bamvor Jian Zhang0f98dd12016-08-31 11:45:46 +0200109{
Bartosz Golaszewskica4091602017-02-06 13:10:35 +0100110 struct gpio_mockup_chip *chip = gpiochip_get_data(gc);
Bamvor Jian Zhang0f98dd12016-08-31 11:45:46 +0200111
Bartosz Golaszewskic650c002017-05-25 10:33:39 +0200112 chip->lines[offset].dir = GPIO_MOCKUP_DIR_IN;
Bartosz Golaszewskica4091602017-02-06 13:10:35 +0100113
Bamvor Jian Zhang0f98dd12016-08-31 11:45:46 +0200114 return 0;
115}
116
Bartosz Golaszewskica4091602017-02-06 13:10:35 +0100117static int gpio_mockup_get_direction(struct gpio_chip *gc, unsigned int offset)
Bamvor Jian Zhang0f98dd12016-08-31 11:45:46 +0200118{
Bartosz Golaszewskica4091602017-02-06 13:10:35 +0100119 struct gpio_mockup_chip *chip = gpiochip_get_data(gc);
Bamvor Jian Zhang0f98dd12016-08-31 11:45:46 +0200120
Bartosz Golaszewskica4091602017-02-06 13:10:35 +0100121 return chip->lines[offset].dir;
Bamvor Jian Zhang0f98dd12016-08-31 11:45:46 +0200122}
123
Bartosz Golaszewski8a68ea02017-02-06 13:10:37 +0100124static int gpio_mockup_name_lines(struct device *dev,
125 struct gpio_mockup_chip *chip)
126{
127 struct gpio_chip *gc = &chip->gc;
128 char **names;
129 int i;
130
131 names = devm_kzalloc(dev, sizeof(char *) * gc->ngpio, GFP_KERNEL);
132 if (!names)
133 return -ENOMEM;
134
135 for (i = 0; i < gc->ngpio; i++) {
136 names[i] = devm_kasprintf(dev, GFP_KERNEL,
137 "%s-%d", gc->label, i);
138 if (!names[i])
139 return -ENOMEM;
140 }
141
142 gc->names = (const char *const *)names;
143
144 return 0;
145}
146
Bartosz Golaszewskie2ff7402017-02-06 15:11:07 +0100147static int gpio_mockup_to_irq(struct gpio_chip *chip, unsigned int offset)
148{
149 return chip->irq_base + offset;
150}
151
Bartosz Golaszewskic7f5326fb2017-05-25 10:33:41 +0200152static void gpio_mockup_irqmask(struct irq_data *data)
153{
154 struct gpio_chip *gc = irq_data_get_irq_chip_data(data);
155 struct gpio_mockup_chip *chip = gpiochip_get_data(gc);
156
157 chip->lines[data->irq - gc->irq_base].irq_enabled = false;
158}
159
160static void gpio_mockup_irqunmask(struct irq_data *data)
161{
162 struct gpio_chip *gc = irq_data_get_irq_chip_data(data);
163 struct gpio_mockup_chip *chip = gpiochip_get_data(gc);
164
165 chip->lines[data->irq - gc->irq_base].irq_enabled = true;
166}
Bartosz Golaszewskie2ff7402017-02-06 15:11:07 +0100167
168static struct irq_chip gpio_mockup_irqchip = {
169 .name = GPIO_MOCKUP_NAME,
170 .irq_mask = gpio_mockup_irqmask,
171 .irq_unmask = gpio_mockup_irqunmask,
172};
173
174static void gpio_mockup_handle_irq(struct irq_work *work)
175{
176 struct gpio_mockup_irq_context *irq_ctx;
177
178 irq_ctx = container_of(work, struct gpio_mockup_irq_context, work);
179 handle_simple_irq(irq_to_desc(irq_ctx->irq));
180}
181
182static int gpio_mockup_irqchip_setup(struct device *dev,
183 struct gpio_mockup_chip *chip)
184{
185 struct gpio_chip *gc = &chip->gc;
186 int irq_base, i;
187
Bartosz Golaszewski62a7ca02017-03-04 17:23:29 +0100188 irq_base = devm_irq_alloc_descs(dev, -1, 0, gc->ngpio, 0);
Bartosz Golaszewskie2ff7402017-02-06 15:11:07 +0100189 if (irq_base < 0)
190 return irq_base;
191
192 gc->irq_base = irq_base;
193 gc->irqchip = &gpio_mockup_irqchip;
194
195 for (i = 0; i < gc->ngpio; i++) {
196 irq_set_chip(irq_base + i, gc->irqchip);
Bartosz Golaszewskic7f5326fb2017-05-25 10:33:41 +0200197 irq_set_chip_data(irq_base + i, gc);
Bartosz Golaszewskie2ff7402017-02-06 15:11:07 +0100198 irq_set_handler(irq_base + i, &handle_simple_irq);
199 irq_modify_status(irq_base + i,
200 IRQ_NOREQUEST | IRQ_NOAUTOEN, IRQ_NOPROBE);
201 }
202
203 init_irq_work(&chip->irq_ctx.work, gpio_mockup_handle_irq);
204
205 return 0;
206}
207
Bartosz Golaszewski9202ba22017-02-06 15:11:08 +0100208static ssize_t gpio_mockup_event_write(struct file *file,
209 const char __user *usr_buf,
210 size_t size, loff_t *ppos)
211{
212 struct gpio_mockup_dbgfs_private *priv;
213 struct gpio_mockup_chip *chip;
214 struct seq_file *sfile;
215 struct gpio_desc *desc;
216 struct gpio_chip *gc;
Bartosz Golaszewski6f9b3e72017-06-09 13:41:25 +0200217 int rv, val;
Bartosz Golaszewski9202ba22017-02-06 15:11:08 +0100218
Bartosz Golaszewski6f9b3e72017-06-09 13:41:25 +0200219 rv = kstrtoint_from_user(usr_buf, size, 0, &val);
220 if (rv)
221 return rv;
222 if (val != 0 && val != 1)
223 return -EINVAL;
224
Bartosz Golaszewski650b57b2017-06-09 13:41:26 +0200225 sfile = file->private_data;
226 priv = sfile->private;
227 desc = priv->desc;
228 chip = priv->chip;
229 gc = &chip->gc;
Bartosz Golaszewskic7f5326fb2017-05-25 10:33:41 +0200230
Bartosz Golaszewski650b57b2017-06-09 13:41:26 +0200231 if (chip->lines[priv->offset].irq_enabled) {
232 gpiod_set_value_cansleep(desc, val);
233 priv->chip->irq_ctx.irq = gc->irq_base + priv->offset;
234 irq_work_queue(&priv->chip->irq_ctx.work);
235 }
Bartosz Golaszewski9202ba22017-02-06 15:11:08 +0100236
237 return size;
238}
239
240static int gpio_mockup_event_open(struct inode *inode, struct file *file)
241{
242 return single_open(file, NULL, inode->i_private);
243}
244
245static const struct file_operations gpio_mockup_event_ops = {
246 .owner = THIS_MODULE,
247 .open = gpio_mockup_event_open,
248 .write = gpio_mockup_event_write,
249 .llseek = no_llseek,
250};
251
252static void gpio_mockup_debugfs_setup(struct device *dev,
253 struct gpio_mockup_chip *chip)
254{
255 struct gpio_mockup_dbgfs_private *priv;
256 struct dentry *evfile;
257 struct gpio_chip *gc;
258 char *name;
259 int i;
260
261 gc = &chip->gc;
262
263 chip->dbg_dir = debugfs_create_dir(gc->label, gpio_mockup_dbg_dir);
264 if (!chip->dbg_dir)
265 goto err;
266
267 for (i = 0; i < gc->ngpio; i++) {
268 name = devm_kasprintf(dev, GFP_KERNEL, "%d", i);
269 if (!name)
270 goto err;
271
272 priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
273 if (!priv)
274 goto err;
275
276 priv->chip = chip;
277 priv->offset = i;
278 priv->desc = &gc->gpiodev->descs[i];
279
280 evfile = debugfs_create_file(name, 0200, chip->dbg_dir, priv,
281 &gpio_mockup_event_ops);
282 if (!evfile)
283 goto err;
284 }
285
286 return;
287
288err:
289 dev_err(dev, "error creating debugfs directory\n");
290}
291
Bartosz Golaszewskica4091602017-02-06 13:10:35 +0100292static int gpio_mockup_add(struct device *dev,
293 struct gpio_mockup_chip *chip,
Bamvor Jian Zhang0f98dd12016-08-31 11:45:46 +0200294 const char *name, int base, int ngpio)
295{
Bartosz Golaszewskica4091602017-02-06 13:10:35 +0100296 struct gpio_chip *gc = &chip->gc;
Bartosz Golaszewski8a68ea02017-02-06 13:10:37 +0100297 int ret;
Bamvor Jian Zhang0f98dd12016-08-31 11:45:46 +0200298
Bartosz Golaszewskica4091602017-02-06 13:10:35 +0100299 gc->base = base;
300 gc->ngpio = ngpio;
301 gc->label = name;
302 gc->owner = THIS_MODULE;
303 gc->parent = dev;
304 gc->get = gpio_mockup_get;
305 gc->set = gpio_mockup_set;
306 gc->direction_output = gpio_mockup_dirout;
307 gc->direction_input = gpio_mockup_dirin;
308 gc->get_direction = gpio_mockup_get_direction;
Bartosz Golaszewskie2ff7402017-02-06 15:11:07 +0100309 gc->to_irq = gpio_mockup_to_irq;
Bartosz Golaszewskica4091602017-02-06 13:10:35 +0100310
311 chip->lines = devm_kzalloc(dev, sizeof(*chip->lines) * gc->ngpio,
Bamvor Jian Zhang0f98dd12016-08-31 11:45:46 +0200312 GFP_KERNEL);
Bartosz Golaszewskie4ba07b2017-02-06 13:10:36 +0100313 if (!chip->lines)
314 return -ENOMEM;
Bartosz Golaszewskica4091602017-02-06 13:10:35 +0100315
Bartosz Golaszewski8a68ea02017-02-06 13:10:37 +0100316 if (gpio_mockup_named_lines) {
317 ret = gpio_mockup_name_lines(dev, chip);
318 if (ret)
319 return ret;
320 }
321
Bartosz Golaszewskie2ff7402017-02-06 15:11:07 +0100322 ret = gpio_mockup_irqchip_setup(dev, chip);
323 if (ret)
324 return ret;
325
Bartosz Golaszewski9202ba22017-02-06 15:11:08 +0100326 ret = devm_gpiochip_add_data(dev, &chip->gc, chip);
327 if (ret)
328 return ret;
329
330 if (gpio_mockup_dbg_dir)
331 gpio_mockup_debugfs_setup(dev, chip);
332
333 return 0;
Bamvor Jian Zhang0f98dd12016-08-31 11:45:46 +0200334}
335
Bartosz Golaszewskica4091602017-02-06 13:10:35 +0100336static int gpio_mockup_probe(struct platform_device *pdev)
Bamvor Jian Zhang0f98dd12016-08-31 11:45:46 +0200337{
Bartosz Golaszewskib6523362017-06-09 13:41:28 +0200338 int ret, i, base, ngpio, num_chips;
Bartosz Golaszewski364ac452016-12-20 12:28:20 +0100339 struct device *dev = &pdev->dev;
Bartosz Golaszewskib6523362017-06-09 13:41:28 +0200340 struct gpio_mockup_chip *chips;
Bartosz Golaszewskiad6d8002016-12-20 12:28:19 +0100341 char *chip_name;
Bamvor Jian Zhang0f98dd12016-08-31 11:45:46 +0200342
Bartosz Golaszewskib6c2e772017-06-09 13:41:27 +0200343 if (gpio_mockup_params_nr < 2 || (gpio_mockup_params_nr % 2))
Bamvor Jian Zhang0f98dd12016-08-31 11:45:46 +0200344 return -EINVAL;
345
Bartosz Golaszewskib6523362017-06-09 13:41:28 +0200346 /* Each chip is described by two values. */
347 num_chips = gpio_mockup_params_nr / 2;
348
349 chips = devm_kzalloc(dev, sizeof(*chips) * num_chips, GFP_KERNEL);
Bartosz Golaszewskica4091602017-02-06 13:10:35 +0100350 if (!chips)
Bamvor Jian Zhang0f98dd12016-08-31 11:45:46 +0200351 return -ENOMEM;
352
Bartosz Golaszewskica4091602017-02-06 13:10:35 +0100353 platform_set_drvdata(pdev, chips);
Bamvor Jian Zhang0f98dd12016-08-31 11:45:46 +0200354
Bartosz Golaszewskib6523362017-06-09 13:41:28 +0200355 for (i = 0; i < num_chips; i++) {
Bamvor Jian Zhang0f98dd12016-08-31 11:45:46 +0200356 base = gpio_mockup_ranges[i * 2];
Bartosz Golaszewskica4091602017-02-06 13:10:35 +0100357
Bamvor Jian Zhang0f98dd12016-08-31 11:45:46 +0200358 if (base == -1)
359 ngpio = gpio_mockup_ranges[i * 2 + 1];
360 else
361 ngpio = gpio_mockup_ranges[i * 2 + 1] - base;
362
363 if (ngpio >= 0) {
Bartosz Golaszewskiad6d8002016-12-20 12:28:19 +0100364 chip_name = devm_kasprintf(dev, GFP_KERNEL,
Bartosz Golaszewskica4091602017-02-06 13:10:35 +0100365 "%s-%c", GPIO_MOCKUP_NAME,
366 gpio_mockup_name_start + i);
Bartosz Golaszewskiad6d8002016-12-20 12:28:19 +0100367 if (!chip_name)
368 return -ENOMEM;
369
Bartosz Golaszewskica4091602017-02-06 13:10:35 +0100370 ret = gpio_mockup_add(dev, &chips[i],
Bamvor Jian Zhang0f98dd12016-08-31 11:45:46 +0200371 chip_name, base, ngpio);
372 } else {
Bartosz Golaszewski4dc9d762017-06-09 13:41:29 +0200373 ret = -EINVAL;
Bamvor Jian Zhang0f98dd12016-08-31 11:45:46 +0200374 }
Bartosz Golaszewskica4091602017-02-06 13:10:35 +0100375
Bamvor Jian Zhang0f98dd12016-08-31 11:45:46 +0200376 if (ret) {
Bartosz Golaszewskiec604f12017-06-09 13:41:30 +0200377 dev_err(dev,
378 "adding gpiochip failed: %d (base: %d, ngpio: %d)\n",
379 ret, base, base < 0 ? ngpio : base + ngpio);
Bamvor Jian Zhang0f98dd12016-08-31 11:45:46 +0200380
381 return ret;
382 }
383 }
384
385 return 0;
386}
387
Bartosz Golaszewskica4091602017-02-06 13:10:35 +0100388static struct platform_driver gpio_mockup_driver = {
Bamvor Jian Zhang0f98dd12016-08-31 11:45:46 +0200389 .driver = {
Bartosz Golaszewskica4091602017-02-06 13:10:35 +0100390 .name = GPIO_MOCKUP_NAME,
Bartosz Golaszewski364ac452016-12-20 12:28:20 +0100391 },
Bartosz Golaszewskica4091602017-02-06 13:10:35 +0100392 .probe = gpio_mockup_probe,
Bamvor Jian Zhang0f98dd12016-08-31 11:45:46 +0200393};
394
395static struct platform_device *pdev;
396static int __init mock_device_init(void)
397{
398 int err;
399
Bartosz Golaszewski9202ba22017-02-06 15:11:08 +0100400 gpio_mockup_dbg_dir = debugfs_create_dir("gpio-mockup-event", NULL);
401 if (!gpio_mockup_dbg_dir)
402 pr_err("%s: error creating debugfs directory\n",
403 GPIO_MOCKUP_NAME);
404
Bartosz Golaszewskica4091602017-02-06 13:10:35 +0100405 pdev = platform_device_alloc(GPIO_MOCKUP_NAME, -1);
Bamvor Jian Zhang0f98dd12016-08-31 11:45:46 +0200406 if (!pdev)
407 return -ENOMEM;
408
409 err = platform_device_add(pdev);
410 if (err) {
411 platform_device_put(pdev);
412 return err;
413 }
414
Bartosz Golaszewskica4091602017-02-06 13:10:35 +0100415 err = platform_driver_register(&gpio_mockup_driver);
Bamvor Jian Zhang0f98dd12016-08-31 11:45:46 +0200416 if (err) {
417 platform_device_unregister(pdev);
418 return err;
419 }
420
421 return 0;
422}
423
424static void __exit mock_device_exit(void)
425{
Bartosz Golaszewski9202ba22017-02-06 15:11:08 +0100426 debugfs_remove_recursive(gpio_mockup_dbg_dir);
Bartosz Golaszewskica4091602017-02-06 13:10:35 +0100427 platform_driver_unregister(&gpio_mockup_driver);
Bamvor Jian Zhang0f98dd12016-08-31 11:45:46 +0200428 platform_device_unregister(pdev);
429}
430
431module_init(mock_device_init);
432module_exit(mock_device_exit);
433
434MODULE_AUTHOR("Kamlakant Patel <kamlakant.patel@broadcom.com>");
435MODULE_AUTHOR("Bamvor Jian Zhang <bamvor.zhangjian@linaro.org>");
Bartosz Golaszewskic60c7f42017-06-09 13:41:31 +0200436MODULE_AUTHOR("Bartosz Golaszewski <brgl@bgdev.pl>");
Bamvor Jian Zhang0f98dd12016-08-31 11:45:46 +0200437MODULE_DESCRIPTION("GPIO Testing driver");
438MODULE_LICENSE("GPL v2");