Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp1963656pxb; Mon, 12 Apr 2021 10:39:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzmaeYBq6QvzpDMEtTyc61H1OElK7+njTHniW9B8RODWDvujy/th1sQkB8C6PULLFPJ2Fu6 X-Received: by 2002:aa7:cccd:: with SMTP id y13mr30228073edt.163.1618249198878; Mon, 12 Apr 2021 10:39:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618249198; cv=none; d=google.com; s=arc-20160816; b=zJzSzi1pm2MfaNkxoL4m4XfvuU7zClHiyVOeeYV4Te96OVLd7ndtczTg/VbZxQTbT0 yy0DOZbxRUzQ0zGmDFo4H0HTMXxz7tjByWilb9q+cMh4I5wbBMrFUfhghCD9rga337r2 iApxihr7vnxnciUeI5RTYUNRNBNTLAQ1ayVqQlLtBrpBSLjCIXXlfZQMaCtuvfiKCj0/ JvH0CS3jtgA2f4gOLNpvoQEgL8/zDHPYbdhUvPsJKXuS7aJZM3hCczQuB0/eBl02lwT6 S6xE2SweSdEa0VulGthxzfJaC9pv+mL1zjh9kYm5TrrGFOooobH5pGGs6YXwlUgdhuWk NTQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:organization:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :ironport-sdr:ironport-sdr; bh=X/6dF8hIs4d/XNvFhJOVmeJQThPBpAhM6n41LPDaj5M=; b=ATaVwaThRXt/Tfpd4IJvVIuSfVIbTiJ2CoUfTDfdqsIlhpgVhcKWLeusZLlue6XkW1 j7E8JwD7rQ1XypTdGhquTlKhX/sZ1T14iKtPsXJbkOpXCLs0ys6PAi5+uM7avgv/XMXa dpyE4BbbGMlItncHh7uViKN46rvyMCIZHlaE8uxRasFtQGRQ8UzkRQwKz2yxYwkQfLhp LPky93P0ysBRlBD39R8be548rf0OpliX1qADzOZR2iEcn4ep2NVhk6AqUREZNDTxvhNU jPmzJoBQl3KcGzVMX5DXlRRFQe6y/FrdY/IzYmbExepbZw9V5P9eujtchGV2zkYCroL8 CVFw== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o9si8320677edc.429.2021.04.12.10.39.34; Mon, 12 Apr 2021 10:39:58 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243509AbhDLRfM (ORCPT + 99 others); Mon, 12 Apr 2021 13:35:12 -0400 Received: from mga14.intel.com ([192.55.52.115]:59905 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239298AbhDLRfL (ORCPT ); Mon, 12 Apr 2021 13:35:11 -0400 IronPort-SDR: +rCKRX1l6hIpehkJeu6ro5WmhqNSUhY7y58mihrx1tzNoiAxrFvkEbFAwEOeY/46w0ClH4qdXr 1gS0tv4gAfRw== X-IronPort-AV: E=McAfee;i="6200,9189,9952"; a="193804990" X-IronPort-AV: E=Sophos;i="5.82,216,1613462400"; d="scan'208";a="193804990" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Apr 2021 10:34:53 -0700 IronPort-SDR: VgP71Ev+CcKJ5sC+DXWVvwvpybjKlEAKWOxSqwfG0chYSKxuZ4aoZdud530kY6M2Lv5o3cSZ8T y0CDpI8rlRKg== X-IronPort-AV: E=Sophos;i="5.82,216,1613462400"; d="scan'208";a="460255052" Received: from smile.fi.intel.com (HELO smile) ([10.237.68.40]) by orsmga001-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Apr 2021 10:34:49 -0700 Received: from andy by smile with local (Exim 4.94) (envelope-from ) id 1lW0ST-003WRL-KB; Mon, 12 Apr 2021 20:34:45 +0300 Date: Mon, 12 Apr 2021 20:34:45 +0300 From: Andy Shevchenko To: Henning Schild Cc: Wolfram Sang , Jean Delvare , Lee Jones , Tan Jui Nee , Jim Quinlan , Jonathan Yong , Bjorn Helgaas , linux-kernel@vger.kernel.org, linux-i2c@vger.kernel.org, linux-pci@vger.kernel.org, Jean Delvare , Peter Tyser , hdegoede@redhat.com Subject: Re: [PATCH v1 6/7] mfd: lpc_ich: Add support for pinctrl in non-ACPI system Message-ID: References: <20210308122020.57071-1-andriy.shevchenko@linux.intel.com> <20210308122020.57071-7-andriy.shevchenko@linux.intel.com> <20210412180106.7dc524e8@md1za8fc.ad001.siemens.net> <20210412184001.2fc359c1@md1za8fc.ad001.siemens.net> <20210412191653.0a53985d@md1za8fc.ad001.siemens.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210412191653.0a53985d@md1za8fc.ad001.siemens.net> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Apr 12, 2021 at 07:16:53PM +0200, Henning Schild wrote: > Am Mon, 12 Apr 2021 19:59:05 +0300 > schrieb Andy Shevchenko : > > On Mon, Apr 12, 2021 at 06:40:01PM +0200, Henning Schild wrote: > > > Tan or Andy, > > > > > > maybe you can point me to a user of that patch. I guess there might > > > be an out-of-tree driver or userland code on how to use the GPIOs > > > from there. > > > > I'm confused. User of this patch is pinctrl-broxton driver. > > It's in upstream. > > Should this appear in /sys/class/gpio as chip so that pins can be > exported? No. Sysfs interface is deprecated. It should appear as /dev/gpiochip0 or so. > That is what i tried and failed with. > > > Using GPIOs from it is something as done in a few drivers already > > (Assuming we have no resources described in the ACPI). I.e. you need > > to register in board file the GPIO mapping table with help of > > devm_acpi_dev_add_driver_gpios() and use one of gpiod_get() family of > > functions to request it. > > > > In case of LEDs you simple describe GPIO device name in lookup table > > and that's it. The drivers/platform/x86/pcengines-apuv2.c not the > > best but will give you an idea how to use "leds-gpio" driver in board > > files. > > I am aware of that driver and had a look at it. In order to figure out > the arguments for the macros/functions i was hoping for userland gpio > "export", but maybe that does not work here ... > For now i will assume that it does not show up in sysfs and can maybe > still be used, and try to build on top. Just switch to use libgpiod and associated tools / bindings in user space. Sysfs ABI is not being developed anymore. -- With Best Regards, Andy Shevchenko