Skip to content

Commit

Permalink
mfd: twl6040: Register child device for twl6040-pdmclk
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Peter Ujfalusi authored and Lee Jones committed Oct 4, 2016
1 parent 25d94a1 commit 0133d32
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions Documentation/devicetree/bindings/mfd/twl6040.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Required properties:
- interrupt-parent: The parent interrupt controller
- gpio-controller:
- #gpio-cells = <1>: twl6040 provides GPO lines.
- #clock-cells = <0>; twl6040 is a provider of pdmclk which is used by McPDM
- twl6040,audpwron-gpio: Power on GPIO line for the twl6040

- vio-supply: Regulator for the twl6040 VIO supply
Expand Down
5 changes: 5 additions & 0 deletions drivers/mfd/twl6040.c
Original file line number Diff line number Diff line change
Expand Up @@ -783,6 +783,11 @@ static int twl6040_probe(struct i2c_client *client,
cell->name = "twl6040-gpo";
children++;

/* PDM clock support */
cell = &twl6040->cells[children];
cell->name = "twl6040-pdmclk";
children++;

/* The chip is powered down so mark regmap to cache only and dirty */
regcache_cache_only(twl6040->regmap, true);
regcache_mark_dirty(twl6040->regmap);
Expand Down
2 changes: 1 addition & 1 deletion include/linux/mfd/twl6040.h
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@
#define TWL6040_VIBROCDET 0x20
#define TWL6040_TSHUTDET 0x40

#define TWL6040_CELLS 3
#define TWL6040_CELLS 4

#define TWL6040_REV_ES1_0 0x00
#define TWL6040_REV_ES1_1 0x01 /* Rev ES1.1 and ES1.2 */
Expand Down

0 comments on commit 0133d32

Please sign in to comment.