From patchwork Mon Oct 29 12:10:23 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manish Narani X-Patchwork-Id: 10659199 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4DAD214DE for ; Mon, 29 Oct 2018 12:11:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3EDA0298BC for ; Mon, 29 Oct 2018 12:11:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 32B0F298ED; Mon, 29 Oct 2018 12:11:00 +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=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=unavailable 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 67490298F0 for ; Mon, 29 Oct 2018 12:10:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729099AbeJ2U7V (ORCPT ); Mon, 29 Oct 2018 16:59:21 -0400 Received: from mail-eopbgr730055.outbound.protection.outlook.com ([40.107.73.55]:8753 "EHLO NAM05-DM3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728416AbeJ2U7U (ORCPT ); Mon, 29 Oct 2018 16:59:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xilinx.onmicrosoft.com; s=selector1-xilinx-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=3PcMffk8sAvM3kGc38Xs4hB/MzfCsi5M5xl2Qz2C9XA=; b=vZx7uuCTU/PI2ob+/QvRIz1LM0rwnwMw6JOYjKkby0o/nyMTzQvqAdUE8/giwqv3zo7TXeueigxroroCYPPKYgL1+82aq6CZsPRm3zAhmYJ4JU8cbcMUdPUdt1LZXhsODb4ItOwp0kNrUEh+JfbcZZ0B46uunG4bB/NcVVr7d+U= Received: from MWHPR02CA0008.namprd02.prod.outlook.com (2603:10b6:300:4b::18) by SN4PR0201MB3519.namprd02.prod.outlook.com (2603:10b6:803:44::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1273.27; Mon, 29 Oct 2018 12:10:50 +0000 Received: from BL2NAM02FT009.eop-nam02.prod.protection.outlook.com (2a01:111:f400:7e46::208) by MWHPR02CA0008.outlook.office365.com (2603:10b6:300:4b::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1273.19 via Frontend Transport; Mon, 29 Oct 2018 12:10:49 +0000 Authentication-Results: spf=pass (sender IP is 149.199.60.100) smtp.mailfrom=xilinx.com; vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=bestguesspass action=none header.from=xilinx.com; Received-SPF: Pass (protection.outlook.com: domain of xilinx.com designates 149.199.60.100 as permitted sender) receiver=protection.outlook.com; client-ip=149.199.60.100; helo=xsj-pvapsmtpgw02; Received: from xsj-pvapsmtpgw02 (149.199.60.100) by BL2NAM02FT009.mail.protection.outlook.com (10.152.77.68) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.1294.14 via Frontend Transport; Mon, 29 Oct 2018 12:10:49 +0000 Received: from unknown-38-66.xilinx.com ([149.199.38.66]:57545 helo=xsj-pvapsmtp01) by xsj-pvapsmtpgw02 with esmtp (Exim 4.63) (envelope-from ) id 1gH6Nc-0004m9-Gg; Mon, 29 Oct 2018 05:10:48 -0700 Received: from [127.0.0.1] (helo=localhost) by xsj-pvapsmtp01 with smtp (Exim 4.63) (envelope-from ) id 1gH6NX-0007jh-D6; Mon, 29 Oct 2018 05:10:43 -0700 Received: from xsj-pvapsmtp01 (xsj-smtp.xilinx.com [149.199.38.66]) by xsj-smtp-dlp2.xlnx.xilinx.com (8.13.8/8.13.1) with ESMTP id w9TCAfSg007788; Mon, 29 Oct 2018 05:10:41 -0700 Received: from [172.23.64.106] (helo=xhdvnc125.xilinx.com) by xsj-pvapsmtp01 with esmtp (Exim 4.63) (envelope-from ) id 1gH6NV-0007j4-4n; Mon, 29 Oct 2018 05:10:41 -0700 Received: by xhdvnc125.xilinx.com (Postfix, from userid 16987) id 3512C12147A; Mon, 29 Oct 2018 17:40:40 +0530 (IST) From: Manish Narani To: , , , , , , , , , , , , , , , , , , , , , , , CC: , , , , Subject: [PATCH v3 0/3] Add Xilinx AMS Driver Date: Mon, 29 Oct 2018 17:40:23 +0530 Message-ID: <1540815026-1012-1-git-send-email-manish.narani@xilinx.com> X-Mailer: git-send-email 2.1.1 X-RCIS-Action: ALLOW X-TM-AS-Product-Ver: IMSS-7.1.0.1224-8.2.0.1013-23620.005 X-TM-AS-User-Approved-Sender: Yes;Yes X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:149.199.60.100;IPV:NLI;CTRY:US;EFV:NLI;SFV:NSPM;SFS:(10009020)(1496009)(396003)(39860400002)(136003)(376002)(346002)(2980300002)(438002)(199004)(189003)(36386004)(90966002)(426003)(486006)(336012)(47776003)(51416003)(39060400002)(72206003)(316002)(14444005)(5660300001)(478600001)(103686004)(16586007)(26005)(186003)(42186006)(110136005)(54906003)(2906002)(6266002)(126002)(4326008)(2616005)(476003)(106002)(44832011)(7416002)(36756003)(50466002)(50226002)(48376002)(81156014)(63266004)(8676002)(305945005)(52956003)(6666004)(8936002)(106466001)(2201001)(81166006)(356004)(921003)(107986001)(2101003)(83996005)(1121003)(5001870100001);DIR:OUT;SFP:1101;SCL:1;SRVR:SN4PR0201MB3519;H:xsj-pvapsmtpgw02;FPR:;SPF:Pass;LANG:en;PTR:unknown-60-100.xilinx.com,xapps1.xilinx.com;A:1;MX:1; X-Microsoft-Exchange-Diagnostics: 1;BL2NAM02FT009;1:ybr3WdxlLF8Pm/0Z7TeTXzRVz4XQF1m3M/WOyC1xK66HhhhrT4iOFedtYr+A4Vol25zpQq474floGi3mrxL0a9RhFuj1YzARodtpysmwI9s1fL8kEAKMOZ5qfshRTwWm MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: bcea5f25-1e44-4fa1-62a1-08d63d979080 X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989299)(5600074)(711020)(4608076)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7153060);SRVR:SN4PR0201MB3519; X-Microsoft-Exchange-Diagnostics: 1;SN4PR0201MB3519;3:vFccY6djZMOBa4KAL8N7W+iBzOc/Bvj2JkvsCabHsMUEfhKSVEUyaeafSlEWZUzGMdNcMHjUe1uKHnEd0rGkNozG0eO6bRtA+Irt+gIr4tIYJKW2XPWDWBX7zYu5TX26gSWNt0InHBep9BCn9i4/Rps8r0agCbsEgxFDTFpPaR7JRGGQC29BmV6xCjS8T7FqCN1LfLJYYFz/XJKqgnMZotbXtfL71TwAZC8rsTn293L2OeL/wuSJssY9EReEn2pS5lOXIpO0zOedzlpbeSk6xhdOMrZg2p//eM2HnpjC9XKUGFWBL7545SxUV+T8mA+rKlw0qzmtHnLN4hyqztfetfBaJLZm5nzKaYEkmS1UoZQ=;25:kfbv5jaEhFoKmVu89sNygyas0qopNRmvmyt9sks/iynNmOszbO9lpaKvgRdpHgA5oeJvXMewXz3xrEsK9Kzmt8WcbcAgR2p7K1ZWuRPkMcKpTF69pA3j7hkZkQsN2YSFFUjhnZ7pcTFqtQBV2eDCqqi9rD54t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-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3231382)(944501410)(52105095)(3002001)(10201501046)(93006095)(93004095)(6055026)(148016)(149066)(150057)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(20161123560045)(20161123564045)(20161123558120)(201708071742011)(7699051)(76991095);SRVR:SN4PR0201MB3519;BCL:0;PCL:0;RULEID:;SRVR:SN4PR0201MB3519; X-Microsoft-Exchange-Diagnostics: 1;SN4PR0201MB3519;4:2m72kNQrpIaUlomgVDdaYuCmy5utrNveJ8M+NshqM1xUxdaJC+/sxjZH3D/hMzWtTVM6m8zGyYi20m1oWaxPC2YP1emo9MTvmVeMUZG4ipzVU2DeptgU8wGKdBXdlxNabeAJpMXe2BGZqyqrMQ5FClyLRMAeAkK517n5aQwFjU1xWBPxb55rRJxk5uneCLQ7gKU9mLFs5afLpSuaypQoa7fk2KNnRAiezlUEdpmIXST12DbGsfT6A8Tes/uwSwLJa8izmL7WtIriWtM0QuzvwA== X-Forefront-PRVS: 084080FC15 X-Microsoft-Exchange-Diagnostics: 1;SN4PR0201MB3519;23:7pY5vnfF0wfRBQtaUAehJElZSOPn7zrBEPUUbfn16j8QpGKs/w91+RvvCAUFZlMCqIy7spuFVLL6M5BwL0NAGx10GKSaIeW+t1NXfDFc7PZXZR00zRcA6/UZcnvvKBs0H3yWrXIfk9s3Ng9xCLFv5hLMjpBkNfRHCS7eoVBjg7BEc68/8GHe3+T6srgY/5Jig59zwWIb1+e+aUyiSoWDLgzeMo02eeQrKCywzzCpn9Kamfj+Ae1CzYsFr7yPY69YBMWG24vRVAACQyTm8meyFFdxPe/J88l5/5oIkFzJDbjxO4w/2XUSYCiHHLiacwR8tNNMt4uL9SN+TrcidU/tQooySfTMzLNOSaRXmNMCFb3/8DAojvTXJgfjlf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/XEm5mftU4Dxg== SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Oct 2018 12:10:49.1786 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: bcea5f25-1e44-4fa1-62a1-08d63d979080 X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c;Ip=[149.199.60.100];Helo=[xsj-pvapsmtpgw02] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN4PR0201MB3519 Sender: linux-hwmon-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add Xilinx AMS driver which is used for Xilinx's ZynqMP AMS controller. This AMS driver is used to report various interface voltages and temperatures across the system. This driver will be used by iio-hwmon to repport voltages and temperatures across the system by using various channel interfaces. This driver handles AMS module including PS-Sysmon & PL-Sysmon. The binding documentation is added for understanding of AMS, PS, PL Sysmon Channels. Changes in v2: - Added documentation for sysfs (Patch-2) - Addressed code style review comments - Patch-2 (Now it is Patch-3) - Arranged the includes in alphabetical order - Removed the wrapper 'ams_pl_write_reg()' and used writel instead - Removed the unnecessary delay of 1ms and used polling of EOC instead - Removed spin_lock and used mutex only. - Used request_irq() instead of devm_request_irq() and handled respective error conditions - Moved contents of xilinx-ams.h to inline with xilinx-ams.c - Patch-1 - Addressed Documentation style comments Changes in v3: - Updated bindings document with the suggested modification in v2 review - Removed documentation for sysfs - Removed extended names for channels in the Xilinx AMS driver - Modified dts to use ranges for child nodes - Reduced address and size cells to 32-bit instead of 64-bit Manish Narani (3): dt-bindings: iio: adc: Add Xilinx AMS binding documentation iio: adc: Add Xilinx AMS driver arm64: zynqmp: DT: Add Xilinx AMS node .../devicetree/bindings/iio/adc/xilinx-ams.txt | 183 +++ arch/arm64/boot/dts/xilinx/zynqmp.dtsi | 27 + drivers/iio/adc/Kconfig | 10 + drivers/iio/adc/Makefile | 1 + drivers/iio/adc/xilinx-ams.c | 1343 ++++++++++++++++++++ 5 files changed, 1564 insertions(+) create mode 100644 Documentation/devicetree/bindings/iio/adc/xilinx-ams.txt create mode 100644 drivers/iio/adc/xilinx-ams.c