mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-26 13:44:15 +08:00
This is the first batch of MFD fixes for 3.9.
With this one we have: - An ab8500 build failure fix. - An ab8500 device tree parsing fix. - A fix for twl4030_madc remove routine to work properly (when built-in). - A fix for properly registering palmas interrupt handler. - A fix for omap-usb init routine to actually write into the hostconfig register. - A couple of warning fixes for ab8500-gpadc and tps65912. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iQIcBAABAgAGBQJRQs2IAAoJEIqAPN1PVmxKN6sQAISiEmSjOiLRZ3b13qeKGiMX 3F3W5qXGYJQzhiVU/unPK9/2rTdfJ0Mqnuj88bLY+336pr89vi8g0k2VBWPfHlcv jv2mJKWuNUM15D0d6uZ3t27jrXXBzNEvMjKKen2kYfm1+JcR+1N8pbJUZtOlgREJ 2Z23or/XP+ZCSbXcvzH1KvRFrcaBDedqgT4m0nat2dTfZ77MpKZEA58sutNBOUMa YfoE2ncJBq5Ku4LBo6wGhsVptzilmpH3YBnSEgTh7tccyLrt4SnodNdT3vxmU4+1 C0r/oX9Idcij4/VAW/2bcEq1E12YUeKnPeVDAARXc+X/1Oyw+Mc6Cqd/rnvFomfe 9uTGMOmH1me1mSUgrzFNM1nnKXaZkWti56rLEe8tLsN7tkc+oWSJPIlWwjCmeWkC R5SPgR5Jf6QeA4mW9qMxnBM3y8YlaV4awW6wwVYXGUDICZMG04qURSLo9NX3kDAA AHsbE+IiSxdDqmZr8aejhaGd7PIVjfPhnM25TNlUZ5P5EWlApl4ha7QZ/BK2fx6k DqaRujfB2uGcQAwqTprVpDI6lHUEneUKaa3zDpoxkP4vPVXDsRIiBo7HRfY8QXjg vMWrYfLvAYBXHx69I5q2DghyFmofu/H0SXDdGlo33cQ5SfzeNGS7h0pPGrkNJyvN 7WJbiOdAYeQXVlBCy7sB =XFgy -----END PGP SIGNATURE----- Merge tag 'mfd-fixes-3.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-fixes Pull MFD fixes from Samuel Ortiz: "This is the first batch of MFD fixes for 3.9. With this one we have: - An ab8500 build failure fix. - An ab8500 device tree parsing fix. - A fix for twl4030_madc remove routine to work properly (when built-in). - A fix for properly registering palmas interrupt handler. - A fix for omap-usb init routine to actually write into the hostconfig register. - A couple of warning fixes for ab8500-gpadc and tps65912" * tag 'mfd-fixes-3.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-fixes: mfd: twl4030-madc: Remove __exit_p annotation mfd: ab8500: Kill "reg" property from binding mfd: ab8500-gpadc: Complain if we fail to enable vtvout LDO mfd: wm831x: Don't forward declare enum wm831x_auxadc mfd: twl4030-audio: Fix argument type for twl4030_audio_disable_resource() mfd: tps65912: Declare and use tps65912_irq_exit() mfd: palmas: Provide irq flags through DT/platform data mfd: Make AB8500_CORE select POWER_SUPPLY to fix build error mfd: omap-usb-host: Actually update hostconfig
This commit is contained in:
commit
de1893f640
@ -13,9 +13,6 @@ Required parent device properties:
|
||||
4 = active high level-sensitive
|
||||
8 = active low level-sensitive
|
||||
|
||||
Optional parent device properties:
|
||||
- reg : contains the PRCMU mailbox address for the AB8500 i2c port
|
||||
|
||||
The AB8500 consists of a large and varied group of sub-devices:
|
||||
|
||||
Device IRQ Names Supply Names Description
|
||||
@ -86,9 +83,8 @@ Non-standard child device properties:
|
||||
- stericsson,amic2-bias-vamic1 : Analoge Mic wishes to use a non-standard Vamic
|
||||
- stericsson,earpeice-cmv : Earpeice voltage (only: 950 | 1100 | 1270 | 1580)
|
||||
|
||||
ab8500@5 {
|
||||
ab8500 {
|
||||
compatible = "stericsson,ab8500";
|
||||
reg = <5>; /* mailbox 5 is i2c */
|
||||
interrupts = <0 40 0x4>;
|
||||
interrupt-controller;
|
||||
#interrupt-cells = <2>;
|
||||
|
@ -319,9 +319,8 @@
|
||||
};
|
||||
};
|
||||
|
||||
ab8500@5 {
|
||||
ab8500 {
|
||||
compatible = "stericsson,ab8500";
|
||||
reg = <5>; /* mailbox 5 is i2c */
|
||||
interrupt-parent = <&intc>;
|
||||
interrupts = <0 40 0x4>;
|
||||
interrupt-controller;
|
||||
|
@ -221,7 +221,7 @@
|
||||
};
|
||||
};
|
||||
|
||||
ab8500@5 {
|
||||
ab8500 {
|
||||
ab8500-regulators {
|
||||
ab8500_ldo_aux1_reg: ab8500_ldo_aux1 {
|
||||
regulator-name = "V-DISPLAY";
|
||||
|
@ -158,7 +158,7 @@
|
||||
};
|
||||
};
|
||||
|
||||
ab8500@5 {
|
||||
ab8500 {
|
||||
ab8500-regulators {
|
||||
ab8500_ldo_aux1_reg: ab8500_ldo_aux1 {
|
||||
regulator-name = "V-DISPLAY";
|
||||
|
@ -298,7 +298,7 @@
|
||||
};
|
||||
};
|
||||
|
||||
ab8500@5 {
|
||||
ab8500 {
|
||||
ab8500-regulators {
|
||||
ab8500_ldo_aux1_reg: ab8500_ldo_aux1 {
|
||||
regulator-name = "V-DISPLAY";
|
||||
|
@ -858,6 +858,7 @@ config EZX_PCAP
|
||||
config AB8500_CORE
|
||||
bool "ST-Ericsson AB8500 Mixed Signal Power Management chip"
|
||||
depends on GENERIC_HARDIRQS && ABX500_CORE && MFD_DB8500_PRCMU
|
||||
select POWER_SUPPLY
|
||||
select MFD_CORE
|
||||
select IRQ_DOMAIN
|
||||
help
|
||||
|
@ -594,9 +594,12 @@ static int ab8500_gpadc_runtime_suspend(struct device *dev)
|
||||
static int ab8500_gpadc_runtime_resume(struct device *dev)
|
||||
{
|
||||
struct ab8500_gpadc *gpadc = dev_get_drvdata(dev);
|
||||
int ret;
|
||||
|
||||
regulator_enable(gpadc->regu);
|
||||
return 0;
|
||||
ret = regulator_enable(gpadc->regu);
|
||||
if (ret)
|
||||
dev_err(dev, "Failed to enable vtvout LDO: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int ab8500_gpadc_runtime_idle(struct device *dev)
|
||||
@ -643,7 +646,7 @@ static int ab8500_gpadc_probe(struct platform_device *pdev)
|
||||
}
|
||||
|
||||
/* VTVout LDO used to power up ab8500-GPADC */
|
||||
gpadc->regu = regulator_get(&pdev->dev, "vddadc");
|
||||
gpadc->regu = devm_regulator_get(&pdev->dev, "vddadc");
|
||||
if (IS_ERR(gpadc->regu)) {
|
||||
ret = PTR_ERR(gpadc->regu);
|
||||
dev_err(gpadc->dev, "failed to get vtvout LDO\n");
|
||||
@ -652,7 +655,11 @@ static int ab8500_gpadc_probe(struct platform_device *pdev)
|
||||
|
||||
platform_set_drvdata(pdev, gpadc);
|
||||
|
||||
regulator_enable(gpadc->regu);
|
||||
ret = regulator_enable(gpadc->regu);
|
||||
if (ret) {
|
||||
dev_err(gpadc->dev, "Failed to enable vtvout LDO: %d\n", ret);
|
||||
goto fail_enable;
|
||||
}
|
||||
|
||||
pm_runtime_set_autosuspend_delay(gpadc->dev, GPADC_AUDOSUSPEND_DELAY);
|
||||
pm_runtime_use_autosuspend(gpadc->dev);
|
||||
@ -663,6 +670,8 @@ static int ab8500_gpadc_probe(struct platform_device *pdev)
|
||||
list_add_tail(&gpadc->node, &ab8500_gpadc_list);
|
||||
dev_dbg(gpadc->dev, "probe success\n");
|
||||
return 0;
|
||||
|
||||
fail_enable:
|
||||
fail_irq:
|
||||
free_irq(gpadc->irq, gpadc);
|
||||
fail:
|
||||
|
@ -460,15 +460,15 @@ static void omap_usbhs_init(struct device *dev)
|
||||
|
||||
switch (omap->usbhs_rev) {
|
||||
case OMAP_USBHS_REV1:
|
||||
omap_usbhs_rev1_hostconfig(omap, reg);
|
||||
reg = omap_usbhs_rev1_hostconfig(omap, reg);
|
||||
break;
|
||||
|
||||
case OMAP_USBHS_REV2:
|
||||
omap_usbhs_rev2_hostconfig(omap, reg);
|
||||
reg = omap_usbhs_rev2_hostconfig(omap, reg);
|
||||
break;
|
||||
|
||||
default: /* newer revisions */
|
||||
omap_usbhs_rev2_hostconfig(omap, reg);
|
||||
reg = omap_usbhs_rev2_hostconfig(omap, reg);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -257,9 +257,24 @@ static struct regmap_irq_chip palmas_irq_chip = {
|
||||
PALMAS_INT1_MASK),
|
||||
};
|
||||
|
||||
static void palmas_dt_to_pdata(struct device_node *node,
|
||||
static int palmas_set_pdata_irq_flag(struct i2c_client *i2c,
|
||||
struct palmas_platform_data *pdata)
|
||||
{
|
||||
struct irq_data *irq_data = irq_get_irq_data(i2c->irq);
|
||||
if (!irq_data) {
|
||||
dev_err(&i2c->dev, "Invalid IRQ: %d\n", i2c->irq);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
pdata->irq_flags = irqd_get_trigger_type(irq_data);
|
||||
dev_info(&i2c->dev, "Irq flag is 0x%08x\n", pdata->irq_flags);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void palmas_dt_to_pdata(struct i2c_client *i2c,
|
||||
struct palmas_platform_data *pdata)
|
||||
{
|
||||
struct device_node *node = i2c->dev.of_node;
|
||||
int ret;
|
||||
u32 prop;
|
||||
|
||||
@ -283,6 +298,8 @@ static void palmas_dt_to_pdata(struct device_node *node,
|
||||
pdata->power_ctrl = PALMAS_POWER_CTRL_NSLEEP_MASK |
|
||||
PALMAS_POWER_CTRL_ENABLE1_MASK |
|
||||
PALMAS_POWER_CTRL_ENABLE2_MASK;
|
||||
if (i2c->irq)
|
||||
palmas_set_pdata_irq_flag(i2c, pdata);
|
||||
}
|
||||
|
||||
static int palmas_i2c_probe(struct i2c_client *i2c,
|
||||
@ -304,7 +321,7 @@ static int palmas_i2c_probe(struct i2c_client *i2c,
|
||||
if (!pdata)
|
||||
return -ENOMEM;
|
||||
|
||||
palmas_dt_to_pdata(node, pdata);
|
||||
palmas_dt_to_pdata(i2c, pdata);
|
||||
}
|
||||
|
||||
if (!pdata)
|
||||
@ -344,6 +361,19 @@ static int palmas_i2c_probe(struct i2c_client *i2c,
|
||||
}
|
||||
}
|
||||
|
||||
/* Change interrupt line output polarity */
|
||||
if (pdata->irq_flags & IRQ_TYPE_LEVEL_HIGH)
|
||||
reg = PALMAS_POLARITY_CTRL_INT_POLARITY;
|
||||
else
|
||||
reg = 0;
|
||||
ret = palmas_update_bits(palmas, PALMAS_PU_PD_OD_BASE,
|
||||
PALMAS_POLARITY_CTRL, PALMAS_POLARITY_CTRL_INT_POLARITY,
|
||||
reg);
|
||||
if (ret < 0) {
|
||||
dev_err(palmas->dev, "POLARITY_CTRL updat failed: %d\n", ret);
|
||||
goto err;
|
||||
}
|
||||
|
||||
/* Change IRQ into clear on read mode for efficiency */
|
||||
slave = PALMAS_BASE_TO_SLAVE(PALMAS_INTERRUPT_BASE);
|
||||
addr = PALMAS_BASE_TO_REG(PALMAS_INTERRUPT_BASE, PALMAS_INT_CTRL);
|
||||
@ -352,7 +382,7 @@ static int palmas_i2c_probe(struct i2c_client *i2c,
|
||||
regmap_write(palmas->regmap[slave], addr, reg);
|
||||
|
||||
ret = regmap_add_irq_chip(palmas->regmap[slave], palmas->irq,
|
||||
IRQF_ONESHOT | IRQF_TRIGGER_LOW, 0, &palmas_irq_chip,
|
||||
IRQF_ONESHOT | pdata->irq_flags, 0, &palmas_irq_chip,
|
||||
&palmas->irq_data);
|
||||
if (ret < 0)
|
||||
goto err;
|
||||
|
@ -169,6 +169,7 @@ err:
|
||||
void tps65912_device_exit(struct tps65912 *tps65912)
|
||||
{
|
||||
mfd_remove_devices(tps65912->dev);
|
||||
tps65912_irq_exit(tps65912);
|
||||
kfree(tps65912);
|
||||
}
|
||||
|
||||
|
@ -118,7 +118,7 @@ EXPORT_SYMBOL_GPL(twl4030_audio_enable_resource);
|
||||
* Disable the resource.
|
||||
* The function returns with error or the content of the register
|
||||
*/
|
||||
int twl4030_audio_disable_resource(unsigned id)
|
||||
int twl4030_audio_disable_resource(enum twl4030_audio_res id)
|
||||
{
|
||||
struct twl4030_audio *audio = platform_get_drvdata(twl4030_audio_dev);
|
||||
int val;
|
||||
|
@ -800,7 +800,7 @@ static int twl4030_madc_remove(struct platform_device *pdev)
|
||||
|
||||
static struct platform_driver twl4030_madc_driver = {
|
||||
.probe = twl4030_madc_probe,
|
||||
.remove = __exit_p(twl4030_madc_remove),
|
||||
.remove = twl4030_madc_remove,
|
||||
.driver = {
|
||||
.name = "twl4030_madc",
|
||||
.owner = THIS_MODULE,
|
||||
|
@ -221,6 +221,7 @@ struct palmas_clk_platform_data {
|
||||
};
|
||||
|
||||
struct palmas_platform_data {
|
||||
int irq_flags;
|
||||
int gpio_base;
|
||||
|
||||
/* bit value to be loaded to the POWER_CTRL register */
|
||||
|
@ -323,5 +323,6 @@ int tps65912_device_init(struct tps65912 *tps65912);
|
||||
void tps65912_device_exit(struct tps65912 *tps65912);
|
||||
int tps65912_irq_init(struct tps65912 *tps65912, int irq,
|
||||
struct tps65912_platform_data *pdata);
|
||||
int tps65912_irq_exit(struct tps65912 *tps65912);
|
||||
|
||||
#endif /* __LINUX_MFD_TPS65912_H */
|
||||
|
@ -15,6 +15,8 @@
|
||||
#ifndef __MFD_WM831X_AUXADC_H__
|
||||
#define __MFD_WM831X_AUXADC_H__
|
||||
|
||||
struct wm831x;
|
||||
|
||||
/*
|
||||
* R16429 (0x402D) - AuxADC Data
|
||||
*/
|
||||
|
@ -20,6 +20,7 @@
|
||||
#include <linux/irqdomain.h>
|
||||
#include <linux/list.h>
|
||||
#include <linux/regmap.h>
|
||||
#include <linux/mfd/wm831x/auxadc.h>
|
||||
|
||||
/*
|
||||
* Register values.
|
||||
@ -355,7 +356,6 @@ enum wm831x_parent {
|
||||
};
|
||||
|
||||
struct wm831x;
|
||||
enum wm831x_auxadc;
|
||||
|
||||
typedef int (*wm831x_auxadc_read_fn)(struct wm831x *wm831x,
|
||||
enum wm831x_auxadc input);
|
||||
|
Loading…
Reference in New Issue
Block a user