Skip to content

Commit 2dfea38

Browse files
committed
Merge tag 'mfd-3.8-1' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6
Pull MFS update from Samuel Ortiz: "This is the MFD patch set for the 3.8 merge window. We have several new drivers, most of the time coming with their sub devices drivers: - Austria Microsystem's AS3711 - Nano River's viperboard - TI's TPS80031, AM335x TS/ADC, - Realtek's MMC/memstick card reader - Nokia's retu We also got some notable cleanups and improvements: - tps6586x got converted to IRQ domains. - tps65910 and tps65090 moved to the regmap IRQ API. - STMPE is now Device Tree aware. - A general twl6040 and twl-core cleanup, with moves to the regmap I/O and IRQ APIs and a conversion to the recently added PWM framework. - sta2x11 gained regmap support. Then the rest is mostly tiny cleanups and fixes, among which we have Mark's wm5xxx and wm8xxx patchset." Far amount of annoying but largely trivial conflicts. Many due to __devinit/exit removal, others due to one or two of the new drivers also having come in through another tree. * tag 'mfd-3.8-1' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6: (119 commits) mfd: tps6507x: Convert to devm_kzalloc mfd: stmpe: Update DT support for stmpe driver mfd: wm5102: Add readback of DSP status 3 register mfd: arizona: Log if we fail to create the primary IRQ domain mfd: tps80031: MFD_TPS80031 needs to select REGMAP_IRQ mfd: tps80031: Add terminating entry for tps80031_id_table mfd: sta2x11: Fix potential NULL pointer dereference in __sta2x11_mfd_mask() mfd: wm5102: Add tuning for revision B mfd: arizona: Defer patch initialistation until after first device boot mfd: tps65910: Fix wrong ack_base register mfd: tps65910: Remove unused data mfd: stmpe: Get rid of irq_invert_polarity mfd: ab8500-core: Fix invalid free of devm_ allocated data mfd: wm5102: Mark DSP memory regions as volatile mfd: wm5102: Correct default for LDO1_CONTROL_2 mfd: arizona: Register haptics devices mfd: wm8994: Make current device behaviour the default mfd: tps65090: MFD_TPS65090 needs to select REGMAP_IRQ mfd: Fix stmpe.c build when OF is not enabled mfd: jz4740-adc: Use devm_kzalloc ...
2 parents aed606e + 1881b68 commit 2dfea38

87 files changed

Lines changed: 6781 additions & 2456 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
* ST Microelectronics STMPE Multi-Functional Device
2+
3+
STMPE is an MFD device which may expose the following inbuilt devices: gpio,
4+
keypad, touchscreen, adc, pwm, rotator.
5+
6+
Required properties:
7+
- compatible : "st,stmpe[610|801|811|1601|2401|2403]"
8+
- reg : I2C/SPI address of the device
9+
10+
Optional properties:
11+
- interrupts : The interrupt outputs from the controller
12+
- interrupt-controller : Marks the device node as an interrupt controller
13+
- interrupt-parent : Specifies which IRQ controller we're connected to
14+
- wakeup-source : Marks the input device as wakable
15+
- st,autosleep-timeout : Valid entries (ms); 4, 16, 32, 64, 128, 256, 512 and 1024
16+
17+
Example:
18+
19+
stmpe1601: stmpe1601@40 {
20+
compatible = "st,stmpe1601";
21+
reg = <0x40>;
22+
interrupts = <26 0x4>;
23+
interrupt-parent = <&gpio6>;
24+
interrupt-controller;
25+
26+
wakeup-source;
27+
st,autosleep-timeout = <1024>;
28+
};

Documentation/devicetree/bindings/regulator/tps65217.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ Required properties:
1111
using the standard binding for regulators found at
1212
Documentation/devicetree/bindings/regulator/regulator.txt.
1313

14+
Optional properties:
15+
- ti,pmic-shutdown-controller: Telling the PMIC to shutdown on PWR_EN toggle.
16+
1417
The valid names for regulators are:
1518
tps65217: dcdc1, dcdc2, dcdc3, ldo1, ldo2, ldo3 and ldo4
1619

@@ -20,6 +23,7 @@ Example:
2023

