From: Daniel Mack <zonque@gmail.com>
To: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
Subject: regmap: Question about devices with unequal register sizes
Date: Sat, 16 Feb 2013 18:03:51 +0100 [thread overview]
Message-ID: <511FBBF7.2020103@gmail.com> (raw)
Hi Mark and everyone,
I'm writing a driver for an I2C audio codec which has an unusual
register map. The datasheet can be found here:
http://www.ti.com/lit/gpn/tas5086
The register layout is described on page 26, and they call their
registers 'subaddresses'. Up to sub-address 0x1c, I see no problem
mapping that to a simple 8-bit regmap layout, but above that, access
gets trickier because registers change their sizes, which breaks the cache.
So for example, in order to set the 'Downmix input MUX register', the
host is expected to send the sub-address 0x21, followed by 4 consecutive
bytes containing the values. 0x21 is, however, not the correct offset in
the register cache, as 0x20 ('Input MUX register') is also 4 bytes in
size. Higher registers also have to be written in 20 byte blocks.
I thought about registering multiple regmaps with the i2c device, but
that turns out not to play well with ASoC, which always takes the first
regmap for the device.
Are ranges within in the regmap_config what I want here? I haven't yet
figured how to use them accordingly though.
Thanks for sharing any ideas.
Best regards,
Daniel
next reply other threads:[~2013-02-16 17:04 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-16 17:03 Daniel Mack [this message]
2013-02-17 16:23 ` regmap: Question about devices with unequal register sizes Mark Brown
2013-05-06 16:32 ` Daniel Mack
2013-05-06 19:36 ` Mark Brown
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=511FBBF7.2020103@gmail.com \
--to=zonque@gmail.com \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=dp@opensource.wolfsonmicro.com \
--cc=linux-kernel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox