Release 4.12 drivers/gpio/gpio-ucb1400.c
  
  
  
/*
 * Philips UCB1400 GPIO driver
 *
 * Author: Marek Vasut <marek.vasut@gmail.com>
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation.
 *
 */
#include <linux/module.h>
#include <linux/ucb1400.h>
static int ucb1400_gpio_dir_in(struct gpio_chip *gc, unsigned off)
{
	struct ucb1400_gpio *gpio;
	gpio = gpiochip_get_data(gc);
	ucb1400_gpio_set_direction(gpio->ac97, off, 0);
	return 0;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp | 
| Marek Vašut | 39 | 97.50% | 1 | 50.00% | 
| Linus Walleij | 1 | 2.50% | 1 | 50.00% | 
| Total | 40 | 100.00% | 2 | 100.00% | 
static int ucb1400_gpio_dir_out(struct gpio_chip *gc, unsigned off, int val)
{
	struct ucb1400_gpio *gpio;
	gpio = gpiochip_get_data(gc);
	ucb1400_gpio_set_direction(gpio->ac97, off, 1);
	ucb1400_gpio_set_value(gpio->ac97, off, val);
	return 0;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp | 
| Marek Vašut | 53 | 98.15% | 1 | 50.00% | 
| Linus Walleij | 1 | 1.85% | 1 | 50.00% | 
| Total | 54 | 100.00% | 2 | 100.00% | 
static int ucb1400_gpio_get(struct gpio_chip *gc, unsigned off)
{
	struct ucb1400_gpio *gpio;
	gpio = gpiochip_get_data(gc);
	return !!ucb1400_gpio_get_value(gpio->ac97, off);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp | 
| Marek Vašut | 35 | 92.11% | 1 | 33.33% | 
| Linus Walleij | 3 | 7.89% | 2 | 66.67% | 
| Total | 38 | 100.00% | 3 | 100.00% | 
static void ucb1400_gpio_set(struct gpio_chip *gc, unsigned off, int val)
{
	struct ucb1400_gpio *gpio;
	gpio = gpiochip_get_data(gc);
	ucb1400_gpio_set_value(gpio->ac97, off, val);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp | 
| Marek Vašut | 39 | 97.50% | 1 | 50.00% | 
| Linus Walleij | 1 | 2.50% | 1 | 50.00% | 
| Total | 40 | 100.00% | 2 | 100.00% | 
static int ucb1400_gpio_probe(struct platform_device *dev)
{
	struct ucb1400_gpio *ucb = dev_get_platdata(&dev->dev);
	int err = 0;
	if (!(ucb && ucb->gpio_offset)) {
		err = -EINVAL;
		goto err;
	}
	platform_set_drvdata(dev, ucb);
	ucb->gc.label = "ucb1400_gpio";
	ucb->gc.base = ucb->gpio_offset;
	ucb->gc.ngpio = 10;
	ucb->gc.owner = THIS_MODULE;
	ucb->gc.direction_input = ucb1400_gpio_dir_in;
	ucb->gc.direction_output = ucb1400_gpio_dir_out;
	ucb->gc.get = ucb1400_gpio_get;
	ucb->gc.set = ucb1400_gpio_set;
	ucb->gc.can_sleep = true;
	err = devm_gpiochip_add_data(&dev->dev, &ucb->gc, ucb);
	if (err)
		goto err;
	if (ucb->gpio_setup)
		err = ucb->gpio_setup(&dev->dev, ucb->gc.ngpio);
err:
	return err;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp | 
| Marek Vašut | 171 | 92.93% | 2 | 33.33% | 
| Laxman Dewangan | 6 | 3.26% | 1 | 16.67% | 
| Jingoo Han | 4 | 2.17% | 1 | 16.67% | 
| Linus Walleij | 3 | 1.63% | 2 | 33.33% | 
| Total | 184 | 100.00% | 6 | 100.00% | 
static int ucb1400_gpio_remove(struct platform_device *dev)
{
	int err = 0;
	struct ucb1400_gpio *ucb = platform_get_drvdata(dev);
	if (ucb && ucb->gpio_teardown) {
		err = ucb->gpio_teardown(&dev->dev, ucb->gc.ngpio);
		if (err)
			return err;
	}
	return err;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp | 
| Marek Vašut | 64 | 100.00% | 2 | 100.00% | 
| Total | 64 | 100.00% | 2 | 100.00% | 
static struct platform_driver ucb1400_gpio_driver = {
	.probe	= ucb1400_gpio_probe,
	.remove	= ucb1400_gpio_remove,
	.driver	= {
		.name	= "ucb1400_gpio"
	},
};
module_platform_driver(ucb1400_gpio_driver);
MODULE_DESCRIPTION("Philips UCB1400 GPIO driver");
MODULE_LICENSE("GPL");
MODULE_ALIAS("platform:ucb1400_gpio");
Overall Contributors
| Person | Tokens | Prop | Commits | CommitProp | 
| Marek Vašut | 448 | 94.51% | 2 | 22.22% | 
| Linus Walleij | 9 | 1.90% | 3 | 33.33% | 
| Laxman Dewangan | 6 | 1.27% | 1 | 11.11% | 
| Axel Lin | 5 | 1.05% | 1 | 11.11% | 
| Jingoo Han | 4 | 0.84% | 1 | 11.11% | 
| Mark Brown | 2 | 0.42% | 1 | 11.11% | 
| Total | 474 | 100.00% | 9 | 100.00% | 
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.