Skip to content

Commit

Permalink
Merge tag 'mfd_3.4-1' of git://git.kernel.org/pub/scm/linux/kernel/gi…
Browse files Browse the repository at this point in the history
…t/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
  ...
  • Loading branch information
Linus Torvalds committed Mar 28, 2012
2 parents 750f770 + b8589e2 commit 30304e5
Show file tree
Hide file tree
Showing 69 changed files with 5,211 additions and 1,126 deletions.
23 changes: 23 additions & 0 deletions Documentation/devicetree/bindings/gpio/gpio-twl4030.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
twl4030 GPIO controller bindings

Required properties:
- compatible:
- "ti,twl4030-gpio" for twl4030 GPIO controller
- #gpio-cells : Should be two.
- first cell is the pin number
- second cell is used to specify optional parameters (unused)
- gpio-controller : Marks the device node as a GPIO controller.
- #interrupt-cells : Should be 2.
- interrupt-controller: Mark the device node as an interrupt controller
The first cell is the GPIO number.
The second cell is not used.

Example:

twl_gpio: gpio {
compatible = "ti,twl4030-gpio";
#gpio-cells = <2>;
gpio-controller;
#interrupt-cells = <2>;
interrupt-controller;
};
13 changes: 7 additions & 6 deletions arch/arm/mach-omap2/board-4430sdp.c
Original file line number Diff line number Diff line change
Expand Up @@ -490,21 +490,22 @@ static struct platform_device omap_vwlan_device = {

static int omap4_twl6030_hsmmc_late_init(struct device *dev)
{
int ret = 0;
int irq = 0;
struct platform_device *pdev = container_of(dev,
struct platform_device, dev);
struct omap_mmc_platform_data *pdata = dev->platform_data;

/* Setting MMC1 Card detect Irq */
if (pdev->id == 0) {
ret = twl6030_mmc_card_detect_config();
if (ret)
irq = twl6030_mmc_card_detect_config();
if (irq < 0) {
pr_err("Failed configuring MMC1 card detect\n");
pdata->slots[0].card_detect_irq = TWL6030_IRQ_BASE +
MMCDETECT_INTR_OFFSET;
return irq;
}
pdata->slots[0].card_detect_irq = irq;
pdata->slots[0].card_detect = twl6030_mmc_card_detect;
}
return ret;
return 0;
}

static __init void omap4_twl6030_hsmmc_set_late_init(struct device *dev)
Expand Down
15 changes: 8 additions & 7 deletions arch/arm/mach-omap2/board-omap4panda.c
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ struct wl12xx_platform_data omap_panda_wlan_data __initdata = {

static int omap4_twl6030_hsmmc_late_init(struct device *dev)
{
int ret = 0;
int irq = 0;
struct platform_device *pdev = container_of(dev,
struct platform_device, dev);
struct omap_mmc_platform_data *pdata = dev->platform_data;
Expand All @@ -249,14 +249,15 @@ static int omap4_twl6030_hsmmc_late_init(struct device *dev)
}
/* Setting MMC1 Card detect Irq */
if (pdev->id == 0) {
ret = twl6030_mmc_card_detect_config();
if (ret)
irq = twl6030_mmc_card_detect_config();
if (irq < 0) {
dev_err(dev, "%s: Error card detect config(%d)\n",
__func__, ret);
else
pdata->slots[0].card_detect = twl6030_mmc_card_detect;
__func__, irq);
return irq;
}
pdata->slots[0].card_detect = twl6030_mmc_card_detect;
}
return ret;
return 0;
}

static __init void omap4_twl6030_hsmmc_set_late_init(struct device *dev)
Expand Down
14 changes: 12 additions & 2 deletions arch/arm/mach-s3c64xx/mach-crag6410-module.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
#include <linux/mfd/wm831x/gpio.h>
#include <linux/mfd/wm8994/pdata.h>

#include <linux/regulator/machine.h>

#include <sound/wm5100.h>
#include <sound/wm8996.h>
#include <sound/wm8962.h>
Expand Down Expand Up @@ -153,15 +155,23 @@ static const struct i2c_board_info wm1259_devs[] = {
},
};

static struct regulator_init_data wm8994_ldo1 = {
.supply_regulator = "WALLVDD",
};

static struct regulator_init_data wm8994_ldo2 = {
.supply_regulator = "WALLVDD",
};

