Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp3342656rwb; Mon, 16 Jan 2023 06:54:13 -0800 (PST) X-Google-Smtp-Source: AMrXdXsGT9vf9Tsgl1sufBRccI+lQZKac/QkH9BpHTnv60Mjwd+uZyTz4WcC6UViITbvlxn4pPcq X-Received: by 2002:a05:6a21:3299:b0:b8:ad44:8530 with SMTP id yt25-20020a056a21329900b000b8ad448530mr1106170pzb.59.1673880853525; Mon, 16 Jan 2023 06:54:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673880853; cv=none; d=google.com; s=arc-20160816; b=iIn7Acrs+XCFiBXdz73LTKKqv0VszUpo6QeznpZdYDmtvmNKTerfJT3cPYJM1AYMsJ Sa0A8tc44vc+WASaBM9HO7GIFcRFOU40OK6jzPzU20MYjOw6iWmzN/zq0J8eRWOIf61O p4asbFcGVB1WmwUOiGxDNsbOSDt7pJG5Lihecb9QLQPtMK+H0/1Aqyercr+GdfeuFyu8 4Ou71w7G80JtHyWb8UdLU7kntyBhfp3RR6x6EhbTQf/pu6C+7x+VTAiW+nSxirbSWNBD aBZM5A6zB2nTSyRiBQyJQ4W2QLGY4pY5XmMKQB3eIPcqsu9jmek23yPHgw5xOJ9gsQev 5NrA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=hCyXRjcH8YuwMPEc2ZGG+hIyruOgN3sWMVzTY5twqOU=; b=HysQcNfckUgRruNRnx6KTL+wSixQUIia9s9yx8JawR+wN7q+1mONwofSYNOyfnChua QolhDjJkVZL0AFIXjwwwCjcKGneEkH/nQGPvL1mloSmUyVpsPxRyl+KXJ/hgB5QEFjiX cSPGvcxDafcgf8z3xqdWtL9FAbUWluOUs2T1Sb5mHYOoX5Cnoh/7UNJw4A3oU4IuUL+s QrKdUdaGee2FCOdH4b4Cd4M3YZcPU7J6LN3yQZ0xXDqA63te1ewZ3AkVU0bQuGunxPdb sqNPpkMvLay3yFMwpEG0njPtBZ8uGQDH41PUnPTioEXM849mgNJvYM5wpTckEitWUXEU fxEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=XWpOyCzt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o25-20020a635a19000000b0047715878df9si29223592pgb.628.2023.01.16.06.54.07; Mon, 16 Jan 2023 06:54:13 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=XWpOyCzt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232238AbjAPOpQ (ORCPT + 50 others); Mon, 16 Jan 2023 09:45:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37452 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232384AbjAPOo2 (ORCPT ); Mon, 16 Jan 2023 09:44:28 -0500 Received: from mail-yb1-xb2f.google.com (mail-yb1-xb2f.google.com [IPv6:2607:f8b0:4864:20::b2f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ED1D922DCF for ; Mon, 16 Jan 2023 06:24:53 -0800 (PST) Received: by mail-yb1-xb2f.google.com with SMTP id e130so924237yba.7 for ; Mon, 16 Jan 2023 06:24:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=hCyXRjcH8YuwMPEc2ZGG+hIyruOgN3sWMVzTY5twqOU=; b=XWpOyCztBtkKx9ZAX92Cij1ET+v3vM5l4VgjTnfVz8etnbVKmQzdzXKiArQff3IlVy jvoZUuLVCzvHSWG43wIh5rLJu/thKefKdcqxmWqYiy4/y/UmeyiaA+aZFHIUnv3wlzeD dIEt6/mDa9m+meh8Kgli87SMgtlT45zia86KPKlID1ylg2f82LVnbZcw+rW9IPsg+y2Q umy8FyEupLgcjA47nK+5cEQGho3FR2tB8m33lVTZ9LVPWc7VVlPaPrF7XwbrDlWP5JaV 7gcYpsfMwI0HO+/cNhLw1CjUA1zn3NliRhzyI6Fd9yr8LfEoqaReR+ydamnQimvJFlvi oz+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=hCyXRjcH8YuwMPEc2ZGG+hIyruOgN3sWMVzTY5twqOU=; b=f2DhHijh06wRLvo8rpWSFkZFrhwTLNZSHg+JH6mPinQ02AfM1tm0311mnYu2HAjAiF n0wy13TDCbFiEgeNwtQ8RXOWKLPpN+vQog4m2aDMB6UJzu2odcGg5NSV9TmnxQSEJSLE QltAiwMEv5v9yRFjS6cvMPDGqyp+VdnlCM6+mBFQ16gBENIHxVyhX/dp8w2G1hw8eKhP 7xRVL2kg7/0JsBv5ef1988kLJeAgMqQCUvv1CgmnIbSlzFv0uuZEfIBd7IAdNdgZZnAj +U/q1y9aTDav7J47P+3DatwGx8bouwWjYObRuWMWeOQhsU/edBStsATPlWu7gOu8whnM 3COA== X-Gm-Message-State: AFqh2krxIhefHaNaG4GUIO1Twwslx9Ot6JSeARH5aGAd9OEFOPHqdTNS f7QN77Hf7vT0oeaG2YN/gBWdo9cAUq0DlkTdWBVFsw== X-Received: by 2002:a5b:a90:0:b0:70b:87d5:4a73 with SMTP id h16-20020a5b0a90000000b0070b87d54a73mr7127242ybq.584.1673879093120; Mon, 16 Jan 2023 06:24:53 -0800 (PST) MIME-Version: 1.0 References: <20230113205922.2312951-1-andreas@kemnade.info> In-Reply-To: <20230113205922.2312951-1-andreas@kemnade.info> From: Linus Walleij Date: Mon, 16 Jan 2023 15:24:42 +0100 Message-ID: Subject: Re: [PATCH] gpio: omap: use dynamic allocation of base To: Andreas Kemnade Cc: grygorii.strashko@ti.com, ssantosh@kernel.org, khilman@kernel.org, brgl@bgdev.pl, linux-omap@vger.kernel.org, linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jan 13, 2023 at 9:59 PM Andreas Kemnade wrote: > Static allocatin is deprecated and may cause probe mess, > if probe order is unusual. > > like this example > [ 2.553833] twl4030_gpio twl4030-gpio: gpio (irq 145) chaining IRQs 161..178 > [ 2.561401] gpiochip_find_base: found new base at 160 > [ 2.564392] gpio gpiochip5: (twl4030): added GPIO chardev (254:5) > [ 2.564544] gpio gpiochip5: registered GPIOs 160 to 177 on twl4030 > [...] > [ 2.692169] omap-gpmc 6e000000.gpmc: GPMC revision 5.0 > [ 2.697357] gpmc_mem_init: disabling cs 0 mapped at 0x0-0x1000000 > [ 2.703643] gpiochip_find_base: found new base at 178 > [ 2.704376] gpio gpiochip6: (omap-gpmc): added GPIO chardev (254:6) > [ 2.704589] gpio gpiochip6: registered GPIOs 178 to 181 on omap-gpmc > [...] > [ 2.840393] gpio gpiochip7: Static allocation of GPIO base is deprecated, use dynamic allocation. > [ 2.849365] gpio gpiochip7: (gpio-160-191): GPIO integer space overlap, cannot add chip > [ 2.857513] gpiochip_add_data_with_key: GPIOs 160..191 (gpio-160-191) failed to register, -16 > [ 2.866149] omap_gpio 48310000.gpio: error -EBUSY: Could not register gpio chip > > So probing was done in an unusual order, causing mess > and chips not getting their gpio in the end. > > Signed-off-by: Andreas Kemnade Dangerous but beautiful change. Let's be brave. Reviewed-by: Linus Walleij > maybe CC stable? not sure about good fixes tag. I wouldn't do that from the outset. If there are no problems for a few kernel releases we can think about doing that. Yours, Linus Walleij