aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpio/gpio-sodaville.c
AgeCommit message (Collapse)AuthorFilesLines
2018-12-07gpio: sodaville: Convert to use SPDX identifierAndy Shevchenko1-5/+1
Reduce size of duplicated comments by switching to use SPDX identifier. No functional change. Signed-off-by: Andy Shevchenko <[email protected]>
2018-12-07gpio: sodaville: Sort headers alphabeticallyAndy Shevchenko1-3/+3
Sort header block alphabetically for easy maintenance. Signed-off-by: Andy Shevchenko <[email protected]>
2018-12-07gpio: sodaville: Use for_each_set_bit() in IRQ handlerAndy Shevchenko1-6/+3
This simplifies and standardizes the AB IRQ handler by using the for_each_set_bit() library function. Signed-off-by: Andy Shevchenko <[email protected]>
2018-12-02gpio: sodaville: Convert to use managed functions pcim_* and devm_*Andy Shevchenko1-34/+18
This makes the error handling much more simpler than open-coding everything and in addition makes the probe function smaller an tidier. Signed-off-by: Andy Shevchenko <[email protected]>
2017-03-15gpio: sodaville: use resource management for irqsBartosz Golaszewski1-17/+11
Use device resource managed variants of irq_alloc_descs() and request_irq() and remove the code manually freeing irq resources. Signed-off-by: Bartosz Golaszewski <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2016-05-11gpio: sodaville: make it explicitly non-modularPaul Gortmaker1-22/+6
The Kconfig currently controlling compilation of this code is: drivers/gpio/Kconfig:config GPIO_SODAVILLE drivers/gpio/Kconfig: bool "Intel Sodaville GPIO support" ...meaning that it currently is not being built as a module by anyone. Lets remove the modular code that is essentially orphaned, so that when reading the driver there is no doubt it is builtin-only. We explicitly disallow a driver unbind, since that doesn't have a sensible use case anyway, and it allows us to drop the ".remove" code for non-modular drivers. Since module_pci_driver() uses the same init level as the builtin_pci_driver() does, there is no init ordering change caused by this commit. We don't replace module.h with init.h since the file already has that. We also delete the MODULE_LICENSE tag etc. since all that information was (or is now) contained at the top of the file in the comments. Cc: Hans J. Koch <[email protected]> Cc: Linus Walleij <[email protected]> Cc: Alexandre Courbot <[email protected]> Cc: [email protected] Signed-off-by: Paul Gortmaker <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2016-01-05gpio: generic: factor into gpio_chip structLinus Walleij1-7/+6
The separate struct bgpio_chip has been a pain to handle, both by being confusingly similar in name to struct gpio_chip and for being contained inside a struct so that struct gpio_chip is contained in a struct contained in a struct, making several steps of dereferencing necessary. Make things simpler: include the fields directly into <linux/gpio/driver.h>, #ifdef:ed for CONFIG_GENERIC_GPIO, and get rid of the <linux/basic_mmio_gpio.h> altogether. Prefix some of the member variables with bgpio_* and add proper kerneldoc while we're at it. Modify all users to handle the change and use a struct gpio_chip directly. And while we're at it: replace all container_of() dereferencing by gpiochip_get_data() and registering the gpio_chip with gpiochip_add_data(). Cc: [email protected] Cc: Alexander Shiyan <[email protected]> Cc: Shawn Guo <[email protected]> Cc: Sascha Hauer <[email protected]> Cc: Kukjin Kim <[email protected]> Cc: Alexandre Courbot <[email protected]> Cc: Brian Norris <[email protected]> Cc: Florian Fainelli <[email protected]> Cc: Sudeep Holla <[email protected]> Cc: Lorenzo Pieralisi <[email protected]> Cc: Nicolas Pitre <[email protected]> Cc: Olof Johansson <[email protected]> Cc: Vladimir Zapolskiy <[email protected]> Cc: Rabin Vincent <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Acked-by: Gregory Fong <[email protected]> Acked-by: Liviu Dudau <[email protected]> Acked-by: H Hartley Sweeten <[email protected]> Acked-by: Tony Lindgren <[email protected]> Acked-by: Krzysztof Kozlowski <[email protected]> Acked-by: Lee Jones <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2015-10-13irqdomain: Use irq_domain_get_of_node() instead of direct field accessMarc Zyngier1-1/+1
The struct irq_domain contains a "struct device_node *" field (of_node) that is almost the only link between the irqdomain and the device tree infrastructure. In order to prepare for the removal of that field, convert all users to use irq_domain_get_of_node() instead. Signed-off-by: Marc Zyngier <[email protected]> Reviewed-and-tested-by: Hanjun Guo <[email protected]> Tested-by: Lorenzo Pieralisi <[email protected]> Cc: <[email protected]> Cc: Tomasz Nowicki <[email protected]> Cc: Suravee Suthikulpanit <[email protected]> Cc: Graeme Gregory <[email protected]> Cc: Jake Oshins <[email protected]> Cc: Jiang Liu <[email protected]> Cc: Jason Cooper <[email protected]> Cc: Rafael J. Wysocki <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Thomas Gleixner <[email protected]>
2015-05-06gpio: Constify irq_domain_opsKrzysztof Kozlowski1-1/+1
The irq_domain_ops are not modified by the driver and the irqdomain core code accepts pointer to a const data. Signed-off-by: Krzysztof Kozlowski <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2014-07-22gpio: remove all usage of gpio_remove retval in driver/gpioabdoulaye berthe1-3/+1
Signed-off-by: abdoulaye berthe <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2013-12-20gpio: sodaville: fix some error return code on error pathWei Yongjun1-2/+6
Fix to return a negative error code from the error handling case instead of 0. Signed-off-by: Wei Yongjun <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2013-12-03gpio: remove DEFINE_PCI_DEVICE_TABLE macroJingoo Han1-1/+1
Don't use DEFINE_PCI_DEVICE_TABLE macro, because this macro is not preferred. Signed-off-by: Jingoo Han <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2012-11-28gpio: remove use of __devinitBill Pemberton1-2/+2
CONFIG_HOTPLUG is going away as an option so __devinit is no longer needed. Signed-off-by: Bill Pemberton <[email protected]> Cc: Grant Likely <[email protected]> Cc: Peter Tyser <[email protected]> Cc: Santosh Shilimkar <[email protected]> Cc: Kevin Hilman <[email protected]> Acked-by: Linus Walleij <[email protected]> Acked-by: Mark Brown <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-09-04gpio: Use DEFINE_PCI_DEVICE_TABLE macroAxel Lin1-1/+1
Signed-off-by: Axel Lin <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2012-05-19gpio/generic: initialize basic_mmio_gpio shadow variables properlyShawn Guo1-1/+1
It fixes the issue in gpio-generic that commit fb14921 (gpio/mxc: add missing initialization of basic_mmio_gpio shadow variables) manged to fix in gpio-mxc driver, so that other platform specific drivers do not suffer from the same problem over and over again. Changes since v1: * Turn the last parameter of bgpio_init() "bool big_endian" into "unsigned long flags" and give those really quirky hardwares a chance to tell that reg_set and reg_dir are unreadable. Signed-off-by: Shawn Guo <[email protected]> [grant.likely: Fix big-endian usage to explicitly set BBGPIOF_BIG_ENDIAN] Signed-off-by: Grant Likely <[email protected]>
2012-05-08Merge tag 'v3.4-rc6' into gpio/nextGrant Likely1-13/+10
Linux 3.4-rc6
2012-04-10gpio/sodaville: Convert sodaville driver to new irqdomain APIGrant Likely1-13/+10
The irqdomain api changed significantly in v3.4 which caused a build failure for this driver. Signed-off-by: Grant Likely <[email protected]> Acked-by: Sebastian Andrzej Siewior <[email protected]> Cc: Hans J. Koch <[email protected]> Cc: Torben Hohn <[email protected]>
2012-04-07gpio: Convert drivers to use module_pci_driver()Axel Lin1-11/+1
This patch converts the drivers in drivers/gpio/* to use module_pci_driver() macro which makes the code smaller and a bit simpler by having less boilerplate. Signed-off-by: Axel Lin <[email protected]> Signed-off-by: Grant Likely <[email protected]>
2012-02-03gpio: Add a driver for Sodaville GPIO controllerSebastian Andrzej Siewior1-0/+302
Sodaville has GPIO controller behind the PCI bus. To my suprissed it is not the same as on PXA. The interrupt & gpio chip can be referenced from the device tree like from any other driver. Unfortunately the driver which uses the gpio interrupt has to use irq_of_parse_and_map() instead of platform_get_irq(). The problem is that the platform device (which is created from the device tree) is most likely created before the interrupt chip is registered and therefore irq_of_parse_and_map() fails. In theory the driver works as module. In reality most of the irq functions are not exported to modules and it is possible that _this_ module is unloaded while the provided irqs are still in use. Signed-off-by: Hans J. Koch <[email protected]> [[email protected]: make it work after the irq namespace cleanup, add some device tree entries.] Signed-off-by: Torben Hohn <[email protected]> [[email protected]: convert to generic irq & gpio chip] Signed-off-by: Sebastian Andrzej Siewior <[email protected]> [[email protected]: depend on x86 to avoid irq_domain breakage] Signed-off-by: Grant Likely <[email protected]>