Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp413564ybb; Wed, 25 Mar 2020 02:15:34 -0700 (PDT) X-Google-Smtp-Source: ADFU+vu9cKOG1MjusknhWozqqUUuUb5ki7NFkqiHJL0Ey7m296zAvYZhdXg1Q3FqO/fOg7ORIuf6 X-Received: by 2002:aca:39d5:: with SMTP id g204mr1675114oia.93.1585127734531; Wed, 25 Mar 2020 02:15:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585127734; cv=none; d=google.com; s=arc-20160816; b=tvl3vzusyFvqqA08s1Ygx9hmqR/qkYvbBHFiPc+fWgGljaVdBqWvVlslLE/63l01jP fe3djgF30cEVLaODfATSlZjTMAH1OxVGf2seH+vp+KIH2Fuk9JtUaM4nCmSTXPo4qCDn Ztm89LRxKpZMj4x8LIuIuDT/X4ExmO4hPGtg+AFjto7ftQkMJ3K5qtyJGCzY5bxipvH/ vaOiN66e99kPpHNEhD0jEKPLF/sM+LcEnlW6D4zcVThdM+2WDzik5fNNAHnblKdTKaAn GTHY3qlDWGsOUJfVIXwbR2twJGaceSxSx7P20ei6pChxzlW1KHPoRO4eWwDf3YyxHLi/ k8+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date; bh=Ow2nRQ4Q1Mg33/uFBR7U8+gKGoabHSrI5B5crDn3NOA=; b=lY1d6xCwk577WCzB/9jxHkubM3aXFlY5M6k6pz03anrjXd2ZH8fsiOvDQ/4cc04Rvj HyaJIwGtHM1pIhV4NjhfeIqH/tBjuAVwU7w9u961eKz8uGYJIJp5a0MfuEIziaW9RY2i n/TqbqdFiJ2UPn4BgeZZsaVpYaKgNFgI7lBv4AG0fq4Z7r/VPmS9RU6lBgM+TGehawrQ hmkoXPQ05lBa8Rhpb4fF9rGwqdJ6pgQ+M9QAUyaDS0X6BeAmKt/nocOoszO/TATnVUKM 6wVXOssiifgnMjmcYVfAIFfNvLTITt1gF6nDeETwVCZW/HCaZcp4U2qYDt9z66gLIHqT 60XA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 2si933658otf.175.2020.03.25.02.15.20; Wed, 25 Mar 2020 02:15:34 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726276AbgCYJPE (ORCPT + 99 others); Wed, 25 Mar 2020 05:15:04 -0400 Received: from mx2.suse.de ([195.135.220.15]:46044 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725903AbgCYJPE (ORCPT ); Wed, 25 Mar 2020 05:15:04 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 950E3ABD1; Wed, 25 Mar 2020 09:15:01 +0000 (UTC) Date: Wed, 25 Mar 2020 10:14:57 +0100 From: Jean Delvare To: Geert Uytterhoeven Cc: Linus Walleij , Bartosz Golaszewski , Jonathan Corbet , Harish Jenny K N , Eugeniu Rosca , Alexander Graf , Peter Maydell , Paolo Bonzini , Phil Reid , Marc Zyngier , Christoffer Dall , Magnus Damm , Rob Herring , Mark Rutland , , , , , , Subject: Re: [PATCH v6 2/8] i2c: i801: Use GPIO_LOOKUP() helper macro Message-ID: <20200325101457.0fff5bb9@endymion> In-Reply-To: <20200324135653.6676-2-geert+renesas@glider.be> References: <20200324135328.5796-1-geert+renesas@glider.be> <20200324135653.6676-1-geert+renesas@glider.be> <20200324135653.6676-2-geert+renesas@glider.be> Organization: SUSE Linux X-Mailer: Claws Mail 3.17.4 (GTK+ 2.24.32; x86_64-suse-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 24 Mar 2020 14:56:47 +0100, Geert Uytterhoeven wrote: > i801_add_mux() fills in the GPIO lookup table by manually populating an > array of gpiod_lookup structures. Use the existing GPIO_LOOKUP() helper > macro instead, to relax a dependency on the gpiod_lookup structure's > member names. > > Signed-off-by: Geert Uytterhoeven > Cc: Jean Delvare > Cc: linux-i2c@vger.kernel.org > --- > While this patch is a dependency for "[PATCH v6 4/8] gpiolib: Add > support for GPIO lookup by line name", it can be applied independently. > But an Acked-by would be nice, too. > > Cover letter and full series at > https://lore.kernel.org/r/20200324135328.5796-1-geert+renesas@glider.be/ > > v6: > - New. > --- > drivers/i2c/busses/i2c-i801.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/drivers/i2c/busses/i2c-i801.c b/drivers/i2c/busses/i2c-i801.c > index ca4f096fef749302..8e64a71bea684cc7 100644 > --- a/drivers/i2c/busses/i2c-i801.c > +++ b/drivers/i2c/busses/i2c-i801.c > @@ -1444,9 +1444,9 @@ static int i801_add_mux(struct i801_priv *priv) > return -ENOMEM; > lookup->dev_id = "i2c-mux-gpio"; > for (i = 0; i < mux_config->n_gpios; i++) { > - lookup->table[i].chip_label = mux_config->gpio_chip; > - lookup->table[i].chip_hwnum = mux_config->gpios[i]; > - lookup->table[i].con_id = "mux"; > + lookup->table[i] = (struct gpiod_lookup) > + GPIO_LOOKUP(mux_config->gpio_chip, > + mux_config->gpios[i], "mux", 0); > } > gpiod_add_lookup_table(lookup); > priv->lookup = lookup; Reviewed-by: Jean Delvare -- Jean Delvare SUSE L3 Support