Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3286455pxk; Tue, 15 Sep 2020 15:23:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwiQG0jcenuudN9zWrTGpG8OEhI7kY9N02eZWZI1GcNv1/N60fnLCRTo+ArihNnupDppPri X-Received: by 2002:a50:8523:: with SMTP id 32mr25730624edr.282.1600208636649; Tue, 15 Sep 2020 15:23:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600208636; cv=none; d=google.com; s=arc-20160816; b=YydGQqMFWfQr8U/IK2/JdR2o+zPD6nZ87OKH+TFQ2JusxlLj7lpRF6lk1bEF8LqtJz q/SY+WrijshDLO1ztYC/kZhkdY93uHP1VndCR/lPjALvp+X2vO+dgJ+nlmXyNCRUbVX+ HdlI3+bKA5EPPKDA3CW+YYYUBI0y9x1gSEYGGBDv3SeXeA3T1AZxPdkmOaC7ofFCadZR HZyexgSXO7BVWGBBOQBmPTsg1agqyDxDV1OsL4kX7P0QoVnrRxYKorjgGlCql1LtwfQ3 Hm8CTuK+nUKi4iEHRKmf9eBoOzW63hZsg+T0yTf7y1kkrbdw46Zq+4N9rk+K7e0TxquA +glw== 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=c1lfPyfpR3MIdTzczk3F37y8kFkSG7QNcKC/F+53Umo=; b=je+MyApYZuiZcIYhC/49Sf5qYMaBxrDDcU6QIa84J2DLmbRynAKn9+EtBQpf1tran2 t/gwcZsqRW5weo0L3gkZEiH3CGZZrrFt+/yQglycXjhF0e+CRgXGs7T8QyabpkQX1OUH lWEZ9/YHlvlVqAmkdo+Q3SBFxtrj4quNNKo8EItUfSAqqgw2G9Si1u2upQYI0WJxRDMK 0TM+CcEqEXXmQnLWUsKuFEcpMY3do4OonjfM6Z2CHuRe2fd9Y282VXWm4/l7XjdaB9Ou PWphAcFlUuGAw82PZ25AsviYbSesZ8/vd1NvbACXr1tjlC1NQ9008mYwnETF2iKok0iA Y71A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=hYng2VdX; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n13si9936121ejd.442.2020.09.15.15.23.34; Tue, 15 Sep 2020 15:23:56 -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=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=hYng2VdX; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727726AbgIOWUk (ORCPT + 99 others); Tue, 15 Sep 2020 18:20:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52956 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727691AbgIOQ3P (ORCPT ); Tue, 15 Sep 2020 12:29:15 -0400 Received: from mail-ej1-x641.google.com (mail-ej1-x641.google.com [IPv6:2a00:1450:4864:20::641]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BC57FC061224 for ; Tue, 15 Sep 2020 09:03:18 -0700 (PDT) Received: by mail-ej1-x641.google.com with SMTP id p9so5828704ejf.6 for ; Tue, 15 Sep 2020 09:03:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=c1lfPyfpR3MIdTzczk3F37y8kFkSG7QNcKC/F+53Umo=; b=hYng2VdXUMalsQlpbxvEaolvVrPXjjO1dg1IBNOJpR5POkg+h+5dS3w6ALmjl43QBv 2kG3eFGBMkUjnyQkOgDNuJN6KiCSm2Xz+1UBa8swFgxPuWy5j8g7p8aPFbbzCNJUVgTi XTq9x3K52I7ybf36Z2pMDOaEp0SObYccGT0njIzOFGqscUVXUzET+d+qdoa70XNgeuIq ychiRQy9UO2BSe1I3ZkArwzDgmWXvpkEs/amhQ+IIrqVJ+u+TGU6vHxuH2Ocno64YMWW lWGLtShJwmSH8u00qJQXoTlVRtckLrfdDBCybJTNP4Ck/xv44l9uzkdhrjP9gzNWDaBx aRhQ== 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=c1lfPyfpR3MIdTzczk3F37y8kFkSG7QNcKC/F+53Umo=; b=Y37NwFT52mkV35MiNRHA58SWNwN663j3FD893ZH/kZn3eOg4mWitNeBhl2hKnhT+OL +Oo5QPxHU+QRb93H9qGFSO7Bg3sl5PgJfUzmL0kmdNgfhQbWSgz3rpNq8tHo/0rWsxYU vylaJKCUSklymrHDKC7dP5GKVjjx8gABbSQHFe1CiYqIpp/aZCbCTia4IT0eUUyvGpNX qzPFTmgSftMY0ABSAzOL4R19vRaW0AsngKVpUGQeo7rUiRwXn35RShKTUAxQxJAWmQcv BesxBIIVd2D070heyJcnYXc3oDFbs+q2Yp+v7M5hUh7p3O7xIdDvq9C44voKNY8GUYVH aVWw== X-Gm-Message-State: AOAM533YwlrQyz4KccVGymq4P3PzlHe9TZeQ/rdiqDdR7HQt4c9RBakw ufgHfVy5AwJfvTf9/HB55e8oWhf2peonznthvfHTqg== X-Received: by 2002:a17:906:6007:: with SMTP id o7mr21824842ejj.550.1600185797421; Tue, 15 Sep 2020 09:03:17 -0700 (PDT) MIME-Version: 1.0 References: <20200908125813.8809-1-brgl@bgdev.pl> <20200915131228.GX3956970@smile.fi.intel.com> <20200915131648.GY3956970@smile.fi.intel.com> In-Reply-To: <20200915131648.GY3956970@smile.fi.intel.com> From: Bartosz Golaszewski Date: Tue, 15 Sep 2020 18:03:06 +0200 Message-ID: Subject: Re: [PATCH 0/3] gpiolib: generalize GPIO line names property To: Andy Shevchenko Cc: Anders Roxell , Bartosz Golaszewski , Linus Walleij , Mika Westerberg , Kent Gibson , Greg Kroah-Hartman , "open list:GPIO SUBSYSTEM" , Linux Kernel Mailing List , ACPI Devel Maling List , lkft-triage@lists.linaro.org, Linux-Next Mailing List , Stephen Rothwell 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, Sep 15, 2020 at 3:16 PM Andy Shevchenko wrote: > > On Tue, Sep 15, 2020 at 04:12:28PM +0300, Andy Shevchenko wrote: > > On Tue, Sep 15, 2020 at 02:01:56PM +0200, Anders Roxell wrote: > > > On Tue, 8 Sep 2020 at 18:40, Bartosz Golaszewski wrote: > > > > > > > > From: Bartosz Golaszewski > > > > > > > > I initially sent this as part of the gpio-mockup overhaul but since > > > > these patches are indepentent and the work on gpio-mockup may become > > > > more complicated - I'm sending these separately. > > > > > > > > The only change is adding additional property helpers to count strings > > > > in array. > > > > > > > > Bartosz Golaszewski (3): > > > > device: property: add helpers to count items in string arrays > > > > gpiolib: generalize devprop_gpiochip_set_names() for device properties > > > > gpiolib: unexport devprop_gpiochip_set_names() > > > > Ha-ha, OF unittest is of_node centric. definitely there is no backed device. > > > > Bart, it seems we are stuck with fwnode interface. > > Hmm... There is a platform device. So, it means that it fails along these > lines: > return IS_ENABLED(CONFIG_OF) && dev->of_node ? &dev->of_node->fwnode : dev->fwnode; > so, who should set fwnode for of_node? > It's strange because the device for this unittest is registered similarly to how we do it in gpio-mockup where this function works. I've not investigated the internals but somewhere someone sets the fwnode for these platform devices. Bartosz