[PATCH] gpio: omap: Fix missing raw locks conversion

2015-08-05 Thread Axel Lin
Fix below build warning:
  CC  drivers/gpio/gpio-omap.o
drivers/gpio/gpio-omap.c: In function 'omap_gpio_irq_type':
drivers/gpio/gpio-omap.c:504:3: warning: passing argument 1 of 
'spin_unlock_irqrestore' from incompatible pointer type [enabled by default]
include/linux/spinlock.h:360:29: note: expected 'struct spinlock_t *' but 
argument is of type 'struct raw_spinlock_t *'

Fixes: commit 4dbada2be460 ("gpio: omap: use raw locks for locking")
Signed-off-by: Axel Lin 
---
 drivers/gpio/gpio-omap.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c
index dba67b2..466fe70 100644
--- a/drivers/gpio/gpio-omap.c
+++ b/drivers/gpio/gpio-omap.c
@@ -501,7 +501,7 @@ static int omap_gpio_irq_type(struct irq_data *d, unsigned 
type)
raw_spin_lock_irqsave(&bank->lock, flags);
retval = omap_set_gpio_triggering(bank, offset, type);
if (retval) {
-   spin_unlock_irqrestore(&bank->lock, flags);
+   raw_spin_unlock_irqrestore(&bank->lock, flags);
goto error;
}
omap_gpio_init_irq(bank, offset);
-- 
2.1.0



--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] mfd: twl6040: Remove wrong and unneeded "platform:twl6040" modalias

2015-03-30 Thread Axel Lin
This is a I2C driver, so it's wrong to use platform prefix for the
modalias. We have all needed i2c aliases coming form MODULE_DEVICE_TABLE,
so let's remove the wrong and unneeded "platform:twl6040" modalias.

Signed-off-by: Axel Lin 
---
 drivers/mfd/twl6040.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/mfd/twl6040.c b/drivers/mfd/twl6040.c
index f71ee3d..c5265c1 100644
--- a/drivers/mfd/twl6040.c
+++ b/drivers/mfd/twl6040.c
@@ -814,4 +814,3 @@ MODULE_DESCRIPTION("TWL6040 MFD");
 MODULE_AUTHOR("Misael Lopez Cruz ");
 MODULE_AUTHOR("Jorge Eduardo Candelaria ");
 MODULE_LICENSE("GPL");
-MODULE_ALIAS("platform:twl6040");
-- 
1.9.1



--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v2] mmc: omap: Use DIV_ROUND_UP instead of open coded

2014-05-02 Thread Axel Lin
Also uses NSEC_PER_SEC and USEC_PER_SEC instead of hard-coded value.
This makes the intention more clear.

Signed-off-by: Axel Lin 
---
 drivers/mmc/host/omap.c | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/mmc/host/omap.c b/drivers/mmc/host/omap.c
index 5c2e58b..81974ec 100644
--- a/drivers/mmc/host/omap.c
+++ b/drivers/mmc/host/omap.c
@@ -177,7 +177,7 @@ static void mmc_omap_fclk_offdelay(struct mmc_omap_slot 
*slot)
unsigned long tick_ns;
 
if (slot != NULL && slot->host->fclk_enabled && slot->fclk_freq > 0) {
-   tick_ns = (10 + slot->fclk_freq - 1) / slot->fclk_freq;
+   tick_ns = DIV_ROUND_UP(NSEC_PER_SEC, slot->fclk_freq);
ndelay(8 * tick_ns);
}
 }
@@ -435,7 +435,7 @@ static void mmc_omap_send_stop_work(struct work_struct 
*work)
struct mmc_data *data = host->stop_data;
unsigned long tick_ns;
 
-   tick_ns = (10 + slot->fclk_freq - 1)/slot->fclk_freq;
+   tick_ns = DIV_ROUND_UP(NSEC_PER_SEC, slot->fclk_freq);
ndelay(8*tick_ns);
 
mmc_omap_start_command(host, data->stop);
@@ -477,7 +477,7 @@ mmc_omap_send_abort(struct mmc_omap_host *host, int 
maxloops)
u16 stat = 0;
 
/* Sending abort takes 80 clocks. Have some extra and round up */
-   timeout = (120*100 + slot->fclk_freq - 1)/slot->fclk_freq;
+   timeout = DIV_ROUND_UP(120 * USEC_PER_SEC, slot->fclk_freq);
restarts = 0;
while (restarts < maxloops) {
OMAP_MMC_WRITE(host, STAT, 0x);
@@ -677,8 +677,8 @@ mmc_omap_xfer_data(struct mmc_omap_host *host, int write)
if (n > host->buffer_bytes_left)
n = host->buffer_bytes_left;
 
-   nwords = n / 2;
-   nwords += n & 1; /* handle odd number of bytes to transfer */
+   /* Round up to handle odd number of bytes to transfer */
+   nwords = DIV_ROUND_UP(n, 2);
 
host->buffer_bytes_left -= n;
host->total_bytes_left -= n;
-- 
1.8.3.2



--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] mmc: omap: Use DIV_ROUND_UP instead of open coded

2014-04-27 Thread Axel Lin
This also makes the intention more clear.

Signed-off-by: Axel Lin 
---
 drivers/mmc/host/omap.c | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/mmc/host/omap.c b/drivers/mmc/host/omap.c
index 5c2e58b..711981e 100644
--- a/drivers/mmc/host/omap.c
+++ b/drivers/mmc/host/omap.c
@@ -177,7 +177,7 @@ static void mmc_omap_fclk_offdelay(struct mmc_omap_slot 
*slot)
unsigned long tick_ns;
 
if (slot != NULL && slot->host->fclk_enabled && slot->fclk_freq > 0) {
-   tick_ns = (10 + slot->fclk_freq - 1) / slot->fclk_freq;
+   tick_ns = DIV_ROUND_UP(10, slot->fclk_freq);
ndelay(8 * tick_ns);
}
 }
@@ -435,7 +435,7 @@ static void mmc_omap_send_stop_work(struct work_struct 
*work)
struct mmc_data *data = host->stop_data;
unsigned long tick_ns;
 
-   tick_ns = (10 + slot->fclk_freq - 1)/slot->fclk_freq;
+   tick_ns = DIV_ROUND_UP(10, slot->fclk_freq);
ndelay(8*tick_ns);
 
mmc_omap_start_command(host, data->stop);
@@ -477,7 +477,7 @@ mmc_omap_send_abort(struct mmc_omap_host *host, int 
maxloops)
u16 stat = 0;
 
/* Sending abort takes 80 clocks. Have some extra and round up */
-   timeout = (120*100 + slot->fclk_freq - 1)/slot->fclk_freq;
+   timeout = DIV_ROUND_UP(120 * 100, slot->fclk_freq);
restarts = 0;
while (restarts < maxloops) {
OMAP_MMC_WRITE(host, STAT, 0x);
@@ -677,8 +677,8 @@ mmc_omap_xfer_data(struct mmc_omap_host *host, int write)
if (n > host->buffer_bytes_left)
n = host->buffer_bytes_left;
 
-   nwords = n / 2;
-   nwords += n & 1; /* handle odd number of bytes to transfer */
+   /* Round up to handle odd number of bytes to transfer */
+   nwords = DIV_ROUND_UP(n, 2);
 
host->buffer_bytes_left -= n;
host->total_bytes_left -= n;
-- 
1.8.3.2



--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] mmc: omap: Use DIV_ROUND_UP instead of open coded

2013-09-01 Thread Axel Lin
This patch makes the intention of the code more clear.

Signed-off-by: Axel Lin 
---
 drivers/mmc/host/omap.c | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/mmc/host/omap.c b/drivers/mmc/host/omap.c
index b94f38e..3187af0 100644
--- a/drivers/mmc/host/omap.c
+++ b/drivers/mmc/host/omap.c
@@ -189,7 +189,7 @@ static void mmc_omap_fclk_offdelay(struct mmc_omap_slot 
*slot)
unsigned long tick_ns;
 
if (slot != NULL && slot->host->fclk_enabled && slot->fclk_freq > 0) {
-   tick_ns = (10 + slot->fclk_freq - 1) / slot->fclk_freq;
+   tick_ns = DIV_ROUND_UP(10, slot->fclk_freq);
ndelay(8 * tick_ns);
}
 }
@@ -444,7 +444,7 @@ static void mmc_omap_send_stop_work(struct work_struct 
*work)
struct mmc_data *data = host->stop_data;
unsigned long tick_ns;
 
-   tick_ns = (10 + slot->fclk_freq - 1)/slot->fclk_freq;
+   tick_ns = DIV_ROUND_UP(10, slot->fclk_freq);
ndelay(8*tick_ns);
 
mmc_omap_start_command(host, data->stop);
@@ -486,7 +486,7 @@ mmc_omap_send_abort(struct mmc_omap_host *host, int 
maxloops)
u16 stat = 0;
 
