Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp5606496imd; Tue, 30 Oct 2018 22:09:35 -0700 (PDT) X-Google-Smtp-Source: AJdET5fjIq4s/Tj/uvw2B11omKqH8hNIkpBxIyjkzDUVYpdq2d/aJsFyLz14/1zNrbBxErOC3if3 X-Received: by 2002:a63:2c5:: with SMTP id 188mr1714808pgc.400.1540962575291; Tue, 30 Oct 2018 22:09:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540962575; cv=none; d=google.com; s=arc-20160816; b=Uihi3pSjjmmqC4eK866jZrbFR4dkWe3gL2n20ASiFdTCK/66NRRdeQBKXgG/RRMYLI zwf7pT0Ttw0d3JsEdp6YIxdsivN5EeGScdOzIJhY3vf49AtaS+Er5X2QJ7yl5s/JWMeA 6aB46lxglHjUDOFXQDyfc/69qNVqL9tOAM7/EpFKEjh0f6HqOmBjeQsjSh09qXho2BYB JgSU1jUtnndlcPWRWotPOT8wAKDaJHLb27i9gQLaJXCEOzWyWpHINRT4XqleGTjyOhi5 ntnDzjTYfB8X1+8L4myqmGxFrc8oeIR7qJ4kzMVP3duJo4urTO+3hFW0ChOseKiXvmUX fe8w== 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=al38zN158vEK+UMiRUUX5xYRuCANomIVDi6OaGoVjWs=; b=wcoML/YrG8nCxMq5t1SbzpVLeuUarJx6iwXe4zg6/tfbD6oJX2vILNGlhKarhdNMiz +VcOx5lUzsEFlyk300m0o9GQwyIrN+PkS3YCL1nGQ2xyYoPCSZRvZ0cHkGAbsW/Wl2Yy Qu7+MAnP9+LZOt/oohZy4aS5LqY7fj9ib5mpaBT4dCM83Tzv3t5k5E0M19x95X9JJRIU Oi9yJDfQ7cwGVAVa3JTcQKeDBOkIaYbVo+5D43TGs7v3hdVy/hEQRjYmKLRmU1MdUoOa +VLDqXasAzCFhMqVZmVTdJUHiEvf8hbDXOdYGyS0JQ8IYMfI3vUTAhYCP1ylNkWRvqDU 4UHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=rFBFeYB5; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 32-v6si9705561plh.70.2018.10.30.22.09.10; Tue, 30 Oct 2018 22:09:35 -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=@google.com header.s=20161025 header.b=rFBFeYB5; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728086AbeJaODu (ORCPT + 99 others); Wed, 31 Oct 2018 10:03:50 -0400 Received: from mail-io1-f68.google.com ([209.85.166.68]:37184 "EHLO mail-io1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727430AbeJaODu (ORCPT ); Wed, 31 Oct 2018 10:03:50 -0400 Received: by mail-io1-f68.google.com with SMTP id k17-v6so8805582ioc.4 for ; Tue, 30 Oct 2018 22:07:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=al38zN158vEK+UMiRUUX5xYRuCANomIVDi6OaGoVjWs=; b=rFBFeYB5eM8UvoifhgSNVuM9d5ryIuG+fbx6dMamTEdJvxX8kxj0umyin+jpkx8n+f /bg+HJTexliEOkw3+jTrgXhkSQJRSOC2oA5+HbFzqlSqR7y4MIgKTKGnaVNoxEDC12mE btAzJXeBzSKJ7Hi51kaNnb09gKk4UOlSAHoR54oR32amb2pJdcGJaDWKuYyPOtaN0f52 ESAlpqzNCweLiBveWlOD6h4TO3XFiNtYRdTIjV+0tTRwswoVKT7tVIT8uxK8UYRpcW+5 c73JNIIOYM4S09uwLFi30q/wqyqGWQ+NmRMhFmENLRp58vXQQDvdDTzD6xDo34I3C9pb vt5A== 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=al38zN158vEK+UMiRUUX5xYRuCANomIVDi6OaGoVjWs=; b=VYaKzW6Oe/9WYv4NUf49DukEKQuACIhc+ld79GCzPyrmbmVqTtkZdk0U2OdLZFZOoc zWl14RtzK6H0idfbUyN2FCnywc3EsbVypL0s9HiIbGsnzDwHIjs6L++CDD3fjeYcKC6n uCe7IuAM6Cll9ANMsgcTKRswTcvC3iDCB8tbjtaISbrqjXB0tO4KbWqsGJv8BZUvnyxY yDQ+eGqYlU9M1bbJ2gqcVxk6schMcxPpvxcPUTS1qwMgovp0vSmwBepClbyQWGfaYGnB PhcMVY+WzEIwHAi++Ixg77kOYHJZOIo8R4DpkrReaZ22/oiiG1kE71CdBBD3k/Bois7Q YlAg== X-Gm-Message-State: AGRZ1gKA0Le+Nqoysi6qboKsIuyfxj4y7kxDI0SkVSVh48DmDZ2IiGpW IevdkJRAgNOvdSP6Nh6ZRC4DlyJymuJEqpFXUWLN0A== X-Received: by 2002:a6b:b450:: with SMTP id d77-v6mr1051979iof.15.1540962440110; Tue, 30 Oct 2018 22:07:20 -0700 (PDT) MIME-Version: 1.0 References: <20181017213012.233957-1-kunyi@google.com> <20181017213012.233957-3-kunyi@google.com> In-Reply-To: From: Kun Yi Date: Tue, 30 Oct 2018 22:06:52 -0700 Message-ID: Subject: Re: [PATCH 2/2] pinctrl: pinctrl-npcm7xx: Set BGPIOF_VOLATILE_REG To: linus.walleij@linaro.org Cc: linux-gpio@vger.kernel.org, tmaimon77@gmail.com, linux-kernel@vger.kernel.org, avifishman70@gmail.com, OpenBMC Maillist , broonie@kernel.org 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 Tue, Oct 30, 2018 at 5:08 AM Linus Walleij wrote: > > On Wed, Oct 17, 2018 at 11:30 PM Kun Yi wrote: > > > Indicate that the pins are both controlled by the pinctrl driver and the > > generic GPIO driver, thus GPIO driver should read the register value > > before updating, instead of using the stored shadow register values. > > > > Signed-off-by: Kun Yi > > This is quite a rough measure, if we instead use regmap-mmio > we can exercise fine control over what register are volatile and > not instead of saying that all of them or some of them are. Thanks for your review Linus! I don't have time to rewrite using regmap-mmio at the moment though. I have discussed with the driver author and we will first patch the pinctrl driver by making the pinctrl functions use the gpio-mmio accessors instead of directly reg read/writes. When I have time I will look into your suggestion to improve the driver. > > Yours, > Linus Walleij -- Regards, Kun