[PATCH] mx28: added LRADC and touchscreen support
Fabio Estevam
festevam at gmail.com
Thu Nov 24 10:01:15 EST 2011
Peter,
On Thu, Nov 24, 2011 at 12:44 PM, Fabio Estevam <festevam at gmail.com> wrote:
> On Thu, Nov 24, 2011 at 11:56 AM, Lothar Waßmann <LW at karo-electronics.de> wrote:
>
>>> +static int lradc_freq = LRADC_CLOCK_6MHZ;
>>> +
>>> +static int __init lradc_freq_setup(char *str)
>>> +{
>>> + long freq;
>>> +
>>> + if (kstrtol(str, 0, &freq) < 0)
>>> + return 0;
>>> +
>>> + if (freq < 0)
>>> + return 0;
>>> + if (freq >= 6)
>>> + lradc_freq = LRADC_CLOCK_6MHZ;
>>> + else if (freq >= 4)
>>> + lradc_freq = LRADC_CLOCK_4MHZ;
>>> + else if (freq >= 3)
>>> + lradc_freq = LRADC_CLOCK_3MHZ;
>>> + else if (freq >= 2)
>>> + lradc_freq = LRADC_CLOCK_2MHZ;
>>> + else
>>> + return 0;
>>> + return 1;
>>> +}
>>> +
>>> +__setup("lradc_freq=", lradc_freq_setup);
>>>
>> How do you set lradc_freq when the driver is compiled as a module?
>> module_param() would work for the driver compiled as a module as well
>> as built-in
>
> What about passing lradc_freq as platform data?
You can also look at this AT91 ADC driver patch for reference:
http://www.spinics.net/lists/arm-kernel/msg148461.html
More information about the linux-arm-kernel
mailing list