[PATCH]: S3C RTC driver: add support for S3C64xx
Maurus Cuelenaere
mcuelenaere at gmail.com
Tue Nov 10 11:46:01 EST 2009
Op 10-11-09 14:53, jassi brar schreef:
> On Tue, Nov 10, 2009 at 10:46 AM, Maurus Cuelenaere
> <mcuelenaere at gmail.com> wrote:
>
>> <snip>
>>
>> +static struct s3c_rtc_platdata s3c_rtc_pdata = {
>> + .rtc_type = 0,
>> +};
>>
> 1) where is this structure defined?
> Perhaps u forgot to share the plat/rtc.h
>
Hmm seems I did forgot to include plat/rtc.h ..
> 2) rtc_type isn't very neat. Runtime CPU detection is better.
> Even better, if you manage to segregate the differences between
> two versions and pass them via platform data somehow.
> For, example, driver could assume resolution as pdata->resolution
> instead of 128 or 32768 or whatever for future SoCs.
>
pdata->resolution sounds like a good idea.
>> <snip>
>> #else
>> @@ -518,7 +563,7 @@ static struct platform_driver s3c2410_rtc_driver = {
>> .suspend = s3c_rtc_suspend,
>> .resume = s3c_rtc_resume,
>> .driver = {
>> - .name = "s3c2410-rtc",
>> + .name = "s3c-rtc",
>> .owner = THIS_MODULE,
>> },
>> };
>>
> why not use platform_device_id ?
>
I didn't know of platform_device_id, looks like a clean(er) solution for
this.
I'll post an updated patch with Jassi's and Ben's remarks in mind.
Regards,
Maurus Cuelenaere
More information about the linux-arm-kernel
mailing list