Re: [PATCH] OMAP3: GPIO: Enable debounce clock only when debounce is enabled v2.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"ext Paul Walmsley" <paul@xxxxxxxxx> writes:

> Hi Jouni,
>
> sorry to make you rework this again, but:
>
> On Tue, 16 Sep 2008, Jouni Hogander wrote:
>
>> This patch changes gpio "driver" to enable debounce clock for
>> gpio-bank only when debounce is enabled for some gpio in that bank.
>
>>  
>> +#if defined(CONFIG_ARCH_OMAP3)
>> +	if (cpu_is_omap34xx())
>> +		enable ? clk_enable(bank->dbck) : clk_disable(bank->dbck);
>> +#endif
>
> the #ifdefs here are unnecessary, since the preprocessor will reduce 
> cpu_is_omap34xx() to a constant for single-OMAP builds..

NP. Maybe I can learn this multi/single OMAP thing:)

If I remove these ifdefs then I should remove also these:

#if defined(CONFIG_ARCH_OMAP3)
	struct clk *dbck;
#endif

Is that ok?

>
>> @@ -1513,6 +1515,15 @@ static int __init _omap_gpio_init(void)
>>  		}
>>  		set_irq_chained_handler(bank->irq, gpio_irq_handler);
>>  		set_irq_data(bank->irq, bank);
>> +
>> +#if defined(CONFIG_ARCH_OMAP3)
>> +		if (cpu_is_omap34xx()) {
>> +			sprintf(clk_name, "gpio%d_dbck", i + 1);
>> +			bank->dbck = clk_get(NULL, clk_name);
>> +			if (IS_ERR(bank->dbck))
>> +				printk(KERN_ERR "Could not get %s\n", clk_name);
>> +		}
>> +#endif
>
> as above.
>
>
> - Paul
>
>

-- 
Jouni Högander

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

[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux