Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1679883ybh; Thu, 16 Jul 2020 20:29:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJykIA+czn8C4dEEoxmVd/55FlSi4Zz9IdSmClYcAfCiG6Qu/4dthuIL7Dq5Me/HosPhfzy6 X-Received: by 2002:a17:906:c56:: with SMTP id t22mr7088977ejf.50.1594956540381; Thu, 16 Jul 2020 20:29:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594956540; cv=none; d=google.com; s=arc-20160816; b=dnmG9YSyicQtj9Snjwqd0QYUl6AD4AkIqeugIBd5bb4ulTJy1MEn/+78OX+HSITrN4 /CUg2Loxjqo+4+GaLh2Mp5vQYeTbFp3k8YgrZcLvslOxsEYKqo7pSom4UHlm7ZZ/OPsG lxSw/rbc+0OYfjvq67N805yOtOH1vT9uZCAkgicQgK83uaZ2I6jJALylkZ0NoBXtQkM9 5XW+/dgm6eoC7vzuQE07VMmYQ96DURbR4NW3DGop5qZ9M7dDarS7hVi0DOiIDDyfMVRL /8WyNl+/2AJW8DzllfAb/jIeHj/j/9xzHw3KKdSRyrfr+TBJu/MFoGqYklbugdSV7UhD KJVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=ypc9o4k0oOn8dOh9EbNRoVmVsNBVQ2xuZudNZLwnm1k=; b=BO1hv1dBHuxM9RaAFrgiaYGDGi1pkPdNIX1gg5HvYvlrIW6sb/hQZAGMBphoc/iZ9c IK1HVhgD3PYTtTyIOFjDQfg4FZ08VLdSEgFWiNMaKsOgOCojtjqhntLM3dVr9j3AkRX0 H5gBKV0Ht0vwjsprr4MYZAUahzh1XUx75JVLu9LxGeMHuhxaSdAeQquwELNrnXpUgAd+ DIghKfD3alGn6JbmwyeOA2iUYk5VxBI+MdrscXnhhRAnDnVr5JL+heEXMS1xyMaJ5ckN VDSl5FO2sz7TxplZ8XC8nz9i/y9PDAbj327Bw58cB53w15MuiAeQbBykTv72o8cB69hp Zipw== ARC-Authentication-Results: i=1; mx.google.com; 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 lw6si4256525ejb.506.2020.07.16.20.28.36; Thu, 16 Jul 2020 20:29:00 -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; 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 S1727105AbgGQD13 (ORCPT + 99 others); Thu, 16 Jul 2020 23:27:29 -0400 Received: from lucky1.263xmail.com ([211.157.147.135]:38652 "EHLO lucky1.263xmail.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726557AbgGQD12 (ORCPT ); Thu, 16 Jul 2020 23:27:28 -0400 Received: from localhost (unknown [192.168.167.13]) by lucky1.263xmail.com (Postfix) with ESMTP id 46FE3A1289; Fri, 17 Jul 2020 11:27:25 +0800 (CST) X-MAIL-GRAY: 0 X-MAIL-DELIVERY: 1 X-ADDR-CHECKED4: 1 X-ANTISPAM-LEVEL: 2 X-ABS-CHECKED: 0 Received: from localhost.localdomain (unknown [58.22.7.114]) by smtp.263.net (postfix) whith ESMTP id P17843T139821238978304S1594956444573766_; Fri, 17 Jul 2020 11:27:25 +0800 (CST) X-IP-DOMAINF: 1 X-UNIQUE-TAG: <2d58e0ed85c5041d7568221e8c6e4f3f> X-RL-SENDER: jay.xu@rock-chips.com X-SENDER: xjq@rock-chips.com X-LOGIN-NAME: jay.xu@rock-chips.com X-FST-TO: heiko@sntech.de X-SENDER-IP: 58.22.7.114 X-ATTACHMENT-NUM: 0 X-DNS-TYPE: 0 X-System-Flag: 0 From: Jianqun Xu To: heiko@sntech.de, linus.walleij@linaro.org Cc: linux-gpio@vger.kernel.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, kever.yang@rock-chips.com, david.wu@rock-chips.com, Jianqun Xu Subject: [PATCH 11/13] pinctrl: rockchip: Add RK3128 definitions to separate from other SoCs Date: Fri, 17 Jul 2020 11:27:23 +0800 Message-Id: <20200717032723.18383-1-jay.xu@rock-chips.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200717032411.17654-1-jay.xu@rock-chips.com> References: <20200717032411.17654-1-jay.xu@rock-chips.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add RK3128 definitions to separate from other SoCs. Signed-off-by: Jianqun Xu --- drivers/pinctrl/pinctrl-rockchip.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/pinctrl/pinctrl-rockchip.c b/drivers/pinctrl/pinctrl-rockchip.c index 04e7027ec8e1..3b74455dcdb2 100644 --- a/drivers/pinctrl/pinctrl-rockchip.c +++ b/drivers/pinctrl/pinctrl-rockchip.c @@ -1799,6 +1799,8 @@ static void rk2928_calc_pull_reg_and_bit(struct rockchip_pin_bank *bank, }; #define RK3128_PULL_OFFSET 0x118 +#define RK3128_PULL_PINS_PER_REG 16 +#define RK3128_PULL_BANK_STRIDE 8 static void rk3128_calc_pull_reg_and_bit(struct rockchip_pin_bank *bank, int pin_num, struct regmap **regmap, @@ -1808,10 +1810,10 @@ static void rk3128_calc_pull_reg_and_bit(struct rockchip_pin_bank *bank, *regmap = info->regmap_base; *reg = RK3128_PULL_OFFSET; - *reg += bank->bank_num * RK2928_PULL_BANK_STRIDE; - *reg += ((pin_num / RK2928_PULL_PINS_PER_REG) * 4); + *reg += bank->bank_num * RK3128_PULL_BANK_STRIDE; + *reg += ((pin_num / RK3128_PULL_PINS_PER_REG) * 4); - *bit = pin_num % RK2928_PULL_PINS_PER_REG; + *bit = pin_num % RK3128_PULL_PINS_PER_REG; } #define RK3188_PULL_OFFSET 0x164 -- 2.17.1