[PATCH] ep93xx: introduce clk parent

Christian Gagneraud cgagneraud at techworks.ie
Fri Oct 9 13:11:21 EDT 2009


H Hartley Sweeten wrote:
> On Thursday, October 08, 2009 4:15 PM, Christian Gagneraud wrote:
>> Hartley,
>>
>> The keypad clock is already in as is the et_keytchclk_rate too.
> 
> Saw that.  Already responded to you about it.
> 
>> Can you explain me by the way why the keypad declares the clock with 
>> dev_id="ep93xx-keypad" and no con_id, but the pwm declares the clock 
>> with no dev_id and with con_id="clk_pwm"
>> Which of dev and con is the consumer and which one is the producer?
>> I'm a bit confuse between the platform_driver.name, the clock.dev_id 
>> and the clock.con_id
>>
>> As well I've noticed that the EP93XX keypad input driver does a 
>> clock_get("clk_key"), but this clock doesn't exist. or did I miss 
>> something.
> 
> No, I did...
> 
> When the input group picked up the keypad driver I didn't get the core
> support files reviewed/merged.  So basically the keypad driver is
> currently broken.
> 
> Patch 5578/1 was the first patch needed to fix this.  During the review
> for it, the original use intended for by the driver changed.  So I'm in
> the process of fixing the keypad driver.  Hopefully I'll get this all
> resolved soon.
> 
> As far as the dev/con id's.
> 
> I could have created two clocks for the pwms.  One for dev_id="pwm.0" and
> one for dev_id="pwm.1" which is how the two pwm ports get identified when
> used.  But, since the pwm clock cannot be disabled it seemed cleaner to
> just add one clock, con_id="clk_pwm", since the clock is common for both
> pwm controllers.  Look at drivers/misc/ep93xx_pwm.c and you will see that
> the clk_get() call passes the dev_id and the con_id.  Since there is not
> a matching dev_id in the ep93xx clocks[], the match occurs based on the
> con_id.

OK, I'll do that.

I've noticed as well that there's missing bits from Matthieu's 
0024-ep93xx_pwm.patch, that's almost nothing, but I guess that was the 
main reason Matthieu added PWM support to EP93XX:

diff --git a/arch/arm/mach-ep93xx/ts72xx.c b/arch/arm/mach-ep93xx/ts72xx.c
index 086d069..ee7baeb 100644
--- a/arch/arm/mach-ep93xx/ts72xx.c
+++ b/arch/arm/mach-ep93xx/ts72xx.c
@@ -303,6 +303,9 @@ static void __init ts72xx_init_machine(void)
         spi_register_board_info(ts72xx_spi_bus, 
ARRAY_SIZE(ts72xx_spi_bus));
         #endif

+       /* PWM1 is DIO_6 on TS-72xx header */
+       ep93xx_register_pwm(1, 1);
+
         ep93xx_register_eth(&ts72xx_eth_data, 1);
  }

> 
> Make sense?

Yes it does! :)

Regards,
Chris

> 
> Regards,
> Hartley




More information about the linux-arm-kernel mailing list