/* Sending abort takes 80 clocks. Have some extra and round up */
-   timeout = (120*100 + slot->fclk_freq - 1)/slot->fclk_freq;
+   timeout = DIV_ROUND_UP(120 * 100, slot->fclk_freq);
restarts = 0;
while (restarts < maxloops) {
OMAP_MMC_WRITE(host, STAT, 0x);
@@ -686,8 +686,8 @@ mmc_omap_xfer_data(struct mmc_omap_host *host, int write)
if (n > host->buffer_bytes_left)
n = host->buffer_bytes_left;
 
-   nwords = n / 2;
-   nwords += n & 1; /* handle odd number of bytes to transfer */
+   /* Round up to handle odd number of bytes to transfer */
+   nwords = DIV_ROUND_UP(n, 2);
 
host->buffer_bytes_left -= n;
host->total_bytes_left -= n;
-- 
1.8.1.2



--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] ARM: OMAP2: reboot: Include common.h to fix build error

2013-06-19 Thread Axel Lin
Include common.h which will include linux/reboot.h to fix below build error.

  CC  arch/arm/mach-omap2/omap4-restart.o
arch/arm/mach-omap2/omap4-restart.c:21:28: warning: 'enum reboot_mode' declared 
inside parameter list [enabled by default]
arch/arm/mach-omap2/omap4-restart.c:21:28: warning: its scope is only this 
definition or declaration, which is probably not what you want [enabled by 
default]
arch/arm/mach-omap2/omap4-restart.c:21:40: error: parameter 1 ('mode') has 
incomplete type
arch/arm/mach-omap2/omap4-restart.c:21:6: warning: function declaration isn't a 
prototype [-Wstrict-prototypes]
make[1]: *** [arch/arm/mach-omap2/omap4-restart.o] Error 1
make: *** [arch/arm/mach-omap2] Error 2

Signed-off-by: Axel Lin 
---
Seems this build error is introduced by commit 7507d035f3cf40c
"reboot: arm: change reboot_mode to use enum reboot_mode"

This patch is against linux-next 20130619.

 arch/arm/mach-omap2/omap4-restart.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/mach-omap2/omap4-restart.c 
b/arch/arm/mach-omap2/omap4-restart.c
index 652adde..7306d9b 100644
--- a/arch/arm/mach-omap2/omap4-restart.c
+++ b/arch/arm/mach-omap2/omap4-restart.c
@@ -9,6 +9,7 @@
 
 #include 
 #include "prminst44xx.h"
+#include "common.h"
 
 /**
  * omap44xx_restart - trigger a software restart of the SoC
-- 
1.8.1.2



--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] mmc: omap_hsmmc: Prevent potential NULL dereference

2013-03-18 Thread Axel Lin
of_get_hsmmc_pdata() may return NULL, thus ensure pdata is not NULL
before dereference it.

Signed-off-by: Axel Lin 
---
 drivers/mmc/host/omap_hsmmc.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
index bc58078..a8f9717 100644
--- a/drivers/mmc/host/omap_hsmmc.c
+++ b/drivers/mmc/host/omap_hsmmc.c
@@ -1774,7 +1774,7 @@ static int omap_hsmmc_probe(struct platform_device *pdev)
match = of_match_device(of_match_ptr(omap_mmc_of_match), &pdev->dev);
if (match) {
pdata = of_get_hsmmc_pdata(&pdev->dev);
-   if (match->data) {
+   if (pdata && match->data) {
const u16 *offsetp = match->data;
pdata->reg_offset = *offsetp;
}
-- 
1.7.9.5



--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] OMAPDSS: Add terminating entry for picodlp_i2c_id table

2012-11-29 Thread Axel Lin
The i2c_device_id table is supposed to be zero-terminated.

Signed-off-by: Axel Lin 
---
 drivers/video/omap2/displays/panel-picodlp.c |1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/video/omap2/displays/panel-picodlp.c 
b/drivers/video/omap2/displays/panel-picodlp.c
index e3a6c19..1b94018 100644
--- a/drivers/video/omap2/displays/panel-picodlp.c
+++ b/drivers/video/omap2/displays/panel-picodlp.c
@@ -50,6 +50,7 @@ struct picodlp_i2c_data {
 
 static struct i2c_device_id picodlp_i2c_id[] = {
{ "picodlp_i2c_driver", 0 },
+   { }
 };
 
 struct picodlp_i2c_command {
-- 
1.7.9.5



--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v2] ARM: OMAP: Fix dependency for OMAP_DEBUG_LEDS

2012-10-07 Thread Axel Lin
This fixes below build error when CONFIG_LEDS_CLASS is not set.

  LD  init/built-in.o
arch/arm/plat-omap/built-in.o: In function `fpga_probe':
arch/arm/plat-omap/debug-leds.c:113: undefined reference to 
`led_classdev_register'
arch/arm/plat-omap/debug-leds.c:113: undefined reference to 
`led_classdev_register'
arch/arm/plat-omap/debug-leds.c:113: undefined reference to 
`led_classdev_register'
arch/arm/plat-omap/debug-leds.c:113: undefined reference to 
`led_classdev_register'
arch/arm/plat-omap/debug-leds.c:113: undefined reference to 
`led_classdev_register'
arch/arm/plat-omap/built-in.o:arch/arm/plat-omap/debug-leds.c:113: more 
undefined references to `led_classdev_register' follow
make: *** [vmlinux] Error 1

Signed-off-by: Axel Lin 
---
 arch/arm/plat-omap/Kconfig |1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/plat-omap/Kconfig b/arch/arm/plat-omap/Kconfig
index ca83a76..c262781 100644
--- a/arch/arm/plat-omap/Kconfig
+++ b/arch/arm/plat-omap/Kconfig
@@ -43,6 +43,7 @@ config OMAP_DEBUG_DEVICES
 
 config OMAP_DEBUG_LEDS
def_bool y if NEW_LEDS
+   select LEDS_CLASS
depends on OMAP_DEBUG_DEVICES
 
 config POWER_AVS_OMAP
-- 
1.7.9.5



--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] ARM: OMAP: Fix dependency for OMAP_DEBUG_LEDS

2012-10-07 Thread Axel Lin
This fixes below build error:
  LD  init/built-in.o
arch/arm/plat-omap/built-in.o: In function `fpga_probe':
arch/arm/plat-omap/debug-leds.c:113: undefined reference to 
`led_classdev_register'
arch/arm/plat-omap/debug-leds.c:113: undefined reference to 
`led_classdev_register'
arch/arm/plat-omap/debug-leds.c:113: undefined reference to 
`led_classdev_register'
arch/arm/plat-omap/debug-leds.c:113: undefined reference to 
`led_classdev_register'
arch/arm/plat-omap/debug-leds.c:113: undefined reference to 
`led_classdev_register'
arch/arm/plat-omap/built-in.o:arch/arm/plat-omap/debug-leds.c:113: more 
undefined references to `led_classdev_register' follow
make: *** [vmlinux] Error 1

Signed-off-by: Axel Lin 
---
Hi Bryan,
I think this issue is introduced by commit dafbead
"ARM: mach-omap1: retire custom LED code".

Regards,
Axel

 arch/arm/plat-omap/Kconfig |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/plat-omap/Kconfig b/arch/arm/plat-omap/Kconfig
index ca83a76..3281377 100644
--- a/arch/arm/plat-omap/Kconfig
+++ b/arch/arm/plat-omap/Kconfig
@@ -42,7 +42,7 @@ config OMAP_DEBUG_DEVICES
  For debug cards on TI reference boards.
 
 config OMAP_DEBUG_LEDS
-   def_bool y if NEW_LEDS
+   default y if LEDS_CLASS
depends on OMAP_DEBUG_DEVICES
 
 config POWER_AVS_OMAP
-- 
1.7.9.5



--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] ARM: OMAP: OMAP_DEBUG_LEDS needs to select LEDS_CLASS

2012-09-17 Thread Axel Lin
2012/9/18 Bryan Wu :
> On Tue, Sep 18, 2012 at 11:30 AM, Axel Lin  wrote:
>> This fixes below build error when CONFIG_LEDS_CLASS is not set.
>>
>>   LD  init/built-in.o
>> arch/arm/plat-omap/built-in.o: In function `fpga_probe':
>> arch/arm/plat-omap/debug-leds.c:113: undefined reference to 
>> `led_classdev_register'
>> make: *** [vmlinux] Error 1
>>
>
> Thanks for posting this. But I think Tony has already fixed it in mainline:
> --
> commit 359f64f7b3997e94ee71039b5fcdc1278b9b77c4
> Author: Tony Lindgren 
> Date:   Wed Sep 15 10:18:51 2010 -0700
>
> omap: Fix compile dependency to LEDS_CLASS
>
> If we LEDS_CLASS is not selected, we will get undefined reference
> to `led_classdev_register'.
>
> Signed-off-by: Tony Lindgren 

Commit 359f64f7b was commited on Sep 15 2010.
This patch is against current linux-next tree.
I got the build error on linux-next tree (next-20120917).

Regards,
Axel
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] ARM: OMAP: OMAP_DEBUG_LEDS needs to select LEDS_CLASS

2012-09-17 Thread Axel Lin
This fixes below build error when CONFIG_LEDS_CLASS is not set.

  LD  init/built-in.o
arch/arm/plat-omap/built-in.o: In function `fpga_probe':
arch/arm/plat-omap/debug-leds.c:113: undefined reference to 
`led_classdev_register'
make: *** [vmlinux] Error 1

Signed-off-by: Axel Lin 
---
 arch/arm/plat-omap/Kconfig |1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/plat-omap/Kconfig b/arch/arm/plat-omap/Kconfig
index ca83a76..c262781 100644
--- a/arch/arm/plat-omap/Kconfig
+++ b/arch/arm/plat-omap/Kconfig
@@ -43,6 +43,7 @@ config OMAP_DEBUG_DEVICES
 
 config OMAP_DEBUG_LEDS
def_bool y if NEW_LEDS
+   select LEDS_CLASS
depends on OMAP_DEBUG_DEVICES
 
 config POWER_AVS_OMAP
-- 
1.7.9.5



--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] cpufreq: OMAP: Check IS_ERR() instead of NULL for omap_device_get_by_hwmod_name

2012-09-17 Thread Axel Lin
omap_device_get_by_hwmod_name() returns ERR_PTR on error.

Signed-off-by: Axel Lin 
---
 drivers/cpufreq/omap-cpufreq.c |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/cpufreq/omap-cpufreq.c b/drivers/cpufreq/omap-cpufreq.c
index 6e22f44..65f8e9a 100644
--- a/drivers/cpufreq/omap-cpufreq.c
+++ b/drivers/cpufreq/omap-cpufreq.c
@@ -266,9 +266,9 @@ static int __init omap_cpufreq_init(void)
}
 
mpu_dev = omap_device_get_by_hwmod_name("mpu");
-   if (!mpu_dev) {
+   if (IS_ERR(mpu_dev)) {
pr_warning("%s: unable to get the mpu device\n", __func__);
-   return -EINVAL;
+   return PTR_ERR(mpu_dev);
}
 
mpu_reg = regulator_get(mpu_dev, "vcc");
-- 
1.7.9.5



--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 5/6] regulator: twl: Remove get_voltage implementation for single voltage regulators

2012-08-09 Thread Axel Lin
This is not required after commit f7df20ec
"regulator: core: Use list_voltage() to read single voltage regulators"

Signed-off-by: Axel Lin 
---
 drivers/regulator/twl-regulator.c |   11 ---
 1 file changed, 11 deletions(-)

diff --git a/drivers/regulator/twl-regulator.c 
b/drivers/regulator/twl-regulator.c
index f2f49e2..2d9a2a8 100644
--- a/drivers/regulator/twl-regulator.c
+++ b/drivers/regulator/twl-regulator.c
@@ -624,18 +624,9 @@ static int twlfixed_list_voltage(struct regulator_dev 
*rdev, unsigned index)
return info->min_mV * 1000;
 }
 
-static int twlfixed_get_voltage(struct regulator_dev *rdev)
-{
-   struct twlreg_info  *info = rdev_get_drvdata(rdev);
-
-   return info->min_mV * 1000;
-}
-
 static struct regulator_ops twl4030fixed_ops = {
.list_voltage   = twlfixed_list_voltage,
 
-   .get_voltage= twlfixed_get_voltage,
-
.enable = twl4030reg_enable,
.disable= twl4030reg_disable,
.is_enabled = twl4030reg_is_enabled,
@@ -648,8 +639,6 @@ static struct regulator_ops twl4030fixed_ops = {
 static struct regulator_ops twl6030fixed_ops = {
.list_voltage   = twlfixed_list_voltage,
 
-   .get_voltage= twlfixed_get_voltage,
-
.enable = twl6030reg_enable,
.disable= twl6030reg_disable,
.is_enabled = twl6030reg_is_enabled,
-- 
1.7.9.5



--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH RFT] regulator: twl: Fix list_voltate for twl6030ldo_ops

2012-07-16 Thread Axel Lin
According to the datasheet, the voltage for twl6030ldo_ops is not linear for
all cases. Linear mapping is only for the selection code from
0001 to 00011000.

Table 9. LDO Output Voltage Selection Code
CODE VOUT(V)COD  VOUT(V)CODE VOUT(V)CODE VOUT(V)
 0  1000 1.70001 2.500011000 3.3
0001 1.01001 1.800010001 2.600011001 Reserved
0010 1.11010 1.900010010 2.700011010 Reserved
0011 1.21011 2.000010011 2.800011011 Reserved
0100 1.31100 2.100010100 2.900011100 Reserved
0101 1.41101 2.200010101 3.000011101 Reserved
0110 1.51110 2.300010110 3.10000 Reserved
0111 1.6 2.400010111 3.20001 2.75

This patch implements the list_voltage callback based on above table.

Signed-off-by: Axel Lin 
---
 drivers/regulator/twl-regulator.c |   31 ---
 1 file changed, 24 insertions(+), 7 deletions(-)

diff --git a/drivers/regulator/twl-regulator.c 
b/drivers/regulator/twl-regulator.c
index de99b78..242fe90 100644
--- a/drivers/regulator/twl-regulator.c
+++ b/drivers/regulator/twl-regulator.c
@@ -559,6 +559,27 @@ static struct regulator_ops twl6030coresmps_ops = {
.get_voltage= twl6030coresmps_get_voltage,
 };
 
+static int twl6030ldo_list_voltage(struct regulator_dev *rdev, unsigned sel)
+{
+   struct twlreg_info *info = rdev_get_drvdata(rdev);
+
+   switch (sel) {
+   case 0:
+   return 0;
+   case 1 ... 24:
+   /* Linear mapping from 0001 to 00011000:
+* Absolute voltage value = 1.0 V + 0.1 V × (sel – 0001)
+*/
+   return (info->min_mV + 100 * (sel - 1)) * 1000;
+   case 25 ... 30:
+   return -EINVAL;
+   case 31:
+   return 275;
+   default:
+   return -EINVAL;
+   }
+}
+
 static int
 twl6030ldo_set_voltage_sel(struct regulator_dev *rdev, unsigned selector)
 {
@@ -577,7 +598,7 @@ static int twl6030ldo_get_voltage_sel(struct regulator_dev 
*rdev)
 }
 
 static struct regulator_ops twl6030ldo_ops = {
-   .list_voltage   = regulator_list_voltage_linear,
+   .list_voltage   = twl6030ldo_list_voltage,
 
.set_voltage_sel = twl6030ldo_set_voltage_sel,
.get_voltage_sel = twl6030ldo_get_voltage_sel,
@@ -906,12 +927,10 @@ static struct twlreg_info TWL6030_INFO_##label = { \
.desc = { \
.name = #label, \
.id = TWL6030_REG_##label, \
-   .n_voltages = (max_mVolts - min_mVolts)/100 + 1, \
+   .n_voltages = 32, \
.ops = &twl6030ldo_ops, \
.type = REGULATOR_VOLTAGE, \
.owner = THIS_MODULE, \
-   .min_uV = min_mVolts * 1000, \
-   .uV_step = 100 * 1000, \
}, \
}
 
