From patchwork Wed Aug 22 20:41:00 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 144851 Delivered-To: patch@linaro.org Received: by 2002:a2e:164a:0:0:0:0:0 with SMTP id 10-v6csp401439ljw; Wed, 22 Aug 2018 13:41:22 -0700 (PDT) X-Google-Smtp-Source: AA+uWPwYrG3nyP1ALRtuPeHywPh9RdBq6eWkQYm8OTtWFXQ4mHlzy2M+/2eciCJzYjfrbaucNkSr X-Received: by 2002:a63:4f14:: with SMTP id d20-v6mr10254988pgb.121.1534970482065; Wed, 22 Aug 2018 13:41:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534970482; cv=none; d=google.com; s=arc-20160816; b=VaGLqSrYbISbcKmV9qVMyaN6eoNPZ4MJUYHjNxSsx6NBfpQWr1JUf4lunvJKgXq4Nz 8+rB71Y1wCal/pIM7e7JU3cYHALoQjkhWt7vPuJGl18Bem4jN6SUizr8OtDJEdSvWbbO 7c2f/gb6BX9XLCi6tGDmUM4ffP4GNtDA+DCnD4h934n/AAllJjwqQBpGgk1QVXkB0Hjm 3JEqGiF/I19G15lDoSXUY+S9ByK7X0cuI5yGlHpwbdah/eQeovTqU1eafw8eOoJiN2Ml cxptULOUcL4QNDYnlM4atY9yJ/s7aiYh9/8CQx3u5WLol0f3QNDYMGsps9wrshb2F6cv lsmw== 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=crBGXLtSWAwwEDiE2NF/zDRC1dmhwePgC+uD8hHc+LQ=; b=C8UubqrCLtDV8nDJSnrsdbsS9llBX1JBahaoK5UOOJylvSxuzIiFoy9CkUu5+fmWQu 0SC2/JxGbYhygO58B+Ojw7oU4fa8FQ+G/z1DBC8Py99Fh7IacWTfdDWLHq3gAMOszskR u6bcLaueBZ+T3lXPh1XNpqgi0Kwi53mYSjxA9WfPUvap5mRqaDGhrzNjfgCTg6LJtgzZ Nj1uwGxI0iMYCwvYXmsaOSZPFCTt46IL4wI7TVECdg8wy4ekGJ/PdlFyCdiCjGhh11dD Uglfr0/TCmf5kAgYhCIndiEYIOnRAiWZDtRRayGYqhVgtqbAsW82jl7rRXE9LYY8bdVo jDBQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=JnfmdOGm; spf=pass (google.com: best guess record for domain of linux-gpio-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-gpio-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 t23-v6si2559068pgi.301.2018.08.22.13.41.21; Wed, 22 Aug 2018 13:41:22 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-gpio-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=JnfmdOGm; spf=pass (google.com: best guess record for domain of linux-gpio-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-gpio-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 S1727315AbeHWAHo (ORCPT + 5 others); Wed, 22 Aug 2018 20:07:44 -0400 Received: from mail-lj1-f196.google.com ([209.85.208.196]:45065 "EHLO mail-lj1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727285AbeHWAHo (ORCPT ); Wed, 22 Aug 2018 20:07:44 -0400 Received: by mail-lj1-f196.google.com with SMTP id u83-v6so2423396lje.12 for ; Wed, 22 Aug 2018 13:41:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=crBGXLtSWAwwEDiE2NF/zDRC1dmhwePgC+uD8hHc+LQ=; b=JnfmdOGmaw6E1R299xEJmYL9+/36jrRS9Ib+h1eScb0UCmSbhabvvzpy+osvXJQurC aUB8c84WebxD840XEEywkEVNkgMkA36y/FxmILahH2QKgZu1SlyWgoGWlKDBjGolcczn FPPBbaq/l+YHRVDz6z68wI4Go5iaQ/c8PXdPk= 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=crBGXLtSWAwwEDiE2NF/zDRC1dmhwePgC+uD8hHc+LQ=; b=Fetc3Op9On0shphNLAbqGAhZ9QhXSaxW3mPNfH3aAux34SphhObaDV+seuQ2yggwHh 6oxh9UyHM5xzjPyvpvVZ4wCTxfgitjFljKctT76S4fFZ5HSYoAb1BRF7/qkpE1w6NvD2 bXZvHt34V/LOX35iY9OhuZx9t8nJc7dtBHWgAh2ddpWHHUxQOwmH1nJ0J0SaDqeK/36s 8IePKY9iv3xMI1CYMghEO8Gk9hHXDmfrK4OCa/aIv8hPy/aqVQB8avDU6vClk6chpKqS 3ArYQrWzOZGLrj2RFFRQZ158x6CPVUn34dlOgNV5a5JgOayje29Vmp/elm1rHcyJxeE0 mPLw== X-Gm-Message-State: AOUpUlGWhzEAoiCLofJH5lCHPVYA+jpWM5BtJ6riWapirvo3YmGCr/y1 lImyhD/NDdhrqkNbDg1ywkoQEA== X-Received: by 2002:a2e:9ec9:: with SMTP id h9-v6mr13953430ljk.133.1534970478776; Wed, 22 Aug 2018 13:41:18 -0700 (PDT) Received: from localhost.bredbandsbolaget (c-ae7b71d5.014-348-6c756e10.bbcust.telenor.se. [213.113.123.174]) by smtp.gmail.com with ESMTPSA id q128-v6sm431515ljq.72.2018.08.22.13.41.16 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 22 Aug 2018 13:41:17 -0700 (PDT) From: Linus Walleij To: H Hartley Sweeten , Alexander Sverdlin Cc: linux-arm-kernel@lists.infradead.org, linux-gpio@vger.kernel.org, Linus Walleij Subject: [PATCH 00/11] Reform EP93xx GPIO Date: Wed, 22 Aug 2018 22:41:00 +0200 Message-Id: <20180822204111.9581-1-linus.walleij@linaro.org> X-Mailer: git-send-email 2.17.1 Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org This series is a spin-off of a patch from Arnd that started to decouple the EP93xx GPIO driver from the code inside arch/arm. The driver needed some modernization and in the end I managed to convert two of the banks to use GPIOLIB_IRQCHIP and use a proper irqdomain. The F bank presents a special problem that I need to think about, because since there is one IRQ per GPIO line it is essentially a hierarchical irqdomain. This was tested on the SIM.ONE where I rigged lines on some of the GPIOs on a board connector. It's crude but gives interrupts and behave as expected before and after these changes, the main visible change being that the hardware IRQ line on each port appears in /proc/interrupts. It would be great if some EP93xx users could test this (especially something using bank F) so I can get it into shape and merge as a baseline for further refactorings. Arnd Bergmann (1): ARM/gpio: ep93xx: build standalone Linus Walleij (10): gpio: ep93xx: Cut down variable names gpio: ep93xx: Switch to SPDX license tag gpio: ep93xx: Pass around struct gpio_chip gpio: ep93xx: Rename has_debounce to has_irq gpio: ep93xx: Properly call the chained IRQ handler gpio: ep93xx: Do not pingpong irq numbers gpio: ep93xx: Use the hwirq and port gpio: ep93xx: Use for_each_set_bit() in IRQ handler gpio: ep93xx: Cut gpio_to_irq() usage gpio: ep93xx: Switch A and B to use GPIOLIB_IRQCHIP arch/arm/mach-ep93xx/core.c | 9 ++ drivers/gpio/Kconfig | 1 + drivers/gpio/gpio-ep93xx.c | 297 +++++++++++++++++++++--------------- 3 files changed, 181 insertions(+), 126 deletions(-) -- 2.17.1 Acked-by: Alexander Sverdlin