From: heiko@sntech.de (Heiko Stübner)
To: linux-arm-kernel@lists.infradead.org
Subject: Rockchip RK3188 I2C driver
Date: Tue, 15 Apr 2014 19:25:28 +0200 [thread overview]
Message-ID: <2745802.Mh5myQIMrf@phil> (raw)
In-Reply-To: <3138967.5Gj2T0XUGf@phil>
Am Dienstag, 15. April 2014, 10:42:18 schrieb Heiko St?bner:
> > The driver is almost finished, it's just missing support for long
> > transfers
> > (>32 bytes) and a bit of cleanup. Communication with the ACT8846 works
> > without problems. It depends on your clock driver though, so I'll wait
> > with
> > a patch until that is finished, right?
>
> Not necessarily. Normally the drivers go through different trees anyway
> (here clock tree vs. i2c tree) and you might get comments and might need a
> v2 anyway. Also as the driver will simply use the standard clock API, you
> have no dependies on my series - so in my mind you should simply go ahead
> when you're finished with it.
Looking at the grf-handling of your i2c-driver [0] reminded me, that I'm
generally not sure how we should handle these registers. All of them use what
recently always got called a hiword-mask, with the upper 16 bit indicating
which lower 16 bit get changed.
So while the
regmap_write(grf, 4, BIT(11 + bus_idx) | BIT(27 + bus_idx));
will most likely get the desired result at least once, I'm not sure how this
interacts with the caching regmap implements [and regmap in general], as the
bit(27 + bus_idx) is not a real value bit and will always read 0.
It may be sensible to teach regmap to handle such hiword-mask registers itself
like in the clock case [1], so that it can automatically select the
appropriate mask bits when value-bits are changed.
I've added Mark Brown, the regmap maintainer, in Cc because I'm not 100% sure
if this is the correct way to go.
Heiko
[0]
https://github.com/xqms/linux/commit/531bcb12a2ac1975f61d16d05e4608800c054c0d#diff-375822b3a417ed4faea8f6ae3e5c1766R621
[1] http://lists.infradead.org/pipermail/linux-arm-kernel/2013-June/174687.html
next prev parent reply other threads:[~2014-04-15 17:25 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-15 0:19 Rockchip RK3188 I2C driver Max Schwarz
2014-04-15 8:42 ` Heiko Stübner
2014-04-15 17:25 ` Heiko Stübner [this message]
2014-04-15 17:55 ` Mark Brown
2014-04-15 18:39 ` Heiko Stübner
2014-04-15 18:50 ` Mark Brown
2014-04-17 0:04 ` Max Schwarz
2014-04-17 13:27 ` Heiko Stübner
2014-04-17 23:10 ` Mark Brown
2014-04-17 18:38 ` Mark Brown
2014-04-17 23:06 ` Max Schwarz
2014-04-18 9:06 ` Heiko Stübner
2014-04-18 9:30 ` Max Schwarz
2014-04-18 10:03 ` Heiko Stübner
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=2745802.Mh5myQIMrf@phil \
--to=heiko@sntech.de \
--cc=linux-arm-kernel@lists.infradead.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.