@@ -923,12 +942,10 @@ static struct twlreg_info TWL6025_INFO_##label = { \
.desc = { \
.name = #label, \
.id = TWL6025_REG_##label, \
-   .n_voltages = ((max_mVolts - min_mVolts)/100) + 1, \
+   .n_voltages = 32, \
.ops = &twl6030ldo_ops, \
.type = REGULATOR_VOLTAGE, \
.owner = THIS_MODULE, \
-   .min_uV = min_mVolts * 1000, \
-   .uV_step = 100 * 1000, \
}, \
}
 
-- 
1.7.9.5



--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH RFT 1/2] regulator: twl: Fix the formula to calculate vsel and voltage for twl6030ldo

2012-07-16 Thread Axel Lin

> On Monday 09 July 2012 04:31 PM, Axel Lin wrote:
> > 於 一,2012-07-09 於 11:22 +0800,Axel Lin 提到:
> >> In twl6030ldo_set_voltage, current code use below formula to calculate 
> >> vsel:
> >>  vsel = (min_uV/1000 - 1000)/100 + 1;
> >> This is worng because when min_uV is 100 uV, vsel is 1.
> >> It should be 0 in this case.
> 
> Why? Do you know of any documentation which states this?

I double check with the datasheet again now.
You are right in this. So we cannot use linear mapping for
twl6030ldo_ops here.
I'm going to send a patch to fix it, I'd appreciate if someone can
review and test it.


> > I found a problem that before commit 3e3d3be79c, the voltage tables were
> > not linear mapping. So why we can convert these voltage mapping table to
> > Voltage(in mV) = 1000mv + 100mv * (vsel - 1)?
> >
> > Did I miss something?
> 
> All voltage tables before commit '3e3d3be79c' for twl6030 regulators
> were clearly wrong. They assumed similarity with twl4030 regulators
> which was not right.

Good to know that. 
Thanks,
Axel
> 
> regards,
> Rajendra
> 
> >
> > Regards,
> > Axel
> >
> >
> 


--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] ASoC: Fix build error in sound/soc/omap/n810.c

2012-02-09 Thread Axel Lin
Fix below build error which is introduced by
commit 022658 "ASoC: core: Add support for DAI and machine kcontrols".

  CC [M]  sound/soc/omap/n810.o
