Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp4594473rwl; Tue, 28 Mar 2023 08:49:40 -0700 (PDT) X-Google-Smtp-Source: AKy350bf8qPxswabPZknwLNPz4aYkDiy+XoHlmAh8x+25RI4fLjr2B/If87w3+0SxEpep6BABf9S X-Received: by 2002:a62:17c7:0:b0:625:13f3:9409 with SMTP id 190-20020a6217c7000000b0062513f39409mr14161576pfx.26.1680018580480; Tue, 28 Mar 2023 08:49:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680018580; cv=none; d=google.com; s=arc-20160816; b=GYqNBYa53JpeAOLlc7rIsJkH+chE553IIXQhb4Fw2EHrTsVfHR8auOhh6ho60GOqcC Y1GXAVv5M/tog8r5LQ2cQQE+uneuTMD6gcRR5WKlaKpjCESP8yW/iL+idNnO34a6FPvF zzGjP3oA6pfvvUYRVy74oRkDa2vXfXrIYPcIg6uFHhoHcK7QtzCD0pF1OUQsmozx0gws huJsMFQ0qTUtVCL9zBLQUaInrAAFiLp1IP7qcXUr9V7Dfk8gowjailQe2fb3r8yc5KZa rlF0hiiYtX50KPcBo9okd+d6DSYay6IHzJkGehR0K/A5zAxFkXjeldLTuIreRbX46Xxo shzw== 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=YsYcjlqwNos+MF91czTKVkuqV3hZTBv5Rq//588E98s=; b=Ci4ELgNIo4LR+m0Gei0c0QF1+CSFknncTQMZ5+U1+5b7OSDM+Iyqf/uHeWXq1BUVIR VfEKb4jLyHrMqsn/zn8EI+AuqKMEkBpppJgzUY60tRBFf8E4coaxIoNt/aWLR/FMVehS 8ze3CS85xuBVRrYuu29HVCks80qYUoZ79o/biZvWQsL9EiTLq/q7gr6nLdkFGLiErIMh cfM+Ngb1DMEHwvsAwCfAHOnY89oWo1pVt/wEPM3KHo3es1ZKLXnh77ttKQvK/cEGKyT1 2Chcu9v1EjQsDJ/Nsg3arymi52nZ3r7w220G4AX8apbGAFSiC0qql7MEFrh52dxXPblk FLpQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=lTGMG+j2; 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 x24-20020a63db58000000b0050c0cdce84asi29606782pgi.577.2023.03.28.08.49.28; Tue, 28 Mar 2023 08:49:40 -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=lTGMG+j2; 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 S233427AbjC1PsC (ORCPT + 99 others); Tue, 28 Mar 2023 11:48:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41294 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233484AbjC1Prw (ORCPT ); Tue, 28 Mar 2023 11:47:52 -0400 Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 99D7355A1; Tue, 28 Mar 2023 08:47:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1680018471; x=1711554471; h=date:from:to:cc:subject:message-id:references: mime-version:content-transfer-encoding:in-reply-to; bh=24T96MRUkvahofWk1u6QPPXpvn4MM1W+NreI36DEZHU=; b=lTGMG+j2+jaoBYJgswpZhkDBYL+9T062CEOna/9PSKwTxrbbABcZD88V oJrHGZI0D2GcHm//fZsf7DzZmawThhgorJJeNomBY9kKTKdGPF+jTD9eE tFzcZJBWt3JJCXAPFNXmlFH9SvHsixcLivR7me2JPQ9ZIHDmQKpz4INpR Bsf/u0F1NAXvPey3M8ulzRmFfMFbA78msf2K1j5CfptuD76Uz6PHIu7He Bh9nXRgZICpRoY7tKjQ8cK7ua1pve5+QMNVB46H0CSYXkBCeEFpZltIO0 RIyFQ7eJTv/i49wfhgGWTA/3fftMSkxTevl9L+bCY/9fCnM89qD1iHnrZ A==; X-IronPort-AV: E=McAfee;i="6600,9927,10663"; a="324502650" X-IronPort-AV: E=Sophos;i="5.98,297,1673942400"; d="scan'208";a="324502650" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Mar 2023 08:47:50 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10663"; a="929960931" X-IronPort-AV: E=Sophos;i="5.98,297,1673942400"; d="scan'208";a="929960931" Received: from smile.fi.intel.com ([10.237.72.54]) by fmsmga006.fm.intel.com with ESMTP; 28 Mar 2023 08:47:45 -0700 Received: from andy by smile.fi.intel.com with local (Exim 4.96) (envelope-from ) id 1phBXz-009gH3-0h; Tue, 28 Mar 2023 18:47:43 +0300 Date: Tue, 28 Mar 2023 18:47:42 +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-6-okan.sahin@analog.com> <20230315175223.GI9667@google.com> <20230315175257.GJ9667@google.com> <60bbad1b38b8e3c9c3efefb0fb7b8d3cad7fa98c.camel@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <60bbad1b38b8e3c9c3efefb0fb7b8d3cad7fa98c.camel@gmail.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-Spam-Status: No, score=-0.1 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,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:51:18PM +0200, Nuno S? wrote: > On Tue, 2023-03-28 at 17:35 +0300, Andy Shevchenko wrote: > > 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 > > Well, if the driver has it's own locking, then sure we do not need > regmap's lock... > > > doesn't require the regmap lock, and I tend to believe the author. > > So, why to > > keep it? > > However, if you look at the adc driver, I can see plain regmap_read() > calls without any "outside" locking. Then author of the code should know what they are doing. Right? -- With Best Regards, Andy Shevchenko