Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753823AbdDEG35 (ORCPT ); Wed, 5 Apr 2017 02:29:57 -0400 Received: from mail-bl2nam02on0065.outbound.protection.outlook.com ([104.47.38.65]:24596 "EHLO NAM02-BL2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753062AbdDEG3y (ORCPT ); Wed, 5 Apr 2017 02:29:54 -0400 Authentication-Results: spf=pass (sender IP is 137.71.25.57) smtp.mailfrom=analog.com; the-dreams.de; dkim=none (message not signed) header.d=none;the-dreams.de; dmarc=bestguesspass action=none header.from=analog.com; Reply-To: Subject: Re: question about concurrent regmap i2c usage References: <76471664-425b-c386-3ad8-efeabc2eaf7e@analog.com> <20170404122654.dfhtvpcnngl3gfco@sirena.org.uk> To: Mark Brown CC: , , , , From: Michael Hennerich Organization: Analog Devices Inc. Message-ID: <4929e112-9a08-8b9c-f64e-fd2ffaf8b45e@analog.com> Date: Wed, 5 Apr 2017 08:31:15 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <20170404122654.dfhtvpcnngl3gfco@sirena.org.uk> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 8bit X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:137.71.25.57;IPV:NLI;CTRY:US;EFV:NLI;SFV:NSPM;SFS:(10009020)(6009001)(39860400002)(39410400002)(39450400003)(39400400002)(39840400002)(39850400002)(2980300002)(438002)(199003)(189002)(24454002)(31696002)(189998001)(86362001)(5660300001)(50466002)(65956001)(77096006)(76176999)(36756003)(50986999)(54356999)(8676002)(8936002)(106466001)(6246003)(47776003)(38730400002)(110136004)(229853002)(3450700001)(356003)(83506001)(23746002)(2906002)(2870700001)(33646002)(6666003)(53546009)(2950100002)(43066003)(6916009)(4326008)(7636002)(31686004)(305945005)(4001350100001)(54906002);DIR:OUT;SFP:1101;SCL:1;SRVR:MWHPR03MB3151;H:nwd2mta2.analog.com;FPR:;SPF:Pass;MLV:sfv;A:1;MX:1;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;BN1BFFO11FD034;1:B5rTpRiygmwBJTvQW/4OSpU8y3qp+7PgPTwd9QO7ej7L3kUsmkbAmJAcOtVlKR7g9+mIZimL9LBqgFfpa8mbGCTqpnKpfzoDGSLB2W8WZE5RelnRPhFuv6o/TXC4zFqaoezdvusm/xsJSs5XOSxH8JL4XPeE3iZrFjb6+6ujkgzoxsFPoOp8DA+HrTjfkyI9p9pS9FV1xznFbyJM8t0HLYrSGM7Co3ngb1tvIramwWRawNE42klvsOBFLOfB311tBkTtN+MGmkfJWGgaRxvxIKBMsXnAulcNy/HFz1roOo+9/SvChrMUyS7gPMJhthdizStCeykRrLeCwIeghaBEdzqccsPoM9ApZOu1hCIM8mLMo3mdQyGRzXuOUDZh5vP6THUHqjPXAdaOvzLkce7wPrKGjVCyH1gLF345TdoVh3TV1HN7+qcOHO4TxHCEg57ZlwqIOYfHIe25PupKAC5Ccl87oBEbhUZOeyigpcKiwObDEa6HsOgTjgJ1Uu737fx7DNHGRcugBHkr8nC7NhFgVOgB3eHYntu3C0AA+1uuEt/OfXdlHXHFDP9VWDH0rLUkTYEHiI2ODSMofEnEaIEaTHrrb800wfXLsLLLP+7uaGw= X-MS-Office365-Filtering-Correlation-Id: e0fae1f5-ca7a-4963-f942-08d47bed29c9 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(8251501002)(2017030254075)(201703131423075)(201703031133081)(201702281549075);SRVR:MWHPR03MB3151; X-Microsoft-Exchange-Diagnostics: 1;MWHPR03MB3151;3:5aFH91CPbNNYeoaqiJLW+MqyrR8Q5WH4xcgloUqKZOXXhdc8Qt2AnfY1GPEThF2DAroihv4cD50ihe2ax1LYpylz8634QTExhEt72kAmQOLhLILNbwEbeCZB/Cm72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xxqhNXAzS7/dY0uL+60gQr1ByiLHOxtcM8KODYDPZaky4sbWAsktGEr+QD/FfImPwdDKkSpubXuOPvCAbCUCyRf2MWXq5gGl4cUMUWCOiPa260TPXoH8vaywGq2Iwn5Ml2vOEmw1J3t0JI= X-Microsoft-Exchange-Diagnostics: 1;MWHPR03MB3151;20:uKubZ8T5bujKyzcjcukL3JUk/EzNtAHvimp68ZebAZ/9shbjSSiaU5wJu629hJtQbeAmEr8RhFxmRFI+00qWEp/g+ako7vdtMJpeXk/o5vrKsiNWlx9gVMrYZFL5By/2bqnn1IB20EVu8xkpPufhCfmQEaRrILrSXaX6/WO8wxYa80i0e0VP+joImvtUZuTth2KCwfluuMLTeAgrPTyjuLD8Pu9Yx0dUNSBFN3RFfRG+2pAOcLhJGR5iYHsyRqRTd6KMOOhG+WhflYRGcUVoiL+vDdqbSXqC0KnBzp6ailGyer3Sy5+Pg2y86VJuAGid4w6I6IPGdyXcsqxmjYw/ynqPYP4xoWHXM4LqJPYpN/R0PqFsNjr4Wg2v9uMKZ4Gwpz4YkxW2Oy4FWhmKwM12k/XTtjBnFT1XYUWrpTyCzJ2kcMKI8tz/FpCGYlT+JpaxNiCSecKcFx+XRGivrP2Ktw3bNFGWEzXSk07XnlLYzRZQ2VF9rjzvXt4ZT2Upp2LF X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040450)(601004)(2401047)(8121501046)(5005006)(13015025)(13017025)(13018025)(13024025)(13023025)(93006095)(93004095)(10201501046)(3002001)(6055026)(6041248)(20161123564025)(20161123560025)(20161123562025)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(6072148);SRVR:MWHPR03MB3151;BCL:0;PCL:0;RULEID:;SRVR:MWHPR03MB3151; X-Microsoft-Exchange-Diagnostics: 1;MWHPR03MB3151;4:a2f/gQBrZyYXjO5qMzbfwpKf6bk85RPA1Wx25x98er8M4rPwf9u/9/B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Pj9AxgZnYsLvb/rjI+cUWhjgmewJuYMEUoae3vnP8HxfELIl?= =?Windows-1252?Q?/qciEpW4VMMSbaIHPSg3yhN8Jl1gtTkiVvGMK8inwsxuoDwhqDov+Z7S?= =?Windows-1252?Q?ANWqkGBp0xPDTDp9Ekz7myZcTq4HsJi7aztgHa8St/pKOwW6qY5aANeA?= =?Windows-1252?Q?FlNHlrIw+ZjaHVe6YZ1082syHh4Lvodm5EFEfstvcKmF3d5dNzQjs/Ig?= =?Windows-1252?Q?3FtuxsIyp8c3sfPhPa0UKayAx7lGAZO7DhrC2+zoW7F68RES9K/f7kPw?= =?Windows-1252?Q?nrVjFpC8D9gMSH6Yby7sdYN8iNFrfQFMcs2ji3EAJ9oiovPCzljzdd8j?= =?Windows-1252?Q?ca3QUUvTV5ZG+0zScro+dMN6usx16OP4+JyVgAWN8ZcfgfAE+5UUGRWZ?= =?Windows-1252?Q?PbK4hegCDKI1+O9bf1r8BDdaqLXPxkajIXe5+K9eNIPG9MVIMvZ8sMsB?= =?Windows-1252?Q?MytJEMB8AV6EYh0Ibf1iH52M/qKKJs7XVF3bjww2XbBzvCduLEKM6EU6?= =?Windows-1252?Q?8EKIP9tPFwqZ+Nm6MV4HhxdXq0Xnj+zeyG+I0+7Ac0ESXuWluEk0FNbb?= =?Windows-1252?Q?aw5hHKh7EbkWog9ujuuOLYYqLB/dzf5LESnlydhvCS07yxMEG4ALE+jK?= =?Windows-1252?Q?EsYMV/g15/lnPHHjSOVL9bNwDisoEYvYzL/1sdcUJoE5kcGGY72nH0ZK?= =?Windows-1252?Q?5al2yGlOQc27+EARNzh2ksXB5eCHGihevVgORbbFI49uVVXDsHABNoA/?= =?Windows-1252?Q?6Fsi4DlZH9eULupUBQxsnuGdJBIo95PJWhmdej7l5Z/MfTpLvW/YCyiH?= =?Windows-1252?Q?JPUD/uEBSAM0643x/Woq9EN9A9UsxwKVRnvW/PVgNqqiH6y3rZRB5NP8?= =?Windows-1252?Q?9Saag12fRxwqwe8HQJC7HvApRhFdu3oMKY/bELbo50MzMd0LzQyIkKEY?= =?Windows-1252?Q?t7wmK6vz+V3EeuGnQBXdvs8xyCrFcfEp9QNfuVFCoZJOShPo7/hiLuHW?= =?Windows-1252?Q?Fia6T6HOvurDS+geUW6uk3dhMhkuVxmzEO8ODcwEFnlm+HeX0XRJLQMD?= =?Windows-1252?Q?zk/pxxQaapAiM3vNctDQVw2Njah5L1vIsZzXrdL+3r+JGV9dVG5lNA86?= =?Windows-1252?Q?GSF?= X-Microsoft-Exchange-Diagnostics: 1;MWHPR03MB3151;6:Rm2cGz8+w3j1Lg6T1beECHEuU2MCEiDS3mkyvFgmOoLqj5fRkCoLLaszVM8V8yXSDZHKfhE/i3P5drf7XsiH7UJXKhk/CBGLJn5hNERbiBFwndWKXi03zHex4S2aOM9ZeHon5soruoMxGzkNj4QsjcAFKbKv30qB19WGz9TwmwI1n3zc7mb8RBwTlvX+kgweMsDuwFdAh/dfhQAeErHqRuErfM/r3M2Li490ompgPfd2C9MUwVIRACqPGmqu7Bcx8x4QFHQ2tgZM6GR41em8xUiP9uM71MEW/VGdzTIMjxJJbO8QyjJAgkrcLv0IDT8eu3rM3rjUfuwjDK+ZEMmxSjkFqbO9eFqT/aurUQIhMebgbZadgPWNV51Z5urpzr3UWrtNP9EhkpXzltgv4IXsMWLX9YeBF/lMP6B1QNU6BDo=;5:vkI3mWSLA6aZ+g4A2Z4G3/h775/9cWdcF0jIPSdBHIy3m54lwApO2CT/smjin/GGauFuckB2b0fpHPDbw48AwECJLA66v4B07r8q1u6NTX9HnKYRwByZK8XRjYXtSlO0801366ktIx8qRgzLZfMXBw==;24:0YXUh0mZUHTWLu9LpO8HR+BvBhnfNuNq45cCFbWy1M2rj1nnVeWY63bYuK5EScDLHF2gTUzqVz6VwPGaK16a5LXkznVrWDXm1NUGodwL4Xg= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;MWHPR03MB3151;7:mzehYe2sEpImcsQnr2wE8G1JRU3l+iejF3e6CQ56SZeNTEw8MbWccevlLz7GkpkzCk8CczvTT8dKQtRbniVywnkznCxOO9IgIGHeXJ1UCHIfs92Gi0q0clEM9L9mUBbcfuerN5K7zUyDcVkoGtiKxiAMTcp+cE4oyvbI438O/W+Zy/Ak1tm6VXiWG0aZfzafooZjHLfRzRNv8jjipBdJu3uo/YqWqjRb90AbnjNMZbn3gRkL+xCL2K/CJwTqlsP9R1LN6tQAbOeVP0MwRy6paCykNysjx6TR4CIdD7T5MhusM1ixcE6F6s3FM1ja/ZxxgbOH4oUq78akL18992rckQ== X-OriginatorOrg: analog.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Apr 2017 06:29:50.3402 (UTC) X-MS-Exchange-CrossTenant-Id: eaa689b4-8f87-40e0-9c6f-7228de4d754a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=eaa689b4-8f87-40e0-9c6f-7228de4d754a;Ip=[137.71.25.57];Helo=[nwd2mta2.analog.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR03MB3151 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 949 Lines: 28 On 04.04.2017 14:26, Mark Brown wrote: > On Tue, Apr 04, 2017 at 10:28:23AM +0200, Michael Hennerich wrote: > >> A question came up, regarding whether it's recommended to mix regmap_i2c and >> plain i2c_smbus or direct adapter transfers. > >> In this specific case for the i2c MUX portion we need to avoid double locks, >> and therefore use un-locked direct adapter transfers. > >> The same time we also implement a small gpiochip, where we would like to use >> regmap to avoid some boilerplate code for the register cache. > > That should work fine providing nothing tries to change cached registers > underneath the regmap. regmap won't be able to tell anything's changed > otherwise. Hi Mark, Thanks for confirmation! -- Greetings, Michael -- Analog Devices GmbH Otl-Aicher Strasse 60-64 80807 M?nchen Sitz der Gesellschaft M?nchen, Registergericht M?nchen HRB 40368, Gesch?ftsf?hrer: Peter Kolberg, Ali Raza Husain, Eileen Wynne