From patchwork Fri May 9 11:57:06 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 29887 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qc0-f198.google.com (mail-qc0-f198.google.com [209.85.216.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id B310620534 for ; Fri, 9 May 2014 11:57:12 +0000 (UTC) Received: by mail-qc0-f198.google.com with SMTP id m20sf11721335qcx.5 for ; Fri, 09 May 2014 04:57:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:mime-version:in-reply-to:references :date:message-id:subject:from:to:cc:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe:content-type; bh=cq9ChbKkcjwVzJ0TAUIWEno17CR4ovA8U4EhFen1Y+8=; b=PC92xDZFFPZeXZP6W4nX6/jGyNGjqIwDAw8ricoWveaUSDNyTwuiDjcJ25ffkRYb7C TMgSXaXuEyECWfxvW530ou14WHdVl64wj5lvV6dNgMyQWVgc/ZHXdCsfMieTWwqMATda N4yqsBJPU27agO5aaCio+G+xg+N0Vw/XtrCuD6HLA/Q4XdJaAgNZdSO5TDEmA9/n4KK/ a07Tg3DKQ5k2idlz2bZGWzG1MNqA+rSLgAM2x69cZHbAzDsB3/EFPP10EdgeB8jMWvBA Jz6ZGqQmHEe5GwNfzsmqvCU2n9SqAmRFOgRGQzEkwVQg/7xVFcGY4N4izeAJtCaThlxE DXLA== X-Gm-Message-State: ALoCoQm/iltjrm/K1WYELBdVEQXUB5P1YKg8C0eCeaVt363Svgxe4suNwJ8h0ftz43iQpEYpZIZB X-Received: by 10.236.142.101 with SMTP id h65mr4119669yhj.1.1399636632233; Fri, 09 May 2014 04:57:12 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.101.4 with SMTP id t4ls292226qge.1.gmail; Fri, 09 May 2014 04:57:12 -0700 (PDT) X-Received: by 10.58.66.195 with SMTP id h3mr120760vet.57.1399636632070; Fri, 09 May 2014 04:57:12 -0700 (PDT) Received: from mail-ve0-f169.google.com (mail-ve0-f169.google.com [209.85.128.169]) by mx.google.com with ESMTPS id iz10si689519vec.60.2014.05.09.04.57.12 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 09 May 2014 04:57:12 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.128.169 as permitted sender) client-ip=209.85.128.169; Received: by mail-ve0-f169.google.com with SMTP id jx11so5167652veb.28 for ; Fri, 09 May 2014 04:57:12 -0700 (PDT) X-Received: by 10.52.181.132 with SMTP id dw4mr80553vdc.86.1399636631987; Fri, 09 May 2014 04:57:11 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.221.72 with SMTP id ib8csp73066vcb; Fri, 9 May 2014 04:57:11 -0700 (PDT) X-Received: by 10.66.227.193 with SMTP id sc1mr19851789pac.102.1399636630956; Fri, 09 May 2014 04:57:10 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id dh1si2149226pbc.198.2014.05.09.04.57.10; Fri, 09 May 2014 04:57:10 -0700 (PDT) Received-SPF: none (google.com: linux-gpio-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755387AbaEIL5J (ORCPT + 1 other); Fri, 9 May 2014 07:57:09 -0400 Received: from mail-ob0-f179.google.com ([209.85.214.179]:50308 "EHLO mail-ob0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755180AbaEIL5H (ORCPT ); Fri, 9 May 2014 07:57:07 -0400 Received: by mail-ob0-f179.google.com with SMTP id gq1so4648217obb.24 for ; Fri, 09 May 2014 04:57:06 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.60.17.132 with SMTP id o4mr12956676oed.34.1399636626880; Fri, 09 May 2014 04:57:06 -0700 (PDT) Received: by 10.182.20.76 with HTTP; Fri, 9 May 2014 04:57:06 -0700 (PDT) In-Reply-To: References: <1398287792-19831-1-git-send-email-linus.walleij@linaro.org> <1398287792-19831-3-git-send-email-linus.walleij@linaro.org> Date: Fri, 9 May 2014 13:57:06 +0200 Message-ID: Subject: Re: [PATCH 2/2] RFT: pinctrl: sirf: move sgpio lock into state container From: Linus Walleij To: Barry Song Cc: LKML , Barry Song , Linux GPIO List , DL-SHA-WorkGroupLinux Sender: linux-gpio-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-gpio@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: linus.walleij@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.128.169 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , On Thu, May 1, 2014 at 2:40 PM, Barry Song wrote: > 2014-04-24 5:16 GMT+08:00 Linus Walleij : >> Instead of referring to a global static variable for the sgpio >> locking, use the state container to contain the lock. >> >> Signed-off-by: Linus Walleij > > hi Linus, thanks! this looks very good only if we fix the > gpiochip_add_pin_range() failure in patch 1: > > [ 0.231658] pinmux-sirf b0120000.pinctrl: initialized SIRFSOC pinmux driver > [ 0.261200] bio: create slab at 0 > [ 0.268264] GPIO chip /axi/peri-iobg/pinctrl@b0120000: could not > create pin range > [ 0.276142] pinmux-sirf b0120000.pinctrl: could not add gpiochip pin range Hm! This may mean that the pin controller is not there at this point, so the pin controller needs to be probed first, before the gpiochip and its range is probed. What happens if you do this: Yours, Linus Walleij --- To unsubscribe from this list: send the line "unsubscribe linux-gpio" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/pinctrl/sirf/pinctrl-sirf.c b/drivers/pinctrl/sirf/pinctrl-sirf.c index 76502aab2cb1..ce7c3552398f 100644 --- a/drivers/pinctrl/sirf/pinctrl-sirf.c +++ b/drivers/pinctrl/sirf/pinctrl-sirf.c @@ -950,7 +950,7 @@ static int __init sirfsoc_gpio_init(void) return sirfsoc_gpio_probe(np); } -subsys_initcall(sirfsoc_gpio_init); +device_initcall(sirfsoc_gpio_init); MODULE_AUTHOR("Rongjun Ying , " "Yuping Luo , "