Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp1690220ybb; Thu, 9 Apr 2020 07:15:17 -0700 (PDT) X-Google-Smtp-Source: APiQypL8bUbkgUZAZtk2u0mL7+MU19THXdOVgHRPiv0U5e3Z+VWx8AuVYM1kAcvUOgfI8ob2+OTb X-Received: by 2002:ac8:2921:: with SMTP id y30mr12078756qty.161.1586441717474; Thu, 09 Apr 2020 07:15:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586441717; cv=none; d=google.com; s=arc-20160816; b=X25hG+0/s62wVfqoD1830c2hSLyj/kx8B9jkGWXRqbfWNbSErvLwC/8s5JXfmE22r3 RRAcDxBvgO+v4NKxwvURKkw8MbOJcWwDph6HnMGzbV9Rqhz2m65NLNYyq7v28x/mMAzC gRISIc63obKqTQNlju6anDceoTi6uAGcjO4unnoHnjTv+6KQeVJMn/G07OjjtpOAEpeq Ln5fwi3Z1eEtafBlQrxzoe2l04nUIueMATfP5bWDEc7hB69Kur9q41O5tVhAdRukN5Pu QXEVJHM4Fblr7IpkQMbxqy4ufUtGUz37w1mGJKsGZTJ+dOWOCJZfxgapV4wjolCX9lEZ pqfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=5l6PQ+GVRa7BU6U1ZntSLjLMMgypiepyMSXTfzbcfec=; b=BfdrnxekkHMKE8pmXmipHfNBrLgbc3HJqv8Jmd+GXqBHqxOZ6esgA5b9aPLqYLY7DU IogZErSiywbfahzGAvI4axDIAOclKCTPbXYH9RFJ80EHK2lvMfRg+sMdl20YSxFy4iJ3 RfCrVoNHhiFPn7ZSyk74r/xhLMTeh2VcMmau7h+Qv/NCcPKksV+mXZWiyBfsdQAwPHiH R77++IxrPqT8nPmpBiRyGzNvjY5seJg3jzZfxHvdbOD9UTcwZt5/d70AxOqSDkhL0xo+ 5GYQGPYIXD23aUCC5BavFbC0e+2sQNmTLS12TpFYExY9uYaZIGHzB+CXNxJrvP3fyk7+ H/3A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=K+HQzlSA; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 140si5957465qkj.47.2020.04.09.07.14.54; Thu, 09 Apr 2020 07:15:17 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=K+HQzlSA; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727486AbgDIOOL (ORCPT + 99 others); Thu, 9 Apr 2020 10:14:11 -0400 Received: from mail-lf1-f67.google.com ([209.85.167.67]:43970 "EHLO mail-lf1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726552AbgDIOOK (ORCPT ); Thu, 9 Apr 2020 10:14:10 -0400 Received: by mail-lf1-f67.google.com with SMTP id k28so7990867lfe.10 for ; Thu, 09 Apr 2020 07:14:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=5l6PQ+GVRa7BU6U1ZntSLjLMMgypiepyMSXTfzbcfec=; b=K+HQzlSADdA/gU9UN5hsyB/wBOLVrotfN1xcU/hiZ4MkzvC/09TmlJ0cMyNtSK85i+ /HAQ2E/Oq/VmfOyviHdluDWMX4GMsQYVcRHcSkRiTUWsAUBQULwzl9MbP9eMUlzS7ow6 IjtTG82w6zZ1vVJgylNTT7jPU516wUFxUqGJP8DreizdEF+C/Ij4pyuklFd2Xu722SgG iEiKbRVjaT8d8R/A0tfm1CRwsp/jU5dN/vDeYHwLFOL0KeeYzQc3VHbkXSn6qUwF+is9 9bEywhJO0uB7J2Ht3v6eV244MIBu46Qx/PUfed00wwxDaC/D9E5xhv05vCqU6i6aOc99 zyOg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=5l6PQ+GVRa7BU6U1ZntSLjLMMgypiepyMSXTfzbcfec=; b=a/GZVPxDDR7bClFZXb+45eZMDjcFRWENC9YLdwLHzBZWStjJQvpWmGzRiBxbrT7gs6 d8G3NjYdodWMT98UYpWP9U5BOAO6x+qfcY4qVJRb+MxGiCrab8cVWUr7+gx3AZ5edlB4 RUZ802VEOyFzOcDf2iPYzx2R1WYcgkFvttqm/84fsCcUuEG11NnYMvhwOY2XeINN5Vwz ms5SyCmWeCDMUz0XtB1druJ9mJwdhFYDw0G1bz9S1PeMp1MyHl25Jn8Vrd954sexg5uK NDpIn8Njhlqtqk9p2ljh6h23vrsll/9edupKQqRqbkA871FECgJzA2tiRuMJ00CfmF0S NpBw== X-Gm-Message-State: AGi0PuYFsV5Km0ovDthpY4QERSBU9JxSxI0kYf6eI73pQ2Tpfk7CYmGR ogdQyljpmhxxrObE/aYYQhgONDEgNvjAd+LbC1c= X-Received: by 2002:ac2:4199:: with SMTP id z25mr7913943lfh.90.1586441648993; Thu, 09 Apr 2020 07:14:08 -0700 (PDT) MIME-Version: 1.0 References: <759f7471d03946ae273a06f7bcca8a54528ec08c.1586422035.git.baolin.wang7@gmail.com> <20200409104802.GB5399@sirena.org.uk> In-Reply-To: <20200409104802.GB5399@sirena.org.uk> From: Baolin Wang Date: Thu, 9 Apr 2020 22:13:58 +0800 Message-ID: Subject: Re: [RFC PATCH 1/3] mfd: syscon: Add reg_update_bits() callback support To: Mark Brown Cc: Lee Jones , Arnd Bergmann , Orson Zhai , Chunyan Zhang , LKML Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Apr 9, 2020 at 6:48 PM Mark Brown wrote: > > On Thu, Apr 09, 2020 at 04:57:57PM +0800, Baolin Wang wrote: > > > --- a/include/linux/regmap.h > > +++ b/include/linux/regmap.h > > @@ -340,6 +340,8 @@ struct regmap_access_table { > > * read operation on a bus such as SPI, I2C, etc. Most of the > > * devices do not need this. > > * @reg_write: Same as above for writing. > > + * @reg_update_bits: Optional, should only be provided for devices whose update > > + * operation cannot be represented as read and write. > > * @fast_io: Register IO is fast. Use a spinlock instead of a mutex > > * to perform locking. This field is ignored if custom lock/unlock > > * functions are used (see fields lock/unlock of struct regmap_config). > > @@ -416,6 +418,8 @@ struct regmap_config { > > > > int (*reg_read)(void *context, unsigned int reg, unsigned int *val); > > int (*reg_write)(void *context, unsigned int reg, unsigned int val); > > + int (*reg_update_bits)(void *context, unsigned int reg, > > + unsigned int mask, unsigned int val); > > This is fine, we already have this operation for buses, but why is this > munged in with the MFD patch? Originally I want to show a example usage of the new callback, but I can spilt them into 2 patches as you suggested. Thanks. -- Baolin Wang