Skip to contentSkip to conversation

S3C64xx backlight PWM misinited GPIO pin

DISCUSSION Maurus Cuelenaere 2 participants 3 messages Sep 24, 2009 – Sep 28, 2009

lore
Share & tools
lore
#0 lore raw

Hi,

Are the GPIO pins used as PWM (e.g. GPF15) supposed to be set to special function 2 in the bootloader/mach file or is this just a bug in the PWM driver
in current mainline?

Without doing the below, backlight PWM doesn't work for me:

static int smartq_bl_init(struct device *dev)

{
     s3c_gpio_cfgpin(S3C64XX_GPF(15), S3C_GPIO_SFN(2));

     return 0;
}

static struct platform_pwm_backlight_data smartq_backlight_data = {
...
.init = smartq_bl_init,
...
};

which doesn't look like it's the way to go..

Do I need to set some kind of config option (mach-hmt doesn't seem to need the
above change) or .. ?

Regards,

Maurus Cuelenaere

#1 lore raw
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Maurus" == Maurus Cuelenaere <[email protected]> writes:

Maurus> Hi,

Maurus> Are the GPIO pins used as PWM (e.g. GPF15) supposed to be set Maurus> to special function 2 in the bootloader/mach file or is this Maurus> just a bug in the PWM driver in current mainline?

The pin configuration imho doesn't belong in the pwm driver shared between 24xx/64xx.

Maurus> which doesn't look like it's the way to go..

To me it's OK - Ben, what do you say?

Maurus> Do I need to set some kind of config option (mach-hmt doesn't Maurus> seem to need the above change) or .. ?

It doesn't do it because I setup the pin in the bootloader (E.G. to display bootsplash image).

Signature · 1 line
Bye, Peter Korsgaard
#2 lore raw

Op 28-09-09 09:43, Peter Korsgaard schreef:

Quoted 6 lines

Maurus> Are the GPIO pins used as PWM (e.g. GPF15) supposed to be set Maurus> to special function 2 in the bootloader/mach file or is this Maurus> just a bug in the PWM driver in current mainline?

The pin configuration imho doesn't belong in the pwm driver shared between 24xx/64xx.

Agreed, but what about a 64xx (or 6410-specific if necessary) configuration?

IMHO this shouldn't go in the platform config, as the PWM GPIO pins are fixed
for all S3C6410-based devices.

Quoted 5 lines

Maurus> Do I need to set some kind of config option (mach-hmt doesn't Maurus> seem to need the above change) or .. ?

It doesn't do it because I setup the pin in the bootloader (E.G. to display bootsplash image).

I suspected something like that, perhaps I should be doing this too.

Regards,

Maurus Cuelenaere