Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp4116814imm; Mon, 6 Aug 2018 17:22:24 -0700 (PDT) X-Google-Smtp-Source: AAOMgpewd1mcv1ttZ437VIprL/KDPlmwP3HJF6J13AsVOwDEdq9igKYCvUfXRdVuya/p5nqQwCsL X-Received: by 2002:a62:828a:: with SMTP id w132-v6mr19406308pfd.121.1533601344571; Mon, 06 Aug 2018 17:22:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533601344; cv=none; d=google.com; s=arc-20160816; b=BWoJJ2ZPcUjxZ+ODLTRg+zevBnsVRIA34IFhiNQwXdDfg8c+L+zg56FvvbAnhT7Z6X /svtO4r4z2RU1C1WRL0pVywFR0BZcffpgjD7a3K5NSM/vRxoexYGhvr9+SlERfa8pvgl E01TXn6S232XLQeDSqBwf0eyUgZapH9OuHgDs7R4+ku6RZ5qy25DIZxZO49M5i+nfBTb GLKkgdfykwodDt3HwXNwGiRdvR4Iz9j0W2EnGkHJ/KpGVutq7xDTY3KWoOWt4OuvLpUx 8V7FkoLrkUxleIZC6fKalrPPTVRjs3ZC3XPuuxdwE6TmtxHgPIOjWFmn3zgV3lSY6Xlg sTog== 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 :arc-authentication-results; bh=++aIMYHofQKiYz4ikdgVTDWQ3caOYUTmMuvbnRUAtAA=; b=nPwfqPm1OJiFPBcv6sumJRguExJ3DXIz8idrU63mYL9JMJec7gx+zwwQHuPIXs+vsh u0np9A5TTXh1MgBn8KAjiP4HOsO8NuKVJsRI82uiXLeBrQ+R1JPp2I4K6kt4Vy1kxZ3o Ns3xoFPsnjWNv40enUVTh5vTFXFRDvwgqgicUcGzUI5BtwxgQFZe/L/zKuYZA3F3SVbe YPAyo4GN0LzPj1H95lCxirArpyQxOMiVxKm1AtGsVTfV/bu4ceQiC7hx8q7fN6abs43a ngqs4K3V2dMMxNWEdzre+wMGxwahDvX6fWSxXsU5wJ9qMZe+MQqumz7qBZrbHOUDno6n 0cEQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="Ym/G8g80"; 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 1-v6si10818987ply.354.2018.08.06.17.22.08; Mon, 06 Aug 2018 17:22:24 -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="Ym/G8g80"; 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 S2387678AbeHGBzh (ORCPT + 99 others); Mon, 6 Aug 2018 21:55:37 -0400 Received: from mail-it0-f68.google.com ([209.85.214.68]:53872 "EHLO mail-it0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387578AbeHGBzh (ORCPT ); Mon, 6 Aug 2018 21:55:37 -0400 Received: by mail-it0-f68.google.com with SMTP id 72-v6so19740210itw.3 for ; Mon, 06 Aug 2018 16:44:09 -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=++aIMYHofQKiYz4ikdgVTDWQ3caOYUTmMuvbnRUAtAA=; b=Ym/G8g80gCdozhE7OK/rwY2mYmsx5f7zkJ1KTQSrZUQvf/MXu3WEDWUmTH3O7lZjBe z9VOThcX9srVfEJ22kZ5OrEoXLabU7A75RAQCAEVVdPqgGR++zfnjIgy2vAq1J7V8uSG Lgt7tdMm3wKQ32n10q+nU41UyjJH5EE0rZHHQ= 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=++aIMYHofQKiYz4ikdgVTDWQ3caOYUTmMuvbnRUAtAA=; b=l8ktFV9DjhYdo+Sf2aYTNVjYa8UwCqauvqYJotHhuaQmeuSYm7HpamRucyYLxH2ZD4 O6tSrlBeCacEAlRfvVZFw/AHdc33DYRasm1g0PQ23+bLSjfuuJHh9AYh+ywyX81vvriC wbT1XEd1mUP5KNvOQsAEBkgwlg79wB9cBwTWP8buX9FFd+bffemmCctwggPsE+UpvxtO JZxKYIT5z1QLeQrnyjHmCIl/7NwzuJykR0PVaPrEyZZoGymMz0piurOEZK9CxxqlOHgA Q6aSWmrV3pzgp8S8RjoUu9d0K8V4xdOJKwncbCrrK8XsuXjnmoF1T7n3mEtVwd2Y9pZe s1cA== X-Gm-Message-State: AOUpUlHP9kqk3mxLfP7VrrSedvbmKEpfaEq8Nux0tBCmnnHZgJfJFW8C gxSgtlRF4CzmvtZpY/ukqWW6+a1EhMHG0C9kTqmsVw== X-Received: by 2002:a24:5004:: with SMTP id m4-v6mr136215itb.38.1533599049517; Mon, 06 Aug 2018 16:44:09 -0700 (PDT) MIME-Version: 1.0 References: <20180718235710.18242-1-jmkrzyszt@gmail.com> <20180806222918.12644-1-jmkrzyszt@gmail.com> <20180806222918.12644-13-jmkrzyszt@gmail.com> In-Reply-To: <20180806222918.12644-13-jmkrzyszt@gmail.com> From: Linus Walleij Date: Tue, 7 Aug 2018 01:43:56 +0200 Message-ID: Subject: Re: [RFC PATCH v2 12/12] gpiolib: Add fast processing path to bitmap API functions To: Janusz Krzysztofik Cc: Boris Brezillon , Jonathan Corbet , =?UTF-8?Q?Miqu=C3=A8l_Raynal?= , Richard Weinberger , David Woodhouse , Brian Norris , Mark Vasut , ext Tony Lindgren , Aaro Koskinen , Linux ARM , Linux-OMAP , linux-mtd@lists.infradead.org, linux-doc@vger.kernel.org, "open list:GPIO SUBSYSTEM" , "linux-kernel@vger.kernel.org" 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 Tue, Aug 7, 2018 at 12:29 AM Janusz Krzysztofik wrote: Hi Janusz! > Certain GPIO descriptor arrays returned by gpio_get_array() may contain > information on a single GPIO chip driving array member pins in hardware > order. In such cases, bitmaps of values can be passed directly to the > chip callback functions without wasting time on iterations. > > Add respective code to gpiod_get/set_array_bitmap_complex() functions. > > Signed-off-by: Janusz Krzysztofik I think it would be disappointing to leave all the users of the old array API without the performance improvement. I think we need to deal with this in a way such that everyone can benefit from it. Also it is kludgy if users (consumers) would need to handle the case where all lines are on the same chip separately, through the bitmap API. What we need is an API that: - All drivers handling arrays can use (including current users). - Enables speed-up if the lines are all on the same chip/register. - Doesn't require consumers to know if they are all on the same chip or not. This means a deep API with a small surface. How do we achieve this the best way? Yours, Linus Walleij