From patchwork Mon Sep 17 03:26:33 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jisheng Zhang X-Patchwork-Id: 970382 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=linux-i2c-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=synaptics.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=Synaptics.onmicrosoft.com header.i=@Synaptics.onmicrosoft.com header.b="BayqwbNp"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 42DBTH4fSmz9sCS for ; Mon, 17 Sep 2018 13:30:11 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729473AbeIQIzb (ORCPT ); Mon, 17 Sep 2018 04:55:31 -0400 Received: from mail-eopbgr700085.outbound.protection.outlook.com ([40.107.70.85]:23264 "EHLO NAM04-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728742AbeIQIz3 (ORCPT ); Mon, 17 Sep 2018 04:55:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Synaptics.onmicrosoft.com; s=selector1-synaptics-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=c+GSGMtu9fZcxoWU2BmnilHQzG6hur0nG0XIMFrlIhw=; b=BayqwbNpfgt5z0pz6EFuR7/jGFbihs72t1w4MdeXfQd7QfpNfgNAFpTWUWv17k7kNWTDYhnfnj+M0QtKCZGfNytRH89yrJAJ14GNAKrWoyFqaE2EvFK/glef1APwJ3PiTs5kRutNlO6ovVuOL168c06/HFHs3fxRH4BuYTT0e+M= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jisheng.Zhang@synaptics.com; Received: from xhacker.debian (124.74.246.114) by CY1PR0301MB1577.namprd03.prod.outlook.com (2a01:111:e400:529c::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1143.14; Mon, 17 Sep 2018 03:30:02 +0000 Date: Mon, 17 Sep 2018 11:26:33 +0800 From: Jisheng Zhang To: Jarkko Nikula , Andy Shevchenko , Mika Westerberg , Wolfram Sang Cc: linux-arm-kernel , , Subject: [PATCH v3 0/3] i2c: designware: select gpio/default pin when prepare/unprepare recovery Message-ID: <20180917112633.252c591c@xhacker.debian> X-Mailer: Claws Mail 3.17.1 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 X-Originating-IP: [124.74.246.114] X-ClientProxiedBy: KAWPR01CA0085.jpnprd01.prod.outlook.com (2603:1096:402:c::21) To CY1PR0301MB1577.namprd03.prod.outlook.com (2a01:111:e400:529c::15) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 1e548207-d603-466a-1847-08d61c4ddc09 X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989137)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600074)(711020)(2017052603328)(7153060)(7193020); SRVR:CY1PR0301MB1577; X-Microsoft-Exchange-Diagnostics: 1; CY1PR0301MB1577; 3:6oGGKQH4Vp5WPDpLb6i5qMH27g/Cj1i4K86NDWE3qSOvH/8qUwLb3Vbvn6Ssez8ITxj4zxBv9XdM/QggvSsje0sKp4UZXgB1VjIm4cnTTnW1kIEpn3sn3KDXfBAFpT0LHac11ylzyq8UH6/pinctgl0xGqMAU+E7j3HTMwntB/5fUNJJoqoiUubgXmj3b3az+wQQAdHCmUhfAFscbxfbbrbOUy3DLp90YeYSwzvtTm2mLYsg5XMOqLpTdxTD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7xIAXOGiN972B/OGyUCAPXmUru5NboPpzxTxNf0Ao3Sg14CC74dXnDJ9j8rhyluNLau6+IOA5PFV63diBNsYX3OH5pECVNk; 4:Lvw49voIzsPjv+j9S12XiD7RdmqdB7UvHXbHau5p3qaiTGqt0Kw9HEFbWNMt5wFCg4co3kpIzXBbkYhV+TaXa29X+QbwvM/2MZvuVdZTV378nk65DfH+fsfQwtvbk9lH/V4FHnuRwavy4/RUyT6eES+dLOYEuHLwmlECD0wr8y5p5efdgsSR8jqZNC8UYQNygEYHu6CVzIn7ZacxTHgw7MrgENz3NUk18BC+Y0nB0DHjuPtzHFUerKI+p9bJgA9T/Wf5dP3SuXqiW1RZuOfz+Q== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040522)(2401047)(5005006)(8121501046)(3231355)(944501410)(52105095)(93006095)(93001095)(3002001)(10201501046)(149027)(150027)(6041310)(20161123562045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123560045)(201708071742011)(7699050); SRVR:CY1PR0301MB1577; BCL:0; PCL:0; RULEID:; SRVR:CY1PR0301MB1577; X-Forefront-PRVS: 0798146F16 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(136003)(396003)(366004)(39850400004)(346002)(376002)(189003)(199004)(72206003)(55016002)(53936002)(7696005)(9686003)(23726003)(8936002)(50226002)(33896004)(5660300001)(3846002)(97736004)(6116002)(230700001)(52116002)(305945005)(81156014)(7736002)(8676002)(81166006)(478600001)(105586002)(1076002)(106356001)(110136005)(25786009)(316002)(956004)(476003)(2906002)(486006)(50466002)(386003)(6506007)(66066001)(26005)(4326008)(186003)(16526019)(68736007)(6666003)(54906003)(86362001)(47776003)(39210200001); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR0301MB1577; H:xhacker.debian; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; Received-SPF: None (protection.outlook.com: synaptics.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: 1; CY1PR0301MB1577; 23:k1HzsvLE94XXDi/vDmXIpY+Vti19+oJlBUWUjTqLcAMbhkKpWe14iHwCPMG8jtqmTJt0OzliGgd4UUgIPjE8odZJJnL1l0DM84YMnrQYgutYMrPC4XzviZXKXYPOXv+8osjr9WYbjoSLPybt7vV5mjAGqr1DP6nSgPEeTmBansQO2Org8ODrYsoyKHwB/ZRX/1xgXDyuzgNPsoS7UvBhJF/24iTANGalhUHhC8Xq38opuwI2aNXvktJOqvuT8lRClxIXNQNG65wzLaUuPo/rlq1Mj2fwOHcUsX2+b95wqO8HGk/uIekX09qyZ/9U2J5WGyXoUvmsfvLrAAkIcktxnsjel/iENgFtwPDvQWg8EBL2r/yYa7h1ohL+Hna2ID85jBT+/dxfSTSOGTitJfL0Bv94MFT3OJ/wbhjOVH92OhCVzRvJ26WFUY2jEAtOnAu3Asin34QQ6jaPNR2BDoys4mfKNsqbNmaHUt8doB1b5pGL1SVrHXOK79iYdo4u1dqhV0el3soop54Ou2SOQdkcpzrLl4UME2265utnVOB6JpyCbC5FftKMxuuRaEAIVBTBgCuNMy7/rYChHRCntZ8spZEL5Qyi6yp0BIQhSy2SDLN5kw5FCKJMunSo7PPsZWR5BfYKAs5JwDdsC3+cB6g/hi73+J4ZApLC9EdvThoXEjh6SqYorFXWZJoSuz1B6egocel9cHQMrcJpEpHZEyUKPs5rVxD3E7nljcpS5rB8w60M+23DgL5CafeaS62S5M8xw7ChFfHZ803yKTxLOjG7gTllHSKkfupLHoWO31krnuaDfzxNAttKHg5XZ5nlJPzkM2bOAMo1m0SqF6devzlzCXdE6v8u59OK9tbAj3xCNy0TcqALsMiWobp6RswEJR0HhGz4PTqJWCDLbL1ot9ZzjWB9IRe3LE0V3+F23ymgc2u/eEL5m2s292V3goXbfWaVY3Rwz/BjEOdDrGAxBYVGVH/Hmp0YnpMikb2ekrcZRqkdrCU+C0n778gjbbpHeTRjXzxZFkWHI9OhlTuvAV6yPNCEn0dZyDLlGhT5fLE2j5N2khFMIoVQwdc2OvMez8Vt6qf6A4KAxwYZrrUrl7cFW/NoO1hl+gicn42d27P7GUzMHL81y18mU6+RWNdF1ZFc+N258K+QaqosNnnonhD8GHWk6Bd9GhTMqnuDpubyCys= X-Microsoft-Antispam-Message-Info: cgp+IhvFK4LO/CIR1gIcbEBTnbyLstvxG2w4Fwzp/2oBSKr8tXnQMFqj8muHsGeUG0WNOjuIXK7fjxBtvNcBcVXSQUFppg0vnPUQo3iBKYrHpHi/OibGJ6cN9lgWVyT4mSZFlydNhBg1ZkOlpANSXg6DZ7X/0Aho8it2RB0wfW4NPKH3QHMqi6eO991MCo7MrF295JfdOozAXso41E4/n3RzHoPJgCFoMJ0oijG3VUQtLf1D5MPuV3uT11YREKIjdAfyTKROom41Htci5/+AQAnNIkSI3oJiozx9qGaIxntdjGhb3X4brHmJmsxCzY/TxtAYvO56H61GJNmlCgU6rnt5l5J9SivdfpPR2DyBuMM= X-Microsoft-Exchange-Diagnostics: 1; CY1PR0301MB1577; 6:wAxxYj7OOVi/d02tm/UxMbcdIk/FAH4fb5sFwLcPhVEiPE30eVGbAXzCL9/y9dg+1FvXsEqHfL2TRQgR2civ5KgZOu1waXNMUMTLAy9jtRofz53ioH2SZKqrPUmtjM2PqCXIfBGN5rVnvA+d0cjUOEKb4EcLU12nba3DU2bVgQ85AMschOof64amYjWIPUtlYAJUIDoiOBq09sjskqvg0UGKFPpjkcIoGowA5kvZVOkYQoFycAOsIu7LRXYdFTEz0vHLioovR+UkXXdcM9Y4IcDBpLvG1psqLWzoENgUkVJhNqaR2rgbT34OiNrkQMafcLWbbCbnhLjNX5l33uvYFhJrzVAi+aHKsKCybnqyaVsY4bLriRRuyx5iq4Uet1GIG+08cy8GvU/zPerZVHrejLuZyilrXoQus7WBy88OVX58O0js/fLDt4F58Vey93QRYl7rptxHCyWjLE7vIPBGxw==; 5:I61fEFXxBpgLp435WfzFif2RXruMbt37j8sCr2wjjqIrbnUdxN1yMBfrYKHR6oEb1K+xeD9ghSltjLSmK96hFo1AMvoHJrtAh774Ts3DoNx1KYcLvuf5PxuZwnlieau1JXna6nryD/qFS6Lh+joWvVEoRuakz5qOwoZcOkuS8A4=; 7:UT6HHuMWZ/ADJ5hUjMQIaP0ouRWlJ0dAf7ocOyr1t2dSkA4MCRK8VCBoyWdSASOF9/LgodVgYivQ+wCT7SpLkqCNM5xy9L8ETT7kbdaFF+l4G/ulfQoQ3ZWh60EX2FhaxDx4efey5YpSZ7W40O17ppGER9A1wpT8xALs8lEvkaCrDjUUFoJThI6/hWAWLlNloJSPh+BoK1l2tnyE0Iqseg4OVfkgv0MFT0TEdgjulIEd09lHTzZjyybgXbBDFVc/ SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: synaptics.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Sep 2018 03:30:02.7198 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 1e548207-d603-466a-1847-08d61c4ddc09 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 335d1fbc-2124-4173-9863-17e7051a2a0e X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR0301MB1577 Sender: linux-i2c-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-i2c@vger.kernel.org On some platforms, the sda/scl pins are muxed with gpio functions, so they could be used for recovery. Select the gpio/default pin function when prepare/unprepare recovery. patch1 adds the missing scl-gpios, sda-gpios properties binding doc. patch2 adds the pintrl property for i2c bus recovery. patch3 selects gpio/default pin when prepare/unprepare recovery. Since v2: - add missing property dt-binding Since v1: - use IS_ERR_OR_NULL Jisheng Zhang (3): dt-bindings: i2c: designware: add optional gpio recovery properties dt-bindings: i2c: designware: add optional pinctrl for bus recovery i2c: designware: select gpio/default pin when prepare/unprepare recovery .../bindings/i2c/i2c-designware.txt | 12 ++++++++++ drivers/i2c/busses/i2c-designware-core.h | 3 +++ drivers/i2c/busses/i2c-designware-master.c | 22 +++++++++++++++++++ 3 files changed, 37 insertions(+)