Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp4498502rwl; Tue, 28 Mar 2023 07:45:11 -0700 (PDT) X-Google-Smtp-Source: AKy350ZNw6+imnGGQ84iNoTpystjeMJgIDp0OV+1mY4Cd8rvzRuoGwzaxGEGYUSe885lvycLom3V X-Received: by 2002:a17:90b:4ac8:b0:23f:91e5:103d with SMTP id mh8-20020a17090b4ac800b0023f91e5103dmr16701303pjb.36.1680014711359; Tue, 28 Mar 2023 07:45:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680014711; cv=none; d=google.com; s=arc-20160816; b=xedlgPGsHRgaM4kIU0zLW8e086kEvsSZrKjmDiEGozgZimWCLRsn1im6V4ohqZ5SeT bux+wDVyv2N7a0QmyBD4q27uDkB53bvOhKZZa36RlkDplmBiov4ob4I7ksnYg1MnKs22 MIWzpov5OtibYE1xbPJDL0H5eIgzZ4lO1qLHNXpMtIuX07mNZclqpVHTLmNts2gr3NKL iYxW6F6ymfpwQSNZR6m8F7hVyK7NUnh/3jkjfmrQPLpcZIWkm6mJMt59YNX3e57xw80f EZHUs31ut8tW8nQp0A6MGG36GQoKMCAPmYTdSqe6uIfBIgWi9UH5iG5ZEhU7PYejDdpW mLlA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:organization:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=ZTKfQ2iRcQLsF1SByPgPmPKle/S+W+Nbf5fpqItdnwY=; b=ntD/o8OTm4TYIgdEfGluW86yQHTJNIWcsqBIG88eqcl4tZGFNp1ZSe3dE2Hco2y8I+ 6SCRG9DvUZxYpcOSIKAEpkkLVF8I/+5OJs27b0063cN+rz/r0yKn2X18yqAii/hoCGo1 PHmnbs01oOCAH7fQPI9Q4H7ajwNTYAR/+esLbshL/dll89zxcDjYWd5WLwaatnj6yC44 lACfYO3Nvo7lAkgRhDvAB1u53dSY89wTHlf21ff7mGRtMk/axB8GUprr5u0Tq9X/W4bD qEPxBdQRt42kkayl32MZXDMcsemv4liCmlW3BKjalvOl+VgmUOxyYgfGF96wnNZkKN8B /mjg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=VKEtnEyD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u5-20020a17090a400500b0023699c44b66si12663650pjc.167.2023.03.28.07.44.59; Tue, 28 Mar 2023 07:45:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=VKEtnEyD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232954AbjC1OgC (ORCPT + 99 others); Tue, 28 Mar 2023 10:36:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52006 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233204AbjC1Ofw (ORCPT ); Tue, 28 Mar 2023 10:35:52 -0400 Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DE7EDCDED; Tue, 28 Mar 2023 07:35:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1680014129; x=1711550129; h=date:from:to:cc:subject:message-id:references: mime-version:content-transfer-encoding:in-reply-to; bh=PwPPDuu5LzPD0qVFdDs/5snLEgHkaAUrZcOrnpL6Ij4=; b=VKEtnEyDsHtl3JrEYTWyZNIMiThqndMOUWO0U0VcdFe/mhCwUZ6q6XIa pb37om0y+nsqpo4or3poIPgHHwefJRze1LZiZGxO7cCfC1+EZ4b0NJqVW ZCYUkOmcWlLdlwddBmcv0kAWCfsgN6uGjj2eKEyTAkPdS99QNcaMIOxMP Ukcf6zwJAe26n6z19jkYzIUW53SGf06d0TXcmIoeqoK6Jn/3gNKQD//VD D/S6KmLdFXmkrYqIVsxIx31+Y8ibCwdlcNtlHlJd8f+4IfJcymhw9Igvn EP+oCawT385aAl0EbSqh0yLUULLo1bQGPMfT1+PWNEVGSyuIkGxm/KrLl w==; X-IronPort-AV: E=McAfee;i="6600,9927,10662"; a="405517670" X-IronPort-AV: E=Sophos;i="5.98,297,1673942400"; d="scan'208";a="405517670" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Mar 2023 07:35:28 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10662"; a="683923841" X-IronPort-AV: E=Sophos;i="5.98,297,1673942400"; d="scan'208";a="683923841" Received: from smile.fi.intel.com ([10.237.72.54]) by orsmga002.jf.intel.com with ESMTP; 28 Mar 2023 07:35:22 -0700 Received: from andy by smile.fi.intel.com with local (Exim 4.96) (envelope-from ) id 1phAPv-009f4E-1f; Tue, 28 Mar 2023 17:35:19 +0300 Date: Tue, 28 Mar 2023 17:35:19 +0300 From: Andy Shevchenko To: Nuno =?iso-8859-1?Q?S=E1?= Cc: Mark Brown , "Sahin, Okan" , Lee Jones , Rob Herring , Krzysztof Kozlowski , Liam Girdwood , Jonathan Cameron , Lars-Peter Clausen , Cosmin Tanislav , Stephen Boyd , Caleb Connolly , Lad Prabhakar , "Bolboaca, Ramona" , ChiYuan Huang , "Tilki, Ibrahim" , William Breathitt Gray , Arnd Bergmann , ChiaEn Wu , Haibo Chen , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-iio@vger.kernel.org" Subject: Re: [PATCH v6 5/5] mfd: max77541: Add ADI MAX77541/MAX77540 PMIC Support Message-ID: References: <20230307112835.81886-1-okan.sahin@analog.com> <20230307112835.81886-6-okan.sahin@analog.com> <20230315175223.GI9667@google.com> <20230315175257.GJ9667@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-Spam-Status: No, score=-2.4 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H2, SPF_HELO_NONE,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Mar 28, 2023 at 04:18:30PM +0200, Nuno S? wrote: > On Tue, 2023-03-28 at 14:46 +0100, Mark Brown wrote: > > On Tue, Mar 28, 2023 at 03:26:44PM +0200, Nuno S? wrote: > > > > > IIRC, regmap_read() is not really reentrant and it is used in the > > > IIO > > > driver on the sysfs interface. So, yeah, I think you need the > > > regmap > > > lock and better just leave the config as is. Yes, the lock is opt- > > > out > > > so let's not disable it :) > > > > All the regmap operations are fully thread safe. > > Even if 'config->disable_locking' is set? I think that is what's being > discussed in here... In case the driver has its own lock to serialize IO how on earth the regmap lock is needed. That's what I asked the author of the driver. He told the code doesn't require the regmap lock, and I tend to believe the author. So, why to keep it? -- With Best Regards, Andy Shevchenko