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=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS 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 CA35FC4321A for ; Tue, 2 Mar 2021 20:31:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A119264F2A for ; Tue, 2 Mar 2021 20:31:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1446375AbhCBU2V (ORCPT ); Tue, 2 Mar 2021 15:28:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54472 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1350741AbhCBPq1 (ORCPT ); Tue, 2 Mar 2021 10:46:27 -0500 Received: from mail-lf1-x12e.google.com (mail-lf1-x12e.google.com [IPv6:2a00:1450:4864:20::12e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DB504C061756 for ; Tue, 2 Mar 2021 07:37:17 -0800 (PST) Received: by mail-lf1-x12e.google.com with SMTP id n16so15004900lfb.4 for ; Tue, 02 Mar 2021 07:37:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=4MgbZOgNW8uixaX7A/+b9oSIGLPsBpXoCjq0KvgA0Vs=; b=Sh8OBszE7R3d8uy7nbh6mGISl/xCEmQuyh4gsiTAsNoq0BctI45bGAlwpUnecy1kA2 7IyIPkl7uPlD9RIGSpEwCItMHd4J1HSMUVEOIfFGWOb1iSQlyd8JBsrwTPeRYNYEwWIL 4F0Oiifpjpe4z0u4pT36uIJse9yGuU21a4gqFsTthZKHpVuqyyNxzCku3CVqOvhEgXoE SEIoh2gDqqJBZHlPiZQgS3vgDgHjUakA1AcpsijE7EI52oMQTvx+0qKk0ZdjmFSwKnmk APLEgSd+JFLMwGBh4Pbg5ePTydmtKuUTzi/U75LRZvA8luBff0oR7xz5+PzrwnIK3UAJ Z6zQ== 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=4MgbZOgNW8uixaX7A/+b9oSIGLPsBpXoCjq0KvgA0Vs=; b=rxDSe926ELqZldqGW66WApLNXpZuntdNjN+dYDDcsevafro1/lVQeo/SHDKHRlJCjS mU5n2lGxWjrurppQuqOFDMXfaC77EjS6Aa1pnk/2FIs0eADCITcdw7J4eggLYfBlsBKk sCgD4puh/Q01ufmQ2do+RAfVsi3lgqmLsQNeZbhm+Ngz9O/JduVpRaFmttjkr0f3Uwa7 Zne4oKw4JTaoZi6S6UnIQ/xYM8XfQU7dQWLlqLqav6A2+66xENjl2APc5cQm2cPWBXTz pmdD1ILZ68qRH0WDjEUCDgY5RJY9vnH7eV+mRsMZHk7rq3PRPyjgkhnsa06sdxEuqa6p lE5Q== X-Gm-Message-State: AOAM532OhQ4yVZdaO1i1OmqLQpB7E8t1DVtzX1CMk+JbdYdVpE2RuKvf 4mH0G2weM3fMnAnSGC9QEoHLqKmaCKTJiZRozyO+gOxGvsbB9Q== X-Google-Smtp-Source: ABdhPJw4x/G20E257/e052t5Gg9ElQhvDjsYdCfPJESaXuqZZBAOAPdVPZrOW8Pyw0S1XLAm4uKTuwetVf8NZN0spvM= X-Received: by 2002:ac2:5d21:: with SMTP id i1mr12099756lfb.649.1614699436419; Tue, 02 Mar 2021 07:37:16 -0800 (PST) MIME-Version: 1.0 References: <20210208135347.18494-1-o.rempel@pengutronix.de> <20210208135347.18494-3-o.rempel@pengutronix.de> <20210215091737.fx6dwiz7tt56wbkr@pengutronix.de> <20210223100656.efbshsh5bz66uhj5@pengutronix.de> <20210223174516.wjlh7hnrd5qe5s6w@pengutronix.de> In-Reply-To: From: Linus Walleij Date: Tue, 2 Mar 2021 16:37:05 +0100 Message-ID: Subject: Re: [PATCH v5 2/2] counter: add IRQ or GPIO based event counter To: William Breathitt Gray Cc: Oleksij Rempel , Rob Herring , Ahmad Fatoum , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , "linux-kernel@vger.kernel.org" , Pengutronix Kernel Team , David Jander , Robin van der Gracht , linux-iio , Jonathan Cameron Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On Wed, Feb 24, 2021 at 3:34 AM William Breathitt Gray wrote: > On Tue, Feb 23, 2021 at 06:45:16PM +0100, Oleksij Rempel wrote: > > > to make this possible, i would need hack gpiolib framework and add > > > name/label exporter. But after endless rounds of pingponging me for > > > renaming the driver and removing interrupt handler, i feel like we are > > > not having serious discussion for mainlining this driver. > > > > Probably for good reason, struct gpio_desc was made local and is located > > in the drivers/gpio/gpiolib.h. It feels like additional hack to include > > it. I assume, it should be done properly so there is a function to > > provide gpio name or label. > > > > @Linus Walleij are there any good way to get the GPIO name? And which > > name will be actually used? A label provided over devicetree? > > Perhaps one of the GPIO subsystem maintainers can provide more guidance > here, but I was under the impression that this name was provided > statically by the respective GPIO driver via their struct gpio_chip. I > think you can see the array of names via priv->gpio->gdev->chip->names. These names can be set either through device properties on the GPIO chip "line-names" such as through device tree, or as static names in the .names array on struct gpio_chip for chips that are e.g. hot-pluggable and does not have a hardware description associated. These names should be something like what the signal is called on the circuit board rail. gpiolib further has a function: gpiod_set_consumer_name() that can be used by consumers to set their use case for the line, which makes it appear in debugfs etc. The consumer name does not need to be unique. These names have no practical use other than debugging or userspace representation. I hope this helps. Yours, Linus Walleij