Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp5519208pxb; Mon, 28 Mar 2022 13:38:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxTpZG0r0UcOlevHU6rvrVwsAdu11S75N1cJbemjYHoJGMr3hiYEkh1fQNTMA8rZHvlAkBu X-Received: by 2002:a05:6402:5cb:b0:419:14d8:4106 with SMTP id n11-20020a05640205cb00b0041914d84106mr18750536edx.140.1648499906496; Mon, 28 Mar 2022 13:38:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648499906; cv=none; d=google.com; s=arc-20160816; b=pfGlbSoRzyPMg3uxPTvuqZnGWg8FLT25bHTW6q0Kg/v/uVaWTgKHfSIoWA6X1BkIGE ha+UbwA9EZu7ZANneW0qn1CIwkqaYzmLQp21t5sH9EJ4YpxpS0WzCiMxim5oxd3CyyGr 2gJrs5y6Lhl2WrkIB41xYjtplo405BteoruAZ+k7T7JSe6kkhEZRSNvKzkejNmV4L3TY MRxh5hs01P+fSOA3U6U3Vk1E6qjwdyMaaEOm4hTaYmAEd4Kh8wWkMN4c59igBKQf7c7C c72Y7CxWqvUzDKEFGkq07PbHkfyoJY6jvjCG1lfbwcMQ8u8A5eKHBOCR+/D9401eKDSY TXtg== 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=Ve5+XZdwip+wfJ4zW83es5FP+je84qvCmA8uoY+nFLs=; b=Hhkv9q61Uy1NrETyI9y2uzOXDMhqgwUvXBhf/8slI1bT1wSnDQsGg97xXxhLWBYwzJ qf6JxBDX11+k5JnKUvDQedJmX6LyU882+vK+KeMqB7fYNVsev2qQPxQeumPJC/V4RJWZ FTpfNjxrinv4Xi+Wf35utSpqbk6jTNRU8Emst0x08o3/2kDe5XBBNlLBWvESeAiBKLOT udziIEpvs972SuNRjkp+h+kHW+kPtcvQRYF+NtG1zQ4iSkyauwAb9pYpdu0naUM9N4/K wQIIVXA1KVx3feNZmEn8ZAhR6QxSEcVh1FxVzKd9289LFLY1bheKdhjD+0a4SAk4Ou5p eNyw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=U7PQrj7B; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s1-20020a056402036100b00419014273b3si11391672edw.354.2022.03.28.13.38.00; Mon, 28 Mar 2022 13:38:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=U7PQrj7B; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S234409AbiC0XJS (ORCPT + 99 others); Sun, 27 Mar 2022 19:09:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33060 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229989AbiC0XJS (ORCPT ); Sun, 27 Mar 2022 19:09:18 -0400 Received: from mail-yb1-xb2e.google.com (mail-yb1-xb2e.google.com [IPv6:2607:f8b0:4864:20::b2e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1200BDEAF for ; Sun, 27 Mar 2022 16:07:39 -0700 (PDT) Received: by mail-yb1-xb2e.google.com with SMTP id y38so20524786ybi.8 for ; Sun, 27 Mar 2022 16:07:39 -0700 (PDT) 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=Ve5+XZdwip+wfJ4zW83es5FP+je84qvCmA8uoY+nFLs=; b=U7PQrj7BlEBIpfqmMR8TfU+MOKxh3kIGvThZ45dmPpytK+1bkRmD/iuObLyklhxlT2 FG5vAILis0+hh0PeEyFI27qkcE33C1ysq5W6UlMUEv8bwsgBADY406aM4jCRhHuzQwvZ rfLG4jC3Xl4ugO3PSn18wKQ2FuvSOTyeZb7h0TiKqf7DYA48Ow08vF0xmTzlnVh4ix/w 0+4pm+GDQOg34sGRkCe1C30T9wJzePDXxF00iRWQ/4DLf18QAH57XcB21/uqJyiY/aw/ m1vOccxyiGQEGFJEcKITiqBDHq1H/G9cYgC21pks78eGltS3VcrCHDI78JDh7Mk3UZ2J 8W9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Ve5+XZdwip+wfJ4zW83es5FP+je84qvCmA8uoY+nFLs=; b=PowdG1EAo8KhvvfVlMde8FGds/plc/l4MAUv1/kVJ0TN2gPm6XuKcphq/0GNWw/g5D jWC6Fg8ZdjqvqLgb7zPmjpTBAR65uqJ63alRRB/u80H7fhXjgdk1j2PDKDg61QLIyhyx usiLFsbSYd8E5sBF9X+/7TFkMA5viBaVmUlPCUIWoyCoAMVnx9CcWxreEHmtaNTu0ygM Hrm6PgtymIDNj5h/dWB3YdFMcdJut7+A7xWy68GhdE32M5+cEtEPf289j100cmneETcg BnI7hcczpwzW48RmBEvOpcmbv7bMXHliIRDWfQoOo1C+XXkhtbYZab5MVwex89JT4DBT OIWQ== X-Gm-Message-State: AOAM533PfmRUpa+ru8BvlIM9g/uCvxZdLGmwS4dFO9FfOzN0yglOnkqy y08cIQAoX+0gy0N6UmfEBapq+nA0PYBJV7gdtkWduL8vz5eU6Q== X-Received: by 2002:a25:d088:0:b0:633:b902:2d29 with SMTP id h130-20020a25d088000000b00633b9022d29mr19969569ybg.626.1648422458225; Sun, 27 Mar 2022 16:07:38 -0700 (PDT) MIME-Version: 1.0 References: <1647927649-9907-1-git-send-email-haibo.chen@nxp.com> In-Reply-To: From: Linus Walleij Date: Mon, 28 Mar 2022 01:07:27 +0200 Message-ID: Subject: Re: [PATCH v2] gpio: Allow setting gpio device id via device tree alias To: Bough Chen Cc: Andy Shevchenko , Bartosz Golaszewski , "open list:GPIO SUBSYSTEM" , Linux Kernel Mailing List , dl-linux-imx Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Mar 22, 2022 at 11:16 AM Bough Chen wrote: > For users, usually, they will open /dev/gpiochipx to handle gpio related option. That makes sense, it is intuitive in a way. > By the way, how can user get the labels and device names of GPIO chips? The way to get metadata for any /dev/* device such as topology on buses is through sysfs. It is also possible to get labels for all gpiochips by iterating over them. The most user-friendly thing to do is however to make use of libgpiod and associated example tools such as gpiodetect: https://git.kernel.org/pub/scm/libs/libgpiod/libgpiod.git/about/ Yours, Linus Walleij