DA906x PMIC driver
Subsystems (7)
cover DA906x PMIC driver
Greetings,
The following patch set adds new multifunction device providing support for DA906x PMIC chips.
Please add some comments to the driver, which targets Linux Kernel v3.6.
Thank you,
---
Krystian Garbaciak (8):
mfd: Add Dialog DA906x core driver.
regulator: Add Dialog DA906x voltage regulators support.
rtc: Add RTC driver for DA906x PMIC.
hwmon: Add DA906x hardware monitoring support.
input: Add support for DA906x PMIC OnKey detection.
input: Add support for DA906x vibration motor driver.
watchdog: Add DA906x PMIC watchdog driver.
leds: Add DA906x PMIC LED driver.
drivers/hwmon/Kconfig | 6 + drivers/hwmon/Makefile | 1 + drivers/hwmon/da906x-hwmon.c | 393 ++++++++++++ drivers/input/misc/Kconfig | 13 + drivers/input/misc/Makefile | 2 + drivers/input/misc/da906x-onkey.c | 139 +++++ drivers/input/misc/da906x-vibration.c | 153 +++++ drivers/leds/Kconfig | 8 + drivers/leds/Makefile | 1 + drivers/leds/leds-da906x.c | 438 +++++++++++++ drivers/mfd/Kconfig | 11 + drivers/mfd/Makefile | 4 + drivers/mfd/da906x-core.c | 228 +++++++ drivers/mfd/da906x-i2c.c | 389 ++++++++++++ drivers/mfd/da906x-irq.c | 192 ++++++ drivers/regulator/Kconfig | 6 + drivers/regulator/Makefile | 1 + drivers/regulator/da906x-regulator.c | 1018 ++++++++++++++++++++++++++++++ drivers/rtc/Kconfig | 7 + drivers/rtc/Makefile | 1 + drivers/rtc/rtc-da906x.c | 379 ++++++++++++ drivers/watchdog/Kconfig | 27 + drivers/watchdog/Makefile | 1 + drivers/watchdog/da906x_wdt.c | 276 +++++++++ include/linux/mfd/da906x/core.h | 121 ++++ include/linux/mfd/da906x/pdata.h | 114 ++++ include/linux/mfd/da906x/registers.h | 1093 +++++++++++++++++++++++++++++++++ 27 files changed, 5022 insertions(+), 0 deletions(-) create mode 100644 drivers/hwmon/da906x-hwmon.c create mode 100644 drivers/input/misc/da906x-onkey.c create mode 100644 drivers/input/misc/da906x-vibration.c create mode 100644 drivers/leds/leds-da906x.c create mode 100644 drivers/mfd/da906x-core.c create mode 100644 drivers/mfd/da906x-i2c.c create mode 100644 drivers/mfd/da906x-irq.c create mode 100644 drivers/regulator/da906x-regulator.c create mode 100644 drivers/rtc/rtc-da906x.c create mode 100644 drivers/watchdog/da906x_wdt.c create mode 100644 include/linux/mfd/da906x/core.h create mode 100644 include/linux/mfd/da906x/pdata.h create mode 100644 include/linux/mfd/da906x/registers.h
_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
PATCH 1/8 mfd: Add Dialog DA906x core driver.
This is MFD module providing access to registers and interrupts of DA906x series PMIC. It is used by other functional modules, registered as MFD cells. Driver uses regmap with paging to access extended register list. Register map is divided into two pages, where the second page is used during initialisation.
This module provides support to following functional cells:
- Regulators
- RTC
- HWMON
- OnKey (power key misc input device)
- Vibration (force-feedback input device)
- Watchdog
- LEDs
--- drivers/mfd/Kconfig | 11 + drivers/mfd/Makefile | 4 + drivers/mfd/da906x-core.c | 228 +++++++ drivers/mfd/da906x-i2c.c | 389 ++++++++++++ drivers/mfd/da906x-irq.c | 192 ++++++ include/linux/mfd/da906x/core.h | 121 ++++ include/linux/mfd/da906x/pdata.h | 114 ++++ include/linux/mfd/da906x/registers.h | 1093 ++++++++++++++++++++++++++++++++++ 8 files changed, 2152 insertions(+), 0 deletions(-) create mode 100644 drivers/mfd/da906x-core.c create mode 100644 drivers/mfd/da906x-i2c.c create mode 100644 drivers/mfd/da906x-irq.c create mode 100644 include/linux/mfd/da906x/core.h create mode 100644 include/linux/mfd/da906x/pdata.h create mode 100644 include/linux/mfd/da906x/registers.h
drivers/mfd/Kconfig +11 -0
@@ -441,6 +441,17 @@ config MFD_DA9052_I2C for accessing the device, additional drivers must be enabled in order to use the functionality of the device. +config MFD_DA906X + bool "Dialog Semiconductor DA906X PMIC Support" + depends on I2C=y + select MFD_CORE + select REGMAP_I2C + select REGMAP_IRQ + help + Support for the Dialog Semiconductor DA906X PMIC. This includes + I2C driver and core APIs, additional drivers must be enabled in + order to use the functionality of the device. + config PMIC_ADP5520 bool "Analog Devices ADP5520/01 MFD PMIC Core Support" depends on I2C=y
drivers/mfd/Makefile +4 -0
@@ -90,8 +90,12 @@ obj-$(CONFIG_PMIC_DA9052) += da9052-core.o obj-$(CONFIG_MFD_DA9052_SPI) += da9052-spi.o obj-$(CONFIG_MFD_DA9052_I2C) += da9052-i2c.o +da906x-objs := da906x-core.o da906x-irq.o da906x-i2c.o +obj-$(CONFIG_MFD_DA906X) += da906x.o + obj-$(CONFIG_MFD_MAX77686) += max77686.o max77686-irq.o obj-$(CONFIG_MFD_MAX77693) += max77693.o max77693-irq.o + max8925-objs := max8925-core.o max8925-i2c.o obj-$(CONFIG_MFD_MAX8925) += max8925.o obj-$(CONFIG_MFD_MAX8997) += max8997.o max8997-irq.o
drivers/mfd/da906x-core.c new file +228 -0
228 lines not on this page · raw message
drivers/mfd/da906x-i2c.c new file +389 -0
389 lines not on this page · raw message
drivers/mfd/da906x-irq.c new file +192 -0
192 lines not on this page · raw message
include/linux/mfd/da906x/core.h new file +121 -0
121 lines not on this page · raw message
include/linux/mfd/da906x/pdata.h new file +114 -0
114 lines not on this page · raw message
include/linux/mfd/da906x/registers.h new file +1093 -0
1,093 lines not on this page · raw message
Signature · 7 lines
1.7.0.4 _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
PATCH 2/8 regulator: Add Dialog DA906x voltage regulators support.
The driver adds support for the following DA9063 PMIC regulators:
- 11x LDOs (named LDO1 - LDO11),
- 6x buck converters (BCORE1, BCORE2, BPRO, BMEM, BIO, BPERI),
- 1x power switch to switch on/off 32 KHz oscilator output (32K_OUT).
Regulators provide following operations:
- REGULATOR_CHANGE_STATUS for all regulators,
- REGULATOR_CHANGE_VOLTAGE for LDOs and buck converters,
- REGULATOR_CHANGE_MODE for LDOs and buck converters, where:
- LDOs allow REGULATOR_MODE_NORMAL and REGULATOR_MODE_STANDBY,
- buck converters allow REGULATOR_MODE_FAST, REGULATOR_MODE_NORMAL and REGULATOR_MODE_STANDBY,
- REGULATOR_CHANGE_CURRENT for buck converters (current limits).
The driver generates REGULATOR_EVENT_OVER_CURRENT for LDO3, LDO4, LDO7, LDO8 and LDO11.
Internally, PMIC provides two voltage configurations for normal and suspend system state for each regulator. The driver switches between those on suspend/wake-up to provide quick and fluent output voltage change.
This driver requires MFD core driver for operation.
--- drivers/regulator/Kconfig | 6 + drivers/regulator/Makefile | 1 + drivers/regulator/da906x-regulator.c | 1018 ++++++++++++++++++++++++++++++++++ 3 files changed, 1025 insertions(+), 0 deletions(-) create mode 100644 drivers/regulator/da906x-regulator.c
drivers/regulator/Kconfig +6 -0
@@ -110,6 +110,12 @@ config REGULATOR_DA9052 This driver supports the voltage regulators of DA9052-BC and DA9053-AA/Bx PMIC. +config REGULATOR_DA906X + bool "Dialog DA906X Regulator family chip" + depends on MFD_DA906X + help + Support for Dialog Semiconductor DA906x chip. + config REGULATOR_ANATOP tristate "Freescale i.MX on-chip ANATOP LDO regulators" depends on MFD_ANATOP
drivers/regulator/Makefile +1 -0
@@ -18,6 +18,7 @@ obj-$(CONFIG_REGULATOR_ANATOP) += anatop-regulator.o obj-$(CONFIG_REGULATOR_ARIZONA) += arizona-micsupp.o arizona-ldo1.o obj-$(CONFIG_REGULATOR_DA903X) += da903x.o obj-$(CONFIG_REGULATOR_DA9052) += da9052-regulator.o +obj-$(CONFIG_REGULATOR_DA906X) += da906x-regulator.o obj-$(CONFIG_REGULATOR_DBX500_PRCMU) += dbx500-prcmu.o obj-$(CONFIG_REGULATOR_DB8500_PRCMU) += db8500-prcmu.o obj-$(CONFIG_REGULATOR_GPIO) += gpio-regulator.o
drivers/regulator/da906x-regulator.c new file +1018 -0
1,018 lines not on this page · raw message
Signature · 7 lines
1.7.0.4 _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
PATCH 3/8 rtc: Add RTC driver for DA906x PMIC.
DA906x RTC driver supports date/time and alarm.
In hardware, PMIC supports alarm setting with a resolution of one minute and tick event (every second update event). The driver combines it, providing alarm with one second resolution.
The driver requires MFD core driver for operation.
--- drivers/rtc/Kconfig | 7 + drivers/rtc/Makefile | 1 + drivers/rtc/rtc-da906x.c | 379 ++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 387 insertions(+), 0 deletions(-) create mode 100644 drivers/rtc/rtc-da906x.c
drivers/rtc/Kconfig +7 -0
@@ -571,6 +571,13 @@ config RTC_DRV_DA9052 Say y here to support the RTC driver for Dialog Semiconductor DA9052-BC and DA9053-AA/Bx PMICs. +config RTC_DRV_DA906X + tristate "Dialog DA906X RTC" + depends on MFD_DA906X + help + Say y here to support the RTC driver for + Dialog Semiconductor DA906x PMIC. + config RTC_DRV_EFI tristate "EFI RTC" depends on IA64
drivers/rtc/Makefile +1 -0
@@ -29,6 +29,7 @@ obj-$(CONFIG_RTC_DRV_BQ4802) += rtc-bq4802.o obj-$(CONFIG_RTC_DRV_CMOS) += rtc-cmos.o obj-$(CONFIG_RTC_DRV_COH901331) += rtc-coh901331.o obj-$(CONFIG_RTC_DRV_DA9052) += rtc-da9052.o +obj-$(CONFIG_RTC_DRV_DA906X) += rtc-da906x.o obj-$(CONFIG_RTC_DRV_DAVINCI) += rtc-davinci.o obj-$(CONFIG_RTC_DRV_DM355EVM) += rtc-dm355evm.o obj-$(CONFIG_RTC_DRV_VRTC) += rtc-mrst.o
drivers/rtc/rtc-da906x.c new file +379 -0
379 lines not on this page · raw message
Signature · 7 lines
1.7.0.4 _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
PATCH 4/8 hwmon: Add DA906x hardware monitoring support.
DA906x PMIC provides ADC for voltage and temperature monitoring.
The driver provides results of following ADC channels:
- in0 - system voltage (2500 - 5500 mV)
- in1 - universal voltage channel #1 (0 - 2500 mV)
- in2 - universal voltage channel #2 (0 - 2500 mV)
- in3 - universal voltage channel #3 (0 - 2500 mV)
- in4 - backup battery voltage (0 - 5000 mV)
- temp1 - PMIC internal junction temperature (-88 - 333 Celcius degrees)
--- drivers/hwmon/Kconfig | 6 + drivers/hwmon/Makefile | 1 + drivers/hwmon/da906x-hwmon.c | 393 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 400 insertions(+), 0 deletions(-) create mode 100644 drivers/hwmon/da906x-hwmon.c
drivers/hwmon/Kconfig +6 -0
@@ -1373,6 +1373,12 @@ config SENSORS_WM8350 This driver can also be built as a module. If so, the module will be called wm8350-hwmon. +config SENSORS_DA906X + tristate "DA906X HWMON device drivers" + depends on MFD_DA906X + help + Support for the HWMON DA906X device driver. + config SENSORS_ULTRA45 tristate "Sun Ultra45 PIC16F747" depends on SPARC64
drivers/hwmon/Makefile +1 -0
@@ -43,6 +43,7 @@ obj-$(CONFIG_SENSORS_ASC7621) += asc7621.o obj-$(CONFIG_SENSORS_ATXP1) += atxp1.o obj-$(CONFIG_SENSORS_CORETEMP) += coretemp.o obj-$(CONFIG_SENSORS_DA9052_ADC)+= da9052-hwmon.o +obj-$(CONFIG_SENSORS_DA906X) += da906x-hwmon.o obj-$(CONFIG_SENSORS_DME1737) += dme1737.o obj-$(CONFIG_SENSORS_DS620) += ds620.o obj-$(CONFIG_SENSORS_DS1621) += ds1621.o
drivers/hwmon/da906x-hwmon.c new file +393 -0
393 lines not on this page · raw message
Signature · 7 lines
1.7.0.4 _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
PATCH 5/8 input: Add support for DA906x PMIC OnKey detection.
This driver creates input device that reports a key event on an OnKey button release. The reported key code depends on the time, the button was holded for. If holding time < 2 seconds - KEY_SLEEP is reported on button release, otherwise KEY_POWER is reported after 2 seconds.
--- drivers/input/misc/Kconfig | 6 ++ drivers/input/misc/Makefile | 1 + drivers/input/misc/da906x-onkey.c | 139 +++++++++++++++++++++++++++++++++++++ 3 files changed, 146 insertions(+), 0 deletions(-) create mode 100644 drivers/input/misc/da906x-onkey.c
drivers/input/misc/Kconfig +6 -0
@@ -486,6 +486,12 @@ config INPUT_DA9052_ONKEY To compile this driver as a module, choose M here: the module will be called da9052_onkey. +config INPUT_DA906X_ONKEY + tristate "Dialog DA906x OnKey" + depends on MFD_DA906X + help + Support for Dialog Semiconductor input onkey device. + config INPUT_DM355EVM tristate "TI DaVinci DM355 EVM Keypad and IR Remote" depends on MFD_DM355EVM_MSP
drivers/input/misc/Makefile +1 -0
@@ -23,6 +23,7 @@ obj-$(CONFIG_INPUT_CMA3000) += cma3000_d0x.o obj-$(CONFIG_INPUT_CMA3000_I2C) += cma3000_d0x_i2c.o obj-$(CONFIG_INPUT_COBALT_BTNS) += cobalt_btns.o obj-$(CONFIG_INPUT_DA9052_ONKEY) += da9052_onkey.o +obj-$(CONFIG_INPUT_DA906X_ONKEY) += da906x-onkey.o obj-$(CONFIG_INPUT_DM355EVM) += dm355evm_keys.o obj-$(CONFIG_INPUT_GP2A) += gp2ap002a00f.o obj-$(CONFIG_INPUT_GPIO_TILT_POLLED) += gpio_tilt_polled.o
drivers/input/misc/da906x-onkey.c new file +139 -0
139 lines not on this page · raw message
Signature · 7 lines
1.7.0.4 _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors