Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp4467883pxf; Tue, 16 Mar 2021 14:26:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzxCuF8NkWKP+AjeHE9wFbgSuXvvB0GtdxFYY1XMzHMkTkSXczIwSxVR7hKgYQsAee0/on4 X-Received: by 2002:a17:906:f203:: with SMTP id gt3mr16441551ejb.346.1615930004859; Tue, 16 Mar 2021 14:26:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615930004; cv=none; d=google.com; s=arc-20160816; b=xoHvuuUzIBpCl6ljeloZwiKGY5gzPW+SAa5GgnRNExCi+0zhPw8JtJkYBhB62YRZhh P5UzAzTaqp5I4rKpW7w2vTapeBBQGw3vWXcrRY27WGeNR7TXFSFDeB7gE76tix/T5/Sr YKqKelgQQ+F+5980NvqSMSCSR+uSnNDY+u9CZMXRQt96PoL1k7k6WaI1JatNHA9cvFCS ebeT1uakBCYzxRIiS6XpydS2J2zwHNUMsklJtsRWGYRWCgOoPWD189b0bX/G/Lvk3asf uOci0HWdAr6Pf6+2/KMKD53egiRRVyX37fCruNix0iKk7+HGmL7MF0itt+jbLZh5XVtP 3FKw== 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=vv3a0Ffh1Y7rcF4+ZoLZB7f3tUVQ954nCGN4XfapJ0I=; b=Pk2NOJ1kaJVpxJlIT1GZxNySDG2ZPoYZB2YVbZtzhwox2OyyVPTRAHToiWWpAHZgUn Rx4QTgyStxqD4sjCwKxWh0epqtUKlAuxtQSjmDVXrrBY/t44mN+yyNPijGOdHR7Gs8qK Ius3xE7D48jzkMviptNYhl9S89/mNcaC9GJDrmIOfCuY+xYqxmtVHJ8UONmdLN+R+Ums lGnubWZ+2ZRPPAmdMx6JAHhNcIV/fG9XdmDlcBgram3lGGN+ej6nSyAxSouTyN/h6t3t 7bqzir6tRyg7HUjepbxPdQW+Z0sejrx7Ntrf9Rw7sfRKCZOINeeDV6tScv0ApfRR4OLv D1KQ== 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 w16si15464323edd.471.2021.03.16.14.26.22; Tue, 16 Mar 2021 14:26:44 -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 S231491AbhCPUuG (ORCPT + 99 others); Tue, 16 Mar 2021 16:50:06 -0400 Received: from mga14.intel.com ([192.55.52.115]:33915 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231701AbhCPUtt (ORCPT ); Tue, 16 Mar 2021 16:49:49 -0400 IronPort-SDR: gBJfmhqMTrgvSLi06RF1jrBVNXkvgFDOhWkLNNMXmCs3ReEHpg25x5wJMI5LDG5TsmHqpzn4HV m38HekheZVCg== X-IronPort-AV: E=McAfee;i="6000,8403,9925"; a="188691410" X-IronPort-AV: E=Sophos;i="5.81,254,1610438400"; d="scan'208";a="188691410" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Mar 2021 13:49:49 -0700 IronPort-SDR: adlCCluqB83BftXXGNsxKzpX8Ftg/JI82srDRY8QKCx2ziuCmWfK6on18+DTngIyBM85j0J7mJ +2KI/4mkiSAw== X-IronPort-AV: E=Sophos;i="5.81,254,1610438400"; d="scan'208";a="511503288" Received: from smile.fi.intel.com (HELO smile) ([10.237.68.40]) by fmsmga001-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Mar 2021 13:49:47 -0700 Received: from andy by smile with local (Exim 4.94) (envelope-from ) id 1lMGdM-00D4YH-UU; Tue, 16 Mar 2021 22:49:44 +0200 Date: Tue, 16 Mar 2021 22:49:44 +0200 From: Andy Shevchenko To: Jan Kiszka , linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Andy Shevchenko , Linus Walleij , Bartosz Golaszewski Subject: Re: [PATCH v4 2/2] gpio: sch: Hook into ACPI SCI handler to catch GPIO edge events Message-ID: References: <20210316162613.87710-1-andriy.shevchenko@linux.intel.com> <20210316162613.87710-3-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210316162613.87710-3-andriy.shevchenko@linux.intel.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Mar 16, 2021 at 06:26:13PM +0200, Andy Shevchenko wrote: > From: Jan Kiszka > > Neither the ACPI description on the Quark platform provides the required > information is to do establish generic handling nor hardware capable of > doing it. According to the datasheet the hardware can generate SCI events. > Therefore, we need to hook from the driver directly into SCI handler of > the ACPI subsystem in order to catch and report GPIO-related events. > > Validated on the Quark-based IOT2000 platform. This patch must be dropped completely. SCI handler is not correct way to do this. The proper way (and we have already few examples in the kernel) is to register GPE event. It took me a while to gather all bits of this puzzle. At least now I get an event, but kernel oopses, I'll continue debugging tomorrow. -- With Best Regards, Andy Shevchenko