Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932706Ab2EYIhN (ORCPT ); Fri, 25 May 2012 04:37:13 -0400 Received: from tx2ehsobe001.messaging.microsoft.com ([65.55.88.11]:17280 "EHLO tx2outboundpool.messaging.microsoft.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932201Ab2EYIhH (ORCPT ); Fri, 25 May 2012 04:37:07 -0400 X-Forefront-Antispam-Report: CIP:70.37.183.190;KIP:(null);UIP:(null);IPV:NLI;H:mail.freescale.net;RD:none;EFVD:NLI X-SpamScore: -9 X-BigFish: VS-9(zz1432N98dKzz1202hzzz2dh2a8h668h839h944hd25hf0ah) Date: Fri, 25 May 2012 16:56:51 +0800 From: Shawn Guo To: Marc Reilly CC: Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= , Fabio Estevam , Mark Brown , Samuel Ortiz , Sascha Hauer , Philippe =?iso-8859-1?Q?R=E9tornaz?= , linux-kernel Subject: Re: mc13xxx-core: kernel hangs after 'regmap_read' Message-ID: <20120525085649.GA8495@S2100-06.ap.freescale.net> References: <201205221053.21792.marc@cpdesign.com.au> <20120524064635.GP3710@pengutronix.de> <20120524073315.GE7843@S2100-06.ap.freescale.net> <201205241908.38278.marc@cpdesign.com.au> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <201205241908.38278.marc@cpdesign.com.au> User-Agent: Mutt/1.5.21 (2010-09-15) X-OriginatorOrg: freescale.com Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1196 Lines: 31 On Thu, May 24, 2012 at 07:08:37PM +1000, Marc Reilly wrote: > > diff --git a/drivers/mfd/mc13xxx-spi.c b/drivers/mfd/mc13xxx-spi.c > > index 3fcdab3..5d1969f 100644 > > --- a/drivers/mfd/mc13xxx-spi.c > > +++ b/drivers/mfd/mc13xxx-spi.c > > @@ -49,6 +49,7 @@ static struct regmap_config mc13xxx_regmap_spi_config = { > > .reg_bits = 7, > > .pad_bits = 1, > > .val_bits = 24, > > + .write_flag_mask = 0x80, > > Should probably have .read_flag_mask = 0x00, here too. If either are non zero, > both are set. > Since mc13xxx_regmap_spi_config is a static variable, .read_flag_mask is initialized as 0 already. > I guess this is the problem, regmap's default read_flag_mask for the spi bus > is 0x80, and the write mask defaults to 0. The mc13xxx works the opposite way > though! aarg. My bad for not noticing. So setting the write_flag_mask to 0x80 > also sets the read mask to 0 correctly also. -- Regards, Shawn -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/