Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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

+63 -23
+1 -5
Documentation/devicetree/bindings/mfd/ab8500.txt
··· 13 13 4 = active high level-sensitive 14 14 8 = active low level-sensitive 15 15 16 - Optional parent device properties: 17 - - reg : contains the PRCMU mailbox address for the AB8500 i2c port 18 - 19 16 The AB8500 consists of a large and varied group of sub-devices: 20 17 21 18 Device IRQ Names Supply Names Description ··· 83 86 - stericsson,amic2-bias-vamic1 : Analoge Mic wishes to use a non-standard Vamic 84 87 - stericsson,earpeice-cmv : Earpeice voltage (only: 950 | 1100 | 1270 | 1580) 85 88 86 - ab8500@5 { 89 + ab8500 { 87 90 compatible = "stericsson,ab8500"; 88 - reg = <5>; /* mailbox 5 is i2c */ 89 91 interrupts = <0 40 0x4>; 90 92 interrupt-controller; 91 93 #interrupt-cells = <2>;
+1 -2
arch/arm/boot/dts/dbx5x0.dtsi
··· 319 319 }; 320 320 }; 321 321 322 - ab8500@5 { 322 + ab8500 { 323 323 compatible = "stericsson,ab8500"; 324 - reg = <5>; /* mailbox 5 is i2c */ 325 324 interrupt-parent = <&intc>; 326 325 interrupts = <0 40 0x4>; 327 326 interrupt-controller;
+1 -1
arch/arm/boot/dts/href.dtsi
··· 221 221 }; 222 222 }; 223 223 224 - ab8500@5 { 224 + ab8500 { 225 225 ab8500-regulators { 226 226 ab8500_ldo_aux1_reg: ab8500_ldo_aux1 { 227 227 regulator-name = "V-DISPLAY";
+1 -1
arch/arm/boot/dts/hrefv60plus.dts
··· 158 158 }; 159 159 }; 160 160 161 - ab8500@5 { 161 + ab8500 { 162 162 ab8500-regulators { 163 163 ab8500_ldo_aux1_reg: ab8500_ldo_aux1 { 164 164 regulator-name = "V-DISPLAY";
+1 -1
arch/arm/boot/dts/snowball.dts
··· 298 298 }; 299 299 }; 300 300 301 - ab8500@5 { 301 + ab8500 { 302 302 ab8500-regulators { 303 303 ab8500_ldo_aux1_reg: ab8500_ldo_aux1 { 304 304 regulator-name = "V-DISPLAY";
+1
drivers/mfd/Kconfig
··· 858 858 config AB8500_CORE 859 859 bool "ST-Ericsson AB8500 Mixed Signal Power Management chip" 860 860 depends on GENERIC_HARDIRQS && ABX500_CORE && MFD_DB8500_PRCMU 861 + select POWER_SUPPLY 861 862 select MFD_CORE 862 863 select IRQ_DOMAIN 863 864 help
+13 -4
drivers/mfd/ab8500-gpadc.c
··· 594 594 static int ab8500_gpadc_runtime_resume(struct device *dev) 595 595 { 596 596 struct ab8500_gpadc *gpadc = dev_get_drvdata(dev); 597 + int ret; 597 598 598 - regulator_enable(gpadc->regu); 599 - return 0; 599 + ret = regulator_enable(gpadc->regu); 600 + if (ret) 601 + dev_err(dev, "Failed to enable vtvout LDO: %d\n", ret); 602 + return ret; 600 603 } 601 604 602 605 static int ab8500_gpadc_runtime_idle(struct device *dev) ··· 646 643 } 647 644 648 645 /* VTVout LDO used to power up ab8500-GPADC */ 649 - gpadc->regu = regulator_get(&pdev->dev, "vddadc"); 646 + gpadc->regu = devm_regulator_get(&pdev->dev, "vddadc"); 650 647 if (IS_ERR(gpadc->regu)) { 651 648 ret = PTR_ERR(gpadc->regu); 652 649 dev_err(gpadc->dev, "failed to get vtvout LDO\n"); ··· 655 652 656 653 platform_set_drvdata(pdev, gpadc); 657 654 658 - regulator_enable(gpadc->regu); 655 + ret = regulator_enable(gpadc->regu); 656 + if (ret) { 657 + dev_err(gpadc->dev, "Failed to enable vtvout LDO: %d\n", ret); 658 + goto fail_enable; 659 + } 659 660 660 661 pm_runtime_set_autosuspend_delay(gpadc->dev, GPADC_AUDOSUSPEND_DELAY); 661 662 pm_runtime_use_autosuspend(gpadc->dev); ··· 670 663 list_add_tail(&gpadc->node, &ab8500_gpadc_list); 671 664 dev_dbg(gpadc->dev, "probe success\n"); 672 665 return 0; 666 + 667 + fail_enable: 673 668 fail_irq: 674 669 free_irq(gpadc->irq, gpadc); 675 670 fail:
+3 -3
drivers/mfd/omap-usb-host.c
··· 460 460 461 461 switch (omap->usbhs_rev) { 462 462 case OMAP_USBHS_REV1: 463 - omap_usbhs_rev1_hostconfig(omap, reg); 463 + reg = omap_usbhs_rev1_hostconfig(omap, reg); 464 464 break; 465 465 466 466 case OMAP_USBHS_REV2: 467 - omap_usbhs_rev2_hostconfig(omap, reg); 467 + reg = omap_usbhs_rev2_hostconfig(omap, reg); 468 468 break; 469 469 470 470 default: /* newer revisions */ 471 - omap_usbhs_rev2_hostconfig(omap, reg); 471 + reg = omap_usbhs_rev2_hostconfig(omap, reg); 472 472 break; 473 473 } 474 474
+33 -3
drivers/mfd/palmas.c
··· 257 257 PALMAS_INT1_MASK), 258 258 }; 259 259 260 - static void palmas_dt_to_pdata(struct device_node *node, 260 + static int palmas_set_pdata_irq_flag(struct i2c_client *i2c, 261 261 struct palmas_platform_data *pdata) 262 262 { 263 + struct irq_data *irq_data = irq_get_irq_data(i2c->irq); 264 + if (!irq_data) { 265 + dev_err(&i2c->dev, "Invalid IRQ: %d\n", i2c->irq); 266 + return -EINVAL; 267 + } 268 + 269 + pdata->irq_flags = irqd_get_trigger_type(irq_data); 270 + dev_info(&i2c->dev, "Irq flag is 0x%08x\n", pdata->irq_flags); 271 + return 0; 272 + } 273 + 274 + static void palmas_dt_to_pdata(struct i2c_client *i2c, 275 + struct palmas_platform_data *pdata) 276 + { 277 + struct device_node *node = i2c->dev.of_node; 263 278 int ret; 264 279 u32 prop; 265 280 ··· 298 283 pdata->power_ctrl = PALMAS_POWER_CTRL_NSLEEP_MASK | 299 284 PALMAS_POWER_CTRL_ENABLE1_MASK | 300 285 PALMAS_POWER_CTRL_ENABLE2_MASK; 286 + if (i2c->irq) 287 + palmas_set_pdata_irq_flag(i2c, pdata); 301 288 } 302 289 303 290 static int palmas_i2c_probe(struct i2c_client *i2c, ··· 321 304 if (!pdata) 322 305 return -ENOMEM; 323 306 324 - palmas_dt_to_pdata(node, pdata); 307 + palmas_dt_to_pdata(i2c, pdata); 325 308 } 326 309 327 310 if (!pdata) ··· 361 344 } 362 345 } 363 346 347 + /* Change interrupt line output polarity */ 348 + if (pdata->irq_flags & IRQ_TYPE_LEVEL_HIGH) 349 + reg = PALMAS_POLARITY_CTRL_INT_POLARITY; 350 + else 351 + reg = 0; 352 + ret = palmas_update_bits(palmas, PALMAS_PU_PD_OD_BASE, 353 + PALMAS_POLARITY_CTRL, PALMAS_POLARITY_CTRL_INT_POLARITY, 354 + reg); 355 + if (ret < 0) { 356 + dev_err(palmas->dev, "POLARITY_CTRL updat failed: %d\n", ret); 357 + goto err; 358 + } 359 + 364 360 /* Change IRQ into clear on read mode for efficiency */ 365 361 slave = PALMAS_BASE_TO_SLAVE(PALMAS_INTERRUPT_BASE); 366 362 addr = PALMAS_BASE_TO_REG(PALMAS_INTERRUPT_BASE, PALMAS_INT_CTRL); ··· 382 352 regmap_write(palmas->regmap[slave], addr, reg); 383 353 384 354 ret = regmap_add_irq_chip(palmas->regmap[slave], palmas->irq, 385 - IRQF_ONESHOT | IRQF_TRIGGER_LOW, 0, &palmas_irq_chip, 355 + IRQF_ONESHOT | pdata->irq_flags, 0, &palmas_irq_chip, 386 356 &palmas->irq_data); 387 357 if (ret < 0) 388 358 goto err;
+1
drivers/mfd/tps65912-core.c
··· 169 169 void tps65912_device_exit(struct tps65912 *tps65912) 170 170 { 171 171 mfd_remove_devices(tps65912->dev); 172 + tps65912_irq_exit(tps65912); 172 173 kfree(tps65912); 173 174 } 174 175
+1 -1
drivers/mfd/twl4030-audio.c
··· 118 118 * Disable the resource. 119 119 * The function returns with error or the content of the register 120 120 */ 121 - int twl4030_audio_disable_resource(unsigned id) 121 + int twl4030_audio_disable_resource(enum twl4030_audio_res id) 122 122 { 123 123 struct twl4030_audio *audio = platform_get_drvdata(twl4030_audio_dev); 124 124 int val;
+1 -1
drivers/mfd/twl4030-madc.c
··· 800 800 801 801 static struct platform_driver twl4030_madc_driver = { 802 802 .probe = twl4030_madc_probe, 803 - .remove = __exit_p(twl4030_madc_remove), 803 + .remove = twl4030_madc_remove, 804 804 .driver = { 805 805 .name = "twl4030_madc", 806 806 .owner = THIS_MODULE,
+1
include/linux/mfd/palmas.h
··· 221 221 }; 222 222 223 223 struct palmas_platform_data { 224 + int irq_flags; 224 225 int gpio_base; 225 226 226 227 /* bit value to be loaded to the POWER_CTRL register */
+1
include/linux/mfd/tps65912.h
··· 323 323 void tps65912_device_exit(struct tps65912 *tps65912); 324 324 int tps65912_irq_init(struct tps65912 *tps65912, int irq, 325 325 struct tps65912_platform_data *pdata); 326 + int tps65912_irq_exit(struct tps65912 *tps65912); 326 327 327 328 #endif /* __LINUX_MFD_TPS65912_H */
+2
include/linux/mfd/wm831x/auxadc.h
··· 15 15 #ifndef __MFD_WM831X_AUXADC_H__ 16 16 #define __MFD_WM831X_AUXADC_H__ 17 17 18 + struct wm831x; 19 + 18 20 /* 19 21 * R16429 (0x402D) - AuxADC Data 20 22 */
+1 -1
include/linux/mfd/wm831x/core.h
··· 20 20 #include <linux/irqdomain.h> 21 21 #include <linux/list.h> 22 22 #include <linux/regmap.h> 23 + #include <linux/mfd/wm831x/auxadc.h> 23 24 24 25 /* 25 26 * Register values. ··· 356 355 }; 357 356 358 357 struct wm831x; 359 - enum wm831x_auxadc; 360 358 361 359 typedef int (*wm831x_auxadc_read_fn)(struct wm831x *wm831x, 362 360 enum wm831x_auxadc input);