Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp2449636pxb; Tue, 13 Apr 2021 02:04:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw+Y26KEO9KSYOSsqqN42vcnuROoAst42/EpKbm8dweoJ0PVeopmc78pVG3SgUDYyi8b1F5 X-Received: by 2002:a17:907:94ca:: with SMTP id dn10mr3042640ejc.123.1618304668754; Tue, 13 Apr 2021 02:04:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618304668; cv=none; d=google.com; s=arc-20160816; b=UfoYkQsqpwBdJBObNYqWVlMmWUlPMuVfB8+PLbcFNLolEubaxa89KgK+KXfU8Ee+Rn w7esn5zhNqmrQjImVkpUqhy8A/rsXsWcyg7g6E5JE/yU9SbFdZUdRG8IPX/YNW7CdMcm /sPxqXAY6olTj4VH61m2tKFazznRp+a5cbZc9l9mBavaUklVGXRbitsfZFTukdD2sHeo x6mK3YmUDJjPfw9cZ82rpCZiZT4P9OqxpsS4GALZrppofMu5+BKz5Q3sopSRrU4Ft67W Kkmw0FFhEj/i5m3d31MDCH1gULzoEOn/YmjeI1Sgy5KxoBTnscBQnHQmlP3Iew5eogVw oSig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=apDgksfHuR/SEUZQjHiTGLZGL2VoIIGV/OBygbL0BXU=; b=G91L0a83TJmQiPcxQZ3KKkWYTH+rW7uQ37ffBdpVjYic6NL7jm8KyCzCZt0XTqAbhA 8mShsqCPXROm5hkwW6FJF7UxwBc9n8RcGyt6l40xJssxoUbt1udLuV8u28pNPiki5K7r JDgTC5Wa+NKtd3iie9VFT2O7h8kyTP2eWneTyrxpDz6tiitneU0ZA00v9dY+ld9vQmbd 0CkyHFOdOHGJ0J1nBmFGHM92k+SlaA3VD7bUSyKnHAC0Xd5FAzlUjXLc1QlYKp9yXh3G au4W8NDhzSBHnHYe2pw9lvwG0hfXz84xlXjg0mJXKmmLVMBQ65YzL8vgsPVVLpAynt6I 589Q== 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=siemens.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dj11si9223202edb.230.2021.04.13.02.04.05; Tue, 13 Apr 2021 02:04:28 -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=siemens.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244132AbhDMGsT (ORCPT + 99 others); Tue, 13 Apr 2021 02:48:19 -0400 Received: from lizzard.sbs.de ([194.138.37.39]:41655 "EHLO lizzard.sbs.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229873AbhDMGsS (ORCPT ); Tue, 13 Apr 2021 02:48:18 -0400 Received: from mail1.sbs.de (mail1.sbs.de [192.129.41.35]) by lizzard.sbs.de (8.15.2/8.15.2) with ESMTPS id 13D6lgBh010706 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 13 Apr 2021 08:47:42 +0200 Received: from md1za8fc.ad001.siemens.net ([167.87.48.83]) by mail1.sbs.de (8.15.2/8.15.2) with ESMTP id 13D6lfxU012626; Tue, 13 Apr 2021 08:47:41 +0200 Date: Tue, 13 Apr 2021 08:47:40 +0200 From: Henning Schild To: Andy Shevchenko Cc: Wolfram Sang , Jean Delvare , Lee Jones , Tan Jui Nee , Jim Quinlan , "Jonathan Yong" , Bjorn Helgaas , , , , Jean Delvare , Peter Tyser , Subject: Re: [PATCH v1 6/7] mfd: lpc_ich: Add support for pinctrl in non-ACPI system Message-ID: <20210413084740.182cfc52@md1za8fc.ad001.siemens.net> In-Reply-To: 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> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Am Mon, 12 Apr 2021 20:34:45 +0300 schrieb Andy Shevchenko : > 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. Ok, just found that there is a null pointer deref in the probe function of the pinctrl driver, looking into that. Meanwhile i think i will need a similar patch for pinctrl-sunrisepoint.c for that wdt, do you happen to have that as well? Or a spec where to find all the magic numbers. regards, Henning > > > 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. >