mfd: Add LP3943 MFD driver

LP3943 has 16 output pins which can be used as GPIO expander and PWM generator.

* Regmap I2C interface for R/W LP3943 registers

* Atomic operations for output pin assignment
  The driver should check whether requested pin is available or not.
  If the pin is already used, pin request returns as a failure.
  A driver data, 'pin_used' is checked when gpio_request() and
  pwm_request() are called. If the pin is available, then pin_used is set.
  And it is cleared when gpio_free() and pwm_free().

* Device tree support
  Compatible strings for GPIO and PWM driver.
  LP3943 platform data is PWM related, so parsing the device tree is
  implemented in the PWM driver.

Signed-off-by: Milo Kim <milo.kim@ti.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
This commit is contained in:
Milo Kim
2013-12-06 11:18:41 +09:00
committed by Lee Jones
parent 0cc59b9d98
commit 470eca47bd
4 changed files with 293 additions and 0 deletions
+11
View File
@@ -738,6 +738,17 @@ config MFD_DM355EVM_MSP
boards. MSP430 firmware manages resets and power sequencing,
inputs from buttons and the IR remote, LEDs, an RTC, and more.
config MFD_LP3943
tristate "TI/National Semiconductor LP3943 MFD Driver"
depends on I2C
select MFD_CORE
select REGMAP_I2C
help
Support for the TI/National Semiconductor LP3943.
This driver consists of GPIO and PWM drivers.
With these functionalities, it can be used for LED string control or
general usage such like a GPIO controller and a PWM controller.
config MFD_LP8788
bool "TI LP8788 Power Management Unit Driver"
depends on I2C=y