Re: [PATCH 1/2]: Add support for Dallas/Maxim DS1685/1687 RTC

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

 



> I have determined the following formula specific to the SGI O2 to read the
> RTC registers:
>
> readb(pdata->regs + RTC_<REGISTER> * 0x100);
>
> is equivalent to
>
> readb(pdata->regs.time.<REGISTER>);
>
> I'll assume writeb() changes are the same.  The question is, how do I wire
> in the 0x100 padding value in such a way that I keep the IP32-specific bits
> out of generic code?  Ralf mentioned using some field in platform_data, but
> I haven't quite learned the platform stuff (this is my first real attempt at
> a kernle driver).

Have a look at i2c-ocores.c:    Basically you use platform_data to specify
register spacing on the bus.

Manuel



[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux