From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751007AbeAVFE0 (ORCPT ); Mon, 22 Jan 2018 00:04:26 -0500 Received: from mout.gmx.net ([212.227.17.21]:63805 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750746AbeAVFEY (ORCPT ); Mon, 22 Jan 2018 00:04:24 -0500 From: =?UTF-8?q?Jonathan=20Neusch=C3=A4fer?= To: linux-kernel@vger.kernel.org Cc: linuxppc-dev@lists.ozlabs.org, linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, =?UTF-8?q?Jonathan=20Neusch=C3=A4fer?= Subject: [PATCH v2 0/6] Nintendo Wii GPIO driver Date: Mon, 22 Jan 2018 06:04:05 +0100 Message-Id: <20180122050411.32460-1-j.neuschaefer@gmx.net> X-Mailer: git-send-email 2.15.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K0:NLi5AD64H7qDkC1wbc2dkVC0qjLYODqo3/kupZqi1T4btVUOGGH 3ta/GbmZw20M1E7t+6JM902aSYAVKw4Q8IBF8xazyPITcQMFW3jKhGQS/EyfZgplGTZJPUJ wMCOZ9BMvPE4W4X5340jnohKex4u+Nu32GkNdGMviDCgRu3CW+0lTgsIf9rdqz3eCmHOxBu YCP0TU0OtCjiePr0PiXjw== X-UI-Out-Filterresults: notjunk:1;V01:K0:+ywb/B6pnA0=:bL/oDZOaRE0X0jHRbfPvlE AwqiVBC/dV0Tz0ya6WrRgveArbN9WK6sE9w7rbM4Hcn/VK59aMdiD9MqBDIWDK8pPLLBcMpRT awwPbYctmkyMwyN2rX4zefqSi1nD8+Em4Q9OCWBYZugLbFwRN3T3dsQu3i3asQmRcpGlFL8Pv sXUPM6M1iWiudJnp7jN3dv4J4aTv4+vNz3fK1uAaCNIKIa1zEjZRYllf8KpLS2zDcMYu4ren6 f8+ksfseJbQigSSwfVwGmee738OzcUZ6dIQcW6f+xgQePhEyR62E5Z7L7P1ugCFRiYLarhmat d7uxN4tPGNE1c7jWfHSnPff64PRi3yz2CxKW+xciUCeXkeSi8/sVlO0AInITn487WXmSL4jcy Zo7LwGzh6k78POQ8azVMQSa32XZzANfclPKwXnIrWto3GhuoV7f9nySgug0Tv+cmxBYAnZw4J xEMD3KDeKIECkGiaVT8er2CkDnFWEkjtA8XM9Tq/mdYYwiIcyGHcSAqaDh2yHq2k7/b+yoDTL LZu1Mg7tLqjLMETl/++5jGkoWjQTL+8QwTSxgszVEukV5pa0OCjugTJ8TijwNZ9mllTZnltpl +pMCCGo7596ysFpdQTu5TNJ/oa2WjagsG8SqjBC7dQmjVmDfdpi8kEAiq9MDNFm93Nwku1KLf TI7A1PYGQA5oXkgkQJ9sbNHIJwRPgW3h8rO+02P7NsGjwWAvsUuLmDtst4cXEjBhx/StJaYL8 aD3UL2xAtP/+knZFLQYFeZ5rTW3UBZMKnn03gq/AVaeRifemQIor3kxnABS+4u2qE7sQVhOMj xv18fCD/0MNWW4xNnr0FO/3ZxTHa9UUqVS8L51YCqt4yiDztJ8= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This series adds a driver for the GPIO controller used in the Nintendo Wii game console. The driver itself, and the related devicetree work should be pretty uncontroversial, but due to the system architecture of the Wii, I also had to extend an old resource allocation hack to kernel/resource.c: On the Wii, there are two separate RAM ranges, with MMIO right in the middle, but AFAIK, Linux on PPC32 doesn't support discontiguous memory properly. So the hack is to allocate one big RAM range with a hole (marked as reserved memory) for MMIO in the middle. Because this series touches different subsystems (GPIO, DT, core resource management), I guess it should be picked up patch-by-patch by the different maintainers. The main difference between v2 and the previous version is that I rewrote the driver on top of the GPIO_GENERIC library, saving 60 lines of code. Jonathan Neuschäfer (6): resource: Extend the PPC32 reserved memory hack powerpc: wii: Explicitly configure GPIO owner for poweroff pin gpio: Add GPIO driver for Nintendo Wii dt-bindings: gpio: Add binding for Wii GPIO controller powerpc: wii.dts: Add ngpios property powerpc: wii.dts: Add GPIO line names .../bindings/gpio/nintendo,hollywood-gpio.txt | 27 +++++ .../devicetree/bindings/powerpc/nintendo/wii.txt | 9 +- arch/powerpc/boot/dts/wii.dts | 9 ++ arch/powerpc/platforms/embedded6xx/wii.c | 7 ++ drivers/gpio/Kconfig | 9 ++ drivers/gpio/Makefile | 1 + drivers/gpio/gpio-hlwd.c | 123 +++++++++++++++++++++ kernel/resource.c | 21 +++- 8 files changed, 197 insertions(+), 9 deletions(-) create mode 100644 Documentation/devicetree/bindings/gpio/nintendo,hollywood-gpio.txt create mode 100644 drivers/gpio/gpio-hlwd.c -- 2.15.1