Skip to content

Commit

Permalink
Merge tag 'mfd-lee-3.12-1' of git://git.linaro.org/people/ljones/mfd
Browse files Browse the repository at this point in the history
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
  • Loading branch information
Samuel Ortiz committed Aug 21, 2013
2 parents 09fd867 + 8a105ca commit 828fa1e
Show file tree
Hide file tree
Showing 71 changed files with 235 additions and 153 deletions.
20 changes: 20 additions & 0 deletions Documentation/devicetree/bindings/mfd/s2mps11.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,21 @@ Optional properties:
- interrupts: Interrupt specifiers for interrupt sources.

Optional nodes:
- clocks: s2mps11 provides three(AP/CP/BT) buffered 32.768 KHz outputs, so to
register these as clocks with common clock framework instantiate a sub-node
named "clocks". It uses the common clock binding documented in :
[Documentation/devicetree/bindings/clock/clock-bindings.txt]
- #clock-cells: should be 1.

- The following is the list of clocks generated by the controller. Each clock
is assigned an identifier and client nodes use this identifier to specify
the clock which they consume.
Clock ID
----------------------
32KhzAP 0
32KhzCP 1
32KhzBT 2

- regulators: The regulators of s2mps11 that have to be instantiated should be
included in a sub-node named 'regulators'. Regulator nodes included in this
sub-node should be of the format as listed below.
Expand Down Expand Up @@ -55,6 +70,11 @@ Example:
compatible = "samsung,s2mps11-pmic";
reg = <0x66>;

s2m_osc: clocks{
#clock-cells = 1;
clock-output-names = "xx", "yy", "zz";
};

