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, 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 0FB54C433B4 for ; Mon, 12 Apr 2021 17:34:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E043F61354 for ; Mon, 12 Apr 2021 17:34:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240002AbhDLRfM (ORCPT ); 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-i2c@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