diff options
author | Peter Ujfalusi <peter.ujfalusi@ti.com> | 2011-05-31 05:02:49 -0400 |
---|---|---|
committer | Peter Ujfalusi <peter.ujfalusi@ti.com> | 2011-07-04 11:43:56 -0400 |
commit | 57fe7251f5bfc4332f24479376de48a1e8ca6211 (patch) | |
tree | d1276ed9201bf94d8a9c1d4cce0acd2b33a0138b /drivers | |
parent | 4fe5668b73d7ad041101656c98f3a58d86f68840 (diff) |
MFD: twl4030-codec -> twl4030-audio: Rename the driver
Rename the driver, and header file from twl4030-codec to
twl4030-audio.
To avoid breakage change depending drivers at the same time.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
CC: Misael Lopez Cruz <misael.lopez@ti.com>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/input/misc/Kconfig | 2 | ||||
-rw-r--r-- | drivers/input/misc/twl4030-vibra.c | 10 | ||||
-rw-r--r-- | drivers/mfd/Kconfig | 2 | ||||
-rw-r--r-- | drivers/mfd/Makefile | 2 | ||||
-rw-r--r-- | drivers/mfd/twl4030-audio.c (renamed from drivers/mfd/twl4030-codec.c) | 33 |
5 files changed, 24 insertions, 25 deletions
diff --git a/drivers/input/misc/Kconfig b/drivers/input/misc/Kconfig index 45dc6aa62ba4..077309a29a2e 100644 --- a/drivers/input/misc/Kconfig +++ b/drivers/input/misc/Kconfig | |||
@@ -267,7 +267,7 @@ config INPUT_TWL4030_PWRBUTTON | |||
267 | config INPUT_TWL4030_VIBRA | 267 | config INPUT_TWL4030_VIBRA |
268 | tristate "Support for TWL4030 Vibrator" | 268 | tristate "Support for TWL4030 Vibrator" |
269 | depends on TWL4030_CORE | 269 | depends on TWL4030_CORE |
270 | select TWL4030_CODEC | 270 | select MFD_TWL4030_AUDIO |
271 | select INPUT_FF_MEMLESS | 271 | select INPUT_FF_MEMLESS |
272 | help | 272 | help |
273 | This option enables support for TWL4030 Vibrator Driver. | 273 | This option enables support for TWL4030 Vibrator Driver. |
diff --git a/drivers/input/misc/twl4030-vibra.c b/drivers/input/misc/twl4030-vibra.c index 014dd4ad0d4f..7abca85b5a74 100644 --- a/drivers/input/misc/twl4030-vibra.c +++ b/drivers/input/misc/twl4030-vibra.c | |||
@@ -28,7 +28,7 @@ | |||
28 | #include <linux/platform_device.h> | 28 | #include <linux/platform_device.h> |
29 | #include <linux/workqueue.h> | 29 | #include <linux/workqueue.h> |
30 | #include <linux/i2c/twl.h> | 30 | #include <linux/i2c/twl.h> |
31 | #include <linux/mfd/twl4030-codec.h> | 31 | #include <linux/mfd/twl4030-audio.h> |
32 | #include <linux/input.h> | 32 | #include <linux/input.h> |
33 | #include <linux/slab.h> | 33 | #include <linux/slab.h> |
34 | 34 | ||
@@ -67,7 +67,7 @@ static void vibra_enable(struct vibra_info *info) | |||
67 | { | 67 | { |
68 | u8 reg; | 68 | u8 reg; |
69 | 69 | ||
70 | twl4030_codec_enable_resource(TWL4030_CODEC_RES_POWER); | 70 | twl4030_audio_enable_resource(TWL4030_AUDIO_RES_POWER); |
71 | 71 | ||
72 | /* turn H-Bridge on */ | 72 | /* turn H-Bridge on */ |
73 | twl_i2c_read_u8(TWL4030_MODULE_AUDIO_VOICE, | 73 | twl_i2c_read_u8(TWL4030_MODULE_AUDIO_VOICE, |
@@ -75,7 +75,7 @@ static void vibra_enable(struct vibra_info *info) | |||
75 | twl_i2c_write_u8(TWL4030_MODULE_AUDIO_VOICE, | 75 | twl_i2c_write_u8(TWL4030_MODULE_AUDIO_VOICE, |
76 | (reg | TWL4030_VIBRA_EN), TWL4030_REG_VIBRA_CTL); | 76 | (reg | TWL4030_VIBRA_EN), TWL4030_REG_VIBRA_CTL); |
77 | 77 | ||
78 | twl4030_codec_enable_resource(TWL4030_CODEC_RES_APLL); | 78 | twl4030_audio_enable_resource(TWL4030_AUDIO_RES_APLL); |
79 | 79 | ||
80 | info->enabled = true; | 80 | info->enabled = true; |
81 | } | 81 | } |
@@ -90,8 +90,8 @@ static void vibra_disable(struct vibra_info *info) | |||
90 | twl_i2c_write_u8(TWL4030_MODULE_AUDIO_VOICE, | 90 | twl_i2c_write_u8(TWL4030_MODULE_AUDIO_VOICE, |
91 | (reg & ~TWL4030_VIBRA_EN), TWL4030_REG_VIBRA_CTL); | 91 | (reg & ~TWL4030_VIBRA_EN), TWL4030_REG_VIBRA_CTL); |
92 | 92 | ||
93 | twl4030_codec_disable_resource(TWL4030_CODEC_RES_APLL); | 93 | twl4030_audio_disable_resource(TWL4030_AUDIO_RES_APLL); |
94 | twl4030_codec_disable_resource(TWL4030_CODEC_RES_POWER); | 94 | twl4030_audio_disable_resource(TWL4030_AUDIO_RES_POWER); |
95 | 95 | ||
96 | info->enabled = false; | 96 | info->enabled = false; |
97 | } | 97 | } |
diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig index 0f09c057e796..3a6f76aac008 100644 --- a/drivers/mfd/Kconfig +++ b/drivers/mfd/Kconfig | |||
@@ -218,7 +218,7 @@ config TWL4030_POWER | |||
218 | and load scripts controlling which resources are switched off/on | 218 | and load scripts controlling which resources are switched off/on |
219 | or reset when a sleep, wakeup or warm reset event occurs. | 219 | or reset when a sleep, wakeup or warm reset event occurs. |
220 | 220 | ||
221 | config TWL4030_CODEC | 221 | config MFD_TWL4030_AUDIO |
222 | bool | 222 | bool |
223 | depends on TWL4030_CORE | 223 | depends on TWL4030_CORE |
224 | select MFD_CORE | 224 | select MFD_CORE |
diff --git a/drivers/mfd/Makefile b/drivers/mfd/Makefile index efe3cc33ed92..4cf946537e39 100644 --- a/drivers/mfd/Makefile +++ b/drivers/mfd/Makefile | |||
@@ -40,7 +40,7 @@ obj-$(CONFIG_MENELAUS) += menelaus.o | |||
40 | obj-$(CONFIG_TWL4030_CORE) += twl-core.o twl4030-irq.o twl6030-irq.o | 40 | obj-$(CONFIG_TWL4030_CORE) += twl-core.o twl4030-irq.o twl6030-irq.o |
41 | obj-$(CONFIG_TWL4030_MADC) += twl4030-madc.o | 41 | obj-$(CONFIG_TWL4030_MADC) += twl4030-madc.o |
42 | obj-$(CONFIG_TWL4030_POWER) += twl4030-power.o | 42 | obj-$(CONFIG_TWL4030_POWER) += twl4030-power.o |
43 | obj-$(CONFIG_TWL4030_CODEC) += twl4030-codec.o | 43 | obj-$(CONFIG_MFD_TWL4030_AUDIO) += twl4030-audio.o |
44 | obj-$(CONFIG_TWL6030_PWM) += twl6030-pwm.o | 44 | obj-$(CONFIG_TWL6030_PWM) += twl6030-pwm.o |
45 | 45 | ||
46 | obj-$(CONFIG_MFD_MC13XXX) += mc13xxx-core.o | 46 | obj-$(CONFIG_MFD_MC13XXX) += mc13xxx-core.o |
diff --git a/drivers/mfd/twl4030-codec.c b/drivers/mfd/twl4030-audio.c index e1782b3f66a5..5cdf84146799 100644 --- a/drivers/mfd/twl4030-codec.c +++ b/drivers/mfd/twl4030-audio.c | |||
@@ -30,7 +30,7 @@ | |||
30 | #include <linux/platform_device.h> | 30 | #include <linux/platform_device.h> |
31 | #include <linux/i2c/twl.h> | 31 | #include <linux/i2c/twl.h> |
32 | #include <linux/mfd/core.h> | 32 | #include <linux/mfd/core.h> |
33 | #include <linux/mfd/twl4030-codec.h> | 33 | #include <linux/mfd/twl4030-audio.h> |
34 | 34 | ||
35 | #define TWL4030_AUDIO_CELLS 2 | 35 | #define TWL4030_AUDIO_CELLS 2 |
36 | 36 | ||
@@ -45,7 +45,7 @@ struct twl4030_audio_resource { | |||
45 | struct twl4030_audio { | 45 | struct twl4030_audio { |
46 | unsigned int audio_mclk; | 46 | unsigned int audio_mclk; |
47 | struct mutex mutex; | 47 | struct mutex mutex; |
48 | struct twl4030_audio_resource resource[TWL4030_CODEC_RES_MAX]; | 48 | struct twl4030_audio_resource resource[TWL4030_AUDIO_RES_MAX]; |
49 | struct mfd_cell cells[TWL4030_AUDIO_CELLS]; | 49 | struct mfd_cell cells[TWL4030_AUDIO_CELLS]; |
50 | }; | 50 | }; |
51 | 51 | ||
@@ -53,7 +53,7 @@ struct twl4030_audio { | |||
53 | * Modify the resource, the function returns the content of the register | 53 | * Modify the resource, the function returns the content of the register |
54 | * after the modification. | 54 | * after the modification. |
55 | */ | 55 | */ |
56 | static int twl4030_audio_set_resource(enum twl4030_codec_res id, int enable) | 56 | static int twl4030_audio_set_resource(enum twl4030_audio_res id, int enable) |
57 | { | 57 | { |
58 | struct twl4030_audio *audio = platform_get_drvdata(twl4030_audio_dev); | 58 | struct twl4030_audio *audio = platform_get_drvdata(twl4030_audio_dev); |
59 | u8 val; | 59 | u8 val; |
@@ -72,7 +72,7 @@ static int twl4030_audio_set_resource(enum twl4030_codec_res id, int enable) | |||
72 | return val; | 72 | return val; |
73 | } | 73 | } |
74 | 74 | ||
75 | static inline int twl4030_audio_get_resource(enum twl4030_codec_res id) | 75 | static inline int twl4030_audio_get_resource(enum twl4030_audio_res id) |
76 | { | 76 | { |
77 | struct twl4030_audio *audio = platform_get_drvdata(twl4030_audio_dev); | 77 | struct twl4030_audio *audio = platform_get_drvdata(twl4030_audio_dev); |
78 | u8 val; | 78 | u8 val; |
@@ -87,12 +87,12 @@ static inline int twl4030_audio_get_resource(enum twl4030_codec_res id) | |||
87 | * Enable the resource. | 87 | * Enable the resource. |
88 | * The function returns with error or the content of the register | 88 | * The function returns with error or the content of the register |
89 | */ | 89 | */ |
90 | int twl4030_codec_enable_resource(enum twl4030_codec_res id) | 90 | int twl4030_audio_enable_resource(enum twl4030_audio_res id) |
91 | { | 91 | { |
92 | struct twl4030_audio *audio = platform_get_drvdata(twl4030_audio_dev); | 92 | struct twl4030_audio *audio = platform_get_drvdata(twl4030_audio_dev); |
93 | int val; | 93 | int val; |
94 | 94 | ||
95 | if (id >= TWL4030_CODEC_RES_MAX) { | 95 | if (id >= TWL4030_AUDIO_RES_MAX) { |
96 | dev_err(&twl4030_audio_dev->dev, | 96 | dev_err(&twl4030_audio_dev->dev, |
97 | "Invalid resource ID (%u)\n", id); | 97 | "Invalid resource ID (%u)\n", id); |
98 | return -EINVAL; | 98 | return -EINVAL; |
@@ -110,18 +110,18 @@ int twl4030_codec_enable_resource(enum twl4030_codec_res id) | |||
110 | 110 | ||
111 | return val; | 111 | return val; |
112 | } | 112 | } |
113 | EXPORT_SYMBOL_GPL(twl4030_codec_enable_resource); | 113 | EXPORT_SYMBOL_GPL(twl4030_audio_enable_resource); |
114 | 114 | ||
115 | /* | 115 | /* |
116 | * Disable the resource. | 116 | * Disable the resource. |
117 | * The function returns with error or the content of the register | 117 | * The function returns with error or the content of the register |
118 | */ | 118 | */ |
119 | int twl4030_codec_disable_resource(unsigned id) | 119 | int twl4030_audio_disable_resource(unsigned id) |
120 | { | 120 | { |
121 | struct twl4030_audio *audio = platform_get_drvdata(twl4030_audio_dev); | 121 | struct twl4030_audio *audio = platform_get_drvdata(twl4030_audio_dev); |
122 | int val; | 122 | int val; |
123 | 123 | ||
124 | if (id >= TWL4030_CODEC_RES_MAX) { | 124 | if (id >= TWL4030_AUDIO_RES_MAX) { |
125 | dev_err(&twl4030_audio_dev->dev, | 125 | dev_err(&twl4030_audio_dev->dev, |
126 | "Invalid resource ID (%u)\n", id); | 126 | "Invalid resource ID (%u)\n", id); |
127 | return -EINVAL; | 127 | return -EINVAL; |
@@ -146,15 +146,15 @@ int twl4030_codec_disable_resource(unsigned id) | |||
146 | 146 | ||
147 | return val; | 147 | return val; |
148 | } | 148 | } |
149 | EXPORT_SYMBOL_GPL(twl4030_codec_disable_resource); | 149 | EXPORT_SYMBOL_GPL(twl4030_audio_disable_resource); |
150 | 150 | ||
151 | unsigned int twl4030_codec_get_mclk(void) | 151 | unsigned int twl4030_audio_get_mclk(void) |
152 | { | 152 | { |
153 | struct twl4030_audio *audio = platform_get_drvdata(twl4030_audio_dev); | 153 | struct twl4030_audio *audio = platform_get_drvdata(twl4030_audio_dev); |
154 | 154 | ||
155 | return audio->audio_mclk; | 155 | return audio->audio_mclk; |
156 | } | 156 | } |
157 | EXPORT_SYMBOL_GPL(twl4030_codec_get_mclk); | 157 | EXPORT_SYMBOL_GPL(twl4030_audio_get_mclk); |
158 | 158 | ||
159 | static int __devinit twl4030_audio_probe(struct platform_device *pdev) | 159 | static int __devinit twl4030_audio_probe(struct platform_device *pdev) |
160 | { | 160 | { |
@@ -199,12 +199,12 @@ static int __devinit twl4030_audio_probe(struct platform_device *pdev) | |||
199 | audio->audio_mclk = pdata->audio_mclk; | 199 | audio->audio_mclk = pdata->audio_mclk; |
200 | 200 | ||
201 | /* Codec power */ | 201 | /* Codec power */ |
202 | audio->resource[TWL4030_CODEC_RES_POWER].reg = TWL4030_REG_CODEC_MODE; | 202 | audio->resource[TWL4030_AUDIO_RES_POWER].reg = TWL4030_REG_CODEC_MODE; |
203 | audio->resource[TWL4030_CODEC_RES_POWER].mask = TWL4030_CODECPDZ; | 203 | audio->resource[TWL4030_AUDIO_RES_POWER].mask = TWL4030_CODECPDZ; |
204 | 204 | ||
205 | /* PLL */ | 205 | /* PLL */ |
206 | audio->resource[TWL4030_CODEC_RES_APLL].reg = TWL4030_REG_APLL_CTL; | 206 | audio->resource[TWL4030_AUDIO_RES_APLL].reg = TWL4030_REG_APLL_CTL; |
207 | audio->resource[TWL4030_CODEC_RES_APLL].mask = TWL4030_APLL_EN; | 207 | audio->resource[TWL4030_AUDIO_RES_APLL].mask = TWL4030_APLL_EN; |
208 | 208 | ||
209 | if (pdata->audio) { | 209 | if (pdata->audio) { |
210 | cell = &audio->cells[childs]; | 210 | cell = &audio->cells[childs]; |
@@ -275,4 +275,3 @@ module_exit(twl4030_audio_exit); | |||
275 | 275 | ||
276 | MODULE_AUTHOR("Peter Ujfalusi <peter.ujfalusi@ti.com>"); | 276 | MODULE_AUTHOR("Peter Ujfalusi <peter.ujfalusi@ti.com>"); |
277 | MODULE_LICENSE("GPL"); | 277 | MODULE_LICENSE("GPL"); |
278 | |||