sound/soc/omap/n810.c: In function 'n810_set_input':
sound/soc/omap/n810.c:194: error: 'codec' undeclared (first use in this 
function)
sound/soc/omap/n810.c:194: error: (Each undeclared identifier is reported only 
once
sound/soc/omap/n810.c:194: error: for each function it appears in.)
sound/soc/omap/n810.c:188: warning: unused variable 'card'
make[3]: *** [sound/soc/omap/n810.o] Error 1
make[2]: *** [sound/soc/omap] Error 2
make[1]: *** [sound/soc] Error 2
make: *** [sound] Error 2

Signed-off-by: Axel Lin 
---
 sound/soc/omap/n810.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/sound/soc/omap/n810.c b/sound/soc/omap/n810.c
index 1490227..c292bf0 100644
--- a/sound/soc/omap/n810.c
+++ b/sound/soc/omap/n810.c
@@ -191,7 +191,7 @@ static int n810_set_input(struct snd_kcontrol *kcontrol,
return 0;
 
n810_dmic_func = ucontrol->value.integer.value[0];
-   n810_ext_control(codec);
+   n810_ext_control(&card->dapm);
 
return 1;
 }
-- 
1.7.5.4



--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] video: convert drivers/video/* to use module_spi_driver()

2012-01-27 Thread Axel Lin
This patch converts the drivers in drivers/video/* to use the
module_spi_driver() macro which makes the code smaller and a bit simpler.

Signed-off-by: Axel Lin 
Cc: Imre Deak 
Cc: Roger Quadros 
Cc: Steve Sakoman 
Cc: Erik Gilling 
Cc: Gražvydas Ignotas 
---
 drivers/video/omap/lcd_mipid.c |   14 +-
 drivers/video/omap2/displays/panel-acx565akm.c |   13 +
 .../omap2/displays/panel-lgphilips-lb035q02.c  |   12 +---
 .../omap2/displays/panel-nec-nl8048hl11-01b.c  |   12 +---
 .../video/omap2/displays/panel-tpo-td043mtea1.c|   13 +
 5 files changed, 5 insertions(+), 59 deletions(-)

diff --git a/drivers/video/omap/lcd_mipid.c b/drivers/video/omap/lcd_mipid.c
index 8d546dd..e3880c4 100644
--- a/drivers/video/omap/lcd_mipid.c
+++ b/drivers/video/omap/lcd_mipid.c
@@ -609,19 +609,7 @@ static struct spi_driver mipid_spi_driver = {
.remove = __devexit_p(mipid_spi_remove),
 };
 
-static int __init mipid_drv_init(void)
-{
-   spi_register_driver(&mipid_spi_driver);
-
-   return 0;
-}
-module_init(mipid_drv_init);
-
-static void __exit mipid_drv_cleanup(void)
-{
-   spi_unregister_driver(&mipid_spi_driver);
-}
-module_exit(mipid_drv_cleanup);
+module_spi_driver(mipid_spi_driver);
 
 MODULE_DESCRIPTION("MIPI display driver");
 MODULE_LICENSE("GPL");
diff --git a/drivers/video/omap2/displays/panel-acx565akm.c 
b/drivers/video/omap2/displays/panel-acx565akm.c
index 51a87e1..d26f37a 100644
--- a/drivers/video/omap2/displays/panel-acx565akm.c
+++ b/drivers/video/omap2/displays/panel-acx565akm.c
@@ -809,18 +809,7 @@ static struct spi_driver acx565akm_spi_driver = {
.remove = __devexit_p(acx565akm_spi_remove),
 };
 
-static int __init acx565akm_init(void)
-{
-   return spi_register_driver(&acx565akm_spi_driver);
-}
-
-static void __exit acx565akm_exit(void)
-{
-   spi_unregister_driver(&acx565akm_spi_driver);
-}
-
-module_init(acx565akm_init);
-module_exit(acx565akm_exit);
+module_spi_driver(acx565akm_spi_driver);
 
 MODULE_AUTHOR("Nokia Corporation");
 MODULE_DESCRIPTION("acx565akm LCD Driver");
diff --git a/drivers/video/omap2/displays/panel-lgphilips-lb035q02.c 
b/drivers/video/omap2/displays/panel-lgphilips-lb035q02.c
index e0eb35b..0841cc2 100644
--- a/drivers/video/omap2/displays/panel-lgphilips-lb035q02.c
+++ b/drivers/video/omap2/displays/panel-lgphilips-lb035q02.c
@@ -264,16 +264,6 @@ static struct spi_driver lb035q02_spi_driver = {
.remove = __devexit_p(lb035q02_panel_spi_remove),
 };
 
-static int __init lb035q02_panel_drv_init(void)
-{
-   return spi_register_driver(&lb035q02_spi_driver);
-}
-
-static void __exit lb035q02_panel_drv_exit(void)
-{
-   spi_unregister_driver(&lb035q02_spi_driver);
-}
+module_spi_driver(lb035q02_spi_driver);
 
-module_init(lb035q02_panel_drv_init);
-module_exit(lb035q02_panel_drv_exit);
 MODULE_LICENSE("GPL");
diff --git a/drivers/video/omap2/displays/panel-nec-nl8048hl11-01b.c 
b/drivers/video/omap2/displays/panel-nec-nl8048hl11-01b.c
index 0eb31ca..8b38b39 100644
--- a/drivers/video/omap2/displays/panel-nec-nl8048hl11-01b.c
+++ b/drivers/video/omap2/displays/panel-nec-nl8048hl11-01b.c
@@ -350,18 +350,8 @@ static struct spi_driver nec_8048_spi_driver = {
},
 };
 
-static int __init nec_8048_lcd_init(void)
-{
-   return spi_register_driver(&nec_8048_spi_driver);
-}
-
-static void __exit nec_8048_lcd_exit(void)
-{
-   return spi_unregister_driver(&nec_8048_spi_driver);
-}
+module_spi_driver(nec_8048_spi_driver);
 
-module_init(nec_8048_lcd_init);
-module_exit(nec_8048_lcd_exit);
 MODULE_AUTHOR("Erik Gilling ");
 MODULE_DESCRIPTION("NEC-nl8048hl11-01b Driver");
 MODULE_LICENSE("GPL");
diff --git a/drivers/video/omap2/displays/panel-tpo-td043mtea1.c 
b/drivers/video/omap2/displays/panel-tpo-td043mtea1.c
index e6649aa..1d6b7fb 100644
--- a/drivers/video/omap2/displays/panel-tpo-td043mtea1.c
+++ b/drivers/video/omap2/displays/panel-tpo-td043mtea1.c
@@ -518,18 +518,7 @@ static struct spi_driver tpo_td043_spi_driver = {
.remove = __devexit_p(tpo_td043_spi_remove),
 };
 
-static int __init tpo_td043_init(void)
-{
-   return spi_register_driver(&tpo_td043_spi_driver);
-}
-
-static void __exit tpo_td043_exit(void)
-{
-   spi_unregister_driver(&tpo_td043_spi_driver);
-}
-
-module_init(tpo_td043_init);
-module_exit(tpo_td043_exit);
+module_spi_driver(tpo_td043_spi_driver);
 
 MODULE_AUTHOR("Gražvydas Ignotas ");
 MODULE_DESCRIPTION("TPO TD043MTEA1 LCD Driver");
-- 
1.7.5.4



--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[PATCH 2/3] video: omap: convert drivers/video/omap/* to use module_platform_driver()

2011-12-08 Thread Axel Lin
This patch converts the drivers in drivers/video/omap/* to use the
module_platform_driver() macro which makes the code smaller and a bit
simpler.

Cc: Jonathan McDowell 
Cc: Cory Maccarrone 
Cc: Laurent Gonzalez 
Cc: Marek Vasut 
Signed-off-by: Axel Lin 
---
 drivers/video/omap/lcd_ams_delta.c |   13 +
 drivers/video/omap/lcd_h3.c|   14 +-
 drivers/video/omap/lcd_htcherald.c |   14 +-
 drivers/video/omap/lcd_inn1510.c   |   14 +-
 drivers/video/omap/lcd_inn1610.c   |   14 +-
 drivers/video/omap/lcd_osk.c   |   14 +-
 drivers/video/omap/lcd_palmte.c|   14 +-
 drivers/video/omap/lcd_palmtt.c|   13 +
 drivers/video/omap/lcd_palmz71.c   |   13 +
 9 files changed, 9 insertions(+), 114 deletions(-)

diff --git a/drivers/video/omap/lcd_ams_delta.c 
b/drivers/video/omap/lcd_ams_delta.c
index eb50a95..0fdd6f6 100644
--- a/drivers/video/omap/lcd_ams_delta.c
+++ b/drivers/video/omap/lcd_ams_delta.c
@@ -209,15 +209,4 @@ static struct platform_driver ams_delta_panel_driver = {
},
 };
 
-static int __init ams_delta_panel_drv_init(void)
-{
-   return platform_driver_register(&ams_delta_panel_driver);
-}
-
-static void __exit ams_delta_panel_drv_cleanup(void)
-{
-   platform_driver_unregister(&ams_delta_panel_driver);
-}
-
-module_init(ams_delta_panel_drv_init);
-module_exit(ams_delta_panel_drv_cleanup);
+module_platform_driver(ams_delta_panel_driver);
diff --git a/drivers/video/omap/lcd_h3.c b/drivers/video/omap/lcd_h3.c
index baec34e..49bdeca 100644
--- a/drivers/video/omap/lcd_h3.c
+++ b/drivers/video/omap/lcd_h3.c
@@ -124,16 +124,4 @@ static struct platform_driver h3_panel_driver = {
},
 };
 
-static int __init h3_panel_drv_init(void)
-{
-   return platform_driver_register(&h3_panel_driver);
-}
-
-static void __exit h3_panel_drv_cleanup(void)
-{
-   platform_driver_unregister(&h3_panel_driver);
-}
-
-module_init(h3_panel_drv_init);
-module_exit(h3_panel_drv_cleanup);
-
+module_platform_driver(h3_panel_driver);
diff --git a/drivers/video/omap/lcd_htcherald.c 
b/drivers/video/omap/lcd_htcherald.c
index b1a022f..20f4778 100644
--- a/drivers/video/omap/lcd_htcherald.c
+++ b/drivers/video/omap/lcd_htcherald.c
@@ -115,16 +115,4 @@ static struct platform_driver htcherald_panel_driver = {
},
 };
 
-static int __init htcherald_panel_drv_init(void)
-{
-   return platform_driver_register(&htcherald_panel_driver);
-}
-
-static void __exit htcherald_panel_drv_cleanup(void)
-{
-   platform_driver_unregister(&htcherald_panel_driver);
-}
-
-module_init(htcherald_panel_drv_init);
-module_exit(htcherald_panel_drv_cleanup);
-
+module_platform_driver(htcherald_panel_driver);
diff --git a/drivers/video/omap/lcd_inn1510.c b/drivers/video/omap/lcd_inn1510.c
index d129946..b38b1dd 100644
--- a/drivers/video/omap/lcd_inn1510.c
+++ b/drivers/video/omap/lcd_inn1510.c
@@ -109,16 +109,4 @@ static struct platform_driver innovator1510_panel_driver = 
{
},
 };
 
-static int __init innovator1510_panel_drv_init(void)
-{
-   return platform_driver_register(&innovator1510_panel_driver);
-}
-
-static void __exit innovator1510_panel_drv_cleanup(void)
-{
-   platform_driver_unregister(&innovator1510_panel_driver);
-}
-
-module_init(innovator1510_panel_drv_init);
-module_exit(innovator1510_panel_drv_cleanup);
-
+module_platform_driver(innovator1510_panel_driver);
diff --git a/drivers/video/omap/lcd_inn1610.c b/drivers/video/omap/lcd_inn1610.c
index a95756b..7e8bd8e 100644
--- a/drivers/video/omap/lcd_inn1610.c
+++ b/drivers/video/omap/lcd_inn1610.c
@@ -133,16 +133,4 @@ static struct platform_driver innovator1610_panel_driver = 
{
},
 };
 
-static int __init innovator1610_panel_drv_init(void)
-{
-   return platform_driver_register(&innovator1610_panel_driver);
-}
-
-static void __exit innovator1610_panel_drv_cleanup(void)
-{
-   platform_driver_unregister(&innovator1610_panel_driver);
-}
-
-module_init(innovator1610_panel_drv_init);
-module_exit(innovator1610_panel_drv_cleanup);
-
+module_platform_driver(innovator1610_panel_driver);
diff --git a/drivers/video/omap/lcd_osk.c b/drivers/video/omap/lcd_osk.c
index b985997..5914220 100644
--- a/drivers/video/omap/lcd_osk.c
+++ b/drivers/video/omap/lcd_osk.c
@@ -127,16 +127,4 @@ static struct platform_driver osk_panel_driver = {
},
 };
 
-static int __init osk_panel_drv_init(void)
-{
-   return platform_driver_register(&osk_panel_driver);
-}
-
-static void __exit osk_panel_drv_cleanup(void)
-{
-   platform_driver_unregister(&osk_panel_driver);
-}
-
-module_init(osk_panel_drv_init);
-module_exit(osk_panel_drv_cleanup);
-
+module_platform_driver(osk_panel_driver);
diff --git a/drivers/video/omap/lcd_palmte.c b/drivers/video/omap/lcd_palmte.c
index d79f436..88c31eb 100644
--- a/drivers/video/omap/lcd_palmte.c
+++ b/drivers/video/omap/lcd_palmte.c
@@

[PATCH 1/2] video: omap: Staticise non-exported symbols

2011-12-08 Thread Axel Lin
These symbols are not used outside it's driver so no need to
make the symbol global.

Signed-off-by: Axel Lin 
---
 drivers/video/omap/lcd_ams_delta.c |2 +-
 drivers/video/omap/lcd_h3.c|2 +-
 drivers/video/omap/lcd_htcherald.c |2 +-
 drivers/video/omap/lcd_inn1510.c   |2 +-
 drivers/video/omap/lcd_inn1610.c   |2 +-
 drivers/video/omap/lcd_osk.c   |2 +-
 drivers/video/omap/lcd_palmte.c|2 +-
 drivers/video/omap/lcd_palmtt.c|2 +-
 drivers/video/omap/lcd_palmz71.c   |2 +-
 9 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/drivers/video/omap/lcd_ams_delta.c 
b/drivers/video/omap/lcd_ams_delta.c
index 6978ae4..eb50a95 100644
--- a/drivers/video/omap/lcd_ams_delta.c
+++ b/drivers/video/omap/lcd_ams_delta.c
@@ -198,7 +198,7 @@ static int ams_delta_panel_resume(struct platform_device 
*pdev)
return 0;
 }
 
-struct platform_driver ams_delta_panel_driver = {
+static struct platform_driver ams_delta_panel_driver = {
.probe  = ams_delta_panel_probe,
.remove = ams_delta_panel_remove,
.suspend= ams_delta_panel_suspend,
diff --git a/drivers/video/omap/lcd_h3.c b/drivers/video/omap/lcd_h3.c
index 622ad83..baec34e 100644
--- a/drivers/video/omap/lcd_h3.c
+++ b/drivers/video/omap/lcd_h3.c
@@ -113,7 +113,7 @@ static int h3_panel_resume(struct platform_device *pdev)
return 0;
 }
 
-struct platform_driver h3_panel_driver = {
+static struct platform_driver h3_panel_driver = {
.probe  = h3_panel_probe,
.remove = h3_panel_remove,
.suspend= h3_panel_suspend,
diff --git a/drivers/video/omap/lcd_htcherald.c 
b/drivers/video/omap/lcd_htcherald.c
index 4802419..b1a022f 100644
--- a/drivers/video/omap/lcd_htcherald.c
+++ b/drivers/video/omap/lcd_htcherald.c
@@ -104,7 +104,7 @@ static int htcherald_panel_resume(struct platform_device 
*pdev)
return 0;
 }
 
-struct platform_driver htcherald_panel_driver = {
+static struct platform_driver htcherald_panel_driver = {
.probe  = htcherald_panel_probe,
.remove = htcherald_panel_remove,
.suspend= htcherald_panel_suspend,
diff --git a/drivers/video/omap/lcd_inn1510.c b/drivers/video/omap/lcd_inn1510.c
index 3271f16..d129946 100644
--- a/drivers/video/omap/lcd_inn1510.c
+++ b/drivers/video/omap/lcd_inn1510.c
@@ -98,7 +98,7 @@ static int innovator1510_panel_resume(struct platform_device 
*pdev)
return 0;
 }
 
-struct platform_driver innovator1510_panel_driver = {
+static struct platform_driver innovator1510_panel_driver = {
.probe  = innovator1510_panel_probe,
.remove = innovator1510_panel_remove,
.suspend= innovator1510_panel_suspend,
diff --git a/drivers/video/omap/lcd_inn1610.c b/drivers/video/omap/lcd_inn1610.c
index 12cc52a..a95756b 100644
--- a/drivers/video/omap/lcd_inn1610.c
+++ b/drivers/video/omap/lcd_inn1610.c
@@ -122,7 +122,7 @@ static int innovator1610_panel_resume(struct 
platform_device *pdev)
return 0;
 }
 
-struct platform_driver innovator1610_panel_driver = {
+static struct platform_driver innovator1610_panel_driver = {
.probe  = innovator1610_panel_probe,
.remove = innovator1610_panel_remove,
.suspend= innovator1610_panel_suspend,
diff --git a/drivers/video/omap/lcd_osk.c b/drivers/video/omap/lcd_osk.c
index 6f8d13c..b985997 100644
--- a/drivers/video/omap/lcd_osk.c
+++ b/drivers/video/omap/lcd_osk.c
@@ -116,7 +116,7 @@ static int osk_panel_resume(struct platform_device *pdev)
return 0;
 }
 
-struct platform_driver osk_panel_driver = {
+static struct platform_driver osk_panel_driver = {
.probe  = osk_panel_probe,
.remove = osk_panel_remove,
.suspend= osk_panel_suspend,
diff --git a/drivers/video/omap/lcd_palmte.c b/drivers/video/omap/lcd_palmte.c
index 4cb3017..d79f436 100644
--- a/drivers/video/omap/lcd_palmte.c
+++ b/drivers/video/omap/lcd_palmte.c
@@ -97,7 +97,7 @@ static int palmte_panel_resume(struct platform_device *pdev)
return 0;
 }
 
-struct platform_driver palmte_panel_driver = {
+static struct platform_driver palmte_panel_driver = {
.probe  = palmte_panel_probe,
.remove = palmte_panel_remove,
.suspend= palmte_panel_suspend,
diff --git a/drivers/video/omap/lcd_palmtt.c b/drivers/video/omap/lcd_palmtt.c
index b51b332..c2e96a7 100644
--- a/drivers/video/omap/lcd_palmtt.c
+++ b/drivers/video/omap/lcd_palmtt.c
@@ -102,7 +102,7 @@ static int palmtt_panel_resume(struct platform_device *pdev)
return 0;
 }
 
-struct platform_driver palmtt_panel_driver = {
+static struct platform_driver palmtt_panel_driver = {
.probe  = palmtt_panel_probe,
.remove = palmtt_panel_remove,
.suspend= palmtt_panel_suspend,
diff --git a/drivers/video/omap/lcd_palmz71.c b/drivers/video

[PATCH] OMAP2, 3: DSS2: Include linux/delay.h and common.h to fix build errors

2011-11-30 Thread Axel Lin
Include linux/delay.h to fix below build error:

  CC  arch/arm/mach-omap2/display.o
arch/arm/mach-omap2/display.c: In function 'dispc_disable_outputs':
arch/arm/mach-omap2/display.c:283: error: implicit declaration of function 
'mdelay'
arch/arm/mach-omap2/display.c: In function 'omap_dss_reset':
arch/arm/mach-omap2/display.c:317: error: implicit declaration of function 
'omap_test_timeout'
make[1]: *** [arch/arm/mach-omap2/display.o] Error 1
make: *** [arch/arm/mach-omap2] Error 2

Include common.h to fix below build error:

  CC  arch/arm/mach-omap2/display.o
arch/arm/mach-omap2/display.c: In function 'omap_dss_reset':
arch/arm/mach-omap2/display.c:318: error: implicit declaration of function 
'omap_test_timeout'
make[1]: *** [arch/arm/mach-omap2/display.o] Error 1
make: *** [arch/arm/mach-omap2] Error 2

Signed-off-by: Axel Lin 
---
I got the build error on linux-next 2030.
This patch is against linux-next 2030.
Axel
 arch/arm/mach-omap2/display.c |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/display.c b/arch/arm/mach-omap2/display.c
index dce9905..fe44cc2 100644
--- a/arch/arm/mach-omap2/display.c
+++ b/arch/arm/mach-omap2/display.c
@@ -21,6 +21,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 
 #include 
@@ -30,6 +31,7 @@
 #include 
 
 #include "control.h"
+#include "common.h"
 #include "display.h"
 
 #define DISPC_CONTROL  0x0040
-- 
1.7.5.4



--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH RESEND] ARM: OMAP: omap_device: Include linux/export.h

2011-11-03 Thread Axel Lin
Include linux/export.h to fix below build warning:

  CC  arch/arm/plat-omap/omap_device.o
arch/arm/plat-omap/omap_device.c:1055: warning: data definition has no type or 
storage class
arch/arm/plat-omap/omap_device.c:1055: warning: type defaults to 'int' in 
declaration of 'EXPORT_SYMBOL'
arch/arm/plat-omap/omap_device.c:1055: warning: parameter names (without types) 
in function declaration

Signed-off-by: Axel Lin 
---
This resend also CC linux-omap@vger.kernel.org and 
linux-arm-ker...@lists.infradead.org.
This patch is against linux-next 2003.

 arch/arm/plat-omap/omap_device.c |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/arch/arm/plat-omap/omap_device.c b/arch/arm/plat-omap/omap_device.c
index cd90bed..f839f94 100644
--- a/arch/arm/plat-omap/omap_device.c
+++ b/arch/arm/plat-omap/omap_device.c
@@ -78,6 +78,7 @@
 #undef DEBUG
 
 #include 
+#include 
 #include 
 #include 
 #include 
-- 
1.7.5.4



--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] ARM: OMAP: dmtimer: Include linux/module.h

2011-11-01 Thread Axel Lin
_SYMBOL_GPL'
arch/arm/plat-omap/dmtimer.c:494: warning: parameter names (without types) in 
function declaration
arch/arm/plat-omap/dmtimer.c:517: warning: data definition has no type or 
storage class
arch/arm/plat-omap/dmtimer.c:517: warning: type defaults to 'int' in 
declaration of 'EXPORT_SYMBOL_GPL'
arch/arm/plat-omap/dmtimer.c:517: warning: parameter names (without types) in 
function declaration
arch/arm/plat-omap/dmtimer.c:534: warning: data definition has no type or 
storage class
arch/arm/plat-omap/dmtimer.c:534: warning: type defaults to 'int' in 
declaration of 'EXPORT_SYMBOL_GPL'
arch/arm/plat-omap/dmtimer.c:534: warning: parameter names (without types) in 
function declaration
arch/arm/plat-omap/dmtimer.c:549: warning: data definition has no type or 
storage class
arch/arm/plat-omap/dmtimer.c:549: warning: type defaults to 'int' in 
declaration of 'EXPORT_SYMBOL_GPL'
arch/arm/plat-omap/dmtimer.c:549: warning: parameter names (without types) in 
function declaration
arch/arm/plat-omap/dmtimer.c:561: warning: data definition has no type or 
storage class
arch/arm/plat-omap/dmtimer.c:561: warning: type defaults to 'int' in 
declaration of 'EXPORT_SYMBOL_GPL'
arch/arm/plat-omap/dmtimer.c:561: warning: parameter names (without types) in 
function declaration
arch/arm/plat-omap/dmtimer.c:572: warning: data definition has no type or 
storage class
arch/arm/plat-omap/dmtimer.c:572: warning: type defaults to 'int' in 
declaration of 'EXPORT_SYMBOL_GPL'
arch/arm/plat-omap/dmtimer.c:572: warning: parameter names (without types) in 
function declaration
arch/arm/plat-omap/dmtimer.c:587: warning: data definition has no type or 
storage class
arch/arm/plat-omap/dmtimer.c:587: warning: type defaults to 'int' in 
declaration of 'EXPORT_SYMBOL_GPL'
arch/arm/plat-omap/dmtimer.c:587: warning: parameter names (without types) in 
function declaration
arch/arm/plat-omap/dmtimer.c:604: warning: data definition has no type or 
storage class
arch/arm/plat-omap/dmtimer.c:604: warning: type defaults to 'int' in 
declaration of 'EXPORT_SYMBOL_GPL'
arch/arm/plat-omap/dmtimer.c:604: warning: parameter names (without types) in 
function declaration
arch/arm/plat-omap/dmtimer.c:746: error: expected declaration specifiers or 
'...' before string constant
arch/arm/plat-omap/dmtimer.c:746: warning: data definition has no type or 
storage class
arch/arm/plat-omap/dmtimer.c:746: warning: type defaults to 'int' in 
declaration of 'MODULE_DESCRIPTION'
arch/arm/plat-omap/dmtimer.c:746: warning: function declaration isn't a 
prototype
arch/arm/plat-omap/dmtimer.c:747: error: expected declaration specifiers or 
'...' before string constant
arch/arm/plat-omap/dmtimer.c:747: warning: data definition has no type or 
storage class
arch/arm/plat-omap/dmtimer.c:747: warning: type defaults to 'int' in 
declaration of 'MODULE_LICENSE'
arch/arm/plat-omap/dmtimer.c:747: warning: function declaration isn't a 
prototype
arch/arm/plat-omap/dmtimer.c:748: error: expected declaration specifiers or 
'...' before string constant
arch/arm/plat-omap/dmtimer.c:748: warning: data definition has no type or 
storage class
arch/arm/plat-omap/dmtimer.c:748: warning: type defaults to 'int' in 
declaration of 'MODULE_ALIAS'
arch/arm/plat-omap/dmtimer.c:748: warning: function declaration isn't a 
prototype
arch/arm/plat-omap/dmtimer.c:749: error: expected declaration specifiers or 
'...' before string constant
arch/arm/plat-omap/dmtimer.c:749: warning: data definition has no type or 
storage class
arch/arm/plat-omap/dmtimer.c:749: warning: type defaults to 'int' in 
declaration of 'MODULE_AUTHOR'
arch/arm/plat-omap/dmtimer.c:749: warning: function declaration isn't a 
prototype
make[1]: *** [arch/arm/plat-omap/dmtimer.o] Error 1
make: *** [arch/arm/plat-omap] Error 2

Signed-off-by: Axel Lin 
---
I got the build error by make omap2plus_defconfig on linux-next 2001.

 arch/arm/plat-omap/dmtimer.c |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/arch/arm/plat-omap/dmtimer.c b/arch/arm/plat-omap/dmtimer.c
index 2def4e1..af3b92b 100644
--- a/arch/arm/plat-omap/dmtimer.c
+++ b/arch/arm/plat-omap/dmtimer.c
@@ -35,6 +35,7 @@
  * 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
+#include 
 #include 
 #include 
 #include 
-- 
1.7.5.4



--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] ARM: OMAP2+: l3-noc: Include linux/module.h

2011-11-01 Thread Axel Lin
Include linux/module.h to fix below build error:

  CC  arch/arm/mach-omap2/omap_l3_noc.o
arch/arm/mach-omap2/omap_l3_noc.c:240: error: expected ',' or ';' before 
'MODULE_DEVICE_TABLE'
arch/arm/mach-omap2/omap_l3_noc.c:250: error: 'THIS_MODULE' undeclared here 
(not in a function)
make[1]: *** [arch/arm/mach-omap2/omap_l3_noc.o] Error 1
make: *** [arch/arm/mach-omap2] Error 2

Signed-off-by: Axel Lin 
---
I got the build error by make omap2plus_defconfig on linux-next 2001.

 arch/arm/mach-omap2/omap_l3_noc.c |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/omap_l3_noc.c 
b/arch/arm/mach-omap2/omap_l3_noc.c
index c8b1bef..6a66aa5 100644
--- a/arch/arm/mach-omap2/omap_l3_noc.c
+++ b/arch/arm/mach-omap2/omap_l3_noc.c
@@ -20,6 +20,7 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
  * USA
  */
