diff options
author | Peter Ujfalusi <peter.ujfalusi@ti.com> | 2016-08-31 07:46:21 -0400 |
---|---|---|
committer | Lee Jones <lee.jones@linaro.org> | 2016-10-04 10:48:05 -0400 |
commit | 0133d323463ec20131f7fd5a70051bd89db4f7a1 (patch) | |
tree | 919f9651c5457d77ec6607fc7df686d0be6f7f39 | |
parent | 25d94a11db6d1e07a8a0914f33456c018049992e (diff) |
mfd: twl6040: Register child device for twl6040-pdmclk
The McPDM in OMAP4/5 is using the pdmclk from twl6040 as functional clock.
The twl6040-pdmclk driver provides a clock which can be used to make sure
that the pdmclk is active when the McPDM is in use.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
-rw-r--r-- | Documentation/devicetree/bindings/mfd/twl6040.txt | 1 | ||||
-rw-r--r-- | drivers/mfd/twl6040.c | 5 | ||||
-rw-r--r-- | include/linux/mfd/twl6040.h | 2 |
3 files changed, 7 insertions, 1 deletions
diff --git a/Documentation/devicetree/bindings/mfd/twl6040.txt b/Documentation/devicetree/bindings/mfd/twl6040.txt index e6afdfa3543d..9a98ee7c323d 100644 --- a/Documentation/devicetree/bindings/mfd/twl6040.txt +++ b/Documentation/devicetree/bindings/mfd/twl6040.txt | |||
@@ -12,6 +12,7 @@ Required properties: | |||
12 | - interrupt-parent: The parent interrupt controller | 12 | - interrupt-parent: The parent interrupt controller |
13 | - gpio-controller: | 13 | - gpio-controller: |
14 | - #gpio-cells = <1>: twl6040 provides GPO lines. | 14 | - #gpio-cells = <1>: twl6040 provides GPO lines. |
15 | - #clock-cells = <0>; twl6040 is a provider of pdmclk which is used by McPDM | ||
15 | - twl6040,audpwron-gpio: Power on GPIO line for the twl6040 | 16 | - twl6040,audpwron-gpio: Power on GPIO line for the twl6040 |
16 | 17 | ||
17 | - vio-supply: Regulator for the twl6040 VIO supply | 18 | - vio-supply: Regulator for the twl6040 VIO supply |
diff --git a/drivers/mfd/twl6040.c b/drivers/mfd/twl6040.c index c3ad59ef43dd..d66502d36ba0 100644 --- a/drivers/mfd/twl6040.c +++ b/drivers/mfd/twl6040.c | |||
@@ -783,6 +783,11 @@ static int twl6040_probe(struct i2c_client *client, | |||
783 | cell->name = "twl6040-gpo"; | 783 | cell->name = "twl6040-gpo"; |
784 | children++; | 784 | children++; |
785 | 785 | ||
786 | /* PDM clock support */ | ||
787 | cell = &twl6040->cells[children]; | ||
788 | cell->name = "twl6040-pdmclk"; | ||
789 | children++; | ||
790 | |||
786 | /* The chip is powered down so mark regmap to cache only and dirty */ | 791 | /* The chip is powered down so mark regmap to cache only and dirty */ |
787 | regcache_cache_only(twl6040->regmap, true); | 792 | regcache_cache_only(twl6040->regmap, true); |
788 | regcache_mark_dirty(twl6040->regmap); | 793 | regcache_mark_dirty(twl6040->regmap); |
diff --git a/include/linux/mfd/twl6040.h b/include/linux/mfd/twl6040.h index 36795a1be479..a2e88761c09f 100644 --- a/include/linux/mfd/twl6040.h +++ b/include/linux/mfd/twl6040.h | |||
@@ -168,7 +168,7 @@ | |||
168 | #define TWL6040_VIBROCDET 0x20 | 168 | #define TWL6040_VIBROCDET 0x20 |
169 | #define TWL6040_TSHUTDET 0x40 | 169 | #define TWL6040_TSHUTDET 0x40 |
170 | 170 | ||
171 | #define TWL6040_CELLS 3 | 171 | #define TWL6040_CELLS 4 |
172 | 172 | ||
173 | #define TWL6040_REV_ES1_0 0x00 | 173 | #define TWL6040_REV_ES1_0 0x00 |
174 | #define TWL6040_REV_ES1_1 0x01 /* Rev ES1.1 and ES1.2 */ | 174 | #define TWL6040_REV_ES1_1 0x01 /* Rev ES1.1 and ES1.2 */ |