Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756428AbbGaVei (ORCPT ); Fri, 31 Jul 2015 17:34:38 -0400 Received: from mail-bn1bon0117.outbound.protection.outlook.com ([157.56.111.117]:10813 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753510AbbGaVed (ORCPT ); Fri, 31 Jul 2015 17:34:33 -0400 Authentication-Results: spf=fail (sender IP is 192.88.158.2) smtp.mailfrom=freescale.com; freescale.mail.onmicrosoft.com; dkim=none (message not signed) header.d=none; From: Shenwei Wang To: , , CC: , , Subject: [PATCH v8 0/2] IMX GPCv2 drivers for wakeup source and suspend Date: Fri, 31 Jul 2015 16:33:57 -0500 Message-ID: <1438378439-11569-1-git-send-email-shenwei.wang@freescale.com> X-Mailer: git-send-email 2.5.0.rc2 X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1;BL2FFO11FD011;1:S4e2KVHF72Tjsb3VtaX3m6E91/5uDONPu315LNruEQBUe1Plizff1XqnpRYftYhQHBUHj1j4X+ovgjCTq4SQEwFxd5Sjc3TBeSqEXFzRrC9Jwye7M5zLdZli0RWXfi4cBmYEiDVBuwvV7MeIKKFAMmp0yY4jRV+8/x5HVzPjRjTLgNk2uGCfKVggiENj2k4uK0i7ms58XUCvL6p3TapC48jRBBzqwq/bCPIAYuAHIGcesbkehj2a/o2OSZBRe6We65ZIfW4uuJ2iXGac2HRscD2/4YwOWPPP1Ra8Yn7hQrcCi+MG2o6fkB4TXFtk0tvYPVxw36r9EEMsOlZk/wKTfg== X-Forefront-Antispam-Report: CIP:192.88.158.2;CTRY:US;IPV:NLI;EFV:NLI;SFV:NSPM;SFS:(10019020)(6009001)(2980300002)(339900001)(189002)(199003)(50226001)(5001770100001)(92566002)(5001960100002)(87936001)(2201001)(86362001)(107886002)(106466001)(229853001)(33646002)(50466002)(62966003)(104016003)(48376002)(77156002)(47776003)(6806004)(46102003)(50986999)(105606002)(36756003)(189998001)(85426001)(77096005)(4001430100001);DIR:OUT;SFP:1102;SCL:1;SRVR:BN3PR03MB1368;H:az84smr01.freescale.net;FPR:;SPF:Fail;MLV:sfv;MX:1;A:1;LANG:en; MIME-Version: 1.0 Content-Type: text/plain X-Microsoft-Exchange-Diagnostics: 1;BN3PR03MB1368;2:E9vFTKNiMHL0wxLZ/K0IZsEX97VSJk+YUP2iteMfue44bmwppoBreadnFqkBMtOKXRVwMCPCzw39rQCqG3gAlr0e+VoEBj2gMgS+JCOzE7lmCJmXmSTNvVG3GYGyF6DVJYczW5/N8+VhQ//c+Ong9x2hcaR/AdEZiJkQa1IhFdk=;3:e3lwc4uJYkQbOrf3MPjPNg/SpcpSVKFJxzHdj0N6xPxUFBHcVkvKjOVzLsrkq7MyZwIGz6fkjd4R6k98uzgRfswWTa3T/d07KtMMRznD7LD7TZ9hgGkXWqCLzZhIWBOO1r3i8xSbRSQX3uN0pOeOX6GO7wCrPb+sn12wtBaZUsecqI3tGA5lxJtdMY/YtAcF9/m+dEgcEnDFv15+vlwEFU+eROTcuRyAuImFOqcZS6Y=;25:A6L/lVh+Q3V0tSElDh506PYbsRrMCsDXtAiGIDVkwQcwj3wvnPo+nL7+nGpKnPtmNWt+Psip9Wx20VeVLV+a4pLJAT7qe5SoWu5aDsvlJc6CDuF/b9g3VUyqp6mZaz8wc2Do/E9kMA3s+TtX7LrQ4J3JZn626iRQATZIGDRFk/hZa6Y2FXZBvsIdB0UNEtkWEQBgD4VAYHUcQXj6xSdSJVNc5xaSEqfzr/521vO1VJpgrZjsIdqst28M94me/V8Vw3axJhFZMvW/MXnydY1GYA== X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BN3PR03MB1368; X-Microsoft-Exchange-Diagnostics: 1;BN3PR03MB1368;20:xBxycaGLTm6qs0Ezf0stlLSzJFMa/SdOFABFWMK1lbk25ZZ1ZgL5HCIXOGeKaZa5TZ10M4NDpnW2t3sjalBT3GfHHAezYX6yeryioDb3nMdnHMtEJRsGr7mUuq5U1TKtf0HCtoBvkcSy6ULw620I5fZnKpSdqPSdazzVmWJH6nLwa593fAA4/x5I+lReW8Pd01ZsVrrjPQWEoOufj/mSWGl/srjPu1LaAjQGdYRP0AKBAXeN7hMV0p6rF31KvsUiptlzy1BxndkMUz6cPqVaQeQtNa0lp1ANQxulDDGw7GU+pBLMAxYIaSEwzw+rGNkcMB08shyeykbIIDeGSxAAtVM5au4sHTHbl04CTqZY+4s=;4:jW5tg4qOv6wza4V5a//3+Q0BBU02eFOAmJJyQyb8VfNQv2Ye9s9ab6XzNbjezTgQdC9XYnAi/u2oD59cLVFLDid5vc/qYfgNla4gi7XHyyQU+jxxRhPH3RYsWZEOCdtAX1rtAd/KRdb4N8quC8lJWnq2P1mC+Hzsnk3uiAXy8JINcnd2VDOCdJNDmtCmhDR+f/IYebtV6roKp1AM6c2wyfocus+WKuyWh7LsGnlbN6o3DMX984Dd/lLBHYyqqppv4CeMXDkiMxSxzuiXxLUB7pBglIAeAafEPS9Oqz/PCto= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(5005006)(3002001);SRVR:BN3PR03MB1368;BCL:0;PCL:0;RULEID:;SRVR:BN3PR03MB1368; X-Forefront-PRVS: 0654257CF5 X-Microsoft-Exchange-Diagnostics: 1;BN3PR03MB1368;23:WSEYxpt5iwpW3X/9+K8L0enuDqzieDoCmd77u3QBwf96MPXhIwQIglihFyQLNMroTnIPKoh41RqHbyLD3c8F/8/xNlRjelmDPvP55xrpRc/ROS70V2rqdqRX3lJGGqjYXG5y39OJxiv+85JSwqabUQmjJ8RID/RYTFOf8X7a1eLU3QOBjRlVSNtgRmtYXh9ZkAriVUSxtnCf2EfTdldOZQXPM5+hjvTbhnO+rDA1/+rEU79+hUFVxk0vk9YWvn5UK7duCKThw3WQ/ORfsWbcqgYERBGu/AqkLe23PWqlTCEvYJMk0WIuISpIf3Em1LsuaCKzmQz/uL6bwSPsikucSUnp3GH/OuqaB2609GbuBJfSI0ivtPEbaMD098GWhCSDFOARdAzAT/AjSB/5Lg7woNXp3OZE+6rBINjJPm/NgjWnhI664zUu4LW2sI12ToxjEMpJuaerjyJG0MJgDjdoZbQX5P6cxx9LvcABszQIlf9uAQtWRd8Ksvg6565t2NH+4cDcvs/ohCZfLUP1UnaLB2JMQcMqzFz+VrCZJnNbxDhzU8Rcg9mjkDN6GBwMVUU5dn94Y+9/ZL4clLpDb4PYeatthCq/qKMpVz6jl+EsCm/VZFrUoR5W3+chOqfxfUBxFdjP1gZzDjHINvQHIC+fVxtT/Z1DqiSmR58tn1CA/kySOu8BTZMukHzR7U8BEVsvOg4v+/HA/SpG6zVP7B7ztA7RcAUlE2etXayKC9s7+6cEwupT5of5kIrkmhcB44RKJ7uGyAYTnucmuPiGLNMLP9zqeXp1C6rWz7lo3L2ZBDUYZdrsuNuslIcJGpyBZuDX7BOJLqTBbJ73xbFlLVj4+g== X-Microsoft-Exchange-Diagnostics: 1;BN3PR03MB1368;5:eqxx1arb4WYwOaJa9IbFzg1hN/NqFuHKD4Fu0ulNBhO0kN4YNB5A0UUC+1nJqYYzySuikEumFCkG9NQnieoG52b2Cuwinlz8a+bjGgKNE7uB7AT2Qy3JKT9sN58Pd3XoTAh+A5/Q65bJbBkKSg+z5A==;24:tfWgIH5jrSXBxtJNNOCWtIOmGvCbVFkLV4EvQpxclrTlrTCgES5p6S+CMV1ozwg99agIMTsgt5WjCqDNK9OUhkzYl4aiIMHBr6VkoZi5V+0=;20:t6M9o8F4zTBSKOpsQabM294Si3/Q9DIxkS3a4E0EVyyPzPyXycBDZE3Ux9qn5p+XdsXK8q3ATb0I8F9++RTC3Q== X-OriginatorOrg: freescale.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Jul 2015 21:34:31.1037 (UTC) X-MS-Exchange-CrossTenant-Id: 710a03f5-10f6-4d38-9ff4-a80b81da590d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=710a03f5-10f6-4d38-9ff4-a80b81da590d;Ip=[192.88.158.2];Helo=[az84smr01.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN3PR03MB1368 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2664 Lines: 78 IMX7D contains a new version of GPC IP block (GPCv2). It has two major functions: power management and wakeup source management. Two drivers were developed to support these functions: One irqchip driver (irq-imx-gpcv2.c) is to manage the interrupt wakeup source. One suspend driver (pm-imx7.c) is used to manage the system power states. Patch v8: Rename the structure "imx-gpcv2-irq" to "gpcv2_irqchip_data", and move it into irq-imx-gpcv2.c. Deleted the "gpcv2.h" header file, and moved 3 function declarations into common.h. Changed the compile switch for suspend-imx7.S and pm-imx7.c to CONFIG_SOC_IMX7D. Added the register and bit mask definitions. Added some error handling codes. Unified coding style and code clean up. Patch v7: Move most of the macros and definitions into relating source files Replace the spinlock_t with the struct raw_spinlock in imx_gpcv2_irq Code clean up Patch V6: Clean up the codes (irq-imx-gpcv2.c) according to the review feedback of Thomas Glx Use raw_spin_lock in the irq_mask and irq_unmask callbacks Split the struct definition into two: irqchip and suspend Unified coding style Patch V5: Splitted it into two patches per Thomas Gleixner suggestion. -- one for irqchip -- one for suspend Patch V4: Splitted the driver into two function drivers: one irqchip driver for wakeup source management, and one suspend driver for power state management. Patch V3: Added the assemble codes (suspend-imx7.S) for SUSPEND_MEM state. Supported the SUSPEND_MEM power mode. Patch V2: Added the basic driver APIs for power management. Supported the STANDBY power mode. Patch V1: Implemented the driver for IRQ wakeup sources. Shenwei Wang (2): irqchip: imx-gpcv2: IMX GPCv2 driver for wakeup sources ARM: imx: support suspend states on imx7D arch/arm/mach-imx/Kconfig | 1 + arch/arm/mach-imx/Makefile | 2 + arch/arm/mach-imx/common.h | 4 + arch/arm/mach-imx/pm-imx7.c | 917 +++++++++++++++++++++++++++++++++++++++ arch/arm/mach-imx/suspend-imx7.S | 529 ++++++++++++++++++++++ drivers/irqchip/Kconfig | 7 + drivers/irqchip/Makefile | 1 + drivers/irqchip/irq-imx-gpcv2.c | 273 ++++++++++++ 8 files changed, 1734 insertions(+) create mode 100644 arch/arm/mach-imx/pm-imx7.c create mode 100644 arch/arm/mach-imx/suspend-imx7.S create mode 100644 drivers/irqchip/irq-imx-gpcv2.c -- 2.5.0.rc2 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/