From patchwork Tue Aug 23 06:16:49 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vignesh Raghavendra X-Patchwork-Id: 9295019 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 4DF6360B16 for ; Tue, 23 Aug 2016 06:22:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3ECA727F2B for ; Tue, 23 Aug 2016 06:22:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 32EEC28B53; Tue, 23 Aug 2016 06:22:22 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DFD9528B53 for ; Tue, 23 Aug 2016 06:22:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757042AbcHWGVx (ORCPT ); Tue, 23 Aug 2016 02:21:53 -0400 Received: from devils.ext.ti.com ([198.47.26.153]:53438 "EHLO devils.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756881AbcHWGVv (ORCPT ); Tue, 23 Aug 2016 02:21:51 -0400 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id u7N6Hgwe022706; Tue, 23 Aug 2016 01:17:42 -0500 Received: from DLEE70.ent.ti.com (dlemailx.itg.ti.com [157.170.170.113]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id u7N6HfW5025436; Tue, 23 Aug 2016 01:17:41 -0500 Received: from dlep33.itg.ti.com (157.170.170.75) by DLEE70.ent.ti.com (157.170.170.113) with Microsoft SMTP Server id 14.3.294.0; Tue, 23 Aug 2016 01:17:40 -0500 Received: from uda0132425.india.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep33.itg.ti.com (8.14.3/8.13.8) with ESMTP id u7N6Guai017186; Tue, 23 Aug 2016 01:17:26 -0500 From: Vignesh R To: Dmitry Torokhov CC: Rob Herring , Mark Rutland , Tony Lindgren , Russell King , Arnd Bergmann , Daniel Hung-yu Wu , Grant Grundler , S Twiss , Vignesh R , Moritz Fischer , Jorge Ramirez-Ortiz , John Stultz , , , , , Subject: [PATCH v2 2/2] ARM: dts: am335x-icev2: Add nodes for gpio-decoder Date: Tue, 23 Aug 2016 11:46:49 +0530 Message-ID: <20160823061649.3394-3-vigneshr@ti.com> X-Mailer: git-send-email 2.9.2 In-Reply-To: <20160823061649.3394-1-vigneshr@ti.com> References: <20160823061649.3394-1-vigneshr@ti.com> MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP AM335x ICE board has a rotary-switch connected to PCA9536 I2C GPIO expander. The position of the rotary-switch is reflected by status of GPIO lines. Add gpio-decoder node to read these GPIO line status via gpio-decoder driver and report it as an input event to the system. Signed-off-by: Vignesh R --- v2: Update DT node name. arch/arm/boot/dts/am335x-icev2.dts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/arch/arm/boot/dts/am335x-icev2.dts b/arch/arm/boot/dts/am335x-icev2.dts index bc0190e4f10f..d3c53e5910c4 100644 --- a/arch/arm/boot/dts/am335x-icev2.dts +++ b/arch/arm/boot/dts/am335x-icev2.dts @@ -139,6 +139,15 @@ default-state = "off"; }; }; + gpio-decoder { + compatible = "gpio-decoder"; + gpios = <&pca9536 3 GPIO_ACTIVE_HIGH>, + <&pca9536 2 GPIO_ACTIVE_HIGH>, + <&pca9536 1 GPIO_ACTIVE_HIGH>, + <&pca9536 0 GPIO_ACTIVE_HIGH>; + linux,axis = <0>; /* ABS_X */ + decoder,max-value = <9>; + }; }; &am33xx_pinmux {