Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752207AbdHNOPT (ORCPT ); Mon, 14 Aug 2017 10:15:19 -0400 Received: from mail-cys01nam02on0079.outbound.protection.outlook.com ([104.47.37.79]:26079 "EHLO NAM02-CY1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750876AbdHNOPQ (ORCPT ); Mon, 14 Aug 2017 10:15:16 -0400 Subject: Re: [PATCH 3/8] gpio: zynq: Shift zynq_gpio_init() to subsys_initcall level To: Linus Walleij , Michal Simek CC: "linux-kernel@vger.kernel.org" , "monstr@monstr.eu" , Nava kishore Manne , =?UTF-8?Q?S=c3=b6ren_Brinkmann?= , Steffen Trumtrar , Peter Crosthwaite , "linux-gpio@vger.kernel.org" , Rob Herring , Josh Cartwright , "linux-arm-kernel@lists.infradead.org" References: From: Michal Simek Message-ID: <68cd52a7-ce87-a507-f02d-ccb99634b465@xilinx.com> Date: Mon, 14 Aug 2017 16:15:01 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-RCIS-Action: ALLOW X-TM-AS-Product-Ver: IMSS-7.1.0.1224-8.1.0.1062-23256.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.83;IPV:NLI;CTRY:US;EFV:NLI;SFV:NSPM;SFS:(10009020)(979002)(6009001)(39860400002)(2980300002)(438002)(199003)(189002)(377454003)(24454002)(4001350100001)(36386004)(54906002)(230700001)(8936002)(6666003)(23676002)(81166006)(81156014)(8676002)(356003)(189998001)(83506001)(31686004)(53546010)(64126003)(2950100002)(33646002)(9786002)(626005)(229853002)(478600001)(86362001)(31696002)(5660300001)(36756003)(65826007)(4326008)(50466002)(6246003)(47776003)(77096006)(2906002)(106466001)(65956001)(65806001)(63266004)(305945005)(54356999)(50986999)(76176999)(39060400002)(107986001)(969003)(989001)(999001)(1009001)(1019001);DIR:OUT;SFP:1101;SCL:1;SRVR:CY4PR02MB2246;H:xsj-pvapsmtpgw01;FPR:;SPF:Pass;PTR:unknown-60-83.xilinx.com;A:1;MX:1;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;BL2NAM02FT026;1:DBuOo0Bt8SfFUGcVbRDivRXDxMlTWHE5o1sNgqFUNNaMIk8L8j7DIwkp/YlKZvCiIUpRtLIQRXwfdQLdBSk2/NWKUu9zQ2zm/YWMvSuNSHEovuj+HWW8P6PXiYBj0SQlwVIUcMz8rWbaebLzqgqP/vAs1xXqFNWePye61U1WNJ6lylQq/aZ1jcBMZdB4YW/xQ/g6aDPacSNfoU48pmuMscj8kJSsWuEbjUjIu39JxbCsowrccfhZa9WKVnUixz4TAao56r+QGFsOwSq4diN8re5b+x/tQMXKFsdLQz4+G+Xy7F1PXHDUBo9dkTBVMlC40wup0i0SrTtmRgbfJwwRajMLh7Itm0vgOzVLuOL5g4J1KnBMyGsRSm+Hs/I8h+buLFF7C1CmG2wWu6hfxJ+57qVjg1vCnYWHFj3JIUNuU+sBuIivGOwcaaGKeNZZhTVGI+gkvInDCB4P3YFbqpNSfOrPvitveB2GtLDFxhbwrDFkNgnitqmeGKaua1NoFm1L/t9Ov6SWxXmWIE9R57BkyrYu+Mg6Q5D5+Lj5uge6L7oP4Oekv6XwARrcDTFrS5PJOZIq5XDvN/hXMa1Uy476K0PCEOs2xBDOssp/g1wJfUs389KHU6uEAKFvGFhgitkjYSGXHZLkYjo9y4VfOcTPw9E4TVBtL0gsZgYA2tW4O5adWjR/rCkmsWRoXLaNzgW4b68CGyqIahnFjblIFQrH6ImO9k7+wq+a7DwGhcsgKXup6mN1Ru2bIAmpGN8LVzNBhMNIshDHRTB4YIu9XwzREI9cDbeoE05EdlEZHzBmN0JCtyLdulVVfv8Z8FYiQnrtlXbQjAdZFIUHy1pORCTCBg== X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 35f1278d-ebae-4454-bd82-08d4e31ee13a X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254152)(8251501002)(300000503095)(300135400095)(2017052603031)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095);SRVR:CY4PR02MB2246; X-Microsoft-Exchange-Diagnostics: 1;CY4PR02MB2246;3:WiSjVqmQCeZEJt8t6tVCHXP83/LOgZRFccp5mnzqsgMoD2+/LtfnNkpvCwIFT/o82/s5P9YBxKXmQhSlnk13ARgHsj3TQba87tfg2g0wzJoxLJo7oiWAyLXlcfxGBNR9zFSVJFf6GvBx6zeQmVvjCZQNLDSU+20iETCmRLBm0wqAWMPkN3g0tZ66ebTj2QKBREQs6C/haoSdqp+G/5O83F2G51RZMq9OB29q5jqhJadH41PKQkCJQBRHRARZmFTQ+hxXCJs4isWE5tGmoGKh6NbUUVsE/lA0hGmcGPtA8r1wrEhf/oTX9x6UonfdDKsK3HCjpPP4Ue87MsN4HzpaYcARW7Y05OZ+5iEN7JJgTjI=;25:mcqmZI4Ch/fiD+tXTZlsQUrHDc4xGIfWEydKJwxp7omQ7itJ3r8bzcely6Pcb3bseESJIPtIyuJxQ70DIOUYuF+ERndpRHFgPuKDeWydUdXGilG4hLdKv6Sw3VExIXktYYusOiRzypQrPFWUJ1/FRE04ASSNjhfaW68IwDwv00eKYv5ZBUFpB12btc4viNkbpUsZlUGZKpArPEPDb97e5+oF+02S36JzxqDwj7F2/+uhNN29Aopf84PGgq8xLoAwzmliWZobJ5ctB6jiQG/v6vMNDiSSKXYzlkxiBMQUMBntDjpnRb8P95dpLFjUax/YnABk3xDBl+yhag7AahjAKw== X-MS-TrafficTypeDiagnostic: CY4PR02MB2246: X-LD-Processed: 657af505-d5df-48d0-8300-c31994686c5c,ExtAddr X-Microsoft-Exchange-Diagnostics: 1;CY4PR02MB2246;31:bTijzfKdm4jsJtKa/TR8veN44vnQKuZ1QEqraU0vuB4ROhjp86EfN1/grSMq7FLqYXCnaTEOQMRG4rMCaRjjkHh475OGVSV42uEytYeK4GQFSuvAgLW123QAjpVqQVy0m5AH7EmUIjC4kQ9sB+hFP+DyxmDkx8I5ojUJinI7F2dX+i7GVTxE7ZDX4y2zxAa6254dEsV1SDFF1+tvS6Mh3AmKBzAMhaIFwodxZd1nfM0=;20:daptvXcS6fr0mpP/63AOzsJqgborWSJpNEspmHIu5aIpFcDPbFoN5JwfjBDOROOOCyVSsQZclndGWDgoLCd7mOcIZ3MyIKEY3To4DFlLbXlOij1D6MDft52mdK/bovAC9XgYTjGRpAzDoCjp4wawYBrPlwnWPKrNfmvLYY0w590EL4tNAjxZR4NjQ/nGnkNB0Jl+rM3qRLNqbq4htWGrG4UlaBb72LrsVVQWAz+QjIBxaSvGWpHiGDuggA+tWpNrwVQgNN9rpFimTSqKAf7BqUeuO0871tiyVljTtUfvJ3pdvceW1BGnDMW1G/GTnXFJmtp4buf+mTyibW0veQiC+uAI1EzyEEDpr7JxbvGJzjeiR5lGiENTWF2Pd7K+gNWAbPuW5sN5TQk7oO6hx/ZppJ0T+RC7LL/F3XszYxvn+yDz0KGzjFmMSvsLssDMrS3/zEohiJw6VASNDrXOmxSmbIqCELAARTsf6W8Dx24qQwmVuDgtJUD7c11Lk52nHCkD X-Exchange-Antispam-Report-Test: UriScan:(192813158149592); X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(8121501046)(5005006)(13016025)(13018025)(10201501046)(3002001)(100000703101)(100105400095)(93006095)(93004095)(6055026)(6041248)(20161123558100)(20161123562025)(20161123560025)(20161123564025)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:CY4PR02MB2246;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:CY4PR02MB2246; X-Microsoft-Exchange-Diagnostics: 1;CY4PR02MB2246;4:csyopgZCmeMe2K+dtP/OIeO1guvebf5Kb7tON9rMbQoL/yYEijj0Z6K9WaOewG0b88Jpco/CVRvy772b+cAa6cKcufokP4OrhOcz2hKMIh4nPBiTHCxdO1zCjjZRj0Rbq08Vb3pISIM/CyRatF7D+nwqWkEfc1BN41c3HIlXOgZvqlawmYRNLpPW1orxGCQ5fqLTrt4AwpTyOqc/p/nveEbIGgpmamWUL3u9CBNbGNKQD6/ODqul8dAxW8dU1WOCz9qMLUidf+q0guGaLZT38MiMh9YvQQOqgVHbKs7AlOE= X-Forefront-PRVS: 039975700A X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtDWTRQUjAyTUIyMjQ2OzIzOi9UTG52RTFsZHVEaVkrNDc1eXJvamVlTTZQ?= =?utf-8?B?MWhJSjhjd1hMUWhPQll0ZDhZbnlhL0Z3SjFUY2s2U0ZNV2pBNmZnSzF0UWN1?= =?utf-8?B?WlRkZ1l6Z0lpSnJTaXdxTS9nZFcwcXFQc1Nka2NieUJkREhzNmdQZEtlSHhY?= =?utf-8?B?K25BTFhmakprRThzSVNSYWZOTmxnU2FVbm95THc0LzhkdDZ2ZTlIUkhXV0JE?= =?utf-8?B?cHNMSWZtdUNodTRXMWdxMzczZjN5c0tNYUhEcGJLdWtpcnM3eEk5dEhFTG1N?= =?utf-8?B?S2tIQnJML1A5UXlMMUlRRnBxS1gxWWhLRXZkeW53d0R1M0xUZWQ4NkRpSFh0?= =?utf-8?B?Q0dkbVNjdGVRT3FJaXAxNTZJb0F6RnRVNWlZRHl3WCt2NXhuM0QyZEZ3Q0lm?= =?utf-8?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bca5dM7+7t5p9RRZlE1NvSGYJfQ==;24:f/BhzPZ8WfK4sfRvGwJW3Hn+8sNv8nu0QICfjyHdJkrpPL6lJdKIk+kXQa3oAXqGLp3iWe57uZFNi0rh5gdGMM4Dn2t1mF8NqTCI8f4VSvA=;7:7IcWFNZ06ywhuU3AeWKLrfn7LPtT/v0zhcLK1QlBvS+kPczuKBiiyhkjTguZsoJmROxfSKoTxjs+dWZNnrDp5Kh44i+XUKhoM4stQULOLS0oWGH2go2Z9hURGMnudjnZ+QUwdwTIeBWKJP/5rEfUK603ibRVNO7IOFB1cq7F0V4CVU1oHcpcK2NrDStmHJLq6sYRpMX9GLlFptaLPmITmwfJtJm6ngWpd1pbDuCYIrM= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Aug 2017 14:15:13.0204 (UTC) 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.83];Helo=[xsj-pvapsmtpgw01] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR02MB2246 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2319 Lines: 63 On 14.8.2017 15:55, Linus Walleij wrote: > On Mon, Aug 7, 2017 at 1:01 PM, Michal Simek wrote: > >> From: Nava kishore Manne >> >> In general situation on-SoC GPIO controller drivers should be probed >> after pinctrl/pinmux controller driver, because on-SoC GPIOs utilize a >> pin/pad as a resource provided and controlled by pinctrl subsystem. >> >> GPIO must come after pinctrl as gpios may need to mux pins....etc >> >> Looking at Xilinx SoC series pinctrl drivers, zynq*_pinctrl_init() >> functions are called at arch_initcall init levels, >> so the change of initcall level for gpio-zynq driver from >> postcore_initcall to subsys_initcall level is sufficient. Also note >> that the most of GPIO controller drivers settled at subsys_initcall >> level. >> >> If pinctrl subsystem manages pads with GPIO functions, the change is >> needed to avoid unwanted driver probe deferrals during kernel boot. >> >> Signed-off-by: Nava kishore Manne >> Signed-off-by: Michal Simek > > Can't you just move it all the way to device_initcall and > simply use the standard module init macros? > builtin_platform_driver(), module_platform_driver()? When I grep the kernel I see this [linux](master)$ git grep "^core_initcall" drivers/gpio/ | wc -l 1 [linux](master)$ git grep "^postcore_initcall" drivers/gpio/ | wc -l 12 [linux](master)$ git grep "^arch_initcall" drivers/gpio/ | wc -l 2 [linux](master)$ git grep "^subsys_initcall" drivers/gpio/ | wc -l 33 [linux](master)$ git grep "^device_initcall" drivers/gpio/ | wc -l 4 [linux](master)$ git grep "^core_initcall" drivers/pinctrl/ | wc -l 6 [linux](master)$ git grep "^postcore_initcall" drivers/pinctrl/ | wc -l 7 [linux](master)$ git grep "^arch_initcall" drivers/pinctrl/ | wc -l 62 [linux](master)$ git grep "^subsys_initcall" drivers/pinctrl/ | wc -l 12 [linux](master)$ git grep "^device_initcall" drivers/pinctrl/ | wc -l 0 Majority of gpio drivers are in subsys_initcall and pinctrl in arch_initcall. It doesn't mean that I have strong opinion about doing this change. I have also read internal tracking system and it is not fully clear if this is fixing any issue rather than removing on deferring probe message. Nava: Do you have any comment? Thanks, Michal