Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp1689108ybb; Thu, 9 Apr 2020 07:14:04 -0700 (PDT) X-Google-Smtp-Source: APiQypJ7i8xeSdPOxKaKHNPiTFFPrJCdJywroKnH96CWXTD0RT/OKAEVQzextCMF22C+vzb10QTE X-Received: by 2002:a37:86c6:: with SMTP id i189mr16318qkd.274.1586441644544; Thu, 09 Apr 2020 07:14:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586441644; cv=none; d=google.com; s=arc-20160816; b=rS7fzEnTG3BpFSxXs1P74ApQrhL5c+Tgv0fvoksWXlA9ni2sryOsOBghLAAv43HLSJ 5OXIfsUsG9aOUxiTrzs2iWKcOruehWjIgs3jyNxizmuUON8Byop0zl7BGdaqfMl0Soq6 e1IQdxlPsIFfmJ+6WZ/6DzCc7FtsQvdA267CTSdYJSPUtkuSI07JDRhEgSUSUFdNiyU/ vc0RhoqmGDGacEr2TwbsZk2IIyny2igVgr9CYOEEtInf3wwoEFCAkGh59VZo5lPCElLp pQM/WBB7BgBOusMy0lnNevNnK/Bndphf2L3CbqFwM7W8X+2W4pQIajU8ylYmXfx0KqpA 8SQg== 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=Abtnmf2H4GjmeY7U38ZZMYXg4SwR9zyb96tOPx6/7Mc=; b=DXxnw5Ly7iDVbl+V28xaT+P7x/zcPS/HL4I/DWno+S0Y1B6ryHcEMJFzosZZucTXEw Y5R7bf+47E9uahkIF//7at7x8vp8wnYI8iCMhbHrCeTJ7Q9k+CH0bLpumLf8ju3Jo7Ic 6vOEFeCvMlmfB+ctec7SZ+R530tnDJ2Lcf5nNcVCtO0krdejFTzKahi0oFtTFJq2Xbx2 JCPaoX4+C1T+gfR1NvTxy2YVgi5cVcYI8lk9/3PUMlyuH75Wiqr6mlREZJ/B91+8uO6s mI+uAjXAY4xb5ujeTt2NLFAXcKufUKOUs6pTBbHbeSDoNfVDGiym2qLyNgyjB9bNBaLU SnrA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=YO1DuASq; 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 d20si5718939qko.362.2020.04.09.07.13.46; Thu, 09 Apr 2020 07:14:04 -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=YO1DuASq; 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 S1727354AbgDIOM4 (ORCPT + 99 others); Thu, 9 Apr 2020 10:12:56 -0400 Received: from mail-lf1-f65.google.com ([209.85.167.65]:45430 "EHLO mail-lf1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727181AbgDIOM4 (ORCPT ); Thu, 9 Apr 2020 10:12:56 -0400 Received: by mail-lf1-f65.google.com with SMTP id f8so7969368lfe.12 for ; Thu, 09 Apr 2020 07:12:55 -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=Abtnmf2H4GjmeY7U38ZZMYXg4SwR9zyb96tOPx6/7Mc=; b=YO1DuASqxyD8T6jRCEoTkDPIGIizldoTg6W3xyVx6PUTVg6wT2Q6ddzlZ3Cpv99Q4b v26wRvuWJeGhBRJqhnsG3mc7cokRyt3/lrs0pJ9KYkDNIbaqHqft7lXb5S5K+T5+b9EO l7X9Qyi1xi0nm2KRYST4v8kGSXv28UegtQn5c5o+bG19HcRlOioe1VYgUNxgohpcx0s5 Ym1USnQ2NgvKR6/FuYgzT115oVhiCZXAn9EZMEBnNBZfuYBPaa9dSBn7PkbOshltmcJG ZwEo7BZq6qjJwPuQpeD+7v/TvTDK7s8vvz/nhpUMF0YUWrB6cB7oTC0dtDX03KPeVDar LphQ== 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=Abtnmf2H4GjmeY7U38ZZMYXg4SwR9zyb96tOPx6/7Mc=; b=NyOhliEsDH8dRQ5b3Xo9fFPsEwjA0E5UBhKJJWuhcmHAuPoraFGbdagV9Spf/buQul kLKODvZakttrbTlKBaluIbWagC7+g+PmBn1nu+PzHf4ztBsk32F1pOanP/GaDHLVJ/q4 guj8MsUNmOLpyWvYjXdlrR0fDODCETjKw/N6bHSvqYyaGO9snqhFaCUljgafqRRe1lN6 O1iU6BGrpgLxs14OKTUE2qKxU1fGqzaYjiCzUchKFFRAw2ge6PDCgQPJ5QChRyyZVKtJ DuPpvjTHlX92rdozqk45ljtzyJLGqZcNDbKey4coXosrKfYctxOqQgQuO5BQTdgSHLD0 ua6Q== X-Gm-Message-State: AGi0PuaxmI8FVgHGIZAg8Nyo/ew1ND298VkYVhsEW5ztt0Vca7W8BJBc ilL68ZnXDqrppozs7y/JGhS2LB7SLpDFP0NM5Hw= X-Received: by 2002:ac2:57cb:: with SMTP id k11mr7908135lfo.19.1586441575243; Thu, 09 Apr 2020 07:12:55 -0700 (PDT) MIME-Version: 1.0 References: <20200409104546.GA5399@sirena.org.uk> In-Reply-To: <20200409104546.GA5399@sirena.org.uk> From: Baolin Wang Date: Thu, 9 Apr 2020 22:12:44 +0800 Message-ID: Subject: Re: [RFC PATCH 2/3] regmap: Add reg_update_bits() 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 Hi Mark, On Thu, Apr 9, 2020 at 6:45 PM Mark Brown wrote: > > On Thu, Apr 09, 2020 at 04:57:58PM +0800, Baolin Wang wrote: > > Add reg_update_bits() support in case some platforms use a special method > > to update bits of registers. > > > > Signed-off-by: Baolin Wang > > --- > > drivers/base/regmap/regmap-mmio.c | 29 ++++++++++++++++++++++++++++- > > drivers/base/regmap/regmap.c | 1 + > > MMIO devices clearly don't physically have an update_bits() operation so > this should be implemented further up the stack where it applies to all > buses without physical support. I understood your concern. But the syscon driver need use the MMIO devices' resources (such as address mapping, clock management and so on), if move this to further up stack, I am afraid the update_bits() can not use the resources in 'struct regmap_mmio_context'. Do you have any good suggestion? Thanks. -- Baolin Wang