regulators {
ldo1_reg: LDO1 {
regulator-name = "VDD_ABB_3.3V";
Expand Down
5 changes: 5 additions & 0 deletions Documentation/devicetree/bindings/regulator/palmas-pmic.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ Optional nodes:
ti,smps-range - OTP has the wrong range set for the hardware so override
0 - low range, 1 - high range.

- ti,system-power-controller: Telling whether or not this pmic is controlling
the system power.

Example:

#include <dt-bindings/interrupt-controller/irq.h>
Expand All @@ -49,6 +52,8 @@ pmic {

ti,ldo6-vibrator;

ti,system-power-controller;

regulators {
smps12_reg : smps12 {
regulator-name = "smps12";
Expand Down
2 changes: 1 addition & 1 deletion drivers/mfd/88pm800.c
Original file line number Diff line number Diff line change
Expand Up @@ -541,7 +541,7 @@ static int pm800_probe(struct i2c_client *client,
{
int ret = 0;
struct pm80x_chip *chip;
struct pm80x_platform_data *pdata = client->dev.platform_data;
struct pm80x_platform_data *pdata = dev_get_platdata(&client->dev);
struct pm80x_subchip *subchip;

ret = pm80x_init(client);
Expand Down
2 changes: 1 addition & 1 deletion drivers/mfd/88pm805.c
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ static int pm805_probe(struct i2c_client *client,
{
int ret = 0;
struct pm80x_chip *chip;
struct pm80x_platform_data *pdata = client->dev.platform_data;
struct pm80x_platform_data *pdata = dev_get_platdata(&client->dev);

ret = pm80x_init(client);
if (ret) {
Expand Down
2 changes: 1 addition & 1 deletion drivers/mfd/88pm860x-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1130,7 +1130,7 @@ static int pm860x_dt_init(struct device_node *np,
static int pm860x_probe(struct i2c_client *client,
const struct i2c_device_id *id)
{
struct pm860x_platform_data *pdata = client->dev.platform_data;
struct pm860x_platform_data *pdata = dev_get_platdata(&client->dev);
struct device_node *node = client->dev.of_node;
struct pm860x_chip *chip;
int ret;
Expand Down
2 changes: 1 addition & 1 deletion drivers/mfd/aat2870-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ static inline void aat2870_uninit_debugfs(struct aat2870_data *aat2870)
static int aat2870_i2c_probe(struct i2c_client *client,
const struct i2c_device_id *id)
{
struct aat2870_platform_data *pdata = client->dev.platform_data;
struct aat2870_platform_data *pdata = dev_get_platdata(&client->dev);
struct aat2870_data *aat2870;
int i, j;
int ret = 0;
Expand Down
2 changes: 1 addition & 1 deletion drivers/mfd/ab3100-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -854,7 +854,7 @@ static int ab3100_probe(struct i2c_client *client,
{
struct ab3100 *ab3100;
struct ab3100_platform_data *ab3100_plf_data =
client->dev.platform_data;
dev_get_platdata(&client->dev);
int err;
int i;

Expand Down
4 changes: 4 additions & 0 deletions drivers/mfd/ab8500-gpadc.c
Original file line number Diff line number Diff line change
Expand Up @@ -867,6 +867,7 @@ static void ab8500_gpadc_read_calibration_data(struct ab8500_gpadc *gpadc)
gpadc->cal_data[ADC_INPUT_VBAT].offset);
}

#ifdef CONFIG_PM_RUNTIME
static int ab8500_gpadc_runtime_suspend(struct device *dev)
{
struct ab8500_gpadc *gpadc = dev_get_drvdata(dev);
Expand All @@ -885,7 +886,9 @@ static int ab8500_gpadc_runtime_resume(struct device *dev)
dev_err(dev, "Failed to enable vtvout LDO: %d\n", ret);
return ret;
}
#endif

#ifdef CONFIG_PM_SLEEP
static int ab8500_gpadc_suspend(struct device *dev)
{
struct ab8500_gpadc *gpadc = dev_get_drvdata(dev);
Expand Down Expand Up @@ -913,6 +916,7 @@ static int ab8500_gpadc_resume(struct device *dev)
mutex_unlock(&gpadc->ab8500_gpadc_lock);
return ret;
}
#endif

static int ab8500_gpadc_probe(struct platform_device *pdev)
{
Expand Down
2 changes: 1 addition & 1 deletion drivers/mfd/adp5520.c
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ static int adp5520_remove_subdevs(struct adp5520_chip *chip)
static int adp5520_probe(struct i2c_client *client,
const struct i2c_device_id *id)
{
struct adp5520_platform_data *pdata = client->dev.platform_data;
struct adp5520_platform_data *pdata = dev_get_platdata(&client->dev);
struct platform_device *pdev;
struct adp5520_chip *chip;
int ret;
Expand Down
2 changes: 1 addition & 1 deletion drivers/mfd/arizona-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -438,9 +438,9 @@ static int arizona_runtime_suspend(struct device *dev)
}
}

regulator_disable(arizona->dcvdd);
regcache_cache_only(arizona->regmap, true);
regcache_mark_dirty(arizona->regmap);
regulator_disable(arizona->dcvdd);

return 0;
}
Expand Down
2 changes: 1 addition & 1 deletion drivers/mfd/as3711.c
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ static int as3711_i2c_probe(struct i2c_client *client,
int ret;

if (!client->dev.of_node) {
pdata = client->dev.platform_data;
pdata = dev_get_platdata(&client->dev);
if (!pdata)
dev_dbg(&client->dev, "Platform data not found\n");
} else {
Expand Down
2 changes: 1 addition & 1 deletion drivers/mfd/asic3.c
Original file line number Diff line number Diff line change
Expand Up @@ -952,7 +952,7 @@ static void asic3_mfd_remove(struct platform_device *pdev)
/* Core */
static int __init asic3_probe(struct platform_device *pdev)
{
struct asic3_platform_data *pdata = pdev->dev.platform_data;
struct asic3_platform_data *pdata = dev_get_platdata(&pdev->dev);
struct asic3 *asic;
struct resource *mem;
unsigned long clksel;
Expand Down
2 changes: 1 addition & 1 deletion drivers/mfd/da903x.c
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,7 @@ static int da903x_add_subdevs(struct da903x_chip *chip,
static int da903x_probe(struct i2c_client *client,
const struct i2c_device_id *id)
{
struct da903x_platform_data *pdata = client->dev.platform_data;
struct da903x_platform_data *pdata = dev_get_platdata(&client->dev);
struct da903x_chip *chip;
unsigned int tmp;
int ret;
Expand Down
2 changes: 1 addition & 1 deletion drivers/mfd/da9052-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -534,7 +534,7 @@ EXPORT_SYMBOL_GPL(da9052_regmap_config);

int da9052_device_init(struct da9052 *da9052, u8 chip_id)
{
struct da9052_pdata *pdata = da9052->dev->platform_data;
struct da9052_pdata *pdata = dev_get_platdata(da9052->dev);
int ret;

mutex_init(&da9052->auxadc_lock);
Expand Down
2 changes: 1 addition & 1 deletion drivers/mfd/da9055-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ static struct regmap_irq_chip da9055_regmap_irq_chip = {

int da9055_device_init(struct da9055 *da9055)
{
struct da9055_pdata *pdata = da9055->dev->platform_data;
struct da9055_pdata *pdata = dev_get_platdata(da9055->dev);
int ret;
uint8_t clear_events[3] = {0xFF, 0xFF, 0xFF};

Expand Down
4 changes: 2 additions & 2 deletions drivers/mfd/dm355evm_msp.c
Original file line number Diff line number Diff line change
Expand Up @@ -315,8 +315,8 @@ static int add_children(struct i2c_client *client)
}

/* MMC/SD inputs -- right after the last config input */
if (client->dev.platform_data) {
void (*mmcsd_setup)(unsigned) = client->dev.platform_data;
if (dev_get_platdata(&client->dev)) {
void (*mmcsd_setup)(unsigned) = dev_get_platdata(&client->dev);

mmcsd_setup(dm355evm_msp_gpio.base + 8 + 5);
}
Expand Down
6 changes: 3 additions & 3 deletions drivers/mfd/ezx-pcap.c
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ static void pcap_msr_work(struct work_struct *work)
static void pcap_isr_work(struct work_struct *work)
{
struct pcap_chip *pcap = container_of(work, struct pcap_chip, isr_work);
struct pcap_platform_data *pdata = pcap->spi->dev.platform_data;
struct pcap_platform_data *pdata = dev_get_platdata(&pcap->spi->dev);
u32 msr, isr, int_sel, service;
int irq;

Expand Down Expand Up @@ -394,7 +394,7 @@ static int pcap_add_subdev(struct pcap_chip *pcap,
static int ezx_pcap_remove(struct spi_device *spi)
{
struct pcap_chip *pcap = spi_get_drvdata(spi);
struct pcap_platform_data *pdata = spi->dev.platform_data;
struct pcap_platform_data *pdata = dev_get_platdata(&spi->dev);
int i, adc_irq;

/* remove all registered subdevs */
Expand All @@ -420,7 +420,7 @@ static int ezx_pcap_remove(struct spi_device *spi)

static int ezx_pcap_probe(struct spi_device *spi)
{
struct pcap_platform_data *pdata = spi->dev.platform_data;
struct pcap_platform_data *pdata = dev_get_platdata(&spi->dev);
struct pcap_chip *pcap;
int i, adc_irq;
int ret = -ENODEV;
Expand Down
2 changes: 1 addition & 1 deletion drivers/mfd/htc-egpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ static void egpio_write_cache(struct egpio_info *ei)

static int __init egpio_probe(struct platform_device *pdev)
{
struct htc_egpio_platform_data *pdata = pdev->dev.platform_data;
struct htc_egpio_platform_data *pdata = dev_get_platdata(&pdev->dev);
struct resource *res;
struct egpio_info *ei;
struct gpio_chip *chip;
Expand Down
10 changes: 5 additions & 5 deletions drivers/mfd/htc-i2cpld.c
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ static int htcpld_setup_chip_irq(
int ret = 0;

/* Get the platform and driver data */
pdata = dev->platform_data;
pdata = dev_get_platdata(dev);
htcpld = platform_get_drvdata(pdev);
chip = &htcpld->chip[chip_index];
plat_chip_data = &pdata->chip[chip_index];
Expand Down Expand Up @@ -375,7 +375,7 @@ static int htcpld_register_chip_i2c(
struct i2c_board_info info;

/* Get the platform and driver data */
pdata = dev->platform_data;
pdata = dev_get_platdata(dev);
htcpld = platform_get_drvdata(pdev);
chip = &htcpld->chip[chip_index];
plat_chip_data = &pdata->chip[chip_index];
Expand Down Expand Up @@ -447,7 +447,7 @@ static int htcpld_register_chip_gpio(
int ret = 0;

/* Get the platform and driver data */
pdata = dev->platform_data;
pdata = dev_get_platdata(dev);
htcpld = platform_get_drvdata(pdev);
chip = &htcpld->chip[chip_index];
plat_chip_data = &pdata->chip[chip_index];
Expand Down Expand Up @@ -509,7 +509,7 @@ static int htcpld_setup_chips(struct platform_device *pdev)
int i;

/* Get the platform and driver data */
pdata = dev->platform_data;
pdata = dev_get_platdata(dev);
htcpld = platform_get_drvdata(pdev);

/* Setup each chip's output GPIOs */
Expand Down Expand Up @@ -574,7 +574,7 @@ static int htcpld_core_probe(struct platform_device *pdev)
if (!dev)
return -ENODEV;

pdata = dev->platform_data;
pdata = dev_get_platdata(dev);
if (!pdata) {
dev_warn(dev, "Platform data not found for htcpld core!\n");
return -ENXIO;
Expand Down
2 changes: 1 addition & 1 deletion drivers/mfd/htc-pasic3.c
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ static struct mfd_cell ds1wm_cell __initdata = {

static int __init pasic3_probe(struct platform_device *pdev)
{
struct pasic3_platform_data *pdata = pdev->dev.platform_data;
struct pasic3_platform_data *pdata = dev_get_platdata(&pdev->dev);
struct device *dev = &pdev->dev;
struct pasic3_data *asic;
struct resource *r;
Expand Down
4 changes: 2 additions & 2 deletions drivers/mfd/intel_msic.c
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ EXPORT_SYMBOL_GPL(intel_msic_irq_read);
static int intel_msic_init_devices(struct intel_msic *msic)
{
struct platform_device *pdev = msic->pdev;
struct intel_msic_platform_data *pdata = pdev->dev.platform_data;
struct intel_msic_platform_data *pdata = dev_get_platdata(&pdev->dev);
int ret, i;

if (pdata->gpio) {
Expand Down Expand Up @@ -372,7 +372,7 @@ static void intel_msic_remove_devices(struct intel_msic *msic)

static int intel_msic_probe(struct platform_device *pdev)
{
struct intel_msic_platform_data *pdata = pdev->dev.platform_data;
struct intel_msic_platform_data *pdata = dev_get_platdata(&pdev->dev);
struct intel_msic *msic;
struct resource *res;
u8 id0, id1;
Expand Down
30 changes: 24 additions & 6 deletions drivers/mfd/kempld-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ EXPORT_SYMBOL_GPL(kempld_write32);
*/
void kempld_get_mutex(struct kempld_device_data *pld)
{
struct kempld_platform_data *pdata = pld->dev->platform_data;
struct kempld_platform_data *pdata = dev_get_platdata(pld->dev);

mutex_lock(&pld->lock);
pdata->get_hardware_mutex(pld);
Expand All @@ -271,7 +271,7 @@ EXPORT_SYMBOL_GPL(kempld_get_mutex);
*/
void kempld_release_mutex(struct kempld_device_data *pld)
{
struct kempld_platform_data *pdata = pld->dev->platform_data;
struct kempld_platform_data *pdata = dev_get_platdata(pld->dev);

pdata->release_hardware_mutex(pld);
mutex_unlock(&pld->lock);
Expand All @@ -288,7 +288,7 @@ EXPORT_SYMBOL_GPL(kempld_release_mutex);
*/
static int kempld_get_info(struct kempld_device_data *pld)
{
struct kempld_platform_data *pdata = pld->dev->platform_data;
struct kempld_platform_data *pdata = dev_get_platdata(pld->dev);

return pdata->get_info(pld);
}
Expand All @@ -302,7 +302,7 @@ static int kempld_get_info(struct kempld_device_data *pld)
*/
static int kempld_register_cells(struct kempld_device_data *pld)
{
struct kempld_platform_data *pdata = pld->dev->platform_data;
struct kempld_platform_data *pdata = dev_get_platdata(pld->dev);

return pdata->register_cells(pld);
}
Expand Down Expand Up @@ -357,7 +357,7 @@ static int kempld_detect_device(struct kempld_device_data *pld)

static int kempld_probe(struct platform_device *pdev)
{
struct kempld_platform_data *pdata = pdev->dev.platform_data;
struct kempld_platform_data *pdata = dev_get_platdata(&pdev->dev);
struct device *dev = &pdev->dev;
struct kempld_device_data *pld;
struct resource *ioport;
Expand Down Expand Up @@ -394,7 +394,7 @@ static int kempld_probe(struct platform_device *pdev)
static int kempld_remove(struct platform_device *pdev)
{
struct kempld_device_data *pld = platform_get_drvdata(pdev);
struct kempld_platform_data *pdata = pld->dev->platform_data;
struct kempld_platform_data *pdata = dev_get_platdata(pld->dev);

mfd_remove_devices(&pdev->dev);
pdata->release_hardware_mutex(pld);
Expand All @@ -412,6 +412,15 @@ static struct platform_driver kempld_driver = {
};

static struct dmi_system_id __initdata kempld_dmi_table[] = {
{
.ident = "BHL6",
.matches = {
DMI_MATCH(DMI_BOARD_VENDOR, "Kontron"),
DMI_MATCH(DMI_BOARD_NAME, "COMe-bHL6"),
},
.driver_data = (void *)&kempld_platform_data_generic,
.callback = kempld_create_platform_device,
},
{
.ident = "CCR2",
.matches = {
Expand Down Expand Up @@ -596,6 +605,15 @@ static struct dmi_system_id __initdata kempld_dmi_table[] = {
.driver_data = (void *)&kempld_platform_data_generic,
.callback = kempld_create_platform_device,
},
{
.ident = "UTH6",
.matches = {
DMI_MATCH(DMI_BOARD_VENDOR, "Kontron"),
DMI_MATCH(DMI_BOARD_NAME, "COMe-cTH6"),
},
.driver_data = (void *)&kempld_platform_data_generic,
.callback = kempld_create_platform_device,
},
{}
};
MODULE_DEVICE_TABLE(dmi, kempld_dmi_table);
Expand Down
Loading

0 comments on commit 828fa1e

Please sign in to comment.