+#include 
 #include 
 #include 
 #include 
-- 
1.7.5.4



--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] usb: musb: OMAP4430: Remove a redundant omap4430_phy_init call in usb_musb_init

2011-09-20 Thread Axel Lin
Current code calls omap4430_phy_init() twice in usb_musb_init().
Calling omap4430_phy_init() once is enough.
This patch removes the first omap4430_phy_init() call, which using an
uninitialized pointer as parameter.

This patch elimates below build warning:
arch/arm/mach-omap2/usb-musb.c: In function 'usb_musb_init':
arch/arm/mach-omap2/usb-musb.c:141: warning: 'dev' may be used uninitialized in 
this function

Signed-off-by: Axel Lin 
---
 arch/arm/mach-omap2/usb-musb.c |3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)

diff --git a/arch/arm/mach-omap2/usb-musb.c b/arch/arm/mach-omap2/usb-musb.c
index a65145b..19e4dac 100644
--- a/arch/arm/mach-omap2/usb-musb.c
+++ b/arch/arm/mach-omap2/usb-musb.c
@@ -137,9 +137,6 @@ void __init usb_musb_init(struct omap_musb_board_data 
*musb_board_data)
musb_plat.mode = board_data->mode;
musb_plat.extvbus = board_data->extvbus;
 
