From patchwork Tue Dec 5 13:46:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Caleb Connolly X-Patchwork-Id: 750384 Delivered-To: patch@linaro.org Received: by 2002:adf:9b9d:0:b0:333:3a04:f257 with SMTP id d29csp1678954wrc; Tue, 5 Dec 2023 05:48:22 -0800 (PST) X-Google-Smtp-Source: AGHT+IGfTzrOfXBlH8H9HtlZwmvo6Kmy50Z686yZm1QLjmNEMr/sRy1MQv9yIafmMGN1nhgUl0cp X-Received: by 2002:a5d:6085:0:b0:333:2fd2:2ef2 with SMTP id w5-20020a5d6085000000b003332fd22ef2mr3784703wrt.107.1701784102148; Tue, 05 Dec 2023 05:48:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701784102; cv=none; d=google.com; s=arc-20160816; b=C6J8hyBBwMZC0/d83RVkfXUPahVfRdXwaTzkt3ujMC0y8TK2u5d4PzTWZAgDUiPP5J 1y30fgrVw7iFpti6DhXEQTwhiqimidnoM6wr6AJxKDkLoe64GJ1IC46PCUhkGPYdtqZm Kqefle2Z1q4pdBymEi4pfjNsNOiltRaO3DSPC2Yei9OBTMpICT4R9EPfwQrGgOwYYuA/ CjPBjjDHH7BGSI18RSJGReqoumerCZsSenHZM5YJKBM90uq9c+kxOCJx39Erd+FStksg tWroINDTGueCrXK96E7v+VTlIk9lBHC7IsezZ9iKtOMm5V5AKZOwRVRUS75uMaXIOkg+ Wfjg== 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=pNzDeS4jLfZs8jyIubeuNekC0RpWcM0qlQMwk11zzE4=; fh=57wjcTC2B872pbvvKlxFgwzI1s9QKuSBoEg/SeZNaxI=; b=CSl5ADMo2jM1Art5t3wxRVY7i3T5EIx/xmsJY1JbZvtQpXqKfNJUgfb2DpMeIxWisM 8ebZByJOhF2K4rjSZ+wYebktxTyZuodhUrCb1W5W5xb7sNHow0WICez2Uf7YQoGZYev8 Bw7egcRlGcbYnm2lqoSqwuVLscT8Oq6mQHso+PNTGpE1nTAchMWsKHoLInybtIulgXWK S7J4+n7tsKMMUEWK5jj0ttA+vGRn2Y7HrAbnpDK/w3QhJXREPp0+xfqDioSN9DsePYhq ehKjJ5kURCWBpM7A/kRTosJI/2l1A+ECoLPF1KETrHgT1DoKaykPW5i5ksEoRjIeUyJn vEbA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=GZEuZ+Gx; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 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. [85.214.62.61]) by mx.google.com with ESMTPS id o8-20020a5d47c8000000b00333419d76bbsi2975523wrc.445.2023.12.05.05.48.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Dec 2023 05:48:22 -0800 (PST) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=GZEuZ+Gx; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 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 38C04878CF; Tue, 5 Dec 2023 14:47:10 +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="GZEuZ+Gx"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id D512E87626; Tue, 5 Dec 2023 14:47:08 +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-lj1-x229.google.com (mail-lj1-x229.google.com [IPv6:2a00:1450:4864:20::229]) (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 E5E188756E for ; Tue, 5 Dec 2023 14:47:06 +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-lj1-x229.google.com with SMTP id 38308e7fff4ca-2c9f9db9567so30390211fa.3 for ; Tue, 05 Dec 2023 05:47:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1701784026; x=1702388826; 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=pNzDeS4jLfZs8jyIubeuNekC0RpWcM0qlQMwk11zzE4=; b=GZEuZ+GxyRYH83z3TFcLZ6gHwioOxet3O+ZZzRAYkLVy1tZ1XllQzNKyFU4d5/5RBt 6VNYaZP2N/PXya7y7mPJqO1KqGG9c1pvZO3ueA7IRpePDcTsxV4Z5HbpDwq9s/+eX6An 3S/PtwB3NFi2AIRbsmac9kZiKZqlN+zh6ZL7tINRV7DGnYLe0RpQ9eUCQjfduNcRTNZX NsA7BR4L9Qe2EAsnFRxpWS54YLsbljYhSRLNkPE51zuRtNUIEHO/Zwg12mPlr1VfQtvQ UVvHQsKTf8fO0fPxYJOA+g3zELc2uK2QGHmDwd0QmRzEDxeiZaA07ZQUuZ8WxN67HBxX +XoQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701784026; x=1702388826; 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=pNzDeS4jLfZs8jyIubeuNekC0RpWcM0qlQMwk11zzE4=; b=X2WG05HXdOHn0XPIVoSc8CExlvSWYdQouaebE2e04IIyqVx3oTwSysxc4IuT36p6tR UMDU2wPxngPNY0LcymoAMQr1DU4Cy5Qg+lkvYFkSTHwDm1SNSyxFUo33cBRT3qTWxn4j 4KCwkE6Ku1cR/+4+wwSp/P7dgNplYIkZFQPTiEUsRQTd5zbMwruI8V/uPczMl7LL6CFS l5esch+QnpWEEGku0v++iivgG1EHqOxDRrm2P3oM7k3O/z96o/CMppvt45IhlM7jr8Kv iU79rNJ2giTUmJ1FlUXLZAjd46qI44naPc6mPs0YEcG5wba02qdpWZ+1QAkAGnPekYGZ cJeg== X-Gm-Message-State: AOJu0YxJXY4z+NKc/+iYuBKtgDuudDw7WGVBhK7FXXDxMBTJ56a8wfIL H5l1BeNv1gwlTW2TG7obkNkKsQ== X-Received: by 2002:a2e:9b97:0:b0:2c9:eb97:b76c with SMTP id z23-20020a2e9b97000000b002c9eb97b76cmr2872717lji.88.1701784026358; Tue, 05 Dec 2023 05:47:06 -0800 (PST) Received: from lion.localdomain ([79.79.179.141]) by smtp.gmail.com with ESMTPSA id d10-20020a2e928a000000b002ca0e0c837asm369688ljh.100.2023.12.05.05.47.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Dec 2023 05:47:05 -0800 (PST) From: Caleb Connolly Date: Tue, 05 Dec 2023 13:46:52 +0000 Subject: [PATCH v6 7/9] gpio: qcom_pmic: drop gpio-count property MIME-Version: 1.0 Message-Id: <20231205-b4-qcom-dt-compat-v6-7-61d104a8f920@linaro.org> References: <20231205-b4-qcom-dt-compat-v6-0-61d104a8f920@linaro.org> In-Reply-To: <20231205-b4-qcom-dt-compat-v6-0-61d104a8f920@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=2548; i=caleb.connolly@linaro.org; h=from:subject:message-id; bh=KIbcCNwhjqBjvG3k7+wa2fqlrubCe/j4Q+RD3LW3KPE=; b=owGbwMvMwCFYaeA6f6eBkTjjabUkhtR8zXN1S22fbi3u3uHTV7Ttl5nao7LOnL1FIRtW7/z59 +4qXRvLjlIWBkEOBlkxRRbxE8ssm9ZettfYvuACzBxWJpAhDFycAjCRAGGG/0Ev1378E2V902m7 Jle3xP8W24tdh/hEG9c8OdOyTrqoPZLhn5Kp3cUTXguqVc6sM7AQ0GPXDHbt/Fnx5bRYWw3Tzwf yzQA= 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. Reviewed-by: Neil Armstrong Reviewed-by: Sumit Garg Tested-by: Sumit Garg Signed-off-by: Caleb Connolly --- 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 5221bd27825e..6167c8411678 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";