Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1640203ybh; Thu, 16 Jul 2020 18:55:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz3o5WkYvEqejgTnBUrk/4JPlQzBLF1tAMkyydKl62+OM+gfuK/1i9ln0J7J6/4oA/muofk X-Received: by 2002:a05:6402:1a54:: with SMTP id bf20mr7151755edb.69.1594950914490; Thu, 16 Jul 2020 18:55:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594950914; cv=none; d=google.com; s=arc-20160816; b=OGizv8+DwMDwJyDNVjyNasFJfAc07U0ow2CP/BcCNw00Edn6QOZ7GFAUcrnZLIdhNP TQBJiaysUS4YqcqCK0jXREJErfFFJaMj+9ZbBSN613pnA7UnGxdBoFECQeuN0MLoEca0 6Lf4ISUG5hf8HAXsnIu0AEl6pC9UcLokXA+CxU28rdZ3QLDfdu3KZT6BW+cfle+BqY7A EwrMr6ggzsBRquVBuoCJm+Jc0EXGZMbbB12b7EboTpt0f38FizvjlS5Co8EYPOkXXL/1 fZ5ubEKJDPqNMcDEM2nkPH/vR2M9KRViazr+3/d1jNpNK13TRP9KfWKuhy4gDhnlqwNa jfCg== 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=Uf0jYD3koUd/QOmqD/XI5HN0Tl+FTu9lV3AwqXPxBNAmLW+9qghyJaSQiZKudD7yhw y8HjClCbk1/kJ5Zeml2fjq+ghtVcw8EOgB5yKVh2jaf8Qkw5ewvsmlrzJcx6glYiFTN2 tEw5HtgWkSkdtnjJ2xtQMmKAirJk2t+1xpaqmyHySU6y/BTVxMh7xLxiZ3byqB8/eO11 D4trog8JuCveZj08gZbFCG1NgYD5qfndwibX/RVLwEdo/NoYtHPIyp8CQ9ITjOHs1C7S QDw+cJjEJUDFAjhePdUI+CPWucztmCL7vkgSb+RmS8O2YmznNoTAOppfE+4Iaw7rzj7L 5t9A== 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 f20si4201009edx.189.2020.07.16.18.54.51; Thu, 16 Jul 2020 18:55:14 -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 S1726932AbgGQBxo (ORCPT + 99 others); Thu, 16 Jul 2020 21:53:44 -0400 Received: from lucky1.263xmail.com ([211.157.147.131]:36322 "EHLO lucky1.263xmail.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726231AbgGQBxn (ORCPT ); Thu, 16 Jul 2020 21:53:43 -0400 Received: from localhost (unknown [192.168.167.16]) by lucky1.263xmail.com (Postfix) with ESMTP id 58B0CB0406; Fri, 17 Jul 2020 09:53:41 +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 P18585T140686284289792S1594950820382085_; Fri, 17 Jul 2020 09:53:41 +0800 (CST) X-IP-DOMAINF: 1 X-UNIQUE-TAG: 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: do codingstyle Date: Fri, 17 Jul 2020 09:53:39 +0800 Message-Id: <20200717015339.14440-1-jay.xu@rock-chips.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200717014908.13914-1-jay.xu@rock-chips.com> References: <20200717014908.13914-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