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 branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6:
mfd: Include linux/io.h to jz4740-adc
mfd: Use request_threaded_irq for twl4030-irq instead of irq_set_chained_handler
mfd: Base interrupt for twl4030-irq must be one-shot
mfd: Handle tps65910 clear-mask correctly
mfd: add #ifdef CONFIG_DEBUG_FS guard for ab8500_debug_resources
mfd: Fix twl-core oops while calling twl_i2c_* for unbound driver
mfd: include linux/module.h for ab5500-debugfs
mfd: Update wm8994 active device checks for WM1811
mfd: Set tps6586x bits if new value is different from the old one
mfd: Set da903x bits if new value is different from the old one
mfd: Set adp5520 bits if new value is different from the old one
mfd: Add missed free_irq in da903x_remove

+29 -20
+1 -1
drivers/mfd/ab5500-debugfs.c
··· 4 4 * Debugfs support for the AB5500 MFD driver 5 5 */ 6 6 7 - #include <linux/export.h> 7 + #include <linux/module.h> 8 8 #include <linux/debugfs.h> 9 9 #include <linux/seq_file.h> 10 10 #include <linux/mfd/ab5500/ab5500.h>
+2
drivers/mfd/ab8500-core.c
··· 620 620 621 621 static struct resource __devinitdata ab8500_chargalg_resources[] = {}; 622 622 623 + #ifdef CONFIG_DEBUG_FS 623 624 static struct resource __devinitdata ab8500_debug_resources[] = { 624 625 { 625 626 .name = "IRQ_FIRST", ··· 635 634 .flags = IORESOURCE_IRQ, 636 635 }, 637 636 }; 637 + #endif 638 638 639 639 static struct resource __devinitdata ab8500_usb_resources[] = { 640 640 {
+1 -1
drivers/mfd/adp5520.c
··· 109 109 110 110 ret = __adp5520_read(chip->client, reg, &reg_val); 111 111 112 - if (!ret && ((reg_val & bit_mask) == 0)) { 112 + if (!ret && ((reg_val & bit_mask) != bit_mask)) { 113 113 reg_val |= bit_mask; 114 114 ret = __adp5520_write(chip->client, reg, reg_val); 115 115 }
+2 -1
drivers/mfd/da903x.c
··· 182 182 if (ret) 183 183 goto out; 184 184 185 - if ((reg_val & bit_mask) == 0) { 185 + if ((reg_val & bit_mask) != bit_mask) { 186 186 reg_val |= bit_mask; 187 187 ret = __da903x_write(chip->client, reg, reg_val); 188 188 } ··· 549 549 struct da903x_chip *chip = i2c_get_clientdata(client); 550 550 551 551 da903x_remove_subdevs(chip); 552 + free_irq(client->irq, chip); 552 553 kfree(chip); 553 554 return 0; 554 555 }
+1
drivers/mfd/jz4740-adc.c
··· 16 16 */ 17 17 18 18 #include <linux/err.h> 19 + #include <linux/io.h> 19 20 #include <linux/irq.h> 20 21 #include <linux/interrupt.h> 21 22 #include <linux/kernel.h>
+1 -1
drivers/mfd/tps6586x.c
··· 197 197 if (ret) 198 198 goto out; 199 199 200 - if ((reg_val & bit_mask) == 0) { 200 + if ((reg_val & bit_mask) != bit_mask) { 201 201 reg_val |= bit_mask; 202 202 ret = __tps6586x_write(to_i2c_client(dev), reg, reg_val); 203 203 }
+1 -1
drivers/mfd/tps65910.c
··· 120 120 goto out; 121 121 } 122 122 123 - data &= mask; 123 + data &= ~mask; 124 124 err = tps65910_i2c_write(tps65910, reg, 1, &data); 125 125 if (err) 126 126 dev_err(tps65910->dev, "write to reg %x failed\n", reg);
+8 -8
drivers/mfd/twl-core.c
··· 363 363 pr_err("%s: invalid module number %d\n", DRIVER_NAME, mod_no); 364 364 return -EPERM; 365 365 } 366 + if (unlikely(!inuse)) { 367 + pr_err("%s: not initialized\n", DRIVER_NAME); 368 + return -EPERM; 369 + } 366 370 sid = twl_map[mod_no].sid; 367 371 twl = &twl_modules[sid]; 368 372 369 - if (unlikely(!inuse)) { 370 - pr_err("%s: client %d is not initialized\n", DRIVER_NAME, sid); 371 - return -EPERM; 372 - } 373 373 mutex_lock(&twl->xfer_lock); 374 374 /* 375 375 * [MSG1]: fill the register address data ··· 420 420 pr_err("%s: invalid module number %d\n", DRIVER_NAME, mod_no); 421 421 return -EPERM; 422 422 } 423 + if (unlikely(!inuse)) { 424 + pr_err("%s: not initialized\n", DRIVER_NAME); 425 + return -EPERM; 426 + } 423 427 sid = twl_map[mod_no].sid; 424 428 twl = &twl_modules[sid]; 425 429 426 - if (unlikely(!inuse)) { 427 - pr_err("%s: client %d is not initialized\n", DRIVER_NAME, sid); 428 - return -EPERM; 429 - } 430 430 mutex_lock(&twl->xfer_lock); 431 431 /* [MSG1] fill the register address data */ 432 432 msg = &twl->xfer_msg[0];
+11 -7
drivers/mfd/twl4030-irq.c
··· 432 432 u32 edge_change; 433 433 434 434 struct mutex irq_lock; 435 + char *irq_name; 435 436 }; 436 437 437 438 /*----------------------------------------------------------------------*/ ··· 590 589 * Generic handler for SIH interrupts ... we "know" this is called 591 590 * in task context, with IRQs enabled. 592 591 */ 593 - static void handle_twl4030_sih(unsigned irq, struct irq_desc *desc) 592 + static irqreturn_t handle_twl4030_sih(int irq, void *data) 594 593 { 595 594 struct sih_agent *agent = irq_get_handler_data(irq); 596 595 const struct sih *sih = agent->sih; ··· 603 602 pr_err("twl4030: %s SIH, read ISR error %d\n", 604 603 sih->name, isr); 605 604 /* REVISIT: recover; eventually mask it all, etc */ 606 - return; 605 + return IRQ_HANDLED; 607 606 } 608 607 609 608 while (isr) { ··· 617 616 pr_err("twl4030: %s SIH, invalid ISR bit %d\n", 618 617 sih->name, irq); 619 618 } 619 + return IRQ_HANDLED; 620 620 } 621 621 622 622 static unsigned twl4030_irq_next; ··· 670 668 activate_irq(irq); 671 669 } 672 670 673 - status = irq_base; 674 671 twl4030_irq_next += i; 675 672 676 673 /* replace generic PIH handler (handle_simple_irq) */ 677 674 irq = sih_mod + twl4030_irq_base; 678 675 irq_set_handler_data(irq, agent); 679 - irq_set_chained_handler(irq, handle_twl4030_sih); 676 + agent->irq_name = kasprintf(GFP_KERNEL, "twl4030_%s", sih->name); 677 + status = request_threaded_irq(irq, NULL, handle_twl4030_sih, 0, 678 + agent->irq_name ?: sih->name, NULL); 680 679 681 680 pr_info("twl4030: %s (irq %d) chaining IRQs %d..%d\n", sih->name, 682 681 irq, irq_base, twl4030_irq_next - 1); 683 682 684 - return status; 683 + return status < 0 ? status : irq_base; 685 684 } 686 685 687 686 /* FIXME need a call to reverse twl4030_sih_setup() ... */ ··· 736 733 } 737 734 738 735 /* install an irq handler to demultiplex the TWL4030 interrupt */ 739 - status = request_threaded_irq(irq_num, NULL, handle_twl4030_pih, 0, 740 - "TWL4030-PIH", NULL); 736 + status = request_threaded_irq(irq_num, NULL, handle_twl4030_pih, 737 + IRQF_ONESHOT, 738 + "TWL4030-PIH", NULL); 741 739 if (status < 0) { 742 740 pr_err("twl4030: could not claim irq%d: %d\n", irq_num, status); 743 741 goto fail_rqirq;
+1
drivers/mfd/wm8994-core.c
··· 239 239 240 240 switch (wm8994->type) { 241 241 case WM8958: 242 + case WM1811: 242 243 ret = wm8994_reg_read(wm8994, WM8958_MIC_DETECT_1); 243 244 if (ret < 0) { 244 245 dev_err(dev, "Failed to read power status: %d\n", ret);