[Top] [All Lists]

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

To: Kumba <>
Subject: Re: [PATCH 1/2]: Add support for Dallas/Maxim DS1685/1687 RTC
From: Manuel Lauss <>
Date: Thu, 17 Feb 2011 08:31:45 +0100
Cc: Lars-Peter Clausen <>, Linux MIPS List <>,
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=H+OJCV+lx/859o0f9JiI/cJK5Ns6sSsh5n7l5s7+8fg=; b=mTGK8tJ/b4gsoY2ugeCqo0RsznqYTCldoHDBZf1G2glA4LiwR70h5q1mcqDBccmSuC O3MVul/HkEjEf2ui2etyiqmpw1l4GtLiacqM4brUDiJTwrN4JT4wrDHcoSr5Dd5BWF0K +Od/+M4lRfqJZ/Clu/jAyaqs58sS/ANnUMhXE=
Domainkey-signature: a=rsa-sha1; c=nofws;; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=Obs/IDRIQ2jJLiWMoof0JF4lYTUgT+iRPRUh4IeqZB9QbuDdDGP3R9p+lboByFKbHW 5I6NQ2Ril1BtiaVoIXqD1TZAM+Mm3wI6Hckynud6f9AM2OA4uHNNHgIJnU87zsQoXOjI 4YsNFam7eoBegQL/OLckUYi1AzV7y0wSkunMI=
In-reply-to: <>
Original-recipient: rfc822;
References: <> <> <>
> 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.


<Prev in Thread] Current Thread [Next in Thread>