Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp234215pxv; Thu, 8 Jul 2021 01:04:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy6YwC7U7U5BZmX+cAzzsN5pYZ9JenyIoVfCXzpHwExpSk5P4RkQ1RL3cjBHwwEqEVL2NGC X-Received: by 2002:a17:907:1ca4:: with SMTP id nb36mr28996746ejc.33.1625731487249; Thu, 08 Jul 2021 01:04:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625731487; cv=none; d=google.com; s=arc-20160816; b=OE/+awhbkcJ5tSPnMbBvefrHnRzr7ChAwp7UFDOP4RjEL813SBbpsofrydHYXfrreV fyHkl1D0nW2C+0TD/2LgznemlQbQWf5Ta8slATI3KFc8zmua/J9jFglRMNnKwPxbYkg5 //4oAr+g/+RGWyWP4xXSB6iY0zFtL/mfpEc+ieMo/FFwtLBXI7eEDaRl9Xf02yPySZgX 7A8OEU+TZXq+pTvoRJoJNQhIwEq24wAVMPO/c58U6fu2Bxm/P3JR9a1Viv3etTJvtjZQ nno1otvbhjIocZQZytTHxfNFC+jB2UA8gVweqTVSjRI7wmC7CmV61/DzYaU1XII291Ye GDig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=xsloucTd0/0+EpM1LEsMPbRallc6DWAH3xAvLsRVlPw=; b=UcMj9PmteOJv+Ny6A1SP7DFAKiZ/KYG97pCuM56xIHZpOz+pRpFw8nldyIDfIQSiJb o7BLctzkaNoVjvMp6/xiNgB72giUexeaX/Jitbk24gYp5T+jOZ4KsSivvEWxZs6wWQ+3 LNTdIKHMx0GJLZtstKkxnQw3ZsuRNjOJX1Txp0g22CtqqLCdkYxCVx1FThsrYGksUzRz 0/2KRAHTuY1DG0kvkfiD5UX/fTOhaj+/8G7sxDmNZummUHmFhtKcvHf+eULDqqxS7DPz tcqUlXjWh4sgmPGYNWiZEksjfZhkk/W4qHQtkW8d/8y01ql49cLrs2IewWRv5z8QmhEx vXqA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=QMgtt7eD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id d24si2320632edy.10.2021.07.08.01.04.24; Thu, 08 Jul 2021 01:04:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=QMgtt7eD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S230514AbhGHIFn (ORCPT + 99 others); Thu, 8 Jul 2021 04:05:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47356 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229851AbhGHIFl (ORCPT ); Thu, 8 Jul 2021 04:05:41 -0400 Received: from mail-pf1-x42e.google.com (mail-pf1-x42e.google.com [IPv6:2607:f8b0:4864:20::42e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5B58CC061574; Thu, 8 Jul 2021 01:02:59 -0700 (PDT) Received: by mail-pf1-x42e.google.com with SMTP id y4so4719107pfi.9; Thu, 08 Jul 2021 01:02:59 -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=xsloucTd0/0+EpM1LEsMPbRallc6DWAH3xAvLsRVlPw=; b=QMgtt7eDCMwzF6d/SDkcxPtCZ/m9qPMgSwJGBPqB+Hrcxk2dsen70FDumkIE9W93v9 yjEmXfrjeCXKaBdpvURmMqht1Ca+YxCKeFI+wUEsYbARZkPC03xpqOx7onC+e7MLZEsU pWO/XN2yn1PrajzBuGkkgfGSRYMiABTadNBNFxWLX3B9us8hXxJLetqeJKo360Sut2pw bu3iTTksATIOkJ/AxGs96zYseVzd4O35qb9sEYFkSAIp1tTEABkyEgbYrlpc2DRkPwRd 9sVhyo7Ix276+NPrJXV67w2SAk611WNPDzifhL/o4mk3aey31+++F/OghXBpgxp0mVy+ ldwQ== 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=xsloucTd0/0+EpM1LEsMPbRallc6DWAH3xAvLsRVlPw=; b=BaN5V7yoKETUVb+uGfSaJ0nxDaJ2pJiI7fAeylzC0yr7RugHTdQh92GUUmpXJgjk4J PGpoV/SWHGipeGxkzTumomZkiHbAPijqYK9IQDOH7/mkDTiC5PPSMOnpCnjYvM9ZKmyM 03mfQEf4KZemm1wZ2pgrLm5L6r7q10lpUeuN12wA4L/A8p+XH+N/fTHmSIVo8Dea+PZ8 MWeAOu2g6ShaaUOqeQ4HsaxObifPQLBwa+yZMCWEeTNmtw8FnNBKNBsOKKhOA40HsEo+ NauzvOxic0YJ2m9fmzoZWzzUKI7/tkLo6+9gSjZLeeK87rEEeoptn+5DxbDY/kx06hn9 azcg== X-Gm-Message-State: AOAM532Yg/hIUhYiIxenEYhLGVjSbW7OBMQgMPBHaE9/d+i6eYQ0MaRY WyZF/pd9bq6q2CCsCcsOPozSLjJxGQ7odiWGtvY= X-Received: by 2002:aa7:8055:0:b029:303:36a6:fec7 with SMTP id y21-20020aa780550000b029030336a6fec7mr30785041pfm.40.1625731378857; Thu, 08 Jul 2021 01:02:58 -0700 (PDT) MIME-Version: 1.0 References: <20210708070429.31871-1-sergio.paracuellos@gmail.com> In-Reply-To: <20210708070429.31871-1-sergio.paracuellos@gmail.com> From: Andy Shevchenko Date: Thu, 8 Jul 2021 11:02:22 +0300 Message-ID: Subject: Re: [PATCH 0/3] gpiolib: convert 'devprop_gpiochip_set_names' to support multiple gpiochip per device To: Sergio Paracuellos Cc: "open list:GPIO SUBSYSTEM" , Linus Walleij , gregory.0xf0@gmail.com, Bartosz Golaszewski , Florian Fainelli , Matthias Brugger , =?UTF-8?Q?Ren=C3=A9_van_Dorst?= , John Thomson , NeilBrown , Nicholas Mc Guire , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 8, 2021 at 10:04 AM Sergio Paracuellos wrote: > > There are some unfortunate cases where the DT representation > of the device and the Linux internal representation differs. > Such drivers for devices are forced to implement a custom function > to avoid the core code 'devprop_gpiochip_set_names' to be executed > since in any other case every gpiochip inside will got repeated > names through its internal gpiochip banks. To avoid this antipattern > this changes are introduced trying to adapt core 'devprop_gpiochip_set_names' > to get a correct behaviour for every single situation. > > This series introduces a new 'offset' field in the gpiochip structure > that can be used for those unfortunate drivers that must define multiple > gpiochips per device. > > Drivers affected by this situation are also updated. These are > 'gpio-mt7621' and 'gpio-brcmstb'. > > Motivation for this series available at [0]. > > Thanks in advance for your feedback. Thanks for doing this! LGTM, Reviewed-by: Andy Shevchenko > Best regards, > Sergio Paracuellos > > [0]: https://lkml.org/lkml/2021/6/26/198 > > Sergio Paracuellos (3): > gpiolib: convert 'devprop_gpiochip_set_names' to support multiple > gpiochip baks per device > gpio: mt7621: support gpio-line-names property > gpio: brcmstb: remove custom 'brcmstb_gpio_set_names' > > drivers/gpio/gpio-brcmstb.c | 45 +------------------------------------ > drivers/gpio/gpio-mt7621.c | 1 + > drivers/gpio/gpiolib.c | 34 +++++++++++++++++++++++----- > include/linux/gpio/driver.h | 4 ++++ > 4 files changed, 34 insertions(+), 50 deletions(-) > > -- > 2.25.1 > -- With Best Regards, Andy Shevchenko