static struct wm8994_pdata wm8994_pdata = {
.gpio_base = CODEC_GPIO_BASE,
.gpio_defaults = {
0x3, /* IRQ out, active high, CMOS */
},
.irq_base = CODEC_IRQ_BASE,
.ldo = {
{ .supply = "WALLVDD" },
{ .supply = "WALLVDD" },
{ .init_data = &wm8994_ldo1, },
{ .init_data = &wm8994_ldo2, },
},
};

Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-ux500/include/mach/irqs-board-mop500.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

#define MOP500_AB8500_IRQ_BASE IRQ_BOARD_START
#define MOP500_AB8500_IRQ_END (MOP500_AB8500_IRQ_BASE \
+ AB8500_NR_IRQS)
+ AB8500_MAX_NR_IRQS)

/* TC35892 */
#define TC35892_NR_INTERNAL_IRQS 8
Expand Down
13 changes: 5 additions & 8 deletions drivers/cpufreq/db8500-cpufreq.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ static struct cpufreq_frequency_table freq_table[] = {
},
[1] = {
.index = 1,
.frequency = 300000,
.frequency = 400000,
},
[2] = {
.index = 2,
.frequency = 600000,
.frequency = 800000,
},
[3] = {
/* Used for MAX_OPP, if available */
Expand Down Expand Up @@ -113,12 +113,9 @@ static int __cpuinit db8500_cpufreq_init(struct cpufreq_policy *policy)

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

if (!prcmu_is_u8400()) {
freq_table[1].frequency = 400000;
freq_table[2].frequency = 800000;
if (prcmu_has_arm_maxopp())
freq_table[3].frequency = 1000000;
}
if (prcmu_has_arm_maxopp())
freq_table[3].frequency = 1000000;

pr_info("db8500-cpufreq : Available frequencies:\n");
for (i = 0; freq_table[i].frequency != CPUFREQ_TABLE_END; i++)
pr_info(" %d Mhz\n", freq_table[i].frequency/1000);
Expand Down
41 changes: 25 additions & 16 deletions drivers/gpio/gpio-stmpe.c
Original file line number Diff line number Diff line change
Expand Up @@ -307,13 +307,11 @@ static int __devinit stmpe_gpio_probe(struct platform_device *pdev)
struct stmpe_gpio_platform_data *pdata;
struct stmpe_gpio *stmpe_gpio;
int ret;
int irq;
int irq = 0;

pdata = stmpe->pdata->gpio;

irq = platform_get_irq(pdev, 0);
if (irq < 0)
return irq;

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

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

ret = stmpe_enable(stmpe, STMPE_BLOCK_GPIO);
if (ret)
goto out_free;

ret = stmpe_gpio_irq_init(stmpe_gpio);
if (ret)
goto out_disable;
if (irq >= 0) {
ret = stmpe_gpio_irq_init(stmpe_gpio);
if (ret)
goto out_disable;

ret = request_threaded_irq(irq, NULL, stmpe_gpio_irq, IRQF_ONESHOT,
"stmpe-gpio", stmpe_gpio);
if (ret) {
dev_err(&pdev->dev, "unable to get irq: %d\n", ret);
goto out_removeirq;
ret = request_threaded_irq(irq, NULL, stmpe_gpio_irq,
IRQF_ONESHOT, "stmpe-gpio", stmpe_gpio);
if (ret) {
dev_err(&pdev->dev, "unable to get irq: %d\n", ret);
goto out_removeirq;
}
}

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

out_freeirq:
free_irq(irq, stmpe_gpio);
if (irq >= 0)
free_irq(irq, stmpe_gpio);
out_removeirq:
stmpe_gpio_irq_remove(stmpe_gpio);
if (irq >= 0)
stmpe_gpio_irq_remove(stmpe_gpio);
out_disable:
stmpe_disable(stmpe, STMPE_BLOCK_GPIO);
out_free:
Expand Down Expand Up @@ -391,8 +398,10 @@ static int __devexit stmpe_gpio_remove(struct platform_device *pdev)

stmpe_disable(stmpe, STMPE_BLOCK_GPIO);

free_irq(irq, stmpe_gpio);
stmpe_gpio_irq_remove(stmpe_gpio);
if (irq >= 0) {
free_irq(irq, stmpe_gpio);
stmpe_gpio_irq_remove(stmpe_gpio);
}
platform_set_drvdata(pdev, NULL);
kfree(stmpe_gpio);

Expand Down
Loading

0 comments on commit 30304e5

Please sign in to comment.