summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZhou Jingyu <b02241@freescale.com>2011-03-02 16:28:25 +0800
committerJason Liu <r64343@freescale.com>2012-01-09 19:53:52 +0800
commite46c868419024af419283854a62a2ea525a33304 (patch)
tree2f012baeae2c810eed20f81827602580bbe69d47
parent3b91b5ac920ba4e716afb8618ee10d6fb7711852 (diff)
ENGR00141391-2 PMIC: porting da9053 to i.mx platform
Fix da9053 backlight Kconfig error porting da9052 regulator driver Signed-off-by: Zhou Jingyu <Jingyu.Zhou@freescale.com> Acked-by: Lily Zhang <r58066@freescale.com>
-rwxr-xr-x[-rw-r--r--]drivers/gpio/Kconfig7
-rwxr-xr-x[-rw-r--r--]drivers/gpio/Makefile1
-rwxr-xr-x[-rw-r--r--]drivers/hwmon/Kconfig7
-rwxr-xr-x[-rw-r--r--]drivers/hwmon/Makefile1
-rwxr-xr-x[-rw-r--r--]drivers/hwmon/da9052-adc.c2
-rwxr-xr-x[-rw-r--r--]drivers/input/misc/Kconfig10
-rwxr-xr-x[-rw-r--r--]drivers/input/misc/Makefile2
-rwxr-xr-x[-rw-r--r--]drivers/input/touchscreen/Kconfig7
-rwxr-xr-x[-rw-r--r--]drivers/input/touchscreen/Makefile2
-rwxr-xr-x[-rw-r--r--]drivers/input/touchscreen/da9052_tsi_filter.c4
-rwxr-xr-x[-rw-r--r--]drivers/leds/Kconfig10
-rwxr-xr-x[-rw-r--r--]drivers/leds/Makefile1
-rwxr-xr-x[-rw-r--r--]drivers/mfd/Kconfig38
-rwxr-xr-x[-rw-r--r--]drivers/mfd/Makefile6
-rwxr-xr-x[-rw-r--r--]drivers/mfd/da9052-core.c41
-rwxr-xr-x[-rw-r--r--]drivers/mfd/da9052-i2c.c3
-rwxr-xr-x[-rw-r--r--]drivers/power/Kconfig7
-rwxr-xr-x[-rw-r--r--]drivers/power/Makefile1
-rwxr-xr-x[-rw-r--r--]drivers/regulator/Kconfig7
-rwxr-xr-x[-rw-r--r--]drivers/regulator/Makefile3
-rwxr-xr-x[-rw-r--r--]drivers/regulator/da9052-regulator.c7
-rwxr-xr-x[-rw-r--r--]drivers/rtc/Kconfig7
-rwxr-xr-x[-rw-r--r--]drivers/rtc/Makefile1
-rwxr-xr-x[-rw-r--r--]drivers/rtc/rtc-da9052.c8
-rwxr-xr-x[-rw-r--r--]drivers/video/backlight/Kconfig6
-rwxr-xr-x[-rw-r--r--]drivers/video/backlight/Makefile2
-rwxr-xr-x[-rw-r--r--]drivers/watchdog/Kconfig5
-rwxr-xr-x[-rw-r--r--]drivers/watchdog/Makefile1
-rwxr-xr-x[-rw-r--r--]include/linux/mfd/da9052/da9052.h3
-rwxr-xr-x[-rw-r--r--]include/linux/mfd/da9052/tsi_filter.h1
30 files changed, 170 insertions, 31 deletions
diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig
index 2967002a9f82..ab93c7abb25f 100644..100755
--- a/drivers/gpio/Kconfig
+++ b/drivers/gpio/Kconfig
@@ -453,4 +453,11 @@ config GPIO_TPS65910
help
Select this option to enable GPIO driver for the TPS65910
chip family.
+
+config DA9052_GPIO_ENABLE
+ bool "Dialog DA9052 GPIO"
+ depends on PMIC_DIALOG
+ help
+ Say Y to enable the GPIO driver for the DA9052 chip
+
endif
diff --git a/drivers/gpio/Makefile b/drivers/gpio/Makefile
index b605f8ec6fbe..bfd28a332787 100644..100755
--- a/drivers/gpio/Makefile
+++ b/drivers/gpio/Makefile
@@ -46,5 +46,6 @@ obj-$(CONFIG_GPIO_JANZ_TTL) += janz-ttl.o
obj-$(CONFIG_GPIO_SX150X) += sx150x.o
obj-$(CONFIG_GPIO_VX855) += vx855_gpio.o
obj-$(CONFIG_GPIO_ML_IOH) += ml_ioh_gpio.o
+obj-$(CONFIG_DA9052_GPIO_ENABLE)+= da9052-gpio.o
obj-$(CONFIG_AB8500_GPIO) += ab8500-gpio.o
obj-$(CONFIG_GPIO_TPS65910) += tps65910-gpio.o
diff --git a/drivers/hwmon/Kconfig b/drivers/hwmon/Kconfig
index 01f90bbfe640..2c23814e42d0 100644..100755
--- a/drivers/hwmon/Kconfig
+++ b/drivers/hwmon/Kconfig
@@ -39,6 +39,13 @@ config HWMON_DEBUG_CHIP
comment "Native drivers"
+config SENSORS_DA9052
+ tristate "Dialog DA9052 HWMon"
+ depends on PMIC_DIALOG
+ help
+ Say y here to support the ADC found on
+ Dialog Semiconductor DA9052 PMIC.
+
config SENSORS_ABITUGURU
tristate "Abit uGuru (rev 1 & 2)"
depends on X86 && DMI && EXPERIMENTAL
diff --git a/drivers/hwmon/Makefile b/drivers/hwmon/Makefile
index b1da8bc1fa6d..33d968a51222 100644..100755
--- a/drivers/hwmon/Makefile
+++ b/drivers/hwmon/Makefile
@@ -120,6 +120,7 @@ obj-$(CONFIG_SENSORS_WM831X) += wm831x-hwmon.o
obj-$(CONFIG_SENSORS_WM8350) += wm8350-hwmon.o
obj-$(CONFIG_MXC_MMA8450) += mxc_mma8450.o
obj-$(CONFIG_MXC_MMA8451) += mxc_mma8451.o
+obj-$(CONFIG_SENSORS_DA9052) += da9052-adc.o
# PMBus drivers
obj-$(CONFIG_PMBUS) += pmbus_core.o
diff --git a/drivers/hwmon/da9052-adc.c b/drivers/hwmon/da9052-adc.c
index 647e580e2131..6803fc2ccea3 100644..100755
--- a/drivers/hwmon/da9052-adc.c
+++ b/drivers/hwmon/da9052-adc.c
@@ -638,7 +638,7 @@ static void __exit da9052_adc_exit(void)
}
module_exit(da9052_adc_exit);
-MODULE_AUTHOR("David Dajun Chen <dchen@diasemi.com>")
+MODULE_AUTHOR("David Dajun Chen <dchen@diasemi.com>");
MODULE_DESCRIPTION("DA9052 ADC driver");
MODULE_LICENSE("GPL v2");
MODULE_ALIAS("platform:" DRIVER_NAME);
diff --git a/drivers/input/misc/Kconfig b/drivers/input/misc/Kconfig
index 45dc6aa62ba4..6fb3607bc287 100644..100755
--- a/drivers/input/misc/Kconfig
+++ b/drivers/input/misc/Kconfig
@@ -478,4 +478,14 @@ config INPUT_XEN_KBDDEV_FRONTEND
To compile this driver as a module, choose M here: the
module will be called xen-kbdfront.
+config INPUT_DA9052_ONKEY
+ tristate "Dialog DA9052 Onkey"
+ depends on PMIC_DIALOG
+ help
+ Support the ONKEY of Dialog DA9052 PMICs as an input device
+ reporting power button status.
+
+ To compile this driver as a module, choose M here: the module
+ will be called da9052_onkey.
+
endif
diff --git a/drivers/input/misc/Makefile b/drivers/input/misc/Makefile
index 38efb2cb182b..3b9052c62314 100644..100755
--- a/drivers/input/misc/Makefile
+++ b/drivers/input/misc/Makefile
@@ -45,4 +45,4 @@ obj-$(CONFIG_INPUT_WISTRON_BTNS) += wistron_btns.o
obj-$(CONFIG_INPUT_WM831X_ON) += wm831x-on.o
obj-$(CONFIG_INPUT_XEN_KBDDEV_FRONTEND) += xen-kbdfront.o
obj-$(CONFIG_INPUT_YEALINK) += yealink.o
-
+obj-$(CONFIG_INPUT_DA9052_ONKEY) += da9052_onkey.o
diff --git a/drivers/input/touchscreen/Kconfig b/drivers/input/touchscreen/Kconfig
index 5e42c8d047bb..5fbc288f64d7 100644..100755
--- a/drivers/input/touchscreen/Kconfig
+++ b/drivers/input/touchscreen/Kconfig
@@ -739,4 +739,11 @@ config TOUCHSCREEN_TPS6507X
To compile this driver as a module, choose M here: the
module will be called tps6507x_ts.
+config TOUCHSCREEN_DA9052
+ tristate "Dialog DA9052 TSI"
+ depends on PMIC_DIALOG
+ help
+ Say y here to support the touchscreen found on
+ Dialog Semiconductor DA9052 PMIC
+
endif
diff --git a/drivers/input/touchscreen/Makefile b/drivers/input/touchscreen/Makefile
index 8956464a193a..82bb5ad5cd89 100644..100755
--- a/drivers/input/touchscreen/Makefile
+++ b/drivers/input/touchscreen/Makefile
@@ -6,6 +6,8 @@
wm97xx-ts-y := wm97xx-core.o
+da9052-tsi-objs := da9052_tsi.o da9052_tsi_filter.o da9052_tsi_calibrate.o
+obj-$(CONFIG_TOUCHSCREEN_DA9052) += da9052-tsi.o
obj-$(CONFIG_TOUCHSCREEN_88PM860X) += 88pm860x-ts.o
obj-$(CONFIG_TOUCHSCREEN_AD7877) += ad7877.o
obj-$(CONFIG_TOUCHSCREEN_AD7879) += ad7879.o
diff --git a/drivers/input/touchscreen/da9052_tsi_filter.c b/drivers/input/touchscreen/da9052_tsi_filter.c
index 16467edf386f..ca0aa92c12e7 100644..100755
--- a/drivers/input/touchscreen/da9052_tsi_filter.c
+++ b/drivers/input/touchscreen/da9052_tsi_filter.c
@@ -62,8 +62,8 @@ void clean_tsi_fifos(struct da9052_ts_priv *priv)
void __init da9052_init_tsi_fifos(struct da9052_ts_priv *priv)
{
- init_MUTEX(&priv->tsi_raw_fifo.lock);
- init_MUTEX(&priv->tsi_reg_fifo.lock);
+ sema_init(&priv->tsi_raw_fifo.lock, 1);
+ sema_init(&priv->tsi_reg_fifo.lock, 1);
clean_tsi_raw_fifo(priv);
clean_tsi_reg_fifo(priv);
diff --git a/drivers/leds/Kconfig b/drivers/leds/Kconfig
index 713d43b4e563..12dbac005062 100644..100755
--- a/drivers/leds/Kconfig
+++ b/drivers/leds/Kconfig
@@ -469,4 +469,14 @@ config LEDS_TRIGGER_DEFAULT_ON
comment "iptables trigger is under Netfilter config (LED target)"
depends on LEDS_TRIGGERS
+config LEDS_DA9052
+ tristate "Dialog DA9052 LEDS"
+ depends on PMIC_DIALOG
+ select LEDS_CLASS
+ help
+ This option enables support for on-chip LED drivers found
+ on Dialog Semiconductor DA9052 PMICs.
+
+comment "LED Triggers"
+
endif # NEW_LEDS
diff --git a/drivers/leds/Makefile b/drivers/leds/Makefile
index bbfd2e367dc0..f29faa0d4266 100644..100755
--- a/drivers/leds/Makefile
+++ b/drivers/leds/Makefile
@@ -43,6 +43,7 @@ obj-$(CONFIG_LEDS_MC13783) += leds-mc13783.o
obj-$(CONFIG_LEDS_NS2) += leds-ns2.o
obj-$(CONFIG_LEDS_NETXBIG) += leds-netxbig.o
obj-$(CONFIG_LEDS_ASIC3) += leds-asic3.o
+obj-$(CONFIG_LEDS_DA9052) += leds-da9052.o
# LED SPI Drivers
obj-$(CONFIG_LEDS_DAC124S085) += leds-dac124s085.o
diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig
index 6ca938a6bf94..b012f6dd5c13 100644..100755
--- a/drivers/mfd/Kconfig
+++ b/drivers/mfd/Kconfig
@@ -469,6 +469,44 @@ config MFD_PCF50633
facilities, and registers devices for the various functions
so that function-specific drivers can bind to them.
+config PMIC_DIALOG
+ bool "Support Dialog Semiconductor PMIC"
+ depends on I2C=y
+ depends on SPI=y
+ select MFD_CORE
+ help
+ Support for Dialog semiconductor PMIC chips.
+ Use the options provided to support the desired PMIC's.
+choice
+ prompt "Chip Type"
+ depends on PMIC_DIALOG
+config PMIC_DA9052
+ bool "Support Dialog Semiconductor DA9052 PMIC"
+ help
+ Support for Dialog semiconductor DA9052 PMIC with inbuilt
+ SPI & I2C connectivities.
+ This driver provides common support for accessing the device,
+ additional drivers must be enabled in order to use the
+ functionality of the device.
+config PMIC_DA9053AA
+ bool "Support Dialog Semiconductor DA9053 AA PMIC"
+ help
+ Support for Dialog semiconductor DA9053 AA PMIC with inbuilt
+ SPI & I2C connectivities.
+ This driver provides common support for accessing the device,
+ additional drivers must be enabled in order to use the
+ functionality of the device.
+config PMIC_DA9053Bx
+ bool "Support Dialog Semiconductor DA9053 BA/BB PMIC"
+ help
+ Support for Dialog semiconductor DA9053 BA/BB PMIC with inbuilt
+ SPI & I2C connectivities.
+ This driver provides common support for accessing the device,
+ additional drivers must be enabled in order to use the
+ functionality of the device.
+endchoice
+
+
config PCF50633_ADC
tristate "Support for NXP PCF50633 ADC"
depends on MFD_PCF50633
diff --git a/drivers/mfd/Makefile b/drivers/mfd/Makefile
index d7d47d2a4c76..a394ae111eaa 100644..100755
--- a/drivers/mfd/Makefile
+++ b/drivers/mfd/Makefile
@@ -90,6 +90,12 @@ obj-$(CONFIG_MFD_TPS6586X) += tps6586x.o
obj-$(CONFIG_MFD_VX855) += vx855.o
obj-$(CONFIG_MFD_WL1273_CORE) += wl1273-core.o
obj-$(CONFIG_MFD_CS5535) += cs5535-mfd.o
+
+#ifeq ($(CONFIG_PMIC_DIALOG),y)
+da9052-objs := da9052-spi.o da9052-i2c.o da9052-core.o
+obj-$(CONFIG_PMIC_DIALOG) += da9052.o
+#endif
+
obj-$(CONFIG_MFD_OMAP_USB_HOST) += omap-usb-host.o
obj-$(CONFIG_MFD_PM8921_CORE) += pm8921-core.o
obj-$(CONFIG_MFD_PM8XXX_IRQ) += pm8xxx-irq.o
diff --git a/drivers/mfd/da9052-core.c b/drivers/mfd/da9052-core.c
index b19eeafbc857..8b4a658ceb50 100644..100755
--- a/drivers/mfd/da9052-core.c
+++ b/drivers/mfd/da9052-core.c
@@ -22,6 +22,7 @@
#include <linux/mfd/core.h>
#include <linux/spi/spi.h>
#include <linux/i2c.h>
+#include <linux/semaphore.h>
#include <linux/mfd/da9052/da9052.h>
#include <linux/mfd/da9052/adc.h>
@@ -171,7 +172,7 @@ static irqreturn_t da9052_eh_isr(int irq, void *dev_id)
/* Schedule work to be done */
schedule_work(&da9052->eh_isr_work);
/* Disable IRQ */
- disable_irq_nosync(DA9052_IRQ);
+ disable_irq_nosync(da9052->irq);
return IRQ_HANDLED;
}
@@ -306,14 +307,14 @@ void eh_workqueue_isr(struct work_struct *work)
ret = da9052_ssc_read_many(da9052,eve_data, DA9052_EVE_REGISTERS);
if (ret) {
- enable_irq(DA9052_IRQ);
+ enable_irq(da9052->irq);
da9052_unlock(da9052);
return;
}
ret = da9052_ssc_read_many(da9052,eve_mask_data, DA9052_EVE_REGISTERS);
if (ret) {
- enable_irq(DA9052_IRQ);
+ enable_irq(da9052->irq);
da9052_unlock(da9052);
return;
}
@@ -330,7 +331,7 @@ void eh_workqueue_isr(struct work_struct *work)
/* Check if we really got any event */
if (events_sts == 0) {
- enable_irq(DA9052_IRQ);
+ enable_irq(da9052->irq);
da9052_unlock(da9052);
return;
}
@@ -344,7 +345,7 @@ void eh_workqueue_isr(struct work_struct *work)
if (eve_data[cnt].data) {
ret = da9052_ssc_write(da9052, &eve_data[cnt]);
if (ret) {
- enable_irq(DA9052_IRQ);
+ enable_irq(da9052->irq);
da9052_unlock(da9052);
return;
}
@@ -360,13 +361,13 @@ void eh_workqueue_isr(struct work_struct *work)
udelay(50);
#endif
/* Enable HOST interrupt */
- enable_irq(DA9052_IRQ);
+ enable_irq(da9052->irq);
}
-static void da9052_eh_restore_irq(void)
+static void da9052_eh_restore_irq(struct da9052 *da9052)
{
/* Put your platform and board specific code here */
- free_irq(DA9052_IRQ, NULL);
+ free_irq(da9052->irq, NULL);
}
static int da9052_add_subdevice_pdata(struct da9052 *da9052,
@@ -404,7 +405,7 @@ static int add_da9052_devices(struct da9052 *da9052)
if (ret != 0)
return ret;
} else
- printk(KERN_CRIT "No platform initialisation supplied \n");
+ pr_err("No platform initialisation supplied\n");
ret = da9052_add_subdevice(da9052, "da9052-rtc");
if (ret)
@@ -433,11 +434,6 @@ static int add_da9052_devices(struct da9052 *da9052)
if (ret)
return ret;
- ret = da9052_add_subdevice_pdata(da9052, "da9052-gpio",
- pdata, sizeof(*pdata));
- if (ret)
- return ret;
-
ret = da9052_add_subdevice_pdata(da9052, "da9052-leds",
&leds_data, sizeof(leds_data));
if (ret)
@@ -464,6 +460,7 @@ int da9052_ssc_init(struct da9052 *da9052)
{
int cnt;
struct da9052_platform_data *pdata;
+ struct da9052_ssc_msg ssc_msg;
/* Initialize eve_nb_array */
for (cnt = 0; cnt < EVE_CNT; cnt++)
@@ -473,7 +470,7 @@ int da9052_ssc_init(struct da9052 *da9052)
mutex_init(&manconv_lock);
/* Initialize NB array lock */
- init_MUTEX(&eve_nb_array_lock);
+ sema_init(&eve_nb_array_lock, 1);
/* Assign the read-write function pointers */
da9052->read = da9052_ssc_read;
@@ -507,10 +504,16 @@ int da9052_ssc_init(struct da9052 *da9052)
add_da9052_devices(da9052);
INIT_WORK(&da9052->eh_isr_work, eh_workqueue_isr);
-
- if (request_irq(DA9052_IRQ, da9052_eh_isr, IRQ_TYPE_LEVEL_LOW,
+ ssc_msg.addr = DA9052_IRQMASKA_REG;
+ ssc_msg.data = 0xff;
+ da9052->write(da9052, &ssc_msg);
+ ssc_msg.addr = DA9052_IRQMASKC_REG;
+ ssc_msg.data = 0xff;
+ da9052->write(da9052, &ssc_msg);
+ if (request_irq(da9052->irq, da9052_eh_isr, IRQ_TYPE_LEVEL_LOW,
DA9052_EH_DEVICE_NAME, da9052))
return -EIO;
+ enable_irq_wake(da9052->irq);
return 0;
}
@@ -520,8 +523,8 @@ void da9052_ssc_exit(struct da9052 *da9052)
printk(KERN_INFO "DA9052: Unregistering SSC device.\n");
mutex_destroy(&manconv_lock);
/* Restore IRQ line */
- da9052_eh_restore_irq();
- free_irq(DA9052_IRQ, NULL);
+ da9052_eh_restore_irq(da9052);
+ free_irq(da9052->irq, NULL);
mutex_destroy(&da9052->ssc_lock);
mutex_destroy(&da9052->eve_nb_lock);
return;
diff --git a/drivers/mfd/da9052-i2c.c b/drivers/mfd/da9052-i2c.c
index 5828b6db4585..4f050896d962 100644..100755
--- a/drivers/mfd/da9052-i2c.c
+++ b/drivers/mfd/da9052-i2c.c
@@ -63,6 +63,7 @@ static int __devinit da9052_i2c_probe(struct i2c_client *client,
/* Store handle to i2c client */
da9052_i2c->i2c_client = client;
+ da9052_i2c->irq = client->irq;
da9052_i2c->dev = &client->dev;
@@ -362,7 +363,7 @@ static int __init da9052_i2c_init(void)
}
return 0;
}
-module_init(da9052_i2c_init);
+subsys_initcall(da9052_i2c_init);
static void __exit da9052_i2c_exit(void)
{
diff --git a/drivers/power/Kconfig b/drivers/power/Kconfig
index e57b50b38565..8145ff85c8ab 100644..100755
--- a/drivers/power/Kconfig
+++ b/drivers/power/Kconfig
@@ -235,4 +235,11 @@ config CHARGER_GPIO
This driver can be build as a module. If so, the module will be
called gpio-charger.
+config BATTERY_DA9052
+ tristate "Dialog DA9052 Battery"
+ depends on PMIC_DIALOG
+ help
+ Say Y here to enable support for batteries charger integrated into
+ DA9052 PMIC.
+
endif # POWER_SUPPLY
diff --git a/drivers/power/Makefile b/drivers/power/Makefile
index 009a90fa8ac9..ad6493affec8 100644..100755
--- a/drivers/power/Makefile
+++ b/drivers/power/Makefile
@@ -36,3 +36,4 @@ obj-$(CONFIG_CHARGER_ISP1704) += isp1704_charger.o
obj-$(CONFIG_CHARGER_MAX8903) += max8903_charger.o
obj-$(CONFIG_CHARGER_TWL4030) += twl4030_charger.o
obj-$(CONFIG_CHARGER_GPIO) += gpio-charger.o
+obj-$(CONFIG_BATTERY_DA9052) += da9052-battery.o
diff --git a/drivers/regulator/Kconfig b/drivers/regulator/Kconfig
index d7ed20f293d7..9856cc37039b 100644..100755
--- a/drivers/regulator/Kconfig
+++ b/drivers/regulator/Kconfig
@@ -297,6 +297,13 @@ config REGULATOR_TPS6524X
serial interface currently supported on the sequencer serial
port controller.
+config REGULATOR_DA9052
+ tristate "Dialog DA9052 regulators"
+ depends on PMIC_DIALOG
+ help
+ Say y here to support the BUCKs and LDOs regulators found on
+ Dialog Semiconductor DA9052 PMIC.
+
config REGULATOR_TPS65910
tristate "TI TPS65910 Power Regulator"
depends on MFD_TPS65910
diff --git a/drivers/regulator/Makefile b/drivers/regulator/Makefile
index 3932d2ec38f3..53e0f09c1706 100644..100755
--- a/drivers/regulator/Makefile
+++ b/drivers/regulator/Makefile
@@ -28,6 +28,7 @@ obj-$(CONFIG_REGULATOR_WM8400) += wm8400-regulator.o
obj-$(CONFIG_REGULATOR_WM8994) += wm8994-regulator.o
obj-$(CONFIG_REGULATOR_TPS6586X) += tps6586x-regulator.o
obj-$(CONFIG_REGULATOR_DA903X) += da903x.o
+obj-$(CONFIG_REGULATOR_DA9052) += da9052-regulator.o
obj-$(CONFIG_REGULATOR_PCF50633) += pcf50633-regulator.o
obj-$(CONFIG_REGULATOR_PCAP) += pcap-regulator.o
obj-$(CONFIG_REGULATOR_MC13783) += mc13783-regulator.o
@@ -44,4 +45,6 @@ obj-$(CONFIG_REGULATOR_AB8500) += ab8500.o
obj-$(CONFIG_REGULATOR_DB8500_PRCMU) += db8500-prcmu.o
obj-$(CONFIG_REGULATOR_TPS65910) += tps65910-regulator.o
+obj-$(CONFIG_REGULATOR_DA9052) += da9052-regulator.o
+
ccflags-$(CONFIG_REGULATOR_DEBUG) += -DDEBUG
diff --git a/drivers/regulator/da9052-regulator.c b/drivers/regulator/da9052-regulator.c
index 780c82427b95..09882ddd8d92 100644..100755
--- a/drivers/regulator/da9052-regulator.c
+++ b/drivers/regulator/da9052-regulator.c
@@ -239,13 +239,15 @@ static int da9052_ldo_buck_is_enabled(struct regulator_dev *rdev)
}
int da9052_ldo_buck_set_voltage(struct regulator_dev *rdev,
- int min_uV, int max_uV)
+ int min_uV, int max_uV,
+ unsigned *selector)
{
struct da9052_regulator_priv *priv = rdev_get_drvdata(rdev);
struct da9052_ssc_msg ssc_msg;
int id = rdev_get_id(rdev);
int ret;
int ldo_volt = 0;
+ selector;
/* Below if condition is there for added setvoltage attribute
in sysfs */
@@ -433,7 +435,8 @@ static int __devinit da9052_regulator_probe(struct platform_device *pdev)
pdev->dev.platform_data = init_data;
priv->regulators[i] = regulator_register(
&da9052_regulators[i].reg_desc,
- &pdev->dev, priv);
+ &pdev->dev, init_data,
+ priv);
if (IS_ERR(priv->regulators[i])) {
ret = PTR_ERR(priv->regulators[i]);
goto err;
diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig
index f2e0eaf6134e..fd0c4736a144 100644..100755
--- a/drivers/rtc/Kconfig
+++ b/drivers/rtc/Kconfig
@@ -1041,6 +1041,13 @@ config RTC_DRV_LPC32XX
This driver can also be buillt as a module. If so, the module
will be called rtc-lpc32xx.
+config RTC_DRV_DA9052
+ tristate "Dialog DA9052 RTC"
+ depends on PMIC_DIALOG
+ help
+ Say y here to support the RTC found on
+ Dialog Semiconductor DA9052 PMIC.
+
config RTC_DRV_TEGRA
tristate "NVIDIA Tegra Internal RTC driver"
depends on RTC_CLASS && ARCH_TEGRA
diff --git a/drivers/rtc/Makefile b/drivers/rtc/Makefile
index 7e8626d1444e..a0e2303c926f 100644..100755
--- a/drivers/rtc/Makefile
+++ b/drivers/rtc/Makefile
@@ -109,3 +109,4 @@ obj-$(CONFIG_RTC_DRV_WM831X) += rtc-wm831x.o
obj-$(CONFIG_RTC_DRV_WM8350) += rtc-wm8350.o
obj-$(CONFIG_RTC_DRV_X1205) += rtc-x1205.o
obj-$(CONFIG_RTC_DRV_MXC_V2) += rtc-mxc_v2.o
+obj-$(CONFIG_RTC_DRV_DA9052) += rtc-da9052.o
diff --git a/drivers/rtc/rtc-da9052.c b/drivers/rtc/rtc-da9052.c
index be80c228d5a3..952a106ebb19 100644..100755
--- a/drivers/rtc/rtc-da9052.c
+++ b/drivers/rtc/rtc-da9052.c
@@ -440,7 +440,7 @@ static int da9052_rtc_class_ops_gettime
(struct device *dev, struct rtc_time *rtc_tm)
{
int ret;
- struct da9052 *da9052 = dev->parent->driver_data;
+ struct da9052 *da9052 = dev_get_drvdata(dev->parent);
ret = da9052_rtc_gettime(da9052, rtc_tm);
if (ret)
return ret;
@@ -451,7 +451,7 @@ static int da9052_rtc_class_ops_gettime
static int da9052_rtc_class_ops_settime(struct device *dev, struct rtc_time *tm)
{
int ret;
- struct da9052 *da9052 = dev->parent->driver_data;
+ struct da9052 *da9052 = dev_get_drvdata(dev->parent);
ret = da9052_rtc_settime(da9052, tm);
return ret;
@@ -461,7 +461,7 @@ static int da9052_rtc_readalarm(struct device *dev, struct rtc_wkalrm *alrm)
{
int ret;
struct rtc_time *tm = &alrm->time;
- struct da9052 *da9052 = dev->parent->driver_data;
+ struct da9052 *da9052 = dev_get_drvdata(dev->parent);
ret = da9052_alarm_gettime(da9052, tm);
if (ret)
@@ -477,7 +477,7 @@ static int da9052_rtc_setalarm(struct device *dev, struct rtc_wkalrm *alrm)
{
int ret = 0;
struct rtc_time *tm = &alrm->time;
- struct da9052 *da9052 = dev->parent->driver_data;
+ struct da9052 *da9052 = dev_get_drvdata(dev->parent);
ret = da9052_alarm_settime(da9052, tm);
diff --git a/drivers/video/backlight/Kconfig b/drivers/video/backlight/Kconfig
index 2d93c8d61ad5..9ef4d56e1c05 100644..100755
--- a/drivers/video/backlight/Kconfig
+++ b/drivers/video/backlight/Kconfig
@@ -327,6 +327,12 @@ config BACKLIGHT_PCF50633
If you have a backlight driven by a NXP PCF50633 MFD, say Y here to
enable its driver.
+config BACKLIGHT_DA9052
+ tristate "Dialog DA9052 WLED"
+ depends on PMIC_DIALOG
+ help
+ Enable the DA9052 Backlight Driver
+
endif # BACKLIGHT_CLASS_DEVICE
endif # BACKLIGHT_LCD_SUPPORT
diff --git a/drivers/video/backlight/Makefile b/drivers/video/backlight/Makefile
index ee72adb8786e..60a67311c325 100644..100755
--- a/drivers/video/backlight/Makefile
+++ b/drivers/video/backlight/Makefile
@@ -37,4 +37,4 @@ obj-$(CONFIG_BACKLIGHT_ADP8860) += adp8860_bl.o
obj-$(CONFIG_BACKLIGHT_ADP8870) += adp8870_bl.o
obj-$(CONFIG_BACKLIGHT_88PM860X) += 88pm860x_bl.o
obj-$(CONFIG_BACKLIGHT_PCF50633) += pcf50633-backlight.o
-
+obj-$(CONFIG_BACKLIGHT_DA9052) += da9052_bl.o
diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig
index 21d816e9dfa5..8598a4b09622 100644..100755
--- a/drivers/watchdog/Kconfig
+++ b/drivers/watchdog/Kconfig
@@ -1230,6 +1230,11 @@ config WDTPCI
To compile this driver as a module, choose M here: the
module will be called wdt_pci.
+config DA9052_WATCHDOG
+ tristate "Dialog DA9052 Watchdog"
+ depends on PMIC_DIALOG
+ help
+ Support for the watchdog in the DA9052 PMIC.
#
# USB-based Watchdog Cards
#
diff --git a/drivers/watchdog/Makefile b/drivers/watchdog/Makefile
index ed26f7094e47..fae2cfcca711 100644..100755
--- a/drivers/watchdog/Makefile
+++ b/drivers/watchdog/Makefile
@@ -159,3 +159,4 @@ obj-$(CONFIG_WM831X_WATCHDOG) += wm831x_wdt.o
obj-$(CONFIG_WM8350_WATCHDOG) += wm8350_wdt.o
obj-$(CONFIG_MAX63XX_WATCHDOG) += max63xx_wdt.o
obj-$(CONFIG_SOFT_WATCHDOG) += softdog.o
+obj-$(CONFIG_DA9052_WATCHDOG) += da9052_wdt.o
diff --git a/include/linux/mfd/da9052/da9052.h b/include/linux/mfd/da9052/da9052.h
index 7652d07f70d3..fd83f73bcd82 100644..100755
--- a/include/linux/mfd/da9052/da9052.h
+++ b/include/linux/mfd/da9052/da9052.h
@@ -94,6 +94,8 @@ struct da9052_eh_nb{
struct da9052_regulator_init_data {
struct regulator_init_data *init_data;
+ int id;
+
};
struct da9052_regulator_platform_data {
@@ -130,6 +132,7 @@ struct da9052 {
struct da9052_eh_nb *nb);
int num_regulators;
int connecting_device;
+ int irq;
struct spi_device *spi_dev;
unsigned int spi_active_page;
unsigned char rw_pol;
diff --git a/include/linux/mfd/da9052/tsi_filter.h b/include/linux/mfd/da9052/tsi_filter.h
index 0439a08fa64d..a244fbd9bf12 100644..100755
--- a/include/linux/mfd/da9052/tsi_filter.h
+++ b/include/linux/mfd/da9052/tsi_filter.h
@@ -23,6 +23,7 @@
#define __LINUX_MFD_DA9052_TSI_FILTER_H
#include <linux/mfd/da9052/tsi_cfg.h>
+#include <linux/semaphore.h>
struct da9052_tsi_data {
s16 x;