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=-2.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_MUTT autolearn=ham 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 B2E93C43613 for ; Fri, 21 Jun 2019 10:12:42 +0000 (UTC) Received: from shelob.surriel.com (shelob.surriel.com [96.67.55.147]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7DFEB208CA for ; Fri, 21 Jun 2019 10:12:42 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7DFEB208CA Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=fail smtp.mailfrom=kernelnewbies-bounces@kernelnewbies.org Received: from localhost ([::1] helo=shelob.surriel.com) by shelob.surriel.com with esmtp (Exim 4.92) (envelope-from ) id 1heGWk-0002bS-Nd; Fri, 21 Jun 2019 06:12:14 -0400 Received: from mga18.intel.com ([134.134.136.126]) by shelob.surriel.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92) (envelope-from ) id 1heGWi-0002bL-56 for kernelnewbies@kernelnewbies.org; Fri, 21 Jun 2019 06:12:12 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 21 Jun 2019 03:12:09 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.63,400,1557212400"; d="scan'208";a="183370202" Received: from smile.fi.intel.com (HELO smile) ([10.237.68.145]) by fmsmga004.fm.intel.com with ESMTP; 21 Jun 2019 03:12:07 -0700 Received: from andy by smile with local (Exim 4.92) (envelope-from ) id 1heGWc-00033r-2A; Fri, 21 Jun 2019 13:12:06 +0300 Date: Fri, 21 Jun 2019 13:12:06 +0300 From: Andy Shevchenko To: Alexander Ivanov Subject: Re: GPIO Driver for Skylake-Y PCH Message-ID: <20190621101206.GI9224@smile.fi.intel.com> References: <23630.1560537979@turing-police> <59c1b6d6-0545-4249-90cb-d1152b6ea728@www.fastmail.com> <25501.1560539366@turing-police> <15515.1560627024@turing-police> <20190617080614.GX9224@smile.fi.intel.com> <61e483bc-6bf9-4438-87de-7a01fac1ae5b@www.fastmail.com> <20190618084034.GI9224@smile.fi.intel.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo User-Agent: Mutt/1.10.1 (2018-07-13) Cc: Linus Walleij , Valdis =?utf-8?Q?Kl=C4=93tnieks?= , =?iso-8859-1?Q?Bj=F8rn?= Mork , Jean Delvare , kernelnewbies@kernelnewbies.org X-BeenThere: kernelnewbies@kernelnewbies.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Learn about the Linux kernel List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: kernelnewbies-bounces@kernelnewbies.org On Thu, Jun 20, 2019 at 02:02:11PM -0700, Alexander Ivanov wrote: > On Tue, 18 Jun 2019 01:41 -07:00, Andy Shevchenko wrote: > > > Obviously, I am wrong here. However, the question stands, is there linux kernel support for Intel PCH GPIO? > > > > Yes. Most of the SoCs from Intel use GPIO IP based on Chassis specification, > > the drivers for which are available under drivers/pinctrl/intel. What you are > > looking for is located under PINCTRL_SUNRISEPOINT configuration option. > My box is updated with current Fedora distro and now running 5.0.9-301.fc30.x86_64. It's also said that the box has Sunrisepoint chipset. For this chipset, 5.0.9 kernel support following devices: > > static const struct acpi_device_id spt_pinctrl_acpi_match[] = { > { "INT344B", (kernel_ulong_t)&sptlp_soc_data }, > { "INT345D", (kernel_ulong_t)&spth_soc_data }, > { } > }; > > [ https://elixir.bootlin.com/linux/v5.0.9/source/drivers/pinctrl/intel/pinctrl-sunrisepoint.c#L587 ] > > I believe the box has INT344B device attached to acpi bus proper: > > $ sudo ls -la /sys/bus/acpi/devices/INT344* > ... > lrwxrwxrwx. 1 root root 0 Jun 20 11:47 /sys/bus/acpi/devices/INT344B:00 -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/INT344B:00 Usually to check this is better to run grep -H 15 /sys/bus/acpi/devices/*/status which return you the list of *present and available* ACPI devices. > Drivers seem loaded: > > $ lsmod | grep pin > pinctrl_sunrisepoint 28672 0 > pinctrl_intel 28672 1 pinctrl_sunrisepoint > > However, I don't see any gpio devices. > > $ ls /dev/gpio* > ls: cannot access '/dev/gpio*': No such file or directory > $ ls /sys/bus/gpio/devices/ > $ > > What am I still missing? Two items: - CONFIG_GPIO_SYSFS (deprecated!) - that this is an old way to access to GPIO chips, the correct one is to use character device; libgpiod tools will help you with that -- With Best Regards, Andy Shevchenko _______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies