From patchwork Thu Nov 30 20:22:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Caleb Connolly X-Patchwork-Id: 748517 Delivered-To: patch@linaro.org Received: by 2002:adf:e9c2:0:b0:32d:baff:b0ca with SMTP id l2csp1103956wrn; Thu, 30 Nov 2023 12:24:20 -0800 (PST) X-Google-Smtp-Source: AGHT+IGnnuCJYqLaK6eZ2bOotcpkTlUDNq2BDyAxOJjqwlA8Q7YRikQcfiwnZm4NBtrWQAtczBfa X-Received: by 2002:a17:902:be12:b0:1cf:9c44:62e with SMTP id r18-20020a170902be1200b001cf9c44062emr27269076pls.34.1701375860226; Thu, 30 Nov 2023 12:24:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701375860; cv=none; d=google.com; s=arc-20160816; b=cmDolmulethRjc/0UeZxsE5dUUQqPy/i2lufh+dB5iG6Pob9TU9741ONrDOPVISE6N GlQlbFQKqthypCkZF0yz538Esg1UQF16IcF+htORb71AQOmICLly7VjMb9stKL1Nah9k 0/i5gNozXI+tgfEEywlmkg5LH6X8K1pFXyy6P0us6tgL2XbGG1LMluuk4ms8VLgl4Fo1 tvkYGHw6zicLyHTP+zfBZtnQewg/CEL7rkUDTyTrSSpZz0p/i3YO9rMaKuCvoU6sgRWh wWyPHNwMg7WjFQQZJ4IKz+vdwy3gu+wFQU2ilwZYxjSXBnaU3DBw9u1a0ZUcZ67rm+QV rhhA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:cc:to:in-reply-to:references :message-id:content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=3hXZHxuecfif5wU/f4nXhH4eCzZfa91dmy97EKVy4RQ=; fh=57wjcTC2B872pbvvKlxFgwzI1s9QKuSBoEg/SeZNaxI=; b=z48K7LLJpkOOCPYRo8Icf2oj3bYw3V7TB20YW19lN3Ak+W2AK9e2NrEUUcBg1yFa8k S6ij1/5LaKtCyRiV8QR1TSo7sF9i3nmp8xDHCT84Y5xKCKFBTlRSjoeCRfQV44hhC8YT sUBi5WHhSFIXS3MfJ1uLCKMK5hf5/trXyP+KqiZ8DJPdQBuP9PHdIrHKRlfX2qfbi9ax SQzogzGoIOEVpx9OdZdwZr+dLlOQ4ld8L+pkqljFOLP3Nyv58WqTD1xafDMPzuIOt+D9 A+yNzB6I7DBn9goCcQBxuRQNDzv4nMUBcTG6IFb+honc7A1InbGc1VHCdjAUWRSPAE5f LnXg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=N81aTcTi; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [2a01:238:438b:c500:173d:9f52:ddab:ee01]) by mx.google.com with ESMTPS id u7-20020a170902bf4700b001cfa7f91403si1821351pls.183.2023.11.30.12.24.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Nov 2023 12:24:20 -0800 (PST) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=N81aTcTi; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 2FC74876FE; Thu, 30 Nov 2023 21:23:01 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="N81aTcTi"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 213438770B; Thu, 30 Nov 2023 21:22:56 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wr1-x42d.google.com (mail-wr1-x42d.google.com [IPv6:2a00:1450:4864:20::42d]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 33DA987709 for ; Thu, 30 Nov 2023 21:22:54 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=caleb.connolly@linaro.org Received: by mail-wr1-x42d.google.com with SMTP id ffacd0b85a97d-332e58d4219so866545f8f.0 for ; Thu, 30 Nov 2023 12:22:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1701375773; x=1701980573; darn=lists.denx.de; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=3hXZHxuecfif5wU/f4nXhH4eCzZfa91dmy97EKVy4RQ=; b=N81aTcTiY141CsFm4fQhi5E+RcFzTOJFv9hi4g7L4HchQ+zs2wPCuAqJddcX4u+OTe /SuLXM2pM5zRjm4OjzA/w0E4F5+dnQs9xBWHOZ9cG5hmzA9cKoWZj72ZZUPXpqSA15Dd JlHybAhIqRBp4QB85HO4KwgRwL2HBMz3HdqS8xYk0HgseYhTqN93zzhgfDyHkLtQFHwc hF+k1VmUHOKcO7VsHc5hq4jlcr7A8wtC42N4POweYmaPptBeTwcptXW66vWszPGs6k5r tPY3wicczM3x1AGUvEmTRzl+DnAvSs+fy86q2PieoA/7tSKMCokiSSvj4XlSj/TIc38h vkNQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701375773; x=1701980573; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=3hXZHxuecfif5wU/f4nXhH4eCzZfa91dmy97EKVy4RQ=; b=CUvRdMy8mqNkyWq6lfUidX9B+9aV3uW38/vuWxGMah05D8QEg6wDKJhPEzYAum/sQA gwrxgF+j5IK7aHi1vAYsDQEGzAIqd03W2IKxZL7zCbvM+Nehsy5tySusJXOloxM1VD0b BQIVReqOE1oZfHgvUdaiwb9OAxP1oSpicLljeqO5h0iu8d3HcG+w0rC3LWLyYF6A6kCI YrrkIpozuvXfdKFmpB3Abinn44GiyaP7TLuDbKnCkuMxWrqXTrvYu/Qod961Rek2S6r8 S3l6TM4n+PP46Hox1hu6etj4FlMDRG5/pSWC62A+a3RL6UXu3FmfYmlANYyReoLQvEWh IMPQ== X-Gm-Message-State: AOJu0Yy9WvQZxuigmwYHs6nbRWzDzgnLEh/ni7f3R6l/CCG0eDWRmcrB wIIv181yZG4XXjiQHBrx1uJJGQ== X-Received: by 2002:adf:a4cf:0:b0:332:f3c9:1c8f with SMTP id h15-20020adfa4cf000000b00332f3c91c8fmr74990wrb.16.1701375773758; Thu, 30 Nov 2023 12:22:53 -0800 (PST) Received: from lion.localdomain ([79.79.179.141]) by smtp.gmail.com with ESMTPSA id fa23-20020a05600c519700b003fee6e170f9sm3028900wmb.45.2023.11.30.12.22.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Nov 2023 12:22:53 -0800 (PST) From: Caleb Connolly Date: Thu, 30 Nov 2023 20:22:31 +0000 Subject: [PATCH v5 7/9] gpio: qcom_pmic: drop gpio-count property MIME-Version: 1.0 Message-Id: <20231130-b4-qcom-dt-compat-v5-7-41500e237ad0@linaro.org> References: <20231130-b4-qcom-dt-compat-v5-0-41500e237ad0@linaro.org> In-Reply-To: <20231130-b4-qcom-dt-compat-v5-0-41500e237ad0@linaro.org> To: Ramon Fried , Jorge Ramirez-Ortiz , Neil Armstrong , Sumit Garg , Mateusz Kulikowski , Jaehoon Chung , Dzmitry Sankouski , Stephan Gerhold , Caleb Connolly Cc: u-boot@lists.denx.de X-Mailer: b4 0.13-dev-4bd13 X-Developer-Signature: v=1; a=openpgp-sha256; l=2395; i=caleb.connolly@linaro.org; h=from:subject:message-id; bh=n4wzavWlWHVsZCehd+UmTwVOMCnMK4Qqs6PAhPleRjQ=; b=owGbwMvMwCFYaeA6f6eBkTjjabUkhtSM92IXY/aVvZyzXW2Wn6fOtdJj35Zc72bPtCtqmGO05 vCk5/NtOkpZGAQ5GGTFFFnETyyzbFp72V5j+4ILMHNYmUCGMHBxCsBErrcy/DOPbNJeKD9h5rvd J/6Lz7m973Wu9N2XAvEVs6qnsru0+S1j+Kfg7djf/H9xYOWEjBwTG5Oj2mEX2P7/vSF2wSq3o/q z7hsA X-Developer-Key: i=caleb.connolly@linaro.org; a=openpgp; fpr=83B24DA7FE145076BC38BB250CD904EB673A7C47 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean This property is not part of the dt bindings and all boards use the new gpio-ranges property instead. Drop support for this. Signed-off-by: Caleb Connolly Reviewed-by: Neil Armstrong --- doc/device-tree-bindings/gpio/pm8916_gpio.txt | 48 --------------------------- drivers/gpio/qcom_pmic_gpio.c | 13 +++----- 2 files changed, 5 insertions(+), 56 deletions(-) diff --git a/doc/device-tree-bindings/gpio/pm8916_gpio.txt b/doc/device-tree-bindings/gpio/pm8916_gpio.txt deleted file mode 100644 index 58185b833524..000000000000 --- a/doc/device-tree-bindings/gpio/pm8916_gpio.txt +++ /dev/null @@ -1,48 +0,0 @@ -Driver for part of pm8916 PMIC - gpio and power/reset keys - -This device should be child of SPMI pmic. - -1) GPIO driver - -Required properties: -- compatible: "qcom,pm8916-gpio" -- reg: peripheral ID, size of register block -- gpio-controller -- gpio-count: number of GPIOs -- #gpio-cells: 2 - -Optional properties: -- gpio-bank-name: name of bank (as default "pm8916" is used) - -Example: - -pmic_gpios: gpios@c000 { - compatible = "qcom,pm8916-gpio"; - reg = <0xc000 0x400>; - gpio-controller; - gpio-count = <4>; - #gpio-cells = <2>; - gpio-bank-name="pmic"; -}; - - -2) Power/Reset key driver - -Required properties: -- compatible: "qcom,pm8916-pwrkey" -- reg: peripheral ID, size of register block -- gpio-controller -- #gpio-cells: 2 - -Optional properties: -- gpio-bank-name: name of bank (as default "pm8916_key" is used) - - -Example: - -pmic_pon: pon@800 { - compatible = "qcom,pm8916-pwrkey"; - reg = <0x800 0x96>; - #gpio-cells = <2>; - gpio-controller; -}; diff --git a/drivers/gpio/qcom_pmic_gpio.c b/drivers/gpio/qcom_pmic_gpio.c index 54f4dbd2b84e..1adc6566a36d 100644 --- a/drivers/gpio/qcom_pmic_gpio.c +++ b/drivers/gpio/qcom_pmic_gpio.c @@ -268,14 +268,11 @@ static int qcom_gpio_of_to_plat(struct udevice *dev) struct gpio_dev_priv *uc_priv = dev_get_uclass_priv(dev); int ret; - uc_priv->gpio_count = dev_read_u32_default(dev, "gpio-count", 0); - if (!uc_priv->gpio_count) { - ret = qcom_gpio_of_parse_ranges(dev); - if (ret > 0) - uc_priv->gpio_count = ret; - else - return ret; - } + ret = qcom_gpio_of_parse_ranges(dev); + if (ret > 0) + uc_priv->gpio_count = ret; + else + return ret; uc_priv->bank_name = "pmic";