aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpio/gpio-it87.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2018-08-16 00:35:38 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2018-08-16 00:35:38 -0400
commit6de4c691eab8f421e34c5250f63bf3f477d30eec (patch)
treedd3deaa163bb478b13778a712afdfccc8cf43f20 /drivers/gpio/gpio-it87.c
parentc1c2ad82c772966d3cdb9a4852329fa2cf71853a (diff)
parenta5ec96ddfd55c501d451cb310566a1170c267ecb (diff)
Merge tag 'gpio-v4.19-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio
Pull GPIO updates from Linus Walleij: "This is the bulk of GPIO changes for the v4.19 kernel cycle. I don't know if anything in particular stands out. Maybe the Aspeed coprocessor thing from Benji: Aspeed is doing baseboard management chips (BMC's) for servers etc. These Aspeed's are ARM processors that exist inside (I guess) Intel servers, and they are moving forward to using mainline Linux in those. This is one of the pieces of the puzzle to achive that. They are doing OpenBMC, it's pretty cool: https://lwn.net/Articles/683320/ Summary: Core changes: - Add a new API for explicitly naming GPIO consumers, when needed. - Don't let userspace set values on input lines. While we do not think anyone would do this crazy thing we better plug the hole before someone uses it and think it's a nifty feature. - Avoid calling chip->request() for unused GPIOs. New drivers/subdrivers: - The Mediatek MT7621 is supported which is a big win for OpenWRT and similar router distributions using this chip, as it seems every major router manufacturer on the planet has made products using this chip: https://wikidevi.com/wiki/MediaTek_MT7621 - The Tegra 194 is now supported. - The IT87 driver now supports IT8786E and IT8718F super-IO chips. - Add support for Rockchip RK3328 in the syscon GPIO driver. Driver changes: - Handle the get/set_multiple() properly on MMIO chips with inverted direction registers. We didn't have this problem until a new chip appear that has get/set registers AND inverted direction bits, OK now we handle it. - A patch series making more error codes percolate upward properly for different errors on gpiochip_lock_as_irq(). - Get/set multiple for the OMAP driver, accelerating these multiple line operations if possible. - A coprocessor interface for the Aspeed driver. Sometimes a few GPIO lines need to be grabbed by a co-processor for doing automated tasks, sometimes they are available as GPIO lines. By adding an explicit API in this driver we make it possible for the two line consumers to coexist. (This work was made available on the ib-aspeed branch, which may be appearing in other pull requests.) - Implemented .get_direction() and open drain in the SCH311x driver. - Continuing cleanup of included headers in GPIO drivers" * tag 'gpio-v4.19-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio: (80 commits) gpio: it87: Add support for IT8613 gpio: it87: add support for IT8718F Super I/O. gpiolib: Avoid calling chip->request() for unused gpios gpio: tegra: Include the right header gpio: mmio: Fix up inverted direction registers gpio: xilinx: Use the right include gpio: timberdale: Include the right header gpio: tb10x: Use the right include gpiolib: Fix of_node inconsistency gpio: vr41xx: Bail out on gpiochip_lock_as_irq() error gpio: uniphier: Bail out on gpiochip_lock_as_irq() error gpio: xgene-sb: Don't shadow error code of gpiochip_lock_as_irq() gpio: em: Don't shadow error code of gpiochip_lock_as_irq() gpio: dwapb: Don't shadow error code of gpiochip_lock_as_irq() gpio: bcm-kona: Don't shadow error code of gpiochip_lock_as_irq() gpiolib: Don't shadow error code of gpiochip_lock_as_irq() gpio: syscon: rockchip: add GRF GPIO support for rk3328 gpio: omap: Add get/set_multiple() callbacks gpio: pxa: remove set but not used variable 'gpio_offset' gpio-it87: add support for IT8786E Super I/O ...
Diffstat (limited to 'drivers/gpio/gpio-it87.c')
-rw-r--r--drivers/gpio/gpio-it87.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/gpio/gpio-it87.c b/drivers/gpio/gpio-it87.c
index 7cad14d3f127..389ecd8b7d26 100644
--- a/drivers/gpio/gpio-it87.c
+++ b/drivers/gpio/gpio-it87.c
@@ -35,12 +35,15 @@
35 35
36/* Chip Id numbers */ 36/* Chip Id numbers */
37#define NO_DEV_ID 0xffff 37#define NO_DEV_ID 0xffff
38#define IT8613_ID 0x8613
38#define IT8620_ID 0x8620 39#define IT8620_ID 0x8620
39#define IT8628_ID 0x8628 40#define IT8628_ID 0x8628
41#define IT8718_ID 0x8718
40#define IT8728_ID 0x8728 42#define IT8728_ID 0x8728
41#define IT8732_ID 0x8732 43#define IT8732_ID 0x8732
42#define IT8761_ID 0x8761 44#define IT8761_ID 0x8761
43#define IT8772_ID 0x8772 45#define IT8772_ID 0x8772
46#define IT8786_ID 0x8786
44 47
45/* IO Ports */ 48/* IO Ports */
46#define REG 0x2e 49#define REG 0x2e
@@ -306,6 +309,14 @@ static int __init it87_gpio_init(void)
306 it87_gpio->chip = it87_template_chip; 309 it87_gpio->chip = it87_template_chip;
307 310
308 switch (chip_type) { 311 switch (chip_type) {
312 case IT8613_ID:
313 gpio_ba_reg = 0x62;
314 it87_gpio->io_size = 8; /* it8613 only needs 6, use 8 for alignment */
315 it87_gpio->output_base = 0xc8;
316 it87_gpio->simple_base = 0xc0;
317 it87_gpio->simple_size = 6;
318 it87_gpio->chip.ngpio = 64; /* has 48, use 64 for convenient calc */
319 break;
309 case IT8620_ID: 320 case IT8620_ID:
310 case IT8628_ID: 321 case IT8628_ID:
311 gpio_ba_reg = 0x62; 322 gpio_ba_reg = 0x62;
@@ -314,9 +325,11 @@ static int __init it87_gpio_init(void)
314 it87_gpio->simple_size = 0; 325 it87_gpio->simple_size = 0;
315 it87_gpio->chip.ngpio = 64; 326 it87_gpio->chip.ngpio = 64;
316 break; 327 break;
328 case IT8718_ID:
317 case IT8728_ID: 329 case IT8728_ID:
318 case IT8732_ID: 330 case IT8732_ID:
319 case IT8772_ID: 331 case IT8772_ID:
332 case IT8786_ID:
320 gpio_ba_reg = 0x62; 333 gpio_ba_reg = 0x62;
321 it87_gpio->io_size = 8; 334 it87_gpio->io_size = 8;
322 it87_gpio->output_base = 0xc8; 335 it87_gpio->output_base = 0xc8;