Skip to content

Commit 30304e5

Browse files
committed
Merge tag 'mfd_3.4-1' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6
Pull MFD changes from Samuel Ortiz: - 4 new drivers: Freescale i.MX on-chip Anatop, Ricoh's RC5T583 and TI's TPS65090 and TPS65217. - New variants support (8420, 8520 ab9540), cleanups and bug fixes for the abx500 and db8500 ST-E chipsets. - Some minor fixes and update for the wm8994 from Mark. - The beginning of a long term TWL cleanup effort coming from the TI folks. - Various fixes and cleanups for the s5m, TPS659xx, pm860x, and MAX8997 drivers. Fix up trivial conflicts due to duplicate patches and header file cleanups (<linux/device.h> removal etc). * tag 'mfd_3.4-1' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6: (97 commits) gpio/twl: Add DT support to gpio-twl4030 driver gpio/twl: Allocate irq_desc dynamically for SPARSE_IRQ support mfd: Detach twl6040 from the pmic mfd driver mfd: Replace twl-* pr_ macros by the dev_ equivalent and do various cleanups mfd: Micro-optimization on twl4030 IRQ handler mfd: Make twl4030 SIH SPARSE_IRQ capable mfd: Move twl-core IRQ allocation into twl[4030|6030]-irq files mfd: Remove references already defineid in header file from twl-core mfd: Remove unneeded header from twl-core mfd: Make twl-core not depend on pdata->irq_base/end ARM: OMAP2+: board-omap4-*: Do not use anymore TWL6030_IRQ_BASE in board files mfd: Return twl6030_mmc_card_detect IRQ for board setup Revert "mfd: Add platform data for MAX8997 haptic driver" mfd: Add support for TPS65090 mfd: Add some da9052-i2c section annotations mfd: Build rtc5t583 only if I2C config is selected to y. mfd: Add anatop mfd driver mfd: Fix compilation error in tps65910.h mfd: Add 8420 variant to db8500-prcmu mfd: Add 8520 PRCMU variant to db8500-prcmu ...
2 parents 750f770 + b8589e2 commit 30304e5

69 files changed

Lines changed: 5211 additions & 1126 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: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
twl4030 GPIO controller bindings
2+
3+
Required properties:
4+
- compatible:
5+
- "ti,twl4030-gpio" for twl4030 GPIO controller
6+
- #gpio-cells : Should be two.
7+
- first cell is the pin number
8+
- second cell is used to specify optional parameters (unused)
9+
- gpio-controller : Marks the device node as a GPIO controller.
10+
- #interrupt-cells : Should be 2.
11+
- interrupt-controller: Mark the device node as an interrupt controller
12+
The first cell is the GPIO number.
13+
The second cell is not used.
14+
15+
Example:
16+
17+
twl_gpio: gpio {
18+
compatible = "ti,twl4030-gpio";
19+
#gpio-cells = <2>;
20+
gpio-controller;
21+
#interrupt-cells = <2>;
22+
interrupt-controller;
23+
};

