Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp239393pxb; Mon, 13 Sep 2021 18:03:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxrhzPm9Ok+mWyqCbacLlYqvGoo6gDNtVK3i3coXGsY1srqKAAOp6AEcW+IpiTheqUXjjtk X-Received: by 2002:a17:907:9723:: with SMTP id jg35mr15507805ejc.187.1631581412590; Mon, 13 Sep 2021 18:03:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631581412; cv=none; d=google.com; s=arc-20160816; b=O1GkMxPjPVOodKuTkfscL8/4BJ+zoFt1jMIFuXZWVB7aHj0T8tTONyfF6AyJf90hmI XUUbj2F8DlxqwlrGMz7Dzd6Ndwnu9TpemMg5VfB9mWp5zoOuYeTkx4+lg3WF+rOroRSJ LGLrsdHtimq37+Vvz6hPjw+wzoytpJapfbP6rPEWFQiuK/n5QFXw0IMoG/xuAsV/WPPa /37GSUocXGL6TcUVKapYY2uESV+c2xVdntx1UFzTlhvRxPUdVJ5ao/vHI4ryG6e+Q13K VUck2FW2GgvncNCuvONyaoh1/zk6yBlh/QfuQ8bkIX8+Uag47cNiY540fyEtnZ2L/29l G6IQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:user-agent:from :references:in-reply-to:mime-version:dkim-signature; bh=9YZhWzpxyNUlpJr6t9C7C760t9g71yk4DJVlf+sXdZM=; b=FH6PY714Rgzi1h4/WqbPMhwbkHmtK2SDHLusRo2SmqiuuPvmPBqhq257/j74LklFnp g10cCYSxX8oCpqnnUw2wK85YsdxDSTIiyLi7eJc4/ZNEfLZf5DNg+zArLUC6728U5C+D joXi6JDdtKagpwo6PhrRBAgiO+H7LMHmP/BPXofEh7jlFpIvxFqmhp9UW8octHeDJUI8 BP/Z89bwiDO91ZBmgUEiR7B1M8xOYTIupzQSfbKuKVJMP6gHUjO6m1Eg6c4kfi9ARN1f TqfmKBdt6as+1Qgz198Et/7aShGDEYBn4kijrmcqZTmSOVOiqKrRtwHbv1LpaHNsfA3H fbxA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=hWbEgFUQ; 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=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v20si9195592eji.303.2021.09.13.18.03.07; Mon, 13 Sep 2021 18:03:32 -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=pass header.i=@chromium.org header.s=google header.b=hWbEgFUQ; 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=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242202AbhIMT7I (ORCPT + 99 others); Mon, 13 Sep 2021 15:59:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37800 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347649AbhIMT7H (ORCPT ); Mon, 13 Sep 2021 15:59:07 -0400 Received: from mail-ot1-x336.google.com (mail-ot1-x336.google.com [IPv6:2607:f8b0:4864:20::336]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4F326C061574 for ; Mon, 13 Sep 2021 12:57:51 -0700 (PDT) Received: by mail-ot1-x336.google.com with SMTP id g66-20020a9d12c8000000b0051aeba607f1so15012368otg.11 for ; Mon, 13 Sep 2021 12:57:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:in-reply-to:references:from:user-agent:date:message-id :subject:to:cc; bh=9YZhWzpxyNUlpJr6t9C7C760t9g71yk4DJVlf+sXdZM=; b=hWbEgFUQr0H4+RS43yKtrL13njKGDIJjG7hBi4boLfE5K+40onnCN6rHryoGeN+Uje OBy3ICY9wngqcKvkc707AUoV+nEjWLZZ8rDALYis/uYWw7MgsXc4w7915ID7PERll0cx tWO8j3WbgXDES18sBHKpdR4JNFbW/TOc1SGm8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:in-reply-to:references:from :user-agent:date:message-id:subject:to:cc; bh=9YZhWzpxyNUlpJr6t9C7C760t9g71yk4DJVlf+sXdZM=; b=SDh6VIjJZJyXYjXZSVmNmFauzKRyA1C3Y9xp2+Xa8tOJZy0QBdWNxh/FZW0OGS+cik If7FCRp8VMuP4xCc+xaFnBjwkpY0+F8DbHwDxiwSYz8+g1VtpakGyQYvZVCEfT7zJJDk tW1Xop5uy9QpkbT5QyR5yrA2egyUKYLyXMtmva5egYnMZgvfcay1mFEUuJ5YMdsNolbp XLskc+F1sSrKTTfgQwF1xGNsNRJgI+kBd1XhL6j0RB5N/gzJqff04h0EOxtYPd/39Jfk qRysY4/CpRwRBglnQMxYLmmo2Y+Q8K1JoqhcompDCGrUcoGLGy8IQGt6hZk0CVHzWKOo x7Jw== X-Gm-Message-State: AOAM531FhT38G598eYfHTyj3kY8VSRig+1NNNp+5h9uvJNymvZ7fL89I CMUljx5IUbLBLyxeCwBIBFHzmVOc+KdO1ooy0dXXIg== X-Received: by 2002:a05:6830:1212:: with SMTP id r18mr10783901otp.159.1631563070744; Mon, 13 Sep 2021 12:57:50 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Mon, 13 Sep 2021 12:57:50 -0700 MIME-Version: 1.0 In-Reply-To: <1631167288-27627-2-git-send-email-skakit@codeaurora.org> References: <1631167288-27627-1-git-send-email-skakit@codeaurora.org> <1631167288-27627-2-git-send-email-skakit@codeaurora.org> From: Stephen Boyd User-Agent: alot/0.9.1 Date: Mon, 13 Sep 2021 12:57:50 -0700 Message-ID: Subject: Re: [PATCH V3 1/2] pinctrl: qcom: spmi-gpio: correct parent irqspec translation To: Andy Gross , Bjorn Andersson , Linus Walleij , Rob Herring , satya priya Cc: David Collins , kgunda@codeaurora.org, linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Quoting satya priya (2021-09-08 23:01:27) > From: David Collins > > pmic_gpio_child_to_parent_hwirq() and > gpiochip_populate_parent_fwspec_fourcell() translate a pinctrl- > spmi-gpio irqspec to an SPMI controller irqspec. When they do > this, they use a fixed SPMI slave ID of 0 and a fixed GPIO > peripheral offset of 0xC0 (corresponding to SPMI address 0xC000). > This translation results in an incorrect irqspec for secondary > PMICs that don't have a slave ID of 0 as well as for PMIC chips > which have GPIO peripherals located at a base address other than > 0xC000. > > Correct this issue by passing the slave ID of the pinctrl-spmi- > gpio device's parent in the SPMI controller irqspec and by > calculating the peripheral ID base from the device tree 'reg' > property of the pinctrl-spmi-gpio device. > > Signed-off-by: David Collins > Signed-off-by: satya priya > Fixes: ca69e2d165eb ("qcom: spmi-gpio: add support for hierarchical IRQ chip") > --- Reviewed-by: Stephen Boyd