From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Fabio Estevam <festevam@gmail.com>
Cc: marc@cpdesign.com.au, "Samuel Ortiz" <sameo@linux.intel.com>,
"Sascha Hauer" <kernel@pengutronix.de>,
"Philippe Rétornaz" <philippe.retornaz@epfl.ch>,
linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: mc13xxx-core: kernel hangs after 'regmap_read'
Date: Wed, 23 May 2012 18:36:18 +0100 [thread overview]
Message-ID: <20120523173617.GC4064@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <CAOMZO5DKLO5B7vbMKmXLfmR0zgVX5bVcxK22khTt=X71bL5tOQ@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 836 bytes --]
On Wed, May 23, 2012 at 11:18:10AM -0300, Fabio Estevam wrote:
> #define MC13XXX_REGOFFSET_SHIFT 25
> int mc13xxx_reg_read(struct mc13xxx *mc13xxx, unsigned int offset, u32 *val)
> {
> struct spi_transfer t;
> struct spi_message m;
> int ret;
>
> BUG_ON(!mutex_is_locked(&mc13xxx->lock));
>
> if (offset > MC13XXX_NUMREGS)
> return -EINVAL;
>
> *val = offset << MC13XXX_REGOFFSET_SHIFT;
> ,would the spi regmap access take into account this
> MC13XXX_REGOFFSET_SHIFT operation?
The data sent should be however many bits of register address are
specified, followed by however many padding bits are specified, followed
by the data. The shift there will be some combination of the padding
and register address.
Though if the device is looking for everything byte swapped for some
insane reason...
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
next prev parent reply other threads:[~2012-05-23 17:36 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-21 16:06 mc13xxx-core: kernel hangs after 'regmap_read' Fabio Estevam
2012-05-22 0:53 ` Marc Reilly
2012-05-22 9:25 ` Mark Brown
2012-05-22 11:40 ` Fabio Estevam
2012-05-22 12:48 ` Philippe Rétornaz
2012-05-22 14:45 ` Fabio Estevam
2012-05-23 1:12 ` Fabio Estevam
2012-05-23 2:05 ` Fabio Estevam
2012-05-23 8:49 ` Mark Brown
2012-05-23 14:18 ` Fabio Estevam
2012-05-23 15:29 ` Fabio Estevam
2012-05-23 17:36 ` Mark Brown [this message]
2012-05-23 19:32 ` Fabio Estevam
2012-05-23 16:42 ` Shawn Guo
2012-05-23 16:34 ` Fabio Estevam
2012-05-24 0:48 ` Shawn Guo
2012-05-24 4:07 ` Fabio Estevam
2012-05-24 6:04 ` Shawn Guo
2012-05-24 6:39 ` Shawn Guo
2012-05-24 6:46 ` Uwe Kleine-König
2012-05-24 7:33 ` Shawn Guo
2012-05-24 9:08 ` Marc Reilly
2012-05-24 10:37 ` Mark Brown
2012-05-24 11:22 ` Marc Reilly
2012-05-24 12:14 ` Mark Brown
2012-05-24 13:06 ` Marc Reilly
2012-05-24 16:37 ` Mark Brown
2012-05-24 13:01 ` Fabio Estevam
2012-05-24 13:38 ` Marc Reilly
2012-05-24 16:16 ` Philippe Rétornaz
2012-05-24 16:36 ` Mark Brown
2012-05-24 16:41 ` Uwe Kleine-König
2012-05-24 17:39 ` Fabio Estevam
2012-05-24 18:03 ` Mark Brown
2012-05-24 19:42 ` philippe.retornaz
2012-05-24 22:21 ` Mark Brown
2012-05-25 8:56 ` Shawn Guo
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=20120523173617.GC4064@opensource.wolfsonmicro.com \
--to=broonie@opensource.wolfsonmicro.com \
--cc=festevam@gmail.com \
--cc=kernel@pengutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=marc@cpdesign.com.au \
--cc=philippe.retornaz@epfl.ch \
--cc=sameo@linux.intel.com \
/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