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
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
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
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
}
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);
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
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
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
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
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);
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
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
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
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
#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>
/* 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;
}
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;
}
/* Check if we really got any event */
if (events_sts == 0) {
- enable_irq(DA9052_IRQ);
+ enable_irq(da9052->irq);
da9052_unlock(da9052);
return;
}
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;
}
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,
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)
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)
{
int cnt;
struct da9052_platform_data *pdata;
+ struct da9052_ssc_msg ssc_msg;
/* Initialize eve_nb_array */
for (cnt = 0; cnt < EVE_CNT; cnt++)
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;
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;
}
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;
/* Store handle to i2c client */
da9052_i2c->i2c_client = client;
+ da9052_i2c->irq = client->irq;
da9052_i2c->dev = &client->dev;
}
return 0;
}
-module_init(da9052_i2c_init);
+subsys_initcall(da9052_i2c_init);
static void __exit da9052_i2c_exit(void)
{
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
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
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
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
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
}
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 */
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;
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
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
(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;
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;
{
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)
{
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);
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
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
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
#
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
struct da9052_regulator_init_data {
struct regulator_init_data *init_data;
+ int id;
+
};
struct da9052_regulator_platform_data {
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;
#define __LINUX_MFD_DA9052_TSI_FILTER_H
#include <linux/mfd/da9052/tsi_cfg.h>
+#include <linux/semaphore.h>
struct da9052_tsi_data {
s16 x;