From patchwork Fri Mar 17 22:24:46 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Rosin X-Patchwork-Id: 9631705 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 AE72960245 for ; Fri, 17 Mar 2017 22:24:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 941F525EA6 for ; Fri, 17 Mar 2017 22:24:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 84E96285EE; Fri, 17 Mar 2017 22:24:09 +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=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 7CA5525EA6 for ; Fri, 17 Mar 2017 22:24:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=o1dZt+EgyiSjQWWxsLxfl1IY53vQy19LmH3IhLEhOGg=; b=b76PY2vZ3AzNJi 1dxv678Hg3Xyx7lGaNqw8nXmWdJlMkWo6iH+E/WYxZ/QYcLHnNPSXzsiWS7Ph3pbdRiEYvaz+GYgz NBIN5SGBP1c1gtZogROmdeA/y+ARTlvIGbjdM03nBYcZ7U4nhNLAhaE/NXsUtuSBDHzaKj7mmxNjG sL1td96ToSS7Li09Y9Ahy05/isS1KziiPg7+svp4AkBb7XNH7Ucx9yXbOkgLkbPhqYLymV3KMAwyg KCyxKl8NLX9TlPEgCvUP5CHXAOzdSpz0VaE1vv3Y9H5p7xuY618SdoiLer1A1uhZHAncvmMkTmiam fgbwau1jQxm/r9wcQIjQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1cp0I1-0002A6-0q; Fri, 17 Mar 2017 22:24:05 +0000 Received: from mail-he1eur01on0099.outbound.protection.outlook.com ([104.47.0.99] helo=EUR01-HE1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cp0Hv-00027o-IV for linux-arm-kernel@lists.infradead.org; Fri, 17 Mar 2017 22:24:02 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=axentiatech.onmicrosoft.com; s=selector1-axentia-se; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=AZBihZ8zjGyxaL6d/0raWxzuRKSSyAnUv/kbF265FtU=; b=KCiMs3kj5Ft+8R8KBp4+zWkhXoWPUS4Ac3llQO+FpChT/Sp0BNEm2Sbv05erVXUulJbYZUZrDQ6dNg+Bwa5ms/tv+Jus8F+j8biTuT+wBAkbbBVXi04+f4PzczYSjfXoWw9qVdrKUegeGrpVnP7b6T039xbqqx6TGfdk/2v/phM= Authentication-Results: vger.kernel.org; dkim=none (message not signed) header.d=none; vger.kernel.org; dmarc=none action=none header.from=axentia.se; Received: from localhost.localdomain (81.224.171.159) by VI1PR0202MB2559.eurprd02.prod.outlook.com (10.173.79.138) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.947.12; Fri, 17 Mar 2017 22:23:31 +0000 From: Peter Rosin To: Subject: [PATCH] ARM: dts: at91: add envelope detector mux to the Axentia TSE-850 Date: Fri, 17 Mar 2017 23:24:46 +0100 Message-ID: <1489789486-30985-1-git-send-email-peda@axentia.se> X-Mailer: git-send-email 2.1.4 MIME-Version: 1.0 X-Originating-IP: [81.224.171.159] X-ClientProxiedBy: HE1PR1001CA0015.EURPRD10.PROD.OUTLOOK.COM (10.171.99.25) To VI1PR0202MB2559.eurprd02.prod.outlook.com (10.173.79.138) X-MS-Office365-Filtering-Correlation-Id: f5f1a660-314b-44ac-5bd0-08d46d843ec9 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001); SRVR:VI1PR0202MB2559; X-Microsoft-Exchange-Diagnostics: 1; VI1PR0202MB2559; 3:A9TzGsN06Y5Up+Lu+sTScwguJODQXKNFI3D1SzgTY4S3nf29iEJNBSYL0mJfht+5DNhj57MqjJ9/HF9zFpJdJK7CgXMjOR+HWthZV1Kq2TDVlua5fvS+oJ+ZBC6mNPByXY2iW8DeKt2GyA562KzbMqUChEEb8UMB8V4JQVMsQyxzSrN3Mfs5DgekShNx+DdIi5TNhypYXuyAwk9ELq7ShLQUYU1JaJiws8ddrQMxHqIH1kKb2ZrvNTB6iJ38r74gTWnz/uf+CspN8R60V6rkaw==; 25:q+rmVn6ycXlsAilT+Mn6C1pRHaMgtfewoxAtA0Qg2+MFbeKrdMANP6Sk7aM4H9U0nQY8wnXwMK/b/0dcaUUPhLsyyLUTX3ByHPUphaDZ5ZRQnbimBGKGdnlETzFXC9/JSRWPPaW8wPA5kCV1BI1UHgEF1CFEVHGdaNT7J5vpjQKN3QJ3y/DlANSnKoK99K5nKRHVskY1dnUiy+d52TQThkYm0l9do7DuDOa/O3lAhzQwG6ibFK/pv7hz1fkhv930tMzMTM8+KOnupTW6KwPOGqicp9HG9pQpqfcHSzX6GsGIgZ4aokLyv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yZI6U0+AslRBuDzH1ELcK3cWvYBhueaSAMltdag/qMfLQMxcSFy1I8FocFRgXL9EXDV4ww0oe7U= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046)(6041248)(20161123564025)(20161123558025)(20161123560025)(2016111802025)(20161123555025)(20161123562025)(6043046)(6072148); SRVR:VI1PR0202MB2559; BCL:0; PCL:0; RULEID:; SRVR:VI1PR0202MB2559; X-Forefront-PRVS: 0249EFCB0B X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(4630300001)(6009001)(6069001)(39830400002)(39450400003)(39410400002)(6666003)(74482002)(36756003)(48376002)(50466002)(66066001)(33646002)(6116002)(50986999)(189998001)(47776003)(42186005)(2906002)(2351001)(6916009)(5660300001)(8676002)(6506006)(38730400002)(110136004)(54906002)(50226002)(86362001)(6486002)(4326008)(6512007)(7736002)(81166006)(25786008)(305945005)(42262002); DIR:OUT; SFP:1102; SCL:1; SRVR:VI1PR0202MB2559; H:localhost.localdomain; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; VI1PR0202MB2559; 23:OsKC2cBkMzXxbvIC3+hVbaNeFPzZSoBfK9OGe3vpTdtKdhfeQycCxw+Q8BcufFqsmhJZwFT4hMGV48FslpkkET5BsOu869eZZfAxANBN/qhvKcaUZej0HS6BYcWhajZVx+OPtAhnZ7miOGuoy+OYTDCL+eskxzWrxiRBPyckEzz2cGCl9bbPrffDUe7nR29HMhLy6c1n/mzBLTjfoctv1KT/r6IPQnKecvVpr58PxAWlla08/Y/ywZGakVDUbewEg8ykajFhaGqIHF4y2Zia9C/JhZkp7mfiGTJFT8IIpjfCraFSiX5S71+MplJTyXBRQ41dNXJDz07Yw2DAWN1l6bYapGwh29NLdEV9VOVzZ6B4GAI8ZClU7lnWevahxPFa/p79+FJ+H5NA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wd/pS62/k9Bg+uJW2ktqrfFEbQlVag6a/mT683c4eObTgqNPOhbCDo1NWdSw7G+mfg==; 24:8a52VNWxVVd6CSN5yeaN34dptrUtJrs9mlThz5IMBq1Zgt0cNTqzEgMrI1W/PAYi6pbcwUYQF6AT9i3BlxNzNvx9fIJopicC0MoLWF2/900= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; VI1PR0202MB2559; 7:qqYR1tL4dcl0Ol/o0eaQp4hCKUStpRRmIltMM4CTDkF7/2PY8HPhG55FMXTFSXG5PHoD0x9XpfCNEb5SVvhaEz67aWNy8c2kIsxHZ/XzvvBAnEx5LeZsE1xmb8AJmzRd+WuUVpRD2yKKP1Ase5ThNoNRqAKnzL7DnNi4BWgukHe4eBp+WjEOh7uj5iQcxYsr2HHF1N4lO+rULFvNTgNCkmU/rQuqb89gyLzTYckiUf3E6giBQ5G3WKV3SKeJNn/WpImnTYKVvdLmYaxbWBqD+oFBNGOo9MUlDDxmqzPGl4acV35luuYI+B1kpz/VbhdpZB1sp248iEwZcfZG1X1Txw== X-OriginatorOrg: axentia.se X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Mar 2017 22:23:31.1917 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0202MB2559 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170317_152400_035893_D085455A X-CRM114-Status: UNSURE ( 9.12 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , devicetree@vger.kernel.org, Russell King , Rob Herring , Alexandre Belloni , Peter Rosin , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP The envelope detector can analyze 6 different signals, selectable with a mux controlled by three gpio pins. Signed-off-by: Peter Rosin --- Hi! This patch makes use of the mux subsystem and a couple of drivers available in linux-next since a week or two. The stuff this depends on has relevant acks, specifically on the DT bindings, so the bindings should be stable and not cause trouble for this patch. Which is why I thought I'd try to get this in for v4.12-rc1 along with that mux subsystem series. Please consider applying. Cheers, peda arch/arm/boot/dts/at91-tse850-3.dts | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/at91-tse850-3.dts b/arch/arm/boot/dts/at91-tse850-3.dts index 669a2c6bdefc..7a68805a4eb5 100644 --- a/arch/arm/boot/dts/at91-tse850-3.dts +++ b/arch/arm/boot/dts/at91-tse850-3.dts @@ -86,16 +86,43 @@ #io-channel-cells = <1>; }; - envelope-detector { + env_det: envelope-detector { compatible = "axentia,tse850-envelope-detector"; io-channels = <&dac 0>; io-channel-names = "dac"; + #io-channel-cells = <1>; interrupt-parent = <&pioA>; interrupts = <3 IRQ_TYPE_EDGE_RISING>; interrupt-names = "comp"; }; + mux: mux-controller { + compatible = "mux-gpio"; + #mux-control-cells = <0>; + + mux-gpios = <&pioA 0 GPIO_ACTIVE_HIGH>, + <&pioA 1 GPIO_ACTIVE_HIGH>, + <&pioA 2 GPIO_ACTIVE_HIGH>; + idle-state = <0>; + }; + + envelope-detector-mux { + compatible = "io-channel-mux"; + io-channels = <&env_det 0>; + io-channel-names = "parent"; + + mux-controls = <&mux>; + + channels = "", "", + "sync-1", + "in", + "out", + "sync-2", + "sys-reg", + "ana-reg"; + }; + leds { compatible = "gpio-leds";