Skip to content

Commit

Permalink
Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/…
Browse files Browse the repository at this point in the history
…git/sameo/mfd-2.6

* 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6: (90 commits)
  mfd: Push byte swaps out of wm8994 bulk read path
  mfd: Rename ab8500 gpadc header
  mfd: Constify WM8994 write path
  mfd: Push byte swap out of WM8994 bulk I/O
  mfd: Avoid copying data in WM8994 I2C write
  mfd: Remove copy from WM831x I2C write function
  mfd: Staticise WM8994 PM ops
  regulator: Add a subdriver for TI TPS6105x regulator portions v2
  mfd: Add a core driver for TI TPS61050/TPS61052 chips v2
  gpio: Add Tunnel Creek support to sch_gpio
  mfd: Add Tunnel Creek support to lpc_sch
  pci_ids: Add Intel Tunnel Creek LPC Bridge device ID.
  regulator: MAX8997/8966 support
  mfd: Add WM8994 bulk register write operation
  mfd: Append additional read write on 88pm860x
  mfd: Adopt mfd_data in 88pm860x input driver
  mfd: Adopt mfd_data in 88pm860x regulator
  mfd: Adopt mfd_data in 88pm860x led
  mfd: Adopt mfd_data in 88pm860x backlight
  mfd: Fix MAX8997 Kconfig entry typos
  ...
  • Loading branch information
Linus Torvalds committed Mar 24, 2011
2 parents 1b506cf + 316b6cc commit a6a1d64
Show file tree
Hide file tree
Showing 110 changed files with 6,059 additions and 785 deletions.
45 changes: 45 additions & 0 deletions Documentation/hwmon/twl4030-madc-hwmon
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
Kernel driver twl4030-madc
=========================

Supported chips:
* Texas Instruments TWL4030
Prefix: 'twl4030-madc'


Authors:
J Keerthy <j-keerthy@ti.com>

Description
-----------

The Texas Instruments TWL4030 is a Power Management and Audio Circuit. Among
other things it contains a 10-bit A/D converter MADC. The converter has 16
channels which can be used in different modes.


See this table for the meaning of the different channels

Channel Signal
------------------------------------------
0 Battery type(BTYPE)
1 BCI: Battery temperature (BTEMP)
2 GP analog input
3 GP analog input
4 GP analog input
5 GP analog input
6 GP analog input
7 GP analog input
8 BCI: VBUS voltage(VBUS)
9 Backup Battery voltage (VBKP)
10 BCI: Battery charger current (ICHG)
11 BCI: Battery charger voltage (VCHG)
12 BCI: Main battery voltage (VBAT)
13 Reserved
14 Reserved
15 VRUSB Supply/Speaker left/Speaker right polarization level


The Sysfs nodes will represent the voltage in the units of mV,
the temperature channel shows the converted temperature in
degree celcius. The Battery charging current channel represents
battery charging current in mA.
11 changes: 7 additions & 4 deletions arch/arm/mach-imx/mach-mx27_3ds.c
Original file line number Diff line number Diff line change
Expand Up @@ -232,10 +232,13 @@ static struct mc13xxx_regulator_init_data mx27_3ds_regulators[] = {
};

