Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp55883imm; Wed, 29 Aug 2018 13:49:48 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZr6HxQH/EzjBqi+0i3UnqeOzeX0OVFLC2Ibhyv5brL4EPI/mwOb4wCWEY5pnpudSEY+kyh X-Received: by 2002:a62:9b46:: with SMTP id r67-v6mr7431670pfd.105.1535575788480; Wed, 29 Aug 2018 13:49:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535575788; cv=none; d=google.com; s=arc-20160816; b=u8puRYh9efBry1FApStKWGq6tKC6xull2q+IlqS1uU1tGH2t69mfXsg1AebpDI4/Bv H5qo7uhXw1tiu7QvOahf5wPJAX6zld7KTBvh8sLGk1h3IsLae0MyHJKBfZLTno5rA+5V x+j8v5Igy5MaaZl2SppyByZBrYBVBQiO1i4RUWEX1FICgzbGvX22GAZoAYfiJ8KvlL9t mLneJ83uqcoDzPa3smf1rvZDmckEim5N0JziSYES/uGR85jnhkr5vNfgWbd/8IrIG56j AHAD0y3rJs2FnZ9ueivduELmUkDkPEXvozBpk0DhFF8XtQCwGdWYP8DvNtuL4UBZkBhV 0O/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=XKcb53aYaZBYeG3pZ4PHNbQDfCqe6cWj/PGgG/0MtzY=; b=xbXOA6sqA8y4ziBP6DlZmD7/Q54DirWbUtcSdJvQgKc2SLaM2QjjjdTXDLXtzpaI/9 e8SWcbLmA/SfkcaRE14FfrSI0xFYMh+iKFrfwRijlvB8o0Z4haXQUnkSupw2vHacFIsp MOfgiN+COczFEQZ+CPEpASfxBi4ru4f5aCk9zCvVnyrIZ7PiPVrE80zt8rOKlEZmZrH6 v2Fc/UtADOX5Vo5DHC70EPJUaVXvFOXiP+b/9I6YvCfnQchWRhfCbMSeQGckcRSbNJk1 yC1qKcBB0yw8/lmfw8a0vRNkCuuYhaUm8V4lYxspV86NR2OjdYLu8tFHHWybDQsqev0E bbrg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=kBKEe1QQ; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h14-v6si4548915pgl.289.2018.08.29.13.49.33; Wed, 29 Aug 2018 13:49:48 -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=@gmail.com header.s=20161025 header.b=kBKEe1QQ; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728738AbeH3ArD (ORCPT + 99 others); Wed, 29 Aug 2018 20:47:03 -0400 Received: from mail-lf1-f66.google.com ([209.85.167.66]:45827 "EHLO mail-lf1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727664AbeH3ArC (ORCPT ); Wed, 29 Aug 2018 20:47:02 -0400 Received: by mail-lf1-f66.google.com with SMTP id r4-v6so5397900lff.12; Wed, 29 Aug 2018 13:48:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=XKcb53aYaZBYeG3pZ4PHNbQDfCqe6cWj/PGgG/0MtzY=; b=kBKEe1QQSB6SVLP6uVo1p8FPQtRAXkp5eP/35rYGUh4UiX0tmH7TAmJ378Geiqp+cW DzgCvs64m72cBgLTxH+mvS4+y6S2JF7H3odz2DdWCLIi0rfRmsWsXCfsLN1FCZSjG22Z SMGgJX1ALtApzTgJl89xU5sMoHE70SF+F5EvV5vO8Eqx1/7kVXbfl7Xa/mB9Oet2lDRR hFM8r3ixHnUUyKUR3MzoPFbxonO1d2dDfhjRMxVred4yFYm+Y0b87m350XJSsYlYroXy 1hb3Jh28T+wSvPRzHUtfIv88/MuHe8R63cLZEiJBBWM4bnNu9rtXLLmbJGBGWRU0GbGK TmXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=XKcb53aYaZBYeG3pZ4PHNbQDfCqe6cWj/PGgG/0MtzY=; b=TDGprpl4/sDXL6kg70AMqt6VhgJ4rb2B9U/dhsTNL1hACXTjeZxxOEH4DbA5uAeef1 v6qLkllgykbu6BvFjwyn/+xkCerqCurm9h7eMTaE+UkRs65tkNGRJhcOEogP4KFCKvuN hy+rdwPfCwAlChWNo2/L4KVi9h5tkxm/lt6Mob62hixCzic6CT5UGz+2BhjWjbadBXcX wIvZDttdX72AJSzqxHyIysWwpOXh98ZCppMHuzIsx2/sSOuHmoohla9ogIL4ljyN5xAY FpPD32nvepCB2dK3wAkzJs1e+E2JT82j7/D+Ru1n3J1GAD2Xc+59HFOliS1+p7gy+Mvn G6Ow== X-Gm-Message-State: APzg51BlWztTckyqxYvOEqbcU21KryzXzJWLJxPVEVk7yBKv3cdiYNu+ +fEmC2ZTmh+CRgqULLnJIdc= X-Received: by 2002:a19:5e12:: with SMTP id s18-v6mr5189174lfb.5.1535575702734; Wed, 29 Aug 2018 13:48:22 -0700 (PDT) Received: from z50.lan (93-181-165-181.internetia.net.pl. [93.181.165.181]) by smtp.gmail.com with ESMTPSA id f66-v6sm947619lji.23.2018.08.29.13.48.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 29 Aug 2018 13:48:21 -0700 (PDT) From: Janusz Krzysztofik To: Linus Walleij Cc: Jonathan Corbet , Miguel Ojeda Sandonis , Peter Korsgaard , Peter Rosin , Ulf Hansson , Andrew Lunn , Florian Fainelli , "David S. Miller" , Dominik Brodowski , Greg Kroah-Hartman , Kishon Vijay Abraham I , Lars-Peter Clausen , Michael Hennerich , Jonathan Cameron , Hartmut Knaack , Peter Meerwald-Stadler , Jiri Slaby , Willy Tarreau , Geert Uytterhoeven , linux-doc@vger.kernel.org, linux-i2c@vger.kernel.org, linux-mmc@vger.kernel.org, netdev@vger.kernel.org, linux-iio@vger.kernel.org, devel@driverdev.osuosl.org, linux-serial@vger.kernel.org, linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATH v5 0/4] gpiolib: speed up GPIO array processing Date: Wed, 29 Aug 2018 22:48:56 +0200 Message-Id: <20180829204900.19390-1-jmkrzyszt@gmail.com> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20180820234341.5271-1-jmkrzyszt@gmail.com> References: <20180820234341.5271-1-jmkrzyszt@gmail.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The goal is to boost performance of get/set array functions while processing GPIO arrays which represent pins of a signle chip in hardware order. If resulting performance is close to PIO, GPIO API can be used for data I/O without much loss of speed. Created and tested on a low end Amstrad Delta board with NAND driver updated to use GPIO API for data I/O. Performance degrade compared to PIO is much better than before the optimization but still not quite satisfactory. Janusz Krzysztofik (4): gpiolib: Pass bitmaps, not integer arrays, to get/set array gpiolib: Identify arrays matching GPIO hardware gpiolib: Pass array info to get/set array functions gpiolib: Implement fast processing path in get/set array Changelog: v5: [PATCH v5 1/4] gpiolib: Pass bitmaps, not integer arrays, to get/set - drivers/i2c/muxes/i2c-mux-gpio.c: - drop assigment of values to struct gpiomux.values, as recommended by Peter Rosin - thanks!, - mark the .values member of the structure as obsolete, - drivers/mux/gpio.c: - drop assigment of values to struct mux_gpio.val, also recommended by Peter Rosin - thanks!, - merk the .val member of the structure as obsolete, - drivers/auxdisplay/hd44780.c: - fix incorrect bitmap size, - use >>= operator to simplify notation, both catched by Miguel Ojeda - thanks!, - add Cc: clauses as well as Acked-by: collected so far. [PATCH v5 2/4] gpiolib: Identify arrays matching GPIO hardware - add Cc: clause. [PATCH v5 3/4] gpiolib: Pass array info to get/set array functions - add Cc: clauses as well as Acked-by: collected so far. [PATCH v5 4/4] gpiolib: Implement fast processing path in get/set - add Cc: clause. v4: That series was a follow up of the former "mtd: rawnand: ams-delta: Use gpio-omap accessors for data I/O" which already contained some changes to gpiolib. Those previous attempts were commented by Borris Brezillon who suggested using GPIO API modified to accept bitmaps, and by Linus Walleij who suggested still more great ideas for further immprovement of the proposed API changes - thanks! diffstat: Documentation/driver-api/gpio/board.rst | 15 + Documentation/driver-api/gpio/consumer.rst | 48 +++- drivers/auxdisplay/hd44780.c | 64 +++--- drivers/bus/ts-nbus.c | 25 -- drivers/gpio/gpio-max3191x.c | 23 +- drivers/gpio/gpiolib.c | 279 ++++++++++++++++++++++------ drivers/gpio/gpiolib.h | 15 + drivers/i2c/muxes/i2c-mux-gpio.c | 10 - drivers/mmc/core/pwrseq_simple.c | 15 - drivers/mux/gpio.c | 12 - drivers/net/phy/mdio-mux-gpio.c | 5 drivers/pcmcia/soc_common.c | 14 - drivers/phy/motorola/phy-mapphone-mdm6600.c | 21 +- drivers/staging/iio/adc/ad7606.c | 12 - drivers/tty/serial/serial_mctrl_gpio.c | 9 include/linux/gpio/consumer.h | 35 ++- 16 files changed, 412 insertions(+), 190 deletions(-)