Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp235906iob; Mon, 2 May 2022 18:04:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyrV+aShBPLiwGw3mqTcgmLg7eMK3hlVNinKQrMPwCg/0QrxhlgkbonAgZ62TT0NQSnTlgj X-Received: by 2002:a17:90a:8581:b0:1b2:7541:af6c with SMTP id m1-20020a17090a858100b001b27541af6cmr2100551pjn.48.1651539886303; Mon, 02 May 2022 18:04:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651539886; cv=none; d=google.com; s=arc-20160816; b=fnry50OjRZ7eTPMZAeUKEm47ndRnaB95MbfqMWgH9HIlXbR63SeA9iefldGCoIiD0K U6MJMbjGh/cu4ngnga8wBdS459618sTqV7V5P3cd0s/WwnCiA8lqnYM3afRqAn9cCHRW RMqmkhqeeuoVy0u9rwafhK+yzHnAp+cTGFtTkKnznD3DSLqYuN4Ck4qfDoEPqgfxXXXl 9oAN6X9dCL8idZuMo3s+Lr2yuYICoVsNurUY1DISnqqbwuR5VZfIcbQvmfkoEgJe6Y5M CqW7jILaPd/71V9SjJQU7awEFthsNSHzhXrq13mrsnSVKoEqGAvvYlq0Y7eqXp7S+qt7 v0cg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:organization:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=xMBpa0HdeXU8lxx61K5H6n6lvf4VzugLkmoTUqnoIjg=; b=VSrIDB1fApISpiW+69FdWdeU7Uy/L18qsHNNWE5lvaG9MV6twX3AIp2QlRY8HWIWL9 kZKvJFzosrMTE6+UnqwmgsbiUXj+OZWzwdlGX8yNE6wD58lRl34ithalx9XImEyf9Jh+ OXboDgVwQJCgaNfkoaGpz+6w8znFk50A1RApsVXKsJ0hWvEb86emWk18b1/yr7PvBIvh B+aFipupuDSSSBfGrlgwADSnycWlXSgXjEKE7jgWhtchT/IKIokeFJiMw0fGY/BJnZRA xLI618giwkZBSDgn95UhfZ8XFEIsc81qhaqAf3I5j0tS5cIVAh+9PXRYGOAimhTROfWZ cjiw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=F0a77bk2; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id f5-20020a17090274c500b0015cf377e71esi14054054plt.523.2022.05.02.18.04.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 May 2022 18:04:46 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=F0a77bk2; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 6063C3C49D; Mon, 2 May 2022 17:48:18 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1386219AbiEBQSD (ORCPT + 99 others); Mon, 2 May 2022 12:18:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59620 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1357459AbiEBQSC (ORCPT ); Mon, 2 May 2022 12:18:02 -0400 Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AC241DFE4; Mon, 2 May 2022 09:14:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1651508073; x=1683044073; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=J/zBHDxhx9Erqph7DBTL1Nk5osAbgd2b/7QSvJaYzxE=; b=F0a77bk2Kbi/bbTcCkXDLX/Egw7XW8812Vs0SbM1wdt6fwkXFlEB3c4W UU5LLxQL1ycnWZCdst4+CHWLO6OIalIz675WKPbydTEGiJMOhbeKVS0RD 651vsyst9fmmCZFolb+5KaYWRkzc9cz3wo9sSzClkreUgFa5eZtA7z7hx 9LYuvKNZPIojRetHJRqL4dGvG9LSFUwD+wpFuUxV4IOwOoA8egX1byzm5 Wxeu4SfZ8YO6h38JwEzfsqj6ABO1+VzGyVfk8dHtdlr/FVDiw2WqdQkY2 YJCrz5v6W1mjt/FSMjdqW/EBN/TmPkTnvgkGM/vOo8fhaGzZB26u3G4VY g==; X-IronPort-AV: E=McAfee;i="6400,9594,10335"; a="247801312" X-IronPort-AV: E=Sophos;i="5.91,192,1647327600"; d="scan'208";a="247801312" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 May 2022 09:14:33 -0700 X-IronPort-AV: E=Sophos;i="5.91,192,1647327600"; d="scan'208";a="619957666" Received: from smile.fi.intel.com ([10.237.72.54]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 May 2022 09:14:27 -0700 Received: from andy by smile.fi.intel.com with local (Exim 4.95) (envelope-from ) id 1nlYgq-00B6dj-2Z; Mon, 02 May 2022 19:14:24 +0300 Date: Mon, 2 May 2022 19:14:23 +0300 From: Andy Shevchenko To: Lee Jones Cc: Wolfram Sang , Jean Delvare , Heiner Kallweit , Hans de Goede , Linus Walleij , Tan Jui Nee , Kate Hsuan , Jonathan Yong , linux-kernel@vger.kernel.org, linux-edac@vger.kernel.org, linux-i2c@vger.kernel.org, linux-gpio@vger.kernel.org, platform-driver-x86@vger.kernel.org, Borislav Petkov , Mauro Carvalho Chehab , Tony Luck , James Morse , Robert Richter , Jean Delvare , Peter Tyser , Mika Westerberg , Andy Shevchenko , Mark Gross , Henning Schild Subject: Re: [PATCH v4 5/8] mfd: lpc_ich: Add support for pinctrl in non-ACPI system Message-ID: References: <20220131151346.45792-1-andriy.shevchenko@linux.intel.com> <20220131151346.45792-6-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE 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 On Tue, Feb 15, 2022 at 05:29:51PM +0000, Lee Jones wrote: > On Tue, 15 Feb 2022, Andy Shevchenko wrote: > > On Tue, Feb 15, 2022 at 04:54:00PM +0000, Lee Jones wrote: > > > On Mon, 31 Jan 2022, Andy Shevchenko wrote: ... > > > > +static struct resource apl_gpio_resources[APL_GPIO_NR_DEVICES][2] = { > > > > + [APL_GPIO_NORTH] = { > > > > + DEFINE_RES_MEM(APL_GPIO_NORTH_OFFSET, 0x1000), > > > > > > Are these 0x1000's being over-written in lpc_ich_init_pinctrl()? > > > > > > If so, why pre-initialise? > > > > You mean to pre-initialize the offsets, but leave the length to be added > > in the function? It can be done, but it feels inconsistent, since we would > > have offsets and lengths in different places for the same thingy. That said, > > I prefer current way for the sake of consistency. > > Don't you over-write this entry entirely? > > for (i = 0; i < ARRAY_SIZE(apl_gpio_devices); i++) { > struct resource *mem = &apl_gpio_resources[i][0]; > > /* Fill MEM resource */ > mem->start += base.start; > mem->end += base.start; > mem->flags = base.flags; > } > > Oh wait, you're just adding the base value to the offsets. Right. > In which case that comment is also confusing! I will fix a comment in the next version. -- With Best Regards, Andy Shevchenko