/* MC13783 */
static struct mc13xxx_platform_data mc13783_pdata __initdata = {
.regulators = mx27_3ds_regulators,
.num_regulators = ARRAY_SIZE(mx27_3ds_regulators),
.flags = MC13XXX_USE_REGULATOR,
static struct mc13xxx_platform_data mc13783_pdata = {
.regulators = {
.regulators = mx27_3ds_regulators,
.num_regulators = ARRAY_SIZE(mx27_3ds_regulators),

},
.flags = MC13783_USE_REGULATOR,
};

/* SPI */
Expand Down
10 changes: 6 additions & 4 deletions arch/arm/mach-imx/mach-pcm038.c
Original file line number Diff line number Diff line change
Expand Up @@ -263,10 +263,12 @@ static struct mc13xxx_regulator_init_data pcm038_regulators[] = {
};

static struct mc13xxx_platform_data pcm038_pmic = {
.regulators = pcm038_regulators,
.num_regulators = ARRAY_SIZE(pcm038_regulators),
.flags = MC13XXX_USE_ADC | MC13XXX_USE_REGULATOR |
MC13XXX_USE_TOUCHSCREEN,
.regulators = {
.regulators = pcm038_regulators,
.num_regulators = ARRAY_SIZE(pcm038_regulators),
},
.flags = MC13783_USE_ADC | MC13783_USE_REGULATOR |
MC13783_USE_TOUCHSCREEN,
};

static struct spi_board_info pcm038_spi_board_info[] __initdata = {
Expand Down
10 changes: 6 additions & 4 deletions arch/arm/mach-mx3/mach-mx31_3ds.c
Original file line number Diff line number Diff line change
Expand Up @@ -488,10 +488,12 @@ static struct mc13xxx_regulator_init_data mx31_3ds_regulators[] = {
};

/* MC13783 */
static struct mc13xxx_platform_data mc13783_pdata __initdata = {
.regulators = mx31_3ds_regulators,
.num_regulators = ARRAY_SIZE(mx31_3ds_regulators),
.flags = MC13XXX_USE_REGULATOR | MC13XXX_USE_TOUCHSCREEN
static struct mc13xxx_platform_data mc13783_pdata = {
.regulators = {
.regulators = mx31_3ds_regulators,
.num_regulators = ARRAY_SIZE(mx31_3ds_regulators),
},
.flags = MC13783_USE_REGULATOR | MC13783_USE_TOUCHSCREEN,
};

/* SPI */
Expand Down
6 changes: 4 additions & 2 deletions arch/arm/mach-mx3/mach-mx31moboard.c
Original file line number Diff line number Diff line change
Expand Up @@ -268,8 +268,10 @@ static struct mc13783_leds_platform_data moboard_leds = {
};

static struct mc13xxx_platform_data moboard_pmic = {
.regulators = moboard_regulators,
.num_regulators = ARRAY_SIZE(moboard_regulators),
.regulators = {
.regulators = moboard_regulators,
.num_regulators = ARRAY_SIZE(moboard_regulators),
},
.leds = &moboard_leds,
.flags = MC13XXX_USE_REGULATOR | MC13XXX_USE_RTC |
MC13XXX_USE_ADC | MC13XXX_USE_LED,
Expand Down
7 changes: 7 additions & 0 deletions arch/arm/mach-omap2/board-4430sdp.c
Original file line number Diff line number Diff line change
Expand Up @@ -550,6 +550,12 @@ static struct regulator_init_data sdp4430_vusb = {
},
};

static struct regulator_init_data sdp4430_clk32kg = {
.constraints = {
.valid_ops_mask = REGULATOR_CHANGE_STATUS,
},
};

static struct twl4030_platform_data sdp4430_twldata = {
.irq_base = TWL6030_IRQ_BASE,
.irq_end = TWL6030_IRQ_END,
Expand All @@ -565,6 +571,7 @@ static struct twl4030_platform_data sdp4430_twldata = {
.vaux1 = &sdp4430_vaux1,
.vaux2 = &sdp4430_vaux2,
.vaux3 = &sdp4430_vaux3,
.clk32kg = &sdp4430_clk32kg,
.usb = &omap4_usbphy_data
};

Expand Down
7 changes: 7 additions & 0 deletions arch/arm/mach-omap2/board-omap4panda.c
Original file line number Diff line number Diff line change
Expand Up @@ -411,6 +411,12 @@ static struct regulator_init_data omap4_panda_vusb = {
},
};

static struct regulator_init_data omap4_panda_clk32kg = {
.constraints = {
.valid_ops_mask = REGULATOR_CHANGE_STATUS,
},
};

static struct twl4030_platform_data omap4_panda_twldata = {
.irq_base = TWL6030_IRQ_BASE,
.irq_end = TWL6030_IRQ_END,
Expand All @@ -426,6 +432,7 @@ static struct twl4030_platform_data omap4_panda_twldata = {
.vaux1 = &omap4_panda_vaux1,
.vaux2 = &omap4_panda_vaux2,
.vaux3 = &omap4_panda_vaux3,
.clk32kg = &omap4_panda_clk32kg,
.usb = &omap4_usbphy_data,
};

Expand Down
42 changes: 20 additions & 22 deletions arch/x86/platform/olpc/olpc-xo1.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/pm.h>
#include <linux/mfd/core.h>

#include <asm/io.h>
#include <asm/olpc.h>
Expand Down Expand Up @@ -56,25 +57,24 @@ static void xo1_power_off(void)
static int __devinit olpc_xo1_probe(struct platform_device *pdev)
{
struct resource *res;
int err;

/* don't run on non-XOs */
if (!machine_is_olpc())
return -ENODEV;

err = mfd_cell_enable(pdev);
if (err)
return err;

res = platform_get_resource(pdev, IORESOURCE_IO, 0);
if (!res) {
dev_err(&pdev->dev, "can't fetch device resource info\n");
return -EIO;
}

if (!request_region(res->start, resource_size(res), DRV_NAME)) {
dev_err(&pdev->dev, "can't request region\n");
return -EIO;
}

if (strcmp(pdev->name, "cs5535-pms") == 0)
if (strcmp(pdev->name, "olpc-xo1-pms") == 0)
pms_base = res->start;
else if (strcmp(pdev->name, "cs5535-acpi") == 0)
else if (strcmp(pdev->name, "olpc-xo1-ac-acpi") == 0)
acpi_base = res->start;

/* If we have both addresses, we can override the poweroff hook */
Expand All @@ -88,14 +88,11 @@ static int __devinit olpc_xo1_probe(struct platform_device *pdev)

static int __devexit olpc_xo1_remove(struct platform_device *pdev)
{
struct resource *r;

r = platform_get_resource(pdev, IORESOURCE_IO, 0);
release_region(r->start, resource_size(r));
mfd_cell_disable(pdev);

if (strcmp(pdev->name, "cs5535-pms") == 0)
if (strcmp(pdev->name, "olpc-xo1-pms") == 0)
pms_base = 0;
else if (strcmp(pdev->name, "cs5535-acpi") == 0)
else if (strcmp(pdev->name, "olpc-xo1-acpi") == 0)
acpi_base = 0;

pm_power_off = NULL;
Expand All @@ -104,7 +101,7 @@ static int __devexit olpc_xo1_remove(struct platform_device *pdev)

static struct platform_driver cs5535_pms_drv = {
.driver = {
.name = "cs5535-pms",
.name = "olpc-xo1-pms",
.owner = THIS_MODULE,
},
.probe = olpc_xo1_probe,
Expand All @@ -113,7 +110,7 @@ static struct platform_driver cs5535_pms_drv = {

static struct platform_driver cs5535_acpi_drv = {
.driver = {
.name = "cs5535-acpi",
.name = "olpc-xo1-acpi",
.owner = THIS_MODULE,
},
.probe = olpc_xo1_probe,
Expand All @@ -124,26 +121,27 @@ static int __init olpc_xo1_init(void)
{
int r;

r = platform_driver_register(&cs5535_pms_drv);
r = mfd_shared_platform_driver_register(&cs5535_pms_drv, "cs5535-pms");
if (r)
return r;

r = platform_driver_register(&cs5535_acpi_drv);
r = mfd_shared_platform_driver_register(&cs5535_acpi_drv,
"cs5535-acpi");
if (r)
platform_driver_unregister(&cs5535_pms_drv);
mfd_shared_platform_driver_unregister(&cs5535_pms_drv);

return r;
}

static void __exit olpc_xo1_exit(void)
{
platform_driver_unregister(&cs5535_acpi_drv);
platform_driver_unregister(&cs5535_pms_drv);
mfd_shared_platform_driver_unregister(&cs5535_acpi_drv);
mfd_shared_platform_driver_unregister(&cs5535_pms_drv);
}

MODULE_AUTHOR("Daniel Drake <dsd@laptop.org>");
MODULE_LICENSE("GPL");
MODULE_ALIAS("platform:olpc-xo1");
MODULE_ALIAS("platform:cs5535-pms");

module_init(olpc_xo1_init);
module_exit(olpc_xo1_exit);
3 changes: 2 additions & 1 deletion drivers/dma/timb_dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
#include <linux/io.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/mfd/core.h>
#include <linux/slab.h>

#include <linux/timb_dma.h>
Expand Down Expand Up @@ -684,7 +685,7 @@ static irqreturn_t td_irq(int irq, void *devid)

static int __devinit td_probe(struct platform_device *pdev)
{
struct timb_dma_platform_data *pdata = pdev->dev.platform_data;
struct timb_dma_platform_data *pdata = mfd_get_data(pdev);
struct timb_dma *td;
struct resource *iomem;
int irq;
Expand Down
7 changes: 5 additions & 2 deletions drivers/gpio/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -100,18 +100,21 @@ config GPIO_VR41XX
Say yes here to support the NEC VR4100 series General-purpose I/O Uint

config GPIO_SCH
tristate "Intel SCH GPIO"
tristate "Intel SCH/TunnelCreek GPIO"
depends on GPIOLIB && PCI && X86
select MFD_CORE
select LPC_SCH
help
Say yes here to support GPIO interface on Intel Poulsbo SCH.
Say yes here to support GPIO interface on Intel Poulsbo SCH
or Intel Tunnel Creek processor.
The Intel SCH contains a total of 14 GPIO pins. Ten GPIOs are
powered by the core power rail and are turned off during sleep
modes (S3 and higher). The remaining four GPIOs are powered by
the Intel SCH suspend power supply. These GPIOs remain
active during S3. The suspend powered GPIOs can be used to wake the
system from the Suspend-to-RAM state.
The Intel Tunnel Creek processor has 5 GPIOs powered by the
core power rail and 9 from suspend power supply.

This driver can also be built as a module. If so, the module
will be called sch-gpio.
Expand Down
3 changes: 2 additions & 1 deletion drivers/gpio/janz-ttl.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#include <linux/interrupt.h>
#include <linux/delay.h>
#include <linux/platform_device.h>
#include <linux/mfd/core.h>
#include <linux/io.h>
#include <linux/gpio.h>
#include <linux/slab.h>
Expand Down Expand Up @@ -149,7 +150,7 @@ static int __devinit ttl_probe(struct platform_device *pdev)
struct resource *res;
int ret;

pdata = pdev->dev.platform_data;
pdata = mfd_get_data(pdev);
if (!pdata) {
dev_err(dev, "no platform data\n");
ret = -ENXIO;
Expand Down
3 changes: 2 additions & 1 deletion drivers/gpio/rdc321x-gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
#include <linux/pci.h>
#include <linux/gpio.h>
#include <linux/mfd/rdc321x.h>
#include <linux/mfd/core.h>
#include <linux/slab.h>

struct rdc321x_gpio {
Expand Down Expand Up @@ -135,7 +136,7 @@ static int __devinit rdc321x_gpio_probe(struct platform_device *pdev)
struct rdc321x_gpio *rdc321x_gpio_dev;
struct rdc321x_gpio_pdata *pdata;

pdata = platform_get_drvdata(pdev);
pdata = mfd_get_data(pdev);
if (!pdata) {
dev_err(&pdev->dev, "no platform data supplied\n");
return -ENODEV;
Expand Down
Loading

0 comments on commit a6a1d64

Please sign in to comment.