From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C1FBEC43461 for ; Mon, 7 Sep 2020 17:53:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7D50D2137B for ; Mon, 7 Sep 2020 17:53:35 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=bgdev-pl.20150623.gappssmtp.com header.i=@bgdev-pl.20150623.gappssmtp.com header.b="rKpXyZ2H" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729539AbgIGRxd (ORCPT ); Mon, 7 Sep 2020 13:53:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42556 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728901AbgIGLW4 (ORCPT ); Mon, 7 Sep 2020 07:22:56 -0400 Received: from mail-il1-x144.google.com (mail-il1-x144.google.com [IPv6:2607:f8b0:4864:20::144]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 44EA8C061575 for ; Mon, 7 Sep 2020 04:01:14 -0700 (PDT) Received: by mail-il1-x144.google.com with SMTP id t16so12100277ilf.13 for ; Mon, 07 Sep 2020 04:01:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=mM0y+Q0a8sB0DkvdsC2ZAa0jhM0rMUB3DCeyiwaznjU=; b=rKpXyZ2H5uP2/h9Dt5pZ0EPjXGgMA3de0HXUxZtvju1LXugoHzeD4RaryePMRR4utI K1Xpnc7dqWuJ1RRNtAvBK9L4dDhOmI1bjUHQE6oaeroH1bhZD6WHqXQXEatSsX2GFpgq sloN9nsm3Z8VHroFwHEs2MLKdtmiSZCfrSio0VqGihZq5rXGXCGVr5/1Euh+ed6/NGxR +PtyIa/kQzMjz3AGzVI0uXl9wO4mXKNkjoWAYUT0S74QK9gzwlCsvvzKGVr1bhFs4Lp2 krBFagjdLqhrymwwVXwl3GsqF95A2B4h0KlX1P6NgCoyedRyf1lcmDqwyoeacDbfAQkR cKRA== 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=mM0y+Q0a8sB0DkvdsC2ZAa0jhM0rMUB3DCeyiwaznjU=; b=j9qdf2aZo8ktRrbf+nvL2QQiXBRcogy7TciSD7zNzNjnLwGXZW/i2sARYa25Ct0yxH Mr9LPXisl3mOqxwb8U5EkBzKSSTZYII+c+Ng2KHSK09FY+ALBzlBdqMnqya7boWTDHWY 4KeKwCTlFKXUeGrkRAZd9SkoMn/ptcwfbenKXQUkInWpbbEMUXy5MNvmTIasDRwmIE1o 6moLwTI+ekwglymRtnQb4O++qm9sS3Uu5YhFgIatKlrcudmXi+p1rwSOgfd7QOR8XV13 Y2/JNob6+FXHjn67anoDhB9lKR1kq7VwtxM1hgPlr0y9qOySzOTrQ85ygSfGcYMlMorl Aj1A== X-Gm-Message-State: AOAM531+ny1DQVBilIoLErwxqbu7J/u/40i7klsrm/cqVMzneEtUtAZJ 6ZCUhLxLwfKj0aSS16uOSz1qBvld1PShoTqlWbeDTw== X-Google-Smtp-Source: ABdhPJzKTB4141AX04DUZCtSVaif2wmDuuNUNco4lagdf94reZmn5rumBiscprbs2LT1YPBLbmGSPn2FRbAHpzNrfok= X-Received: by 2002:a92:189:: with SMTP id 131mr19175912ilb.40.1599476473551; Mon, 07 Sep 2020 04:01:13 -0700 (PDT) MIME-Version: 1.0 References: <20200904154547.3836-1-brgl@bgdev.pl> <20200904154547.3836-14-brgl@bgdev.pl> <20200904164820.GB1891694@smile.fi.intel.com> In-Reply-To: <20200904164820.GB1891694@smile.fi.intel.com> From: Bartosz Golaszewski Date: Mon, 7 Sep 2020 13:01:02 +0200 Message-ID: Subject: Re: [PATCH 13/23] gpio: mockup: pass the chip label as device property To: Andy Shevchenko Cc: Linus Walleij , Jonathan Corbet , Mika Westerberg , Kent Gibson , "open list:GPIO SUBSYSTEM" , linux-doc , Linux Kernel Mailing List , linux-acpi@vger.kernel.org, Bartosz Golaszewski 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 Fri, Sep 4, 2020 at 6:48 PM Andy Shevchenko wrote: > > On Fri, Sep 04, 2020 at 05:45:37PM +0200, Bartosz Golaszewski wrote: > > From: Bartosz Golaszewski > > > > While we do check the "chip-name" property in probe(), we never actually > > use it. Let's pass the chip label to the driver using device properties > > as we'll want to allow users to define their own once dynamically > > created chips are supported. > > > > The property is renamed to "chip-label" to not cause any confusion with > > the actual chip name which is of the form: "gpiochipX". > > > > If the "chip-label" property is missing, let's do what most devices in > > drivers/gpio/ do and use dev_name(). > > Just wondering if we have a documentation in kernel how this mockup mechanism > works and what kind of properties it uses. > > Side note: moving to software nodes would make some advantages in future such > as visibility properties and their values (not yet implemented, but there is an > idea to move forward). Seems like we're implicitly using software nodes already: fwnode_create_software_node() is called when adding device properties. Bart