From patchwork Fri Nov 24 09:30:40 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 119559 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp1952175qgn; Fri, 24 Nov 2017 01:30:52 -0800 (PST) X-Google-Smtp-Source: AGs4zMbH7+qSTgsJsMjXNL/BPBhtmaSEgrxiFi6z+bAi26evm7kQ12bWNVPpIY+G2s5oPwWiB4eM X-Received: by 10.99.125.71 with SMTP id m7mr10048742pgn.349.1511515852052; Fri, 24 Nov 2017 01:30:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511515852; cv=none; d=google.com; s=arc-20160816; b=lGl32I7UMSYQq/nke3oJp+kv8ShCZCwhOEm65MfBc6lqbzMKDk/I73Yriz5uUOY/qs Q6WISYWG9W+rhpSeARraYToTNvARjDgC/Fl9GIV3fHynybcUR64prrhPqpI5sOxsAonJ j81GPNFJyODIqO+3FfvrwR51Fvw53WoPW/gqrDctzrX/uTnp//ObFXUHBv9+Ef0mt66e pWZIHiUtLgY6vHH/BJaftKe1KlRnhOusaC/keokPMz4s2d6d+swgOPYq6P4FUcd0mncJ /7az6LYSk7A/m6KKYonD+166hvFLknttS66K5YSmBRqzk/WY1gtZy+zXLPTdbkjz0khD 6UyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=6Ttwq1oKm0C8vr5oqqSGiDQCiaVw3G1lLc+5MyQptcs=; b=pv/f30ln3o/wVANzA2cnMI0ASglz+zNcDLKBrEECakJ+K1gnvHZ+YfAqPd1wSFYMXp 6kcHeuWqEnFzW+SNjKdN7tUUw6AkxgIk5lAQj8HnffxsGzEumwJDvw/8+n7NRi3FrLnX 5jeIrup49TAnhJuYmM02iSDItPXdcsgLgzpZSXzFzPLlHQQ9fReB1zBSqV5/H728njfJ 64iocAXR+X30kxcibOrOwo4nHjWRj+WJsvAz2G6L18kmwxDdSsN7D4JpmkWyHSUNo3kd V0TIeLiABV68J7Z1H1vrClCla3WC2uIktoEFhl25wVvMwWXbfOMLbcli9ZD3nwX+KJ19 fLGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=bOxMOZRK; spf=pass (google.com: best guess record for domain of linux-input-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-input-owner@vger.kernel.org; dmarc=fail (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 u86si19793425pfg.173.2017.11.24.01.30.51 for ; Fri, 24 Nov 2017 01:30:52 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-input-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=bOxMOZRK; spf=pass (google.com: best guess record for domain of linux-input-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-input-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752737AbdKXJav (ORCPT ); Fri, 24 Nov 2017 04:30:51 -0500 Received: from mail-lf0-f65.google.com ([209.85.215.65]:33825 "EHLO mail-lf0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752322AbdKXJat (ORCPT ); Fri, 24 Nov 2017 04:30:49 -0500 Received: by mail-lf0-f65.google.com with SMTP id i14so24744759lfc.1 for ; Fri, 24 Nov 2017 01:30:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=mHZpyvWrtgRtmU/uY5CBhLiRm+iBrWLkoW2QAhZrBrY=; b=bOxMOZRKZodvJDFvWEG91ScLt0Yb65EBuiVJAJQTXcQPFP5x45gJYadUKIV8Ek+ulb VgjLO03Ut/tCZrnh4D/0D6zdTD4NFU/ihOTZUpMU//xONS6yIKgBdAvkGQ73VvGk8ZJ4 LVipK8eZiWnBIIUTUPD+MQL/1XBtlTr/g58/w= 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; bh=mHZpyvWrtgRtmU/uY5CBhLiRm+iBrWLkoW2QAhZrBrY=; b=mN5u/ItirWpQnqWmcqQOr2X4oQ5RV72XGWpsPqfCxdELNzIZndyUmksk/BoJRoN4al 3eL4w1RQEtI5EKaIT5G+hwI0ntnXx8dtm3rFjlfhNF/RgwwwLB/Mzxw89GoVDCPu3dsm vfOsIFM9PLnqeiJLxtvhoWo/5W+WxLfP7cvpF1erx+ojwO9kR8PWSJJRXuX+99/W1eX0 oOduKAo3hF+aNMOJs2VrESHmcNAvf+y1jzAsq3YamEfTAeIycVKAsIqtIyJUNnQ/4eTg 6lEkX1JCJ3HRiAK73eO6xYIQ35lO7kT52xvGC+2HzO/v7j9bRVIKvZsyxpe64R9MaO/3 1Wdg== X-Gm-Message-State: AJaThX5oempZz6jpOd4xjv52LNlTPPDTu0ki9/ttBL9KijkCJMDKuLBW etkHhlTIr9SsRUNrJ0g28eEFGOdWNjo= X-Received: by 10.25.141.6 with SMTP id p6mr10366227lfd.10.1511515848319; Fri, 24 Nov 2017 01:30:48 -0800 (PST) Received: from genomnajs.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id 19sm4476608ljx.58.2017.11.24.01.30.47 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 24 Nov 2017 01:30:47 -0800 (PST) From: Linus Walleij To: Dmitry Torokhov , linux-input@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org, Linus Walleij Subject: [PATCH 0/5] Make gpio_keys accept board descriptors Date: Fri, 24 Nov 2017 10:30:40 +0100 Message-Id: <20171124093045.5961-1-linus.walleij@linaro.org> X-Mailer: git-send-email 2.14.3 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org The goal I'm working toward is to rid the kernel of the global GPIO numberspace. This means GPIO lines should be references by the local offset on the GPIO chip. This patch set starts to move gpio_keys toward using GPIO look-up tables instead of global GPIO numbers to find their GPIOs. As an example I did (I think) the necessary patches to convert DaVinci and i.MX to use this. There are several users also x86 platform devices. Strategy: - Merge the patch to input/keyboard/gpio_keys* to support using descriptors from board files. - Refactor the whole universe to get proper names on GPIO chips, and reference the GPIO lines with local offsets using tables, as in the example patches in this series. These can trickle in after the first patch is merged in Input. The work to be done can be seen if you type: git grep gpio_keys_platform_data - When all are refactored, remove the "gpio" and "active low" members from the platform data and delete the associated legacy GPIO handling in the input driver for gpio_keys. Posting this with the examples to get buy-in from Dmitry before I go and spend time refactoring the world. I.e. I'm happy if patch 1 gets merged, the rest I will push through ARM SoC etc, or if nothing else works (like nonresponsive maintainers) I can push it through the GPIO tree without bothering Dmitry. Linus Walleij (5): Input: gpio-keys: Support getting descriptors from board gpio: pca953x: Name the gpiochip after the I2C address ARM: davinci: Switch DA850EVM to use GPIO descriptors ARM: imx: Give all GPIO chips a unique name ARM: imx: Use GPIO descriptors for gpio_keys arch/arm/mach-davinci/board-da850-evm.c | 57 ++++++++++++++--- arch/arm/mach-imx/mach-armadillo5x0.c | 19 ++++-- arch/arm/mach-imx/mach-imx27_visstrim_m10.c | 26 ++++++-- arch/arm/mach-imx/mach-pcm037_eet.c | 52 +++++++++++---- arch/arm/mach-imx/mach-vpr200.c | 99 ++++++++++++++++++++++++----- arch/arm/mach-imx/mm-imx21.c | 12 ++-- arch/arm/mach-imx/mm-imx27.c | 12 ++-- arch/arm/mach-imx/mm-imx3.c | 12 ++-- drivers/gpio/gpio-pca953x.c | 17 ++++- drivers/input/keyboard/gpio_keys.c | 14 +++- drivers/input/keyboard/gpio_keys_polled.c | 10 +++ 11 files changed, 259 insertions(+), 71 deletions(-) -- 2.14.3 -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html