-   if (cpu_is_omap44xx())
-   omap4430_phy_init(dev);
-
if (cpu_is_omap3517() || cpu_is_omap3505()) {
oh_name = "am35x_otg_hs";
name = "musb-am35x";
-- 
1.7.4.1



--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH RESEND] omap1: select GENERIC_IRQ_CHIP for TI OMAP1

2011-08-03 Thread Axel Lin
The gpio-omap driver has been converted to use generic IRQ chip.
Thus select GENERIC_IRQ_CHIP for TI OMAP1 to fix below build error.

 LD  vmlinux
drivers/built-in.o: In function `omap_mpuio_alloc_gc':
drivers/gpio/gpio-omap.c:1087: undefined reference to `irq_alloc_generic_chip'
drivers/gpio/gpio-omap.c:1100: undefined reference to `irq_setup_generic_chip'
drivers/built-in.o: In function `omap_gpio_show_rev':
drivers/gpio/gpio-omap.c:998: undefined reference to `irq_gc_mask_clr_bit'
drivers/gpio/gpio-omap.c:998: undefined reference to `irq_gc_mask_set_bit'
make: *** [vmlinux] Error 1

Signed-off-by: Axel Lin 
---
Kevin already sent a similar patch.  
http://marc.info/?l=linux-omap&m=130749135312468&w=2
But I still have the build error with make omap1_defconfig in today's 
linux-next tree.
So here is a resend.

