Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp3364330imw; Mon, 11 Jul 2022 07:19:04 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uDCeNtqiUUdVpWiyJqiVXQk+sDHtyCL05RepUDOJc7yJT63Fg30Ef2ZWp0Ss00+FkvFHCn X-Received: by 2002:a17:90b:380e:b0:1f0:4424:d53d with SMTP id mq14-20020a17090b380e00b001f04424d53dmr4304222pjb.85.1657549144389; Mon, 11 Jul 2022 07:19:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657549144; cv=none; d=google.com; s=arc-20160816; b=cuqWgHy1Yrfdcr6Oa9VR3Y/COwtEdDb2Byrnev+SwG696VnKcZEX2nfbD6UP8XjNem +t+IS3RwSM+dQulVb5A8IbiM6fL+3oC/tyEX+5m4RYFGy0VnvvDkQCmaGozh+EShyjaQ Cy6u4/CSHSE+sQ7iXS3zwO9lHWVF93VVmejY4ijh1TIiH8WDM/emcn0+raHpyU68JzmF XDFpKzkaG54H2KkNpQa/RDitO136DKIJ0MKOvwjtPoQQvuFAcQGoK1w1+UA1+FQWkpB0 nWRrdZRv2p+G2eSY0ONiTXr85nAGOd4RbD5TCTqymA14lThc8gkN+smZ3HkVLvCiRGPQ k/JA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=xXSr1IkJleDJTMw/pjHpWEO9yQTeDbB8XeXVFLf3Kdw=; b=Rb6WHWCT2s9++s98PAT/oyrgKV24cU4IPVCmRMyaW7Z23my98+ZZWG2MGWrQFloOkO 4xOQ1bt35MTPxOgsz+NtDitYok+V8WPJ58R9VMlBXV3w3nWv1cK2D8fPyZvPs7I6xuis J3vvTvictjqNzX/OWTky3IaXM3mvwmhDV87nwVxxhijLn9J+kKHMGd8Nz7oBImeDwJdL xIM20w4PyMHp3U1ClMTdVJj7g2PoyZZbxXJqqRbH4Jo/w5N02AzSpFp49d752GzfDfMi Qfcw0Yifvgj1iUFUniIMyZBHQuHoF7rtEoCfI+aEenYS9z3rBpCy+ibnKF3naGVCq1SD iBzA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=a4UBbmV2; 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=collabora.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j2-20020a17090276c200b0016a7f1a4857si9432819plt.472.2022.07.11.07.18.52; Mon, 11 Jul 2022 07:19:04 -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=@collabora.com header.s=mail header.b=a4UBbmV2; 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=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230405AbiGKOEP (ORCPT + 99 others); Mon, 11 Jul 2022 10:04:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57202 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230084AbiGKOEK (ORCPT ); Mon, 11 Jul 2022 10:04:10 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e5ab]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EDB34120A7; Mon, 11 Jul 2022 07:04:09 -0700 (PDT) Received: from [192.168.2.145] (109-252-119-232.nat.spd-mgts.ru [109.252.119.232]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: dmitry.osipenko) by madras.collabora.co.uk (Postfix) with ESMTPSA id B2FE066019FF; Mon, 11 Jul 2022 15:04:07 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1657548248; bh=C0XN9RKnWDlXmYm+a6GfTq9/VWea2/+BxOU6oLr0iIA=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=a4UBbmV2mSyXG2UjvRpgZls25hVIKUBcPmATMmR75GesQqwEutstb/m8oaJVAWcLz 3VXOto5qYeVOZXmP9jl8iIx0ZbfyiIVVU7ohty6MLy9P7G1CGjWKRWv9SVRooUz+mH vWkItc9ycf4O5giNdhKzfXIr8eXQTbhYmpFRd9oR+h4qe8kJQLztHfjsPpkK9bN5d6 ZNTVS/33imlFuHGR0/O5V8O6SBPD64uYpWrannQ24htvd7YMomkP8dOaUAiTi2Oo36 G2nsAaeFG9E2UBXNCuwxvflnBkf9Z2mZtDIPY2HSHAzt4srrWTO8HPCGh/yHinyi96 d7ayb2gWNmqBw== Message-ID: <68de450f-da22-02e3-e863-7e17582ee03f@collabora.com> Date: Mon, 11 Jul 2022 17:04:04 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.10.0 Subject: Re: [PATCH v7 2/2] iio: light: Add support for ltrf216a sensor Content-Language: en-US To: Andy Shevchenko , Shreeya Patel Cc: Jonathan Cameron , Lars-Peter Clausen , Rob Herring , Zhigang.Shi@liteon.com, krisman@collabora.com, linux-iio , devicetree , Linux Kernel Mailing List , Collabora Kernel ML , alvaro.soliverez@collabora.com References: <20220711112900.61363-1-shreeya.patel@collabora.com> <20220711112900.61363-3-shreeya.patel@collabora.com> From: Dmitry Osipenko In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 7/11/22 16:41, Andy Shevchenko wrote: > On Mon, Jul 11, 2022 at 3:39 PM Shreeya Patel > wrote: >> On 11/07/22 18:36, Andy Shevchenko wrote: >>> On Mon, Jul 11, 2022 at 1:30 PM Shreeya Patel > > Please, remove unneeded context when replying! > > ... > >>>> +static const struct regmap_config ltrf216a_regmap_config = { >>>> + .name = LTRF216A_DRV_NAME, >>>> + .reg_bits = 8, >>>> + .val_bits = 8, >>>> + .max_register = LTRF216A_MAX_REG, >>> Why do you use regmap locking? What for? >> >> Why do we want to skip the internal locking if it doesn't bring any >> benefits? > > Can you elaborate on the "no benefits" part, please? Since the regmap's lock will never be contended, thus it's free to keep using it. If later on we will need to change the driver's code such that the lock will become needed, then we won't need to bother with re-enabling it. The comment to the driver's mutex states clearly that it's intended to protect the cached value. Hence what is point in disabling the regmap's lock? There are very few drivers that disable the regmap's lock and most of them do that for the good reason. -- Best regards, Dmitry