]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ENGR00141391-2 PMIC: porting da9053 to i.mx platform
authorZhou Jingyu <b02241@freescale.com>
Wed, 2 Mar 2011 08:28:25 +0000 (16:28 +0800)
committerLothar Waßmann <LW@KARO-electronics.de>
Fri, 24 May 2013 06:32:31 +0000 (08:32 +0200)
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>
30 files changed:
drivers/gpio/Kconfig [changed mode: 0644->0755]
drivers/gpio/Makefile [changed mode: 0644->0755]
drivers/hwmon/Kconfig [changed mode: 0644->0755]
drivers/hwmon/Makefile [changed mode: 0644->0755]
drivers/hwmon/da9052-adc.c [changed mode: 0644->0755]
drivers/input/misc/Kconfig [changed mode: 0644->0755]
drivers/input/misc/Makefile [changed mode: 0644->0755]
drivers/input/touchscreen/Kconfig [changed mode: 0644->0755]
drivers/input/touchscreen/Makefile [changed mode: 0644->0755]
drivers/input/touchscreen/da9052_tsi_filter.c [changed mode: 0644->0755]
drivers/leds/Kconfig [changed mode: 0644->0755]
drivers/leds/Makefile [changed mode: 0644->0755]
drivers/mfd/Kconfig [changed mode: 0644->0755]
drivers/mfd/Makefile [changed mode: 0644->0755]
drivers/mfd/da9052-core.c [changed mode: 0644->0755]
drivers/mfd/da9052-i2c.c [changed mode: 0644->0755]
drivers/power/Kconfig [changed mode: 0644->0755]
drivers/power/Makefile [changed mode: 0644->0755]
drivers/regulator/Kconfig [changed mode: 0644->0755]
drivers/regulator/Makefile [changed mode: 0644->0755]
drivers/regulator/da9052-regulator.c [changed mode: 0644->0755]
drivers/rtc/Kconfig [changed mode: 0644->0755]
drivers/rtc/Makefile [changed mode: 0644->0755]
drivers/rtc/rtc-da9052.c [changed mode: 0644->0755]
drivers/video/backlight/Kconfig [changed mode: 0644->0755]
drivers/video/backlight/Makefile [changed mode: 0644->0755]
drivers/watchdog/Kconfig [changed mode: 0644->0755]
drivers/watchdog/Makefile [changed mode: 0644->0755]
include/linux/mfd/da9052/da9052.h [changed mode: 0644->0755]
include/linux/mfd/da9052/tsi_filter.h [changed mode: 0644->0755]

old mode 100644 (file)
new mode 100755 (executable)
index 80ccce9..8ff5752
@@ -454,4 +454,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
old mode 100644 (file)
new mode 100755 (executable)
index b605f8e..bfd28a3
@@ -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
old mode 100644 (file)
new mode 100755 (executable)
index 395ccdf..f307b4d
@@ -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
old mode 100644 (file)
new mode 100755 (executable)
index b1da8bc..33d968a
@@ -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
old mode 100644 (file)
new mode 100755 (executable)
index 647e580..6803fc2
@@ -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);
old mode 100644 (file)
new mode 100755 (executable)
index 45dc6aa..6fb3607
@@ -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
old mode 100644 (file)
new mode 100755 (executable)
index 38efb2c..3b9052c
@@ -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
old mode 100644 (file)
new mode 100755 (executable)
index 5e42c8d..5fbc288
@@ -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
old mode 100644 (file)
new mode 100755 (executable)
index 8956464..82bb5ad
@@ -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
old mode 100644 (file)
new mode 100755 (executable)
index 16467ed..ca0aa92
@@ -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);
old mode 100644 (file)
new mode 100755 (executable)
index 713d43b..12dbac0
@@ -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
old mode 100644 (file)
new mode 100755 (executable)
index bbfd2e3..f29faa0
@@ -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
old mode 100644 (file)
new mode 100755 (executable)
index 6ca938a..b012f6d
@@ -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
old mode 100644 (file)
new mode 100755 (executable)
index d7d47d2..a394ae1
@@ -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
old mode 100644 (file)
new mode 100755 (executable)
index b19eeaf..8b4a658
@@ -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;
old mode 100644 (file)
new mode 100755 (executable)
index 5828b6d..4f05089
@@ -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)
 {
old mode 100644 (file)
new mode 100755 (executable)
index e57b50b..8145ff8
@@ -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
old mode 100644 (file)
new mode 100755 (executable)
index 009a90f..ad6493a
@@ -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
old mode 100644 (file)
new mode 100755 (executable)
index d7ed20f..9856cc3
@@ -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
old mode 100644 (file)
new mode 100755 (executable)
index 3932d2e..53e0f09
@@ -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
old mode 100644 (file)
new mode 100755 (executable)
index 780c824..09882dd
@@ -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;
old mode 100644 (file)
new mode 100755 (executable)
index f2e0eaf..fd0c473
@@ -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
old mode 100644 (file)
new mode 100755 (executable)
index 7e8626d..a0e2303
@@ -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
old mode 100644 (file)
new mode 100755 (executable)
index be80c22..952a106
@@ -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);
 
old mode 100644 (file)
new mode 100755 (executable)
index 2d93c8d..9ef4d56
@@ -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
old mode 100644 (file)
new mode 100755 (executable)
index ee72adb..60a6731
@@ -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
old mode 100644 (file)
new mode 100755 (executable)
index 21d816e..8598a4b
@@ -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
 #
old mode 100644 (file)
new mode 100755 (executable)
index ed26f70..fae2cfc
@@ -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
old mode 100644 (file)
new mode 100755 (executable)
index 7652d07..fd83f73
@@ -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;
old mode 100644 (file)
new mode 100755 (executable)
index 0439a08..a244fbd
@@ -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;