[PATCH] ep93xx: introduce clk parent

H Hartley Sweeten hartleys at visionengravers.com
Thu Oct 8 18:40:23 EDT 2009


On Thursday, October 08, 2009 2:29 PM, Christian Gagneraud wrote:
> Hi,
> 
> What's the status of this patch? It does not appear on the patch 
> tracker, and it's not in linus tree (or I'm missing something).
> 
> I'm currently working on adding ADC support (no touchscreen for now) 
> and the problem is that touchscreen (ADC) and keypad use the same 
> clock. With this patch applied it would be possible to define the 
> shared ep93xx-keytch clock and add ep93xx-keypad and 
> ep93xx-touchscreen as children.

Christian,

I have a patch for clock.c that adds the keypad clock.  This will
also give you what you need to configure the adc clock.  Hopefully
I will get a chance to post that patch in the next couple days.

As Russell already mentioned, the clk parent patch does not effect
the adc clock.  The common clock between them is actually the external
crystal.

The only thing they share is the configuration register used to set
the clock divisor and to enable the clock.  For the adc clock you
will just need to add:

+static struct clk clk_adc = {
+	.parent		= &clk_xtali,
+	.sw_locked	= 1,
+	.enable_reg	= EP93XX_SYSCON_KEYTCHCLKDIV,
+	.enable_mask	= EP93XX_SYSCON_KEYTCHCLKDIV_TSEN,
+	.set_rate	= set_keytchclk_rate,
+};

And of course the proper INIT_CK() for clk_adc.  The set_rate
callback will be the same one used for the keypad, which will
be in my coming patch.

Regards,
Hartley



More information about the linux-arm-kernel mailing list