aboutsummaryrefslogtreecommitdiff
path: root/arch/mips/ar7/gpio.c
AgeCommit message (Collapse)AuthorFilesLines
2019-05-24treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 102Thomas Gleixner1-14/+1
Based on 1 normalized pattern(s): this program is free software you can redistribute it and or modify it under the terms of the gnu general public license as published by the free software foundation either version 2 of the license or at your option any later version this program is distributed in the hope that it will be useful but without any warranty without even the implied warranty of merchantability or fitness for a particular purpose see the gnu general public license for more details you should have received a copy of the gnu general public license along with this program if not write to the free software foundation inc 51 franklin st fifth floor boston ma 02110 1301 usa extracted by the scancode license scanner the SPDX license identifier GPL-2.0-or-later has been chosen to replace the boilerplate/reference in 50 file(s). Signed-off-by: Thomas Gleixner <[email protected]> Reviewed-by: Kate Stewart <[email protected]> Reviewed-by: Allison Randal <[email protected]> Reviewed-by: Richard Fontana <[email protected]> Cc: [email protected] Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2017-02-14MIPS: Audit and remove any unnecessary uses of module.hPaul Gortmaker1-1/+2
Historically a lot of these existed because we did not have a distinction between what was modular code and what was providing support to modules via EXPORT_SYMBOL and friends. That changed when we forked out support for the latter into the export.h file. This means we should be able to reduce the usage of module.h in code that is obj-y Makefile or bool Kconfig. In the case of some code where it is modular, we can extend that to also include files that are building basic support functionality but not related to loading or registering the final module; such files also have no need whatsoever for module.h The advantage in removing such instances is that module.h itself sources about 15 other headers; adding significantly to what we feed cpp, and it can obscure what headers we are effectively using. Since module.h might have been the implicit source for init.h (for __init) and for export.h (for EXPORT_SYMBOL) we consider each instance for the presence of either and replace/add as needed. Also note that MODULE_DEVICE_TABLE is a no-op for non-modular code. Build coverage of all the mips defconfigs revealed the module.h header was masking a couple of implicit include instances, so we add the appropriate headers there. Signed-off-by: Paul Gortmaker <[email protected]> Cc: David Daney <[email protected]> Cc: John Crispin <[email protected]> Cc: Ralf Baechle <[email protected]> Cc: "Steven J. Hill" <[email protected]> Cc: [email protected] Patchwork: https://patchwork.linux-mips.org/patch/15131/ [[email protected]: Preserve sort order where it already exists] Signed-off-by: James Hogan <[email protected]>
2016-02-19MIPS: ar7: use gpiochip data pointerLinus Walleij1-17/+9
This makes the driver use the data pointer added to the gpio_chip to store a pointer to the state container instead of relying on container_of(). Cc: [email protected] Cc: Alban Bedel <[email protected]> Acked-by: Ralf Baechle <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2016-01-24MIPS: ar7: Be sure to clamp return valueLinus Walleij1-1/+1
As we want gpio_chip .get() calls to be able to return negative error codes and propagate to drivers, we need to go over all drivers and make sure their return values are clamped to [0,1]. We do this by using the ret = !!(val) design pattern. Signed-off-by: Linus Walleij <[email protected]> Acked-by: Florian Fainelli <[email protected]> Cc: Alban Bedel <[email protected]> Cc: [email protected] Cc: [email protected] Patchwork: https://patchwork.linux-mips.org/patch/11922/ Signed-off-by: Ralf Baechle <[email protected]>
2015-09-03MIPS: Remove all the uses of custom gpio.hAlban Bedel1-1/+4
Currently CONFIG_ARCH_HAVE_CUSTOM_GPIO_H is defined for all MIPS machines, and each machine type provides its own gpio.h. However only a handful really implement the GPIO API, most just forward everythings to gpiolib. The Alchemy machine is notable as it provides a system to allow implementing the GPIO API at the board level. But it is not used by any board currently supported, so it can also be removed. For most machine types we can just remove the custom gpio.h, as well as the custom wrappers if some exists. Some of the code found in the wrappers must be moved to the respective GPIO driver. A few more fixes are need in some drivers as they rely on linux/gpio.h to provides some machine specific definitions, or used asm/gpio.h instead of linux/gpio.h for the gpio API. Signed-off-by: Alban Bedel <[email protected]> Reviewed-by: Linus Walleij <[email protected]> Cc: [email protected] Cc: Hauke Mehrtens <[email protected]> Cc: Rafał Miłecki <[email protected]> Cc: Bartlomiej Zolnierkiewicz <[email protected]> Cc: Tejun Heo <[email protected]> Cc: Alexandre Courbot <[email protected]> Cc: Dmitry Torokhov <[email protected]> Cc: Florian Fainelli <[email protected]> Cc: Manuel Lauss <[email protected]> Cc: Joe Perches <[email protected]> Cc: Daniel Walter <[email protected]> Cc: Sergey Ryazanov <[email protected]> Cc: Huacai Chen <[email protected]> Cc: James Hartley <[email protected]> Cc: Andrew Bresticker <[email protected]> Cc: Paul Burton <[email protected]> Cc: Jiri Kosina <[email protected]> Cc: Bjorn Helgaas <[email protected]> Cc: Wolfram Sang <[email protected]> Cc: Randy Dunlap <[email protected]> Cc: Varka Bhadram <[email protected]> Cc: Masanari Iida <[email protected]> Cc: Tomi Valkeinen <[email protected]> Cc: Michael Buesch <[email protected]> Cc: abdoulaye berthe <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Patchwork: https://patchwork.linux-mips.org/patch/10828/ Signed-off-by: Ralf Baechle <[email protected]>
2011-12-07MIPS: AR7: constify some arrays in gpio and prom codeFlorian Fainelli1-1/+1
Signed-off-by: Florian Fainelli <[email protected]> Cc: [email protected] Patchwork: https://patchwork.linux-mips.org/patch/2980/ Signed-off-by: Ralf Baechle <[email protected]>
2011-05-18MIPS: AR7: Fix GPIO register size for Titan variant.Florian Fainelli1-3/+1
The 'size' variable contains the correct register size for both AR7 and Titan, but we never used it to ioremap the correct register size. This problem only shows up on Titan. [[email protected]: Fixed the fix. The original patch as in patchwork recognizes the problem correctly then fails to fix it ...] Reported-by: Alexander Clouter <[email protected]> Signed-off-by: Florian Fainelli <[email protected]> Patchwork: https://patchwork.linux-mips.org/patch/2380/ Signed-off-by: Ralf Baechle <[email protected]>
2010-10-29MIPS: AR7: Add support for Titan (TNETV10xx) SoC variantFlorian Fainelli1-10/+230
Add support for Titan TNETV1050,1055,1056,1060 variants. This SoC is almost completely identical to AR7 except on a few points: - a second bank of gpios is available - vlynq0 on titan is vlynq1 on ar7 - different PHY addresses for cpmac0 This SoC can be found on commercial products like the Linksys WRTP54G Original patch by Xin with improvments by Florian. Signed-off-by: Xin Zhen <[email protected]> Signed-off-by: Florian Fainelli <[email protected]> Patchwork: http://patchwork.linux-mips.org/patch/1563/ Signed-off-by: Ralf Baechle <[email protected]> ---
2010-10-29MIPS: AR7: Initialize GPIO earlierFlorian Fainelli1-2/+1
In order to detect the Titan variant, we must initialize GPIOs earlier since detection relies on some GPIO values to be set. Signed-off-by: Florian Fainelli <[email protected]> Patchwork: http://patchwork.linux-mips.org/patch/1562/ Signed-off-by: Ralf Baechle <[email protected]> ---
2010-02-27MIPS: AR7: Whitespace hackingAlexander Clouter1-3/+3
[Ralf: Fixed up reject and Wu's complaints about comment style.] Signed-off-by: Alexander Clouter <[email protected]> To: [email protected] Patchwork: http://patchwork.linux-mips.org/patch/921/ Signed-off-by: Ralf Baechle <[email protected]>
2010-02-27MIPS: AR7: Implement gpiolibFlorian Fainelli1-15/+98
This patch implements gpiolib for the AR7 SoC. Signed-off-by: Florian Fainelli <[email protected]> To: [email protected] Patchwork: http://patchwork.linux-mips.org/patch/816/ Signed-off-by: Ralf Baechle <[email protected]>
2009-07-03MIPS: Add support for Texas Instruments AR7 System-on-a-ChipFlorian Fainelli1-0/+48
This patch adds support for the Texas Instruments AR7 System-on-a-Chip. It supports the TNETD7100, 7200 and 7300 versions of the SoC. Signed-off-by: Matteo Croce <[email protected]> Signed-off-by: Felix Fietkau <[email protected]> Signed-off-by: Eugene Konev <[email protected]> Signed-off-by: Nicolas Thill <[email protected]> Signed-off-by: Florian Fainelli <[email protected]> Signed-off-by: Ralf Baechle <[email protected]>