Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757472Ab1DMPWK (ORCPT ); Wed, 13 Apr 2011 11:22:10 -0400 Received: from na3sys009aog102.obsmtp.com ([74.125.149.69]:54963 "EHLO na3sys009aog102.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757130Ab1DMPWI convert rfc822-to-8bit (ORCPT ); Wed, 13 Apr 2011 11:22:08 -0400 DomainKey-Signature: a=rsa-sha1; c=nofws; d=nanometrics.ca; s=google; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=KYXBhRu4smboM0je4bEso4O56OcmT5PwcsxiKLHuPHWikI+SwDHpvZCx+81McYq5ZR pSFwMgyYF0AXGO3sY3BGiUtAb5hBNUXns3qbQedp+q3UFjX86TGhoIFIU/zHXwOn267q Vo9Trprpae33XOtzIu2UNJJRZ46JGI3I12ifk= MIME-Version: 1.0 In-Reply-To: References: Date: Wed, 13 Apr 2011 11:22:05 -0400 Message-ID: Subject: Re: [PATCH 6/6] da8xx: enable the use of the ICPFUNC in i2c-davinci From: Ben Gardiner To: "Nori, Sekhar" Cc: "davinci-linux-open-source@linux.davincidsp.com" , "linux-i2c@vger.kernel.org" , Ben Dooks , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" , Bastian Ruppert , "Griffis, Brad" , Jon Povey , Philby John Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2019 Lines: 59 Hi Sekhar, On Wed, Apr 13, 2011 at 11:10 AM, Nori, Sekhar wrote: > Hi Ben, > > On Wed, Apr 06, 2011 at 03:08:09, Ben Gardiner wrote: >> Both the da850 and da830 have an I2C controller which has the ICPFUNC >> registers. Indicate this for all da830 and da850 boards by setting the >> has_pfunc flag true in the da8xx utility setup routine for registering the >> I2C controller >> >> Signed-off-by: Ben Gardiner >> Cc: Sekhar Nori >> Cc: Ben Dooks >> >> --- >> ?arch/arm/mach-davinci/devices-da8xx.c | ? ?6 ++++++ >> ?1 files changed, 6 insertions(+), 0 deletions(-) >> >> diff --git a/arch/arm/mach-davinci/devices-da8xx.c b/arch/arm/mach-davinci/devices-da8xx.c >> index beda8a4..da01558 100644 >> --- a/arch/arm/mach-davinci/devices-da8xx.c >> +++ b/arch/arm/mach-davinci/devices-da8xx.c >> @@ -324,6 +324,12 @@ int __init da8xx_register_i2c(int instance, >> ? ? ? else >> ? ? ? ? ? ? ? return -EINVAL; >> >> + ? ? /* >> + ? ? ?* Both the DA850 and DA830 have an I2C controller which has the >> + ? ? ?* ICPFUNC et. al. registers >> + ? ? ?*/ >> + ? ? pdata->has_pfunc = 1; > > The I2C driver implements a default platform data > so it should actually be legal for a DA8x board to > pass NULL platform data. In that case this line > will crash. Good catch, thanks. > [...] You should either check for pdata to > be NULL or just let each board choose whether it > needs recovery (I think the better option). I understand "check for pdata to be NULL." If you think it is the better option I'd be happy to implement it but I don't understand how to implement "let each board choose whether it needs recovery." Best Regards, Ben Gardiner --- Nanometrics Inc. http://www.nanometrics.ca -- 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/