Regards,
Axel
 arch/arm/plat-omap/Kconfig |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/arch/arm/plat-omap/Kconfig b/arch/arm/plat-omap/Kconfig
index 6e6735f..bb8f4a6 100644
--- a/arch/arm/plat-omap/Kconfig
+++ b/arch/arm/plat-omap/Kconfig
@@ -13,6 +13,7 @@ config ARCH_OMAP1
bool "TI OMAP1"
select CLKDEV_LOOKUP
select CLKSRC_MMIO
+   select GENERIC_IRQ_CHIP
help
  "Systems based on omap7xx, omap15xx or omap16xx"
 
-- 
1.7.4.1



--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] omap1: select GENERIC_IRQ_CHIP for TI OMAP1

2011-07-17 Thread Axel Lin
2011/6/28 Kevin Hilman :
> Axel Lin  writes:
>
>> The gpio-omap driver has been converted to use generic IRQ chip.
>> Thus select GENERIC_IRQ_CHIP for TI OMAP1 to fix below build error.
>>
>>   LD      vmlinux
>> drivers/built-in.o: In function `omap_mpuio_alloc_gc':
>> drivers/gpio/gpio-omap.c:1087: undefined reference to 
>> `irq_alloc_generic_chip'
>> drivers/gpio/gpio-omap.c:1100: undefined reference to 
>> `irq_setup_generic_chip'
>> drivers/built-in.o: In function `omap_gpio_show_rev':
>> drivers/gpio/gpio-omap.c:998: undefined reference to `irq_gc_mask_clr_bit'
>> drivers/gpio/gpio-omap.c:998: undefined reference to `irq_gc_mask_set_bit'
>> make: *** [vmlinux] Error 1
>>
>> Signed-off-by: Axel Lin 
>
> Thanks, I have a fix for this already queued for v3.0-rc3 series:
>
>        http://marc.info/?l=linux-omap&m=130749135312468&w=2
>
Hi,
Seems this patch is not upstream.
I still have the same build error with  [linux-next: Tree for July 16].

Regards,
Axel
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] omap1: select GENERIC_IRQ_CHIP for TI OMAP1

2011-06-28 Thread Axel Lin
The gpio-omap driver has been converted to use generic IRQ chip.
Thus select GENERIC_IRQ_CHIP for TI OMAP1 to fix below build error.

  LD  vmlinux
drivers/built-in.o: In function `omap_mpuio_alloc_gc':
drivers/gpio/gpio-omap.c:1087: undefined reference to `irq_alloc_generic_chip'
drivers/gpio/gpio-omap.c:1100: undefined reference to `irq_setup_generic_chip'
drivers/built-in.o: In function `omap_gpio_show_rev':
drivers/gpio/gpio-omap.c:998: undefined reference to `irq_gc_mask_clr_bit'
drivers/gpio/gpio-omap.c:998: undefined reference to `irq_gc_mask_set_bit'
make: *** [vmlinux] Error 1

Signed-off-by: Axel Lin 
---
 arch/arm/plat-omap/Kconfig |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/arch/arm/plat-omap/Kconfig b/arch/arm/plat-omap/Kconfig
index 49a4c75..9a4a6bf 100644
--- a/arch/arm/plat-omap/Kconfig
+++ b/arch/arm/plat-omap/Kconfig
@@ -13,6 +13,7 @@ config ARCH_OMAP1
bool "TI OMAP1"
select CLKDEV_LOOKUP
select CLKSRC_MMIO
+   select GENERIC_IRQ_CHIP
help
  "Systems based on omap7xx, omap15xx or omap16xx"
 
-- 
1.7.4.1



--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2] ARM: OMAP2: Add missing include of linux/gpio.h

2011-05-31 Thread Axel Lin
2011/5/31 Tony Lindgren :
> * Axel Lin  [110531 05:51]:
>> I got some build error like below while executing "make omap2plus_defconfig".
>>
>>   CC      arch/arm/mach-omap2/board-2430sdp.o
>> arch/arm/mach-omap2/board-2430sdp.c: In function 'omap_2430sdp_init':
>> arch/arm/mach-omap2/board-2430sdp.c:247: error: 'GPIOF_OUT_INIT_LOW' 
>> undeclared (first use in this function)
>> arch/arm/mach-omap2/board-2430sdp.c:247: error: (Each undeclared identifier 
>> is reported only once
>> arch/arm/mach-omap2/board-2430sdp.c:247: error: for each function it appears 
>> in.)
>>
>> This patch fixes the build error by include linux/gpio.h instead of 
>> mach/gpio.h.
>
> Does this happen with next?
Yes, I build the kernel with today's linux-next tree.
>
> Will queue as a fix anyways.
Thanks,
Axel
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v2] ARM: OMAP2: Add missing include of linux/gpio.h

2011-05-31 Thread Axel Lin
I got some build error like below while executing "make omap2plus_defconfig".

  CC  arch/arm/mach-omap2/board-2430sdp.o
arch/arm/mach-omap2/board-2430sdp.c: In function 'omap_2430sdp_init':
arch/arm/mach-omap2/board-2430sdp.c:247: error: 'GPIOF_OUT_INIT_LOW' undeclared 
(first use in this function)
arch/arm/mach-omap2/board-2430sdp.c:247: error: (Each undeclared identifier is 
reported only once
arch/arm/mach-omap2/board-2430sdp.c:247: error: for each function it appears 
in.)

This patch fixes the build error by include linux/gpio.h instead of mach/gpio.h.

