From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Chou Date: Thu, 1 Oct 2015 15:22:08 +0800 Subject: [U-Boot] [PATCH v2 1/2] dm: implement a Timer uclass In-Reply-To: References: <1443446357-21393-1-git-send-email-thomas@wytron.com.tw> <1443530349-14599-1-git-send-email-thomas@wytron.com.tw> Message-ID: <560CDF20.1070808@wytron.com.tw> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Simon, On 09/29/2015 09:57 PM, Simon Glass wrote: >> +int timer_get_count(struct udevice *dev, unsigned long *count); > > We should also handle microsecond time in this API. How about: > > timer_get_ms() > timer_get_us() Please allow the additional API be implemented at some later point. It might be better to keep the first patch simple as possible, >> + /* >> + * Get the timer clock rate >> + * >> + * @dev: The Timer device >> + * @rate: pointer that returns the timer clock rate >> + */ >> + int (*get_rate)(struct udevice *dev, unsigned long *rate); > > in Hz. Also, isn't the clock rate required to be 1000 now? Sorry for the confusion. It meant the timer input clock frequency. I rename it to get_clock() now. Will this be better? Thanks a lot for your review. Best regards, Thomas Chou