Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp960321pxb; Wed, 3 Mar 2021 22:35:48 -0800 (PST) X-Google-Smtp-Source: ABdhPJx//hpt9KKM4MIxvjwU+jhkBMCEKJRvLk1bPO2cFin1j/2I/pYPZRDpUSgtp7CKMKAlHii2 X-Received: by 2002:a17:906:3801:: with SMTP id v1mr2594982ejc.353.1614839748448; Wed, 03 Mar 2021 22:35:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614839748; cv=none; d=google.com; s=arc-20160816; b=sMCm7+tCsyHGKyx+GZ6bxEILmbCQ98OacFnSWthCm72jeCiYuilCZL8fWiawiGekX/ tyXkpF80T6MXa5jV829s9TiNoy+MQQBXdKMr3FgxXVm6lVAY/fLsIAUSWc+mRfH0Vwec cSsSaXmdsO6Uh5uyED6dNK8csqcuE1Yt/OI29W0TKjF4V4Mu53Kd+YMeNGFUjyib7ki6 wRsjbpOOx+C30QhmKvEdkc1ONyuI3m3Jgf8Up1OapEAVmfRzDFvF6OF93rbNMRZhkflR a0O5pAC2vyyWY5AD/KCxIm/DIWjqQLZnbMiV7OVnvnMnMrgSq2xI+q/Ny1UYCtx9DWf5 DXug== 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=4MgbZOgNW8uixaX7A/+b9oSIGLPsBpXoCjq0KvgA0Vs=; b=gA/MOtSptnP9i4g0x2AdFW6ZWHHv2h2VJ3oNoEoYX4pFrwyCtEoofgfW4UwK1J+tRF oAfprqcRht6NrQfAH49pABlqKc1qpQHy7yDKVjCrneO2rD6DdfLJRB+KmRirUrpK79QY 8OV8yPq/qDwVgaxSBfdEzI8KjQKeAtZpmVZSEu20H99womV3rDju4j61yqUKBGrVnWaR BzCWVUWaVfqhpfKwy3OvsuR8o14fvp1lBXk5KZbgSrIg0gBEbnFJ8qNNpOkNYZDtXD9K IshxXTWA8SxPdcSw7y3aiJkvgs65sLNuKSuU9dPRfkeln+VTa0WnQYh6ORezAzzbXy9k ct6A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Sh8OBszE; 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=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z14si7361882edq.36.2021.03.03.22.35.26; Wed, 03 Mar 2021 22:35:48 -0800 (PST) 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=@linaro.org header.s=google header.b=Sh8OBszE; 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=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1581000AbhCBScq (ORCPT + 99 others); Tue, 2 Mar 2021 13:32:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54474 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1350742AbhCBPq1 (ORCPT ); Tue, 2 Mar 2021 10:46:27 -0500 Received: from mail-lf1-x12c.google.com (mail-lf1-x12c.google.com [IPv6:2a00:1450:4864:20::12c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F03E9C06178C for ; Tue, 2 Mar 2021 07:37:17 -0800 (PST) Received: by mail-lf1-x12c.google.com with SMTP id q25so11701960lfc.8 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=gDBLT5e4JCXFApcjmJhDURk5gkby4BGjGi6LhEeUJySkTU7nGreR8xzamyfa+YQQZP s265qwmpADHlH/yuaihMjynYgxlyH3a52qw+lM9anfOfwGrlr5YfwZ4AldZERDOPB19p /w//xyp2YriFNNyg/dJzZBvMiSd3+vPxXP3KAwsJUiNuwr3/Os+JimO+W4+P3LlZP/6u DPe9d5brtUM5jjxfYLvvi2BPGM1FYkSd3fY9tK8N0Qe+2+jOA598ec99eGQUc7vxARx/ 8d9WbmFC8mYPjQ68pXxGvh8GahoYyjiE4u6wZtUL44AK+kXAenHw20Q+ogGhbiLwoOI8 qQ/A== X-Gm-Message-State: AOAM530PrXWJuwzm4LaEQxTV/8fA+ld/lhGyrMyYgpkZryNLclxfqY2X pdLCzGmmc5oIha9kg9giy9rMSHATR6jKo955SuAzmw== 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: linux-kernel@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