Signed-off-by: Axel Lin 
Cc: Syed Mohammed Khasim 
Cc: Tony Lindgren 
Cc: Grazvydas Ignotas 
Cc: Steve Sakoman 
---
 arch/arm/mach-omap2/board-2430sdp.c  |2 +-
 arch/arm/mach-omap2/board-apollon.c  |2 +-
 arch/arm/mach-omap2/board-omap3pandora.c |2 +-
 arch/arm/mach-omap2/board-overo.c|2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/arm/mach-omap2/board-2430sdp.c 
b/arch/arm/mach-omap2/board-2430sdp.c
index d54969b..5de6eac 100644
--- a/arch/arm/mach-omap2/board-2430sdp.c
+++ b/arch/arm/mach-omap2/board-2430sdp.c
@@ -26,13 +26,13 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
 #include 
 #include 
 
-#include 
 #include 
 #include 
 #include 
diff --git a/arch/arm/mach-omap2/board-apollon.c 
b/arch/arm/mach-omap2/board-apollon.c
index f3beb8e..b124bdf 100644
--- a/arch/arm/mach-omap2/board-apollon.c
+++ b/arch/arm/mach-omap2/board-apollon.c
@@ -27,13 +27,13 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
 #include 
 #include 
 
-#include 
 #include 
 #include 
 #include 
diff --git a/arch/arm/mach-omap2/board-omap3pandora.c 
b/arch/arm/mach-omap2/board-omap3pandora.c
index 1d10736..5ee034a 100644
--- a/arch/arm/mach-omap2/board-omap3pandora.c
+++ b/arch/arm/mach-omap2/board-omap3pandora.c
@@ -30,6 +30,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -41,7 +42,6 @@
 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
diff --git a/arch/arm/mach-omap2/board-overo.c 
b/arch/arm/mach-omap2/board-overo.c
index 1555918..9952c20 100644
--- a/arch/arm/mach-omap2/board-overo.c
+++ b/arch/arm/mach-omap2/board-overo.c
@@ -24,6 +24,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -45,7 +46,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
-- 
1.7.4.1



--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] ARM: OMAP2: Add missing include of linux/gpio.h

2011-05-31 Thread Axel Lin
I got some build error like below while executing "make omap2plus_defconfig".

  CC  arch/arm/mach-omap2/board-2430sdp.o
arch/arm/mach-omap2/board-2430sdp.c: In function 'omap_2430sdp_init':
arch/arm/mach-omap2/board-2430sdp.c:247: error: 'GPIOF_OUT_INIT_LOW' undeclared 
(first use in this function)
arch/arm/mach-omap2/board-2430sdp.c:247: error: (Each undeclared identifier is 
reported only once
arch/arm/mach-omap2/board-2430sdp.c:247: error: for each function it appears 
in.)
make[1]: *** [arch/arm/mach-omap2/board-2430sdp.o] Error 1
make: *** [arch/arm/mach-omap2] Error 2

This patch fixes the build error.

Signed-off-by: Axel Lin 
Cc: Syed Mohammed Khasim 
Cc: Tony Lindgren 
Cc: Grazvydas Ignotas 
Cc: Steve Sakoman 
---
 arch/arm/mach-omap2/board-2430sdp.c  |1 +
 arch/arm/mach-omap2/board-apollon.c  |1 +
 arch/arm/mach-omap2/board-omap3pandora.c |1 +
 arch/arm/mach-omap2/board-overo.c|1 +
 4 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/board-2430sdp.c 
b/arch/arm/mach-omap2/board-2430sdp.c
index d54969b..329b95c 100644
--- a/arch/arm/mach-omap2/board-2430sdp.c
+++ b/arch/arm/mach-omap2/board-2430sdp.c
@@ -26,6 +26,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
diff --git a/arch/arm/mach-omap2/board-apollon.c 
b/arch/arm/mach-omap2/board-apollon.c
index f3beb8e..41f07b0 100644
--- a/arch/arm/mach-omap2/board-apollon.c
+++ b/arch/arm/mach-omap2/board-apollon.c
@@ -27,6 +27,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
diff --git a/arch/arm/mach-omap2/board-omap3pandora.c 
b/arch/arm/mach-omap2/board-omap3pandora.c
index 1d10736..89d5fba 100644
--- a/arch/arm/mach-omap2/board-omap3pandora.c
+++ b/arch/arm/mach-omap2/board-omap3pandora.c
@@ -30,6 +30,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
diff --git a/arch/arm/mach-omap2/board-overo.c 
b/arch/arm/mach-omap2/board-overo.c
index 1555918..5942aa5 100644
--- a/arch/arm/mach-omap2/board-overo.c
+++ b/arch/arm/mach-omap2/board-overo.c
@@ -24,6 +24,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
-- 
1.7.4.1



--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 2/2 RESEND] ASoC: Fix resource reclaim for osk5912

2010-11-24 Thread Axel Lin
In current implementation, there are resources leak in the error path.
This patch properly reclaims the allocated resources in the error path.

Also adds a missing clk_put in osk_soc_exit.

Signed-off-by: Axel Lin 
Acked-by: Jarkko Nikula 
---
 sound/soc/omap/osk5912.c |   11 ---
 1 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/sound/soc/omap/osk5912.c b/sound/soc/omap/osk5912.c
index 18d053d..7e75e77 100644
--- a/sound/soc/omap/osk5912.c
+++ b/sound/soc/omap/osk5912.c
@@ -177,7 +177,8 @@ static int __init osk_soc_init(void)
tlv320aic23_mclk = clk_get(dev, "mclk");
if (IS_ERR(tlv320aic23_mclk)) {
printk(KERN_ERR "Could not get mclk clock\n");
-   return -ENODEV;
+   err = PTR_ERR(tlv320aic23_mclk);
+   goto err2;
}
 
/*
@@ -188,7 +189,7 @@ static int __init osk_soc_init(void)
if (clk_set_rate(tlv320aic23_mclk, CODEC_CLOCK)) {
printk(KERN_ERR "Cannot set MCLK for AIC23 CODEC\n");
err = -ECANCELED;
-   goto err1;
+   goto err3;
}
}
 
@@ -196,9 +197,12 @@ static int __init osk_soc_init(void)
   (uint) clk_get_rate(tlv320aic23_mclk), CODEC_CLOCK);
 
return 0;
-err1:
+
+err3:
clk_put(tlv320aic23_mclk);
+err2:
platform_device_del(osk_snd_device);
+err1:
platform_device_put(osk_snd_device);
 
return err;
@@ -207,6 +211,7 @@ err1:
 
 static void __exit osk_soc_exit(void)
 {
+   clk_put(tlv320aic23_mclk);
platform_device_unregister(osk_snd_device);
 }
 
-- 
1.7.2




--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 2/2] ASoC: Fix resource reclaim for osk5912

2010-11-23 Thread Axel Lin
Signed-off-by: Axel Lin 
---
 sound/soc/omap/osk5912.c |   11 ---
 1 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/sound/soc/omap/osk5912.c b/sound/soc/omap/osk5912.c
index 18d053d..7e75e77 100644
--- a/sound/soc/omap/osk5912.c
+++ b/sound/soc/omap/osk5912.c
@@ -177,7 +177,8 @@ static int __init osk_soc_init(void)
tlv320aic23_mclk = clk_get(dev, "mclk");
if (IS_ERR(tlv320aic23_mclk)) {
printk(KERN_ERR "Could not get mclk clock\n");
-   return -ENODEV;
+   err = PTR_ERR(tlv320aic23_mclk);
+   goto err2;
}
 
/*
@@ -188,7 +189,7 @@ static int __init osk_soc_init(void)
if (clk_set_rate(tlv320aic23_mclk, CODEC_CLOCK)) {
printk(KERN_ERR "Cannot set MCLK for AIC23 CODEC\n");
err = -ECANCELED;
-   goto err1;
+   goto err3;
}
}
 
@@ -196,9 +197,12 @@ static int __init osk_soc_init(void)
   (uint) clk_get_rate(tlv320aic23_mclk), CODEC_CLOCK);
 
return 0;
-err1:
+
+err3:
clk_put(tlv320aic23_mclk);
+err2:
platform_device_del(osk_snd_device);
+err1:
platform_device_put(osk_snd_device);
 
return err;
@@ -207,6 +211,7 @@ err1:
 
 static void __exit osk_soc_exit(void)
 {
+   clk_put(tlv320aic23_mclk);
platform_device_unregister(osk_snd_device);
 }
 
-- 
1.7.2



--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 1/2] ASoC: Return proper error for omap3pandora_soc_init

2010-11-23 Thread Axel Lin
Return PTR_ERR(omap3pandora_dac_reg) instead of 0 if regulator_get failed.

Signed-off-by: Axel Lin 
---
 sound/soc/omap/omap3pandora.c |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/sound/soc/omap/omap3pandora.c b/sound/soc/omap/omap3pandora.c
index bff9864..8047c52 100644
--- a/sound/soc/omap/omap3pandora.c
+++ b/sound/soc/omap/omap3pandora.c
@@ -307,6 +307,7 @@ static int __init omap3pandora_soc_init(void)
pr_err(PREFIX "Failed to get DAC regulator from %s: %ld\n",
dev_name(&omap3pandora_snd_device->dev),
PTR_ERR(omap3pandora_dac_reg));
+   ret = PTR_ERR(omap3pandora_dac_reg);
goto fail3;
}
 
-- 
1.7.2



--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html