[Top] [All Lists]

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

To: Manuel Lauss <>
Subject: Re: [PATCH 1/2]: Add support for Dallas/Maxim DS1685/1687 RTC
From: Kumba <>
Date: Thu, 17 Feb 2011 03:17:34 -0500
Cc: Lars-Peter Clausen <>, Linux MIPS List <>,
In-reply-to: <>
Original-recipient: rfc822;
References: <> <> <> <>
User-agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv: Gecko/20101207 Lightning/1.0b2 Thunderbird/3.1.7
On 02/17/2011 02:31, Manuel Lauss wrote:

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


I think I get most of it here. i2c-ocores.c defines `struct ocores_i2c`, which has regstep in it. I assume the equivalent to this in the RTC driver is going to be ds1685_priv. But in i2c_ocores.h, `struct ocores_i2c_platform_data` is defined, which also carries a regstep. In i2c-ocores.c, this struct becomes *pdata while ocores_i2c becomes *i2c, and *i2c is used to access the registers.

I don't think I have an equivalent to either of these two with the way the driver was originally written and how I modified it. The ds1685_priv kinda does both right now. I assume platform_data is not really defined...I have to implement one specific to this RTC driver, giving it specific variables that need to be customizable at the platform level, and then set those in the machine-specific areas, i.e., somewhere in IP32's platform file.

Sound correct?

Joshua Kinard

"The past tempts us, the present confuses us, the future frightens us. And our lives slip away, moment by moment, lost in that vast, terrible in-between."

--Emperor Turhan, Centauri Republic

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