Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2279264imm; Mon, 24 Sep 2018 01:14:57 -0700 (PDT) X-Google-Smtp-Source: ACcGV63FLTvBP/FHhVxIdIri7R5sw8I4ysD2fQbt/ulHfU9ldEb4WaE9IEANU1GitXYFkrgzomWr X-Received: by 2002:a17:902:864b:: with SMTP id y11-v6mr9578548plt.335.1537776897714; Mon, 24 Sep 2018 01:14:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537776897; cv=none; d=google.com; s=arc-20160816; b=mvvYDPYLnm8wLpk1TD9Y+TLIMw6WaL+8neVtoXipU1bo52hVftW2CgI6w25TTLSoBg MAvJet6SjMCL2a+NdbqPbWj1bW50eNGmC19aXt7+DEpOXBL/0hhsOwJKTlk+3IPGHpY1 pkkNca6owFLzGlzFe6xo8caW00IHlDUFEM+tNYzVWuOQChOkfc5x/QssL6R3l0a+GOai nuVpx52+d2Smr2yfxdaLWTt/wyrV/mm2lAKkA4j8g40QAEY68NUEbl3Jh/oahEPUMqDn Wlp+HnUsy5+/yEBiqJGnt4C6xpuNkiHBG3oeJW30kuSw1iigA+MgLfmxpgu/K2W19+6i N9Hw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=tuCpIlcdQTeV/K7rYvlgsPf7U0bVlHvEfKgiDfhDHvs=; b=mzheaHYy9OfeQU+QdNH15E4pyU71qYYnrviA7+xELgVMNaZ3OY0pZJTwlSLOl8iema m8jiqz5Bv4W6Ld4EA735EOnCQ/6WnNr0hjdpPBQfN5n3qk89d2/EQlovCUiQ1KcqQRjI 53ZuNB0uLYMt1xTRk2sVVl5fIm8u9VdXVXUAt8BR92s7vclHwCxHyWalTSrTTxjqXUPy Xz8ulZGTjASN2SCBiwf2313RS/hX6Mfnj79Ay+D74iy9nSq2jGAEt8IIpmTZ+FgUGAtE xRzCA3P0I+uoSSYfBTthEYPvrKrpwXRfJckwIcGW52tAdSoyOn9YPRY1TiHjDL3WrH1w mnSA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=VT32eHns; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q13-v6si11264817pll.472.2018.09.24.01.14.41; Mon, 24 Sep 2018 01:14:57 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=VT32eHns; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1727524AbeIXOOK (ORCPT + 99 others); Mon, 24 Sep 2018 10:14:10 -0400 Received: from mail-io1-f65.google.com ([209.85.166.65]:33950 "EHLO mail-io1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726914AbeIXOOJ (ORCPT ); Mon, 24 Sep 2018 10:14:09 -0400 Received: by mail-io1-f65.google.com with SMTP id h16-v6so6597133ioj.1 for ; Mon, 24 Sep 2018 01:13:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=tuCpIlcdQTeV/K7rYvlgsPf7U0bVlHvEfKgiDfhDHvs=; b=VT32eHnsqo34eMWXwaJmjSagmgbjREwJEg3Oo655D0ogCmuCOq3AUW7CXZRJk4yHZW tyCdK19SnYanYL4kGt8YMw4cDC9bPfRxbCobVkISd9lPVRoNbBUZ3MDDVMbrC3Omjlh4 Ypy6dKJLFUtLRhgABiSr8N3xSUzzR6cs+xDM0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=tuCpIlcdQTeV/K7rYvlgsPf7U0bVlHvEfKgiDfhDHvs=; b=c0XvaFjvAht5+0n3Fm7QNlImRvN3fYap6Ta3dAtSDrZyGYLYTbRw4zPwVVa/wj0otf Cxf4CLdDjjE4bcUUiX5I2h1mDTVUj5ddMjigZ40MzyFX1L/6DMYZf1tojwByNdXZgxHn uj+hVSssjpnlsR8sgbSGb2YNJvVRNfJPG7TyDe71aTgmzfdnGvX6iroAsLXxTszXZarv fTWKlkRXOCdSldyoinOYBlW/N5ishMF2m58ASAxQMnzjGJJH/cNALzASeTwQ+7dnHdOm fhYBO0UgvdRYLtgZPJSRja6njkwLkvRJ0pe5BxEnylvLv0Z+FsH//sk3S9FNiAZpZ5dd 6oag== X-Gm-Message-State: ABuFfohRb8e9vhaH7M6eM22Yed5CWaz0A8LHfcW+x3kNMbybuRyyvr8V 5VYY8KWP7LyQB28T1kFDHW7PjInZHndbabaUeTG98w== X-Received: by 2002:a6b:630a:: with SMTP id p10-v6mr7161376iog.175.1537776795785; Mon, 24 Sep 2018 01:13:15 -0700 (PDT) MIME-Version: 1.0 References: <2785169.v6aIfS3K2k@z50> <20180923235336.22148-1-jmkrzyszt@gmail.com> <20180923235336.22148-3-jmkrzyszt@gmail.com> In-Reply-To: <20180923235336.22148-3-jmkrzyszt@gmail.com> From: Linus Walleij Date: Mon, 24 Sep 2018 10:13:02 +0200 Message-ID: Subject: Re: [PATCH 2/2] gpiolib: Fix array members of same chip processed separately To: Janusz Krzysztofik Cc: Jonathan Corbet , Miguel Ojeda Sandonis , Peter Korsgaard , Peter Rosin , Ulf Hansson , Andrew Lunn , Florian Fainelli , "David S. Miller" , Dominik Brodowski , Greg KH , kishon@ti.com, Lars-Peter Clausen , Michael Hennerich , Jonathan Cameron , Hartmut Knaack , Peter Meerwald , Jiri Slaby , Willy Tarreau , Geert Uytterhoeven , Sebastien Bourdelin , Lukas Wunner , Rojhalat Ibrahim , Russell King , ext Tony Lindgren , Yegor Yefremov , =?UTF-8?Q?Uwe_Kleine=2DK=C3=B6nig?= , linux-doc@vger.kernel.org, linux-i2c@vger.kernel.org, linux-mmc , netdev , linux-iio@vger.kernel.org, devel@driverdev.osuosl.org, linux-serial@vger.kernel.org, "open list:GPIO SUBSYSTEM" , "linux-kernel@vger.kernel.org" , Marek Szyprowski , Krzysztof Kozlowski , linux-samsung-soc Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Sep 24, 2018 at 1:52 AM Janusz Krzysztofik wrote: > New code introduced by commit bf9346f5d47b ("gpiolib: Identify arrays > matching GPIO hardware") forcibly tries to find an array member which > has its array index number equal to its hardware pin number and set > up an array info for possible fast bitmap processing of all arrray > pins belonging to that chip which also satisfy that numbering rule. > > Depending on array content, it may happen that consecutive array > members which belong to the same chip but don't have array indexes > equal to their pin hardware numbers will be split into groups, some of > them processed together via the fast bitmap path, and rest of them > separetely. However, applications may expect all those pins being > processed together with a single call to .set_multiple() chip callback, > like that was done before the change. > > Limit applicability of fast bitmap processing path to cases where all > pins of consecutive array members starting from 0 which belong to the > same chip have their hardware numbers equal to their corresponding > array indexes. That should still speed up processing of applications > using whole GPIO banks as I/O ports, while not breaking simultaneous > manipulation of consecutive pins of the same chip which don't follow > the equal numbering rule. > > Cc: Jonathan Corbet > Signed-off-by: Janusz Krzysztofik Patch applied! Yours, Linus Walleij