2124
tps: tps@24 {
2225
compatible = "ti,tps65217";
26+
ti,pmic-shutdown-controller;
2327

2428
regulators {
2529
dcdc1_reg: dcdc1 {

drivers/gpio/Kconfig

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -683,4 +683,17 @@ config GPIO_MSIC
683683
Enable support for GPIO on intel MSIC controllers found in
684684
intel MID devices
685685

686+
comment "USB GPIO expanders:"
687+
688+
config GPIO_VIPERBOARD
689+
tristate "Viperboard GPIO a & b support"
690+
depends on MFD_VIPERBOARD && USB
691+
help
692+
Say yes here to access the GPIO signals of Nano River
693+
Technologies Viperboard. There are two GPIO chips on the
694+
board: gpioa and gpiob.
695+
See viperboard API specification and Nano
696+
River Tech's viperboard.h for detailed meaning
697+
of the module parameters.
698+
686699
endif

drivers/gpio/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ obj-$(CONFIG_GPIO_TS5500) += gpio-ts5500.o
7676
obj-$(CONFIG_GPIO_TWL4030) += gpio-twl4030.o
7777
obj-$(CONFIG_GPIO_TWL6040) += gpio-twl6040.o
7878
obj-$(CONFIG_GPIO_UCB1400) += gpio-ucb1400.o
79+
obj-$(CONFIG_GPIO_VIPERBOARD) += gpio-viperboard.o
7980
obj-$(CONFIG_GPIO_VR41XX) += gpio-vr41xx.o
8081
obj-$(CONFIG_GPIO_VT8500) += gpio-vt8500.o
8182
obj-$(CONFIG_GPIO_VX855) += gpio-vx855.o

drivers/gpio/gpio-da9052.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,11 @@ static int da9052_gpio_to_irq(struct gpio_chip *gc, u32 offset)
185185
struct da9052_gpio *gpio = to_da9052_gpio(gc);
186186
struct da9052 *da9052 = gpio->da9052;
187187

188-
return da9052->irq_base + DA9052_IRQ_GPI0 + offset;
188+
int irq;
189+
190+
irq = regmap_irq_get_virq(da9052->irq_data, DA9052_IRQ_GPI0 + offset);
191+
192+
return irq;
189193
}
190194

191195
static struct gpio_chip reference_gp = {

drivers/gpio/gpio-tps6586x.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,14 @@ static int tps6586x_gpio_output(struct gpio_chip *gc, unsigned offset,
8080
val, mask);
8181
}
8282

83+
static int tps6586x_gpio_to_irq(struct gpio_chip *gc, unsigned offset)
84+
{
85+
struct tps6586x_gpio *tps6586x_gpio = to_tps6586x_gpio(gc);
86+
87+
return tps6586x_irq_get_virq(tps6586x_gpio->parent,
88+
TPS6586X_INT_PLDO_0 + offset);
89+
}
90+
8391
static int tps6586x_gpio_probe(struct platform_device *pdev)
8492
{
8593
struct tps6586x_platform_data *pdata;
@@ -106,6 +114,7 @@ static int tps6586x_gpio_probe(struct platform_device *pdev)
106114
tps6586x_gpio->gpio_chip.direction_output = tps6586x_gpio_output;
107115
tps6586x_gpio->gpio_chip.set = tps6586x_gpio_set;
108116
tps6586x_gpio->gpio_chip.get = tps6586x_gpio_get;
117+
tps6586x_gpio->gpio_chip.to_irq = tps6586x_gpio_to_irq;
109118

110119
#ifdef CONFIG_OF_GPIO
111120
tps6586x_gpio->gpio_chip.of_node = pdev->dev.parent->of_node;

drivers/gpio/gpio-twl4030.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -355,13 +355,13 @@ static struct gpio_chip twl_gpiochip = {
355355

356356
static int gpio_twl4030_pulls(u32 ups, u32 downs)
357357
{
358-
u8 message[6];
358+
u8 message[5];
359359
unsigned i, gpio_bit;
360360

361361
/* For most pins, a pulldown was enabled by default.
362362
* We should have data that's specific to this board.
363363
*/
364-
for (gpio_bit = 1, i = 1; i < 6; i++) {
364+
for (gpio_bit = 1, i = 0; i < 5; i++) {
365365
u8 bit_mask;
366366
unsigned j;
367367

@@ -380,16 +380,16 @@ static int gpio_twl4030_pulls(u32 ups, u32 downs)
380380

381381
static int gpio_twl4030_debounce(u32 debounce, u8 mmc_cd)
382382
{
383-
u8 message[4];
383+
u8 message[3];
384384

385385
/* 30 msec of debouncing is always used for MMC card detect,
386386
* and is optional for everything else.
387387
*/
388-
message[1] = (debounce & 0xff) | (mmc_cd & 0x03);
388+
message[0] = (debounce & 0xff) | (mmc_cd & 0x03);
389389
debounce >>= 8;
390-
message[2] = (debounce & 0xff);
390+
message[1] = (debounce & 0xff);
391391
debounce >>= 8;
392-
message[3] = (debounce & 0x03);
392+
message[2] = (debounce & 0x03);
393393

394394
return twl_i2c_write(TWL4030_MODULE_GPIO, message,
395395
REG_GPIO_DEBEN1, 3);

0 commit comments

Comments
 (0)