Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp3547304rwl; Sun, 2 Apr 2023 09:43:46 -0700 (PDT) X-Google-Smtp-Source: AKy350Y89gaCHSybv79oHU8F5QuH9TXxrDbrlgQC/Acal05W8JBBV4YGls80sdgStkJURIOZppZM X-Received: by 2002:a62:84d6:0:b0:625:500c:35bd with SMTP id k205-20020a6284d6000000b00625500c35bdmr18184528pfd.6.1680453826690; Sun, 02 Apr 2023 09:43:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680453826; cv=none; d=google.com; s=arc-20160816; b=ZDkDcPRDCIy0NSbTc4l+UHTDVrDStR1R9ajQ+xUeN6MB0v4PCCpW522cbTm9kP3gaF sWUDpm3NE252PeMYJ9TnAT5j5qskwyTCEIZPOKHqMhqk4Qa/5T88z8wce/WA2CGPKE9/ 5r8W8wCtPvi7cwIFB6/Hqo6/I5HgJmdrascYdxmazrvtx57crwz35SZ0YQXKs/IWagPM /BBjqYF7+mnFZO3yx8jGkM4/6ROR0P7a8nRNhBTCRmIfG3R6fLy1IDoVrdsuJ9VUWmyN qcPEZ3bXB4aU60GLVyFg8cgC71e8a0C3K/JuQaDR1vJX7FcNPamAzkf/z34Vc+8kyisN 6l+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=LqDtqiOzrLcDvG1aQfWBA+gSYbRShlkSeo+/6HwNatM=; b=ggfzthBh9mCSDzzqB+3A6Uae8BFGTYkXYe65n+BtKqqM0alXGxu/4QxKw/G36jfuH7 MvuXdiC7JCZ/m+rfYnMXNBBYZZj72f4IaX3bY3QuI8k+55BXad8XRsMCXyy3dqWoz4jr BvvqJtbLGg6YNAXm9wtMGXoSq+5t+fyg4t2s9TYB6bxK/cmnW6GjLcsrDwd0xT9HdEuJ Wn3p+qiQG8lukQJTzqHp64ad6vOD6/E98MPolXJEmxOYEhza8tx6f7I0rRqiFX8EkrRM EFZm4lUEI+j6tKzOMzDurbU4cJz0hUvgpV+mXlyIEmp6DhSP6N1rootpD3yNQrdFq4wS C4gA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=uqQIUBqE; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x5-20020aa79405000000b006280cd49409si6986553pfo.21.2023.04.02.09.43.32; Sun, 02 Apr 2023 09:43:46 -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=@kernel.org header.s=k20201202 header.b=uqQIUBqE; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230496AbjDBQbv (ORCPT + 99 others); Sun, 2 Apr 2023 12:31:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52884 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230246AbjDBQbu (ORCPT ); Sun, 2 Apr 2023 12:31:50 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5A1A3CC37; Sun, 2 Apr 2023 09:31:49 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id D91B66127C; Sun, 2 Apr 2023 16:31:48 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 03FEBC433EF; Sun, 2 Apr 2023 16:31:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1680453108; bh=qJeZ5uDyEeQaZcj4Q81noYNElzTzq/Y3eW1UJP6DIF8=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=uqQIUBqEnMt25KlGU3fSrHKonEIX2ToZt58RDQj4a3U+scmq69TikS0QNlQI5/OT4 rwny0Bw16lLqlbwnQuutBtfE55CQnKp2fJVCpYPIa2Hn71+ZBcI7NQvmtciKVQE3sr r3MyDXnB9BKOO6+wepXSBdGM4XidoMNaPhGa5rXvAOyrfqQYVmQ+n294CpGvHe3Eg2 S2mWhetoKMvbgKitlTCPzikANH2sskvAoGC4/xTzEOJCLbdDeDZdJ+CJRg11enE4bZ KeMqkqoid7Flj3fT5EK099ROy6DygZqdfTWFuzUZAxFF2pJheYy8wvrG4yRVT+6Kp3 2GHXj9wXhothQ== Date: Sun, 2 Apr 2023 17:46:57 +0100 From: Jonathan Cameron To: William Breathitt Gray Cc: Andy Shevchenko , Lars-Peter Clausen , linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 1/2] iio: addac: stx104: Migrate to the regmap API Message-ID: <20230402174657.55159879@jic23-huawei> In-Reply-To: References: <4ebc1b6b609a086846420954b893e914fd395384.1679867815.git.william.gray@linaro.org> X-Mailer: Claws Mail 4.1.1 (GTK 3.24.37; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-5.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI,SPF_HELO_NONE, SPF_PASS 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 > > > + .wr_table = &aio_ctl_wr_table, > > > + .rd_table = &aio_ctl_rd_table, > > > + .volatile_table = &aio_ctl_volatile_table, > > > + .cache_type = REGCACHE_FLAT, > > > +}; > > > > Do we need regmap lock? > > I think the regmap lock is opt-out, so I don't think we need to set an > custom lock callback for the regmaps in this driver. > > Jonathan, do read_raw() and write_raw() require explicit locking? The don't provide their own locking. Depending on the access pattern the underlying bus locking may be sufficient. If you have read modify write cycles though you'll want locking at the appropriate level for that which might well be at the level of regmap. Jonathan