‎arch/arm/mach-omap2/board-4430sdp.c‎

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -490,21 +490,22 @@ static struct platform_device omap_vwlan_device = {
490490

491491
static int omap4_twl6030_hsmmc_late_init(struct device *dev)
492492
{
493-
int ret = 0;
493+
int irq = 0;
494494
struct platform_device *pdev = container_of(dev,
495495
struct platform_device, dev);
496496
struct omap_mmc_platform_data *pdata = dev->platform_data;
497497

498498
/* Setting MMC1 Card detect Irq */
499499
if (pdev->id == 0) {
500-
ret = twl6030_mmc_card_detect_config();
501-
if (ret)
500+
irq = twl6030_mmc_card_detect_config();
501+
if (irq < 0) {
502502
pr_err("Failed configuring MMC1 card detect\n");
503-
pdata->slots[0].card_detect_irq = TWL6030_IRQ_BASE +
504-
MMCDETECT_INTR_OFFSET;
503+
return irq;
504+
}
505+
pdata->slots[0].card_detect_irq = irq;
505506
pdata->slots[0].card_detect = twl6030_mmc_card_detect;
506507
}
507-
return ret;
508+
return 0;
508509
}
509510

510511
static __init void omap4_twl6030_hsmmc_set_late_init(struct device *dev)

‎arch/arm/mach-omap2/board-omap4panda.c‎

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ struct wl12xx_platform_data omap_panda_wlan_data __initdata = {
238238

239239
static int omap4_twl6030_hsmmc_late_init(struct device *dev)
240240
{
241-
int ret = 0;
241+
int irq = 0;
242242
struct platform_device *pdev = container_of(dev,
243243
struct platform_device, dev);
244244
struct omap_mmc_platform_data *pdata = dev->platform_data;
@@ -249,14 +249,15 @@ static int omap4_twl6030_hsmmc_late_init(struct device *dev)
249249
}
250250
/* Setting MMC1 Card detect Irq */
251251
if (pdev->id == 0) {
252-
ret = twl6030_mmc_card_detect_config();
253-
if (ret)
252+
irq = twl6030_mmc_card_detect_config();
253+
if (irq < 0) {
254254
dev_err(dev, "%s: Error card detect config(%d)\n",
255-
__func__, ret);
256-
else
257-
pdata->slots[0].card_detect = twl6030_mmc_card_detect;
255+
__func__, irq);
256+
return irq;
257+
}
258+
pdata->slots[0].card_detect = twl6030_mmc_card_detect;
258259
}
259-
return ret;
260+
return 0;
260261
}
261262

262263
static __init void omap4_twl6030_hsmmc_set_late_init(struct device *dev)

‎arch/arm/mach-s3c64xx/mach-crag6410-module.c‎

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
#include <linux/mfd/wm831x/gpio.h>
1818
#include <linux/mfd/wm8994/pdata.h>
1919

20+
#include <linux/regulator/machine.h>
21+
2022
#include <sound/wm5100.h>
2123
#include <sound/wm8996.h>
2224
#include <sound/wm8962.h>
@@ -153,15 +155,23 @@ static const struct i2c_board_info wm1259_devs[] = {
153155
},
154156
};
155157

158+
static struct regulator_init_data wm8994_ldo1 = {
159+
.supply_regulator = "WALLVDD",
160+
};
161+
162+
static struct regulator_init_data wm8994_ldo2 = {
163+
.supply_regulator = "WALLVDD",
164+
};
165+
156166
static struct wm8994_pdata wm8994_pdata = {
157167
.gpio_base = CODEC_GPIO_BASE,
158168
.gpio_defaults = {
159169
0x3, /* IRQ out, active high, CMOS */
160170
},
161171
.irq_base = CODEC_IRQ_BASE,
162172
.ldo = {
163-
{ .supply = "WALLVDD" },
164-
{ .supply = "WALLVDD" },
173+
{ .init_data = &wm8994_ldo1, },
174+
{ .init_data = &wm8994_ldo2, },
165175
},
166176
};
167177

‎arch/arm/mach-ux500/include/mach/irqs-board-mop500.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
#define MOP500_AB8500_IRQ_BASE IRQ_BOARD_START
1515
#define MOP500_AB8500_IRQ_END (MOP500_AB8500_IRQ_BASE \
16-
+ AB8500_NR_IRQS)
16+
+ AB8500_MAX_NR_IRQS)
1717

1818
/* TC35892 */
1919
#define TC35892_NR_INTERNAL_IRQS 8

‎drivers/cpufreq/db8500-cpufreq.c‎

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@ static struct cpufreq_frequency_table freq_table[] = {
2222
},
2323
[1] = {
2424
.index = 1,
25-
.frequency = 300000,
25+
.frequency = 400000,
2626
},
2727
[2] = {
2828
.index = 2,
29-
.frequency = 600000,
29+
.frequency = 800000,
3030
},
3131
[3] = {
3232
/* Used for MAX_OPP, if available */
@@ -113,12 +113,9 @@ static int __cpuinit db8500_cpufreq_init(struct cpufreq_policy *policy)
113113

114114
BUILD_BUG_ON(ARRAY_SIZE(idx2opp) + 1 != ARRAY_SIZE(freq_table));
115115

116-
if (!prcmu_is_u8400()) {
117-
freq_table[1].frequency = 400000;
118-
freq_table[2].frequency = 800000;
119-
if (prcmu_has_arm_maxopp())
120-
freq_table[3].frequency = 1000000;
121-
}
116+
if (prcmu_has_arm_maxopp())
117+
freq_table[3].frequency = 1000000;
118+
122119
pr_info("db8500-cpufreq : Available frequencies:\n");
123120
for (i = 0; freq_table[i].frequency != CPUFREQ_TABLE_END; i++)
124121
pr_info(" %d Mhz\n", freq_table[i].frequency/1000);

‎drivers/gpio/gpio-stmpe.c‎

Lines changed: 25 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -307,13 +307,11 @@ static int __devinit stmpe_gpio_probe(struct platform_device *pdev)
307307
struct stmpe_gpio_platform_data *pdata;
308308
struct stmpe_gpio *stmpe_gpio;
309309
int ret;
310-
int irq;
310+
int irq = 0;
311311

312312
pdata = stmpe->pdata->gpio;
313313

314314
irq = platform_get_irq(pdev, 0);
315-
if (irq < 0)
316-
return irq;
317315

318316
stmpe_gpio = kzalloc(sizeof(struct stmpe_gpio), GFP_KERNEL);
319317
if (!stmpe_gpio)
@@ -330,21 +328,28 @@ static int __devinit stmpe_gpio_probe(struct platform_device *pdev)
330328
stmpe_gpio->chip.dev = &pdev->dev;
331329
stmpe_gpio->chip.base = pdata ? pdata->gpio_base : -1;
332330

333-
stmpe_gpio->irq_base = stmpe->irq_base + STMPE_INT_GPIO(0);
331+
if (irq >= 0)
332+
stmpe_gpio->irq_base = stmpe->irq_base + STMPE_INT_GPIO(0);
333+
else
334+
dev_info(&pdev->dev,
335+
"device configured in no-irq mode; "
336+
"irqs are not available\n");
334337

335338
ret = stmpe_enable(stmpe, STMPE_BLOCK_GPIO);
336339
if (ret)
337340
goto out_free;
338341

339-
ret = stmpe_gpio_irq_init(stmpe_gpio);
340-
if (ret)
341-
goto out_disable;
342+
if (irq >= 0) {
343+
ret = stmpe_gpio_irq_init(stmpe_gpio);
344+
if (ret)
345+
goto out_disable;
342346

343-
ret = request_threaded_irq(irq, NULL, stmpe_gpio_irq, IRQF_ONESHOT,
344-
"stmpe-gpio", stmpe_gpio);
345-
if (ret) {
346-
dev_err(&pdev->dev, "unable to get irq: %d\n", ret);
347-
goto out_removeirq;
347+
ret = request_threaded_irq(irq, NULL, stmpe_gpio_irq,
348+
IRQF_ONESHOT, "stmpe-gpio", stmpe_gpio);
349+
if (ret) {
350+
dev_err(&pdev->dev, "unable to get irq: %d\n", ret);
351+
goto out_removeirq;
352+
}
348353
}
349354

350355
ret = gpiochip_add(&stmpe_gpio->chip);
@@ -361,9 +366,11 @@ static int __devinit stmpe_gpio_probe(struct platform_device *pdev)
361366
return 0;
362367

363368
out_freeirq:
364-
free_irq(irq, stmpe_gpio);
369+
if (irq >= 0)
370+
free_irq(irq, stmpe_gpio);
365371
out_removeirq:
366-
stmpe_gpio_irq_remove(stmpe_gpio);
372+
if (irq >= 0)
373+
stmpe_gpio_irq_remove(stmpe_gpio);
367374
out_disable:
368375
stmpe_disable(stmpe, STMPE_BLOCK_GPIO);
369376
out_free:
@@ -391,8 +398,10 @@ static int __devexit stmpe_gpio_remove(struct platform_device *pdev)
391398

392399
stmpe_disable(stmpe, STMPE_BLOCK_GPIO);
393400

394-
free_irq(irq, stmpe_gpio);
395-
stmpe_gpio_irq_remove(stmpe_gpio);
401+
if (irq >= 0) {
402+
free_irq(irq, stmpe_gpio);
403+
stmpe_gpio_irq_remove(stmpe_gpio);
404+
}
396405
platform_set_drvdata(pdev, NULL);
397406
kfree(stmpe_gpio);
398407

0 commit comments

Comments
 (0)