Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp727591ybt; Mon, 6 Jul 2020 21:53:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxq0o8tqA/ehkwUIDXprOT8Ss/Yk95nSPxGMMi/Njxo3UXK7YRw6r3s7X0d9WD1uc3HPC1h X-Received: by 2002:a05:6402:134e:: with SMTP id y14mr60021607edw.4.1594097599330; Mon, 06 Jul 2020 21:53:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594097599; cv=none; d=google.com; s=arc-20160816; b=XLos0hPvcNtrhDqPNGIG6oQtkJZlXdZZkGsm+7f13Esa0BlTh/MnYDXZQY4lfdupGB EcB0NuL6R5s4FWt9qJNML5wUhBZU/Mlh7dK0cTuoClpg7P+LNvevqc+YvLj11w5jN8U5 JLLs0kV9+4zLrb9RzMxDwfa0R+GFKNGKo1UWrzhjbpZbQzsTZ/gxxsk5Zhst5a+/IDdd NgP3xto9f2DGY+10vZfc8Uf95D8l2IeYP8H9pAL13TTtkzCeCuqkIl5ojAnCFAv33lh0 OSarTvnsRIIykFd51Ngi215Rw+3a6fCTvyJf/gzBSXtCe4xUJLoZS+7EWhobPAaK60Hs 7Vvg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dmarc-filter :dkim-signature; bh=OcoyeThPIlWtWC0r6guscQL9dK0UlTUWXTYaHWIEOww=; b=w33nUE0v5+T5klAWDesagzS8G2W66ad2mwofrUhopErNDiSF6+Kz4QHMuRBK658xlk KctJsfhnDg0UB6oP2HT4JpgyTj5oxHMrGZ7cjcx9QD6jKikOWk0bmB4q0yNRnUNFR6Rb QG7+CoTYfBiidCh6w9oXYqATYENh0EWd15nPApEYyYE6DpynJrN9hAVfirfslylIZAa/ MoGMcJYi6mWIH0I7wXbNasMiLOmH9rTONnvCuv4ruofCdE2SZR5K2Cr4L0RQQV5YNSIa wZQYiJ3RLPzk/p/VMnDPvgoNk4UGo1XyPDGW59W3qH1vkbt5JcKewPSLEXIZ2IAk0rlq oquQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@mg.codeaurora.org header.s=smtp header.b="c/5dqu5N"; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d21si14100125eja.703.2020.07.06.21.52.54; Mon, 06 Jul 2020 21:53:19 -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; dkim=fail header.i=@mg.codeaurora.org header.s=smtp header.b="c/5dqu5N"; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727107AbgGGEwh (ORCPT + 99 others); Tue, 7 Jul 2020 00:52:37 -0400 Received: from mail29.static.mailgun.info ([104.130.122.29]:17837 "EHLO mail29.static.mailgun.info" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727072AbgGGEwh (ORCPT ); Tue, 7 Jul 2020 00:52:37 -0400 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1594097556; h=Content-Transfer-Encoding: Content-Type: In-Reply-To: MIME-Version: Date: Message-ID: From: References: Cc: To: Subject: Sender; bh=OcoyeThPIlWtWC0r6guscQL9dK0UlTUWXTYaHWIEOww=; b=c/5dqu5NFho0/gogMDKBdY1w+OkvongbkTjpcdz52A55omO5D4PLHsfO911nawW98K6Qegx6 uo+Vp6s02xa0ZvQQ7LAp9pgQjBIZddzj9g27pUp2ijQNj9RlVEEbuVkuLGmvNd6/MLBfIjCw mAJgfVGUEJC1rEbWuwKdY4rGjUU= X-Mailgun-Sending-Ip: 104.130.122.29 X-Mailgun-Sid: WyI0MWYwYSIsICJsaW51eC1rZXJuZWxAdmdlci5rZXJuZWwub3JnIiwgImJlOWU0YSJd Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by smtp-out-n20.prod.us-east-1.postgun.com with SMTP id 5f03ff92bca1ed3155a6556d (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Tue, 07 Jul 2020 04:52:34 GMT Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 43B86C433CA; Tue, 7 Jul 2020 04:52:33 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-caf-mail-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=2.0 tests=ALL_TRUSTED,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.0 Received: from [192.168.1.11] (unknown [61.3.20.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: rnayak) by smtp.codeaurora.org (Postfix) with ESMTPSA id 1D6E4C433C8; Tue, 7 Jul 2020 04:52:28 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 1D6E4C433C8 Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; spf=none smtp.mailfrom=rnayak@codeaurora.org Subject: Re: [PATCH v2] pinctrl: qcom: sc7180: Make gpio28 non wakeup capable for google,lazor To: Bjorn Andersson , Doug Anderson Cc: LinusW , Andy Gross , linux-arm-msm , "open list:GPIO SUBSYSTEM" , LKML , Maulik Shah , Lina Iyer References: <1593762506-32680-1-git-send-email-rnayak@codeaurora.org> <20200706203805.GS388985@builder.lan> From: Rajendra Nayak Message-ID: Date: Tue, 7 Jul 2020 10:22:25 +0530 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20200706203805.GS388985@builder.lan> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [].. >>> @@ -1151,6 +1168,10 @@ static const struct msm_pinctrl_soc_data sc7180_pinctrl = { >>> >>> static int sc7180_pinctrl_probe(struct platform_device *pdev) >>> { >>> + if (of_machine_is_compatible("google,lazor")) { >>> + sc7180_pinctrl.wakeirq_map = sc7180_lazor_pdc_map; >>> + sc7180_pinctrl.nwakeirq_map = ARRAY_SIZE(sc7180_lazor_pdc_map); >>> + } >> >> As much as I want patches landed and things working, the above just >> doesn't feel like a viable solution. I guess it could work as a short >> term hack but it's going to become untenable pretty quickly. > > I second that. > >> As we >> have more variants of this we're going to have to just keep piling >> more machines in here, right? ...this is also already broken for us >> because not all boards will have the "google,lazor" compatible. From >> the current Chrome OS here are the compatibles for various revs/SKUs >> >> compatible = "google,lazor-rev0", "qcom,sc7180"; >> compatible = "google,lazor-rev0-sku0", "qcom,sc7180"; >> compatible = "google,lazor", "qcom,sc7180"; >> compatible = "google,lazor-sku0", "qcom,sc7180"; >> compatible = "google,lazor-rev2", "qcom,sc7180"; >> >> ...so of the 5 boards you'll only match one of them. >> >> >> Maybe I'm jumping into a situation again where I'm ignorant since I >> haven't followed all the prior conversation, but is it really that >> hard to just add dual edge support to the PDC irqchip driver? ...or FWIK, this is really a PDC hardware issue (with the specific IP rev that exists on sc7180) so working it around in SW could get ugly. >> maybe it's just easier to change the pinctrl driver to emulate dual >> edge itself and that can work around the problem in the PDC? There >> seem to be a few samples you could copy from: >> >> $ git log --oneline --no-merges --grep=emulate drivers/pinctrl/ >> 3221f40b7631 pinctrl: mediatek: emulate GPIO interrupt on both-edges >> 5a92750133ff pinctrl: rockchip: emulate both edge triggered interrupts >> > > pinctrl-msm already supports emulating dual edge, but my understanding > was that the problem lies in that somehow this emulation would have to > be tied to or affect the PDC driver? yes, thats correct, pinctrl-msm already supports it, the problem lies in the fact that PDC does not. This patch, infact was trying to fix the issue by removing all PDC involvement for gpio28 and making pinctrl-msm in charge of it. -- QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation