From patchwork Wed Dec 13 18:30:15 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Timur Tabi X-Patchwork-Id: 848112 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=linux-gpio-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=codeaurora.org header.i=@codeaurora.org header.b="DJja4FIR"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=codeaurora.org header.i=@codeaurora.org header.b="DJja4FIR"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3yxlcL3lscz9s74 for ; Thu, 14 Dec 2017 05:30:26 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753269AbdLMSaZ (ORCPT ); Wed, 13 Dec 2017 13:30:25 -0500 Received: from smtp.codeaurora.org ([198.145.29.96]:58890 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753011AbdLMSaY (ORCPT ); Wed, 13 Dec 2017 13:30:24 -0500 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id D03C8607DD; Wed, 13 Dec 2017 18:30:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1513189823; bh=hrJRfBwQrIsnH+vU/Q7P9KbMhZObYIqj6JkDB8TwMmY=; h=From:To:Cc:Subject:Date:From; b=DJja4FIRb8nueKZTkS4GBdWIev8BhSTocUTJ+uAKhMTgL9Kn9NEBziTvSTYmba9Bi CFyZb8xWjEAEGuIugTpnOXbDBcUEg93cVcF2zqc71pASyz7mAGNcXYoO/Pw5JuDFPh SBONeTMwpP2BEbT+ShHUNlIqoArx1xx4M3eORVbs= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED, T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.0 Received: from timur-ubuntu.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: timur@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 21877607DD; Wed, 13 Dec 2017 18:30:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1513189823; bh=hrJRfBwQrIsnH+vU/Q7P9KbMhZObYIqj6JkDB8TwMmY=; h=From:To:Cc:Subject:Date:From; b=DJja4FIRb8nueKZTkS4GBdWIev8BhSTocUTJ+uAKhMTgL9Kn9NEBziTvSTYmba9Bi CFyZb8xWjEAEGuIugTpnOXbDBcUEg93cVcF2zqc71pASyz7mAGNcXYoO/Pw5JuDFPh SBONeTMwpP2BEbT+ShHUNlIqoArx1xx4M3eORVbs= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 21877607DD Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=timur@codeaurora.org From: Timur Tabi To: linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-gpio@vger.kernel.org, Linus Walleij , Andy Shevchenko , Mika Westerberg , thierry.reding@gmail.com, Stephen Boyd , david.brown@linaro.org, andy.gross@linaro.org, Bjorn Andersson , Varadarajan Narayanan , Archit Taneja Cc: timur@codeaurora.org Subject: [PATCH 0/3] [v10] pinctrl: qcom: add support for sparse GPIOs Date: Wed, 13 Dec 2017 12:30:15 -0600 Message-Id: <1513189818-7384-1-git-send-email-timur@codeaurora.org> X-Mailer: git-send-email 1.9.1 Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org A series of patches that add support for GPIO maps that have holes in them. That is, even though a client driver has N consecutive GPIOs, some are just unavailable for whatever reason, and the hardware should not be accessed for those GPIOs. Patch 1 reverts an old patch that triggers a get_direction of every pin upon init, without attempting to request the pins first. The direction is already being queried when the pin is requested. Patch 2 adds support to pinctrl-msm for "unavailable" GPIOs. Patch 3 extends that support to pinctrl-qdf2xxx. A recent ACPI change on QDF2400 platforms blocks access to most pins, so the driver can only register a subset. This version drops the availability check in gpiolib, because it's no necessary. Instead, just having pinctrl-msm return -EACCES is enough to block all unavailable GPIOs. Patch 1 removes the only instance where an unrequested GPIO is being accessed. v10: Use driver_stuct to obtain ACPI match table entry Timur Tabi (3): [v2] Revert "gpio: set up initial state from .get_direction()" [v8] pinctrl: qcom: disable GPIO groups with no pins [v6] pinctrl: qcom: qdf2xxx: add support for new ACPI HID QCOM8002 drivers/gpio/gpiolib.c | 31 ++------ drivers/pinctrl/qcom/pinctrl-msm.c | 28 +++++-- drivers/pinctrl/qcom/pinctrl-qdf2xxx.c | 134 +++++++++++++++++++++++++-------- 3 files changed, 133 insertions(+), 60 deletions(-)