From: Wolfram Sang <wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org>
To: zhangfei <zhangfei.gao-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
Cc: Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org>,
haifeng.yan-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org,
jchxue-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Wei Yan <sledge.yanwei-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
Subject: Re: [PATCH resend 2/2] i2c: hix5hd2: add i2c controller driver
Date: Fri, 26 Sep 2014 08:55:44 +0200 [thread overview]
Message-ID: <20140926065544.GA1284@katana> (raw)
In-Reply-To: <5424DDD5.1020706-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 970 bytes --]
> >>+#include <linux/clk.h>
> >>+#include <linux/delay.h>
> >>+#include <linux/i2c.h>
> >>+#include <linux/io.h>
> >>+#include <linux/interrupt.h>
> >>+#include <linux/module.h>
> >>+#include <linux/platform_device.h>
> >>+#include <linux/pm_runtime.h>
> >
> >I think there should be at least of.h, too.
> The of.h is already in i2c.h
> include/linux/i2c.h:33:#include <linux/of.h>
Please add it nonetheless, because you use e.g. of_property_read_u32()
directly. That makes you independet of changes to i2c.h.
> >>+ rate = i2c->s_clock;
> >>+ sysclock = clk_get_rate(i2c->clk);
> >>+ sclh = (sysclock / (rate * 2)) / 2 - 1;
> >>+ writel_relaxed(sclh, i2c->regs + HIX5I2C_SCL_H);
> >>+ scll = (sysclock / (rate * 2)) / 2 - 1;
> >
> >scll and sclh use the same formula? Have you measured the setup
> >frequency with a scope?
> Yes, it is confusing, will use the same vector scl instead.
> The value is same means sclk high voltage and low voltage keep same time.
OK.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: wsa@the-dreams.de (Wolfram Sang)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH resend 2/2] i2c: hix5hd2: add i2c controller driver
Date: Fri, 26 Sep 2014 08:55:44 +0200 [thread overview]
Message-ID: <20140926065544.GA1284@katana> (raw)
In-Reply-To: <5424DDD5.1020706@linaro.org>
> >>+#include <linux/clk.h>
> >>+#include <linux/delay.h>
> >>+#include <linux/i2c.h>
> >>+#include <linux/io.h>
> >>+#include <linux/interrupt.h>
> >>+#include <linux/module.h>
> >>+#include <linux/platform_device.h>
> >>+#include <linux/pm_runtime.h>
> >
> >I think there should be at least of.h, too.
> The of.h is already in i2c.h
> include/linux/i2c.h:33:#include <linux/of.h>
Please add it nonetheless, because you use e.g. of_property_read_u32()
directly. That makes you independet of changes to i2c.h.
> >>+ rate = i2c->s_clock;
> >>+ sysclock = clk_get_rate(i2c->clk);
> >>+ sclh = (sysclock / (rate * 2)) / 2 - 1;
> >>+ writel_relaxed(sclh, i2c->regs + HIX5I2C_SCL_H);
> >>+ scll = (sysclock / (rate * 2)) / 2 - 1;
> >
> >scll and sclh use the same formula? Have you measured the setup
> >frequency with a scope?
> Yes, it is confusing, will use the same vector scl instead.
> The value is same means sclk high voltage and low voltage keep same time.
OK.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140926/dc5d7872/attachment.sig>
next prev parent reply other threads:[~2014-09-26 6:55 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-26 5:25 [PATCH resend 0/2] i2c: hix5hd2: add i2c controller driver Zhangfei Gao
2014-08-26 5:25 ` Zhangfei Gao
[not found] ` <1409030722-30709-1-git-send-email-zhangfei.gao-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2014-08-26 5:25 ` [PATCH resend 1/2] i2c: hix5hd2: add devicetree documentation Zhangfei Gao
2014-08-26 5:25 ` Zhangfei Gao
2014-08-26 5:25 ` [PATCH resend 2/2] i2c: hix5hd2: add i2c controller driver Zhangfei Gao
2014-08-26 5:25 ` Zhangfei Gao
[not found] ` <1409030722-30709-3-git-send-email-zhangfei.gao-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2014-09-19 17:18 ` Wolfram Sang
2014-09-19 17:18 ` Wolfram Sang
2014-09-26 3:30 ` zhangfei
2014-09-26 3:30 ` zhangfei
[not found] ` <5424DDD5.1020706-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2014-09-26 6:55 ` Wolfram Sang [this message]
2014-09-26 6:55 ` Wolfram Sang
2014-09-15 19:56 ` [PATCH resend 0/2] " Zhangfei Gao
2014-09-15 19:56 ` Zhangfei Gao
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140926065544.GA1284@katana \
--to=wsa-z923lk4zbo2bacvfa/9k2g@public.gmane.org \
--cc=arnd-r2nGTMty4D4@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=haifeng.yan-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=jchxue-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=sledge.yanwei-hv44wF8Li93QT0dZR+AlfA@public.gmane.org \
--cc=zhangfei.gao-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.