aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpio
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-04-07 13:24:18 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-04-07 13:24:18 -0400
commite5744abb2fa3629aa5a94e21ca1eae32ff2fe00b (patch)
treeef90c96390256b073f5255d224aecb2fc1f6ee84 /drivers/gpio
parentc29aa153ef0469cddf0146d41ce6494bd76be78b (diff)
parent2d28ca731b9bb6262f7711241628c7844b0cf7dc (diff)
Merge tag 'mfd-for-linus-3.15' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd
Pull MFD updates from Lee Jones: "Changes to existing drivers: - Use of managed resources - omap, twl4030, ti_am335x_tscadc - Advanced error handling - omap - Rework clk management - omap - Device Tree (re-)work - tc3589x, pm8921, da9055, sec - IRC management overhaul and !BROKEN - pm8921 - Convert to regmap - ssbi, pm8921 - Use simple power-management ops - ucb1x00 - Include file clean-up - adp5520, cs5535, janz, lpc_ich, - lpc_sch, max14577, mcp-sa11x0, pcf50633-adc, rc5t583, rdc321x-southbridge, retu, smsc-ece1099, ti-ssp, ti_am335x_tscadc, tps65912, vexpress-config, wm8350, ywm8350 - Various bug fixes across the subsystem - NULL/invalid pointer dereference prevention - Resource leak mitigation, - Variable used initialised - Staticise various containers - Enforce return value checks New drivers/supported devices: - Add support for s2mps14 and s2mpa01 to sec - Add support for da9063 (v5) to da9063 - Add support for atom-c2000 to gpio-ich - Add support for come-{mbt10,cbt6,chl6} to kempld - Add support for da9053 to da9052 - Add support for itco-wdt (v3) and baytrail to lpc_ich - Add new drivers for tps65218, rtsx_usb, bcm590xx (Re-)moved drivers: - twl4030 ==> drivers/iio - ti-ssp ==> /dev/null" * tag 'mfd-for-linus-3.15' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: (103 commits) mfd: wm5110: Correct default for HEADPHONE_DETECT_1 mfd: arizona: Correct small errors in the DT binding documentation mfd: arizona: Mark DSP clocking register as volatile mfd: devicetree: bindings: Add pm8xxx RTC description mfd: kempld-core: Fix potential hang-up during boot mfd: sec-core: Fix uninitialized 'regmap_rtc' on S2MPA01 mfd: tps65910: Fix regmap_irq_chip_data leak on mfd_add_devices fail mfd: tps65910: Fix possible invalid pointer dereference on regmap_add_irq_chip fail mfd: sec-core: Fix I2C dummy device resource leak on probe failure mfd: sec-core: Add of_compatible strings for clock MFD cells mfd: Remove obsolete ti-ssp driver Documentation: mfd: s2mps11: Describe S5M8767 and S2MPS14 clocks mfd: bcm590xx: Fix type argument for module device table mfd: lpc_ich: Add support for Intel Bay Trail SoC mfd: lpc_ich: Add support for NM10 GPIO mfd: lpc_ich: Change Avoton to iTCO v3 watchdog: iTCO_wdt: Add support for v3 silicon mfd: lpc_ich: Add support for iTCO v3 mfd: lpc_ich: Remove lpc_ich_cfg struct use mfd: lpc_ich: Only configure watchdog or GPIO when present ...
Diffstat (limited to 'drivers/gpio')
-rw-r--r--drivers/gpio/gpio-ich.c26
1 files changed, 25 insertions, 1 deletions
diff --git a/drivers/gpio/gpio-ich.c b/drivers/gpio/gpio-ich.c
index bfef20f8ab48..e73c6755a5eb 100644
--- a/drivers/gpio/gpio-ich.c
+++ b/drivers/gpio/gpio-ich.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Intel ICH6-10, Series 5 and 6 GPIO driver 2 * Intel ICH6-10, Series 5 and 6, Atom C2000 (Avoton/Rangeley) GPIO driver
3 * 3 *
4 * Copyright (C) 2010 Extreme Engineering Solutions. 4 * Copyright (C) 2010 Extreme Engineering Solutions.
5 * 5 *
@@ -55,6 +55,16 @@ static const u8 ichx_reglen[3] = {
55 0x30, 0x10, 0x10, 55 0x30, 0x10, 0x10,
56}; 56};
57 57
58static const u8 avoton_regs[4][3] = {
59 {0x00, 0x80, 0x00},
60 {0x04, 0x84, 0x00},
61 {0x08, 0x88, 0x00},
62};
63
64static const u8 avoton_reglen[3] = {
65 0x10, 0x10, 0x00,
66};
67
58#define ICHX_WRITE(val, reg, base_res) outl(val, (reg) + (base_res)->start) 68#define ICHX_WRITE(val, reg, base_res) outl(val, (reg) + (base_res)->start)
59#define ICHX_READ(reg, base_res) inl((reg) + (base_res)->start) 69#define ICHX_READ(reg, base_res) inl((reg) + (base_res)->start)
60 70
@@ -353,6 +363,17 @@ static struct ichx_desc intel5_desc = {
353 .reglen = ichx_reglen, 363 .reglen = ichx_reglen,
354}; 364};
355 365
366/* Avoton */
367static struct ichx_desc avoton_desc = {
368 /* Avoton has only 59 GPIOs, but we assume the first set of register
369 * (Core) has 32 instead of 31 to keep gpio-ich compliance
370 */
371 .ngpio = 60,
372 .regs = avoton_regs,
373 .reglen = avoton_reglen,
374 .use_outlvl_cache = true,
375};
376
356static int ichx_gpio_request_regions(struct resource *res_base, 377static int ichx_gpio_request_regions(struct resource *res_base,
357 const char *name, u8 use_gpio) 378 const char *name, u8 use_gpio)
358{ 379{
@@ -427,6 +448,9 @@ static int ichx_gpio_probe(struct platform_device *pdev)
427 case ICH_V10CONS_GPIO: 448 case ICH_V10CONS_GPIO:
428 ichx_priv.desc = &ich10_cons_desc; 449 ichx_priv.desc = &ich10_cons_desc;
429 break; 450 break;
451 case AVOTON_GPIO:
452 ichx_priv.desc = &avoton_desc;
453 break;
430 default: 454 default:
431 return -ENODEV; 455 return -ENODEV;
432 } 456 }