From: Heiko Stuebner <heiko@sntech.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 04/10] pinctrl: rockchip: Special treatment for RK3288 gpio0 pins' iomux
Date: Thu, 04 Apr 2019 10:57:24 +0200 [thread overview]
Message-ID: <22538145.JIIDXa7gCV@phil> (raw)
In-Reply-To: <def32114-03c8-f631-680f-89d0f9a8021c@rock-chips.com>
Am Donnerstag, 4. April 2019, 10:16:02 CEST schrieb David Wu:
> Hi Philipp,
>
> 在 2019/4/4 下午3:19, Philipp Tomsich 写道:
> >
> >
> >> On 04.04.2019, at 05:51, David Wu <david.wu@rock-chips.com> wrote:
> >>
> >> RK3288 pmu_gpio0 iomux setting have no higher 16 writing corresponding
> >> bits, need to read before write the register.
> >>
> >> Signed-off-by: David Wu <david.wu@rock-chips.com>
> >> ---
> >>
> >> drivers/pinctrl/rockchip/pinctrl-rk3288.c | 8 +++++++-
> >> 1 file changed, 7 insertions(+), 1 deletion(-)
> >>
> >> diff --git a/drivers/pinctrl/rockchip/pinctrl-rk3288.c b/drivers/pinctrl/rockchip/pinctrl-rk3288.c
> >> index 1fa601d954..d66ffdf24b 100644
> >> --- a/drivers/pinctrl/rockchip/pinctrl-rk3288.c
> >> +++ b/drivers/pinctrl/rockchip/pinctrl-rk3288.c
> >> @@ -54,7 +54,13 @@ static int rk3288_set_mux(struct rockchip_pin_bank *bank, int pin, int mux)
> >> }
> >> }
> >>
> >> - data = (mask << (bit + 16));
> >> + if (bank->bank_num == 0) {
> >> + regmap_read(regmap, reg, &data);
> >
> > Could you pull the regmap_read out of the if and make it common for all cases, so the differences between the paths are in data-manipulation only?
>
> Yes, the difference between the gpio0 and other pins is the
> data-manipulation, and i think the others don't need the regmap_read,
> so it is not a common case.
yep ... the other pinmuxes are using hiword-mask registers
while only gpio0 (in the pmu-area) needs the to get the
read-modify-write scheme.
next prev parent reply other threads:[~2019-04-04 8:57 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-04 3:51 [U-Boot] [PATCH v2 00/10] pinctrl: Split the common mux/drive/pull/schmitt func into per Soc David Wu
2019-04-04 3:51 ` [U-Boot] [PATCH v2 01/10] pinctrl: rockchip: Add pull-pin-default param and remove unused param David Wu
2019-04-04 7:09 ` Heiko Stuebner
2019-04-04 3:51 ` [U-Boot] [PATCH v2 02/10] pinctrl: rockchip: Remove redundant spaces David Wu
2019-04-24 3:54 ` Simon Glass
2019-04-04 3:51 ` [U-Boot] [PATCH v2 03/10] pinctrl: rockchip: Split the common set_mux() into per Soc David Wu
2019-04-04 3:51 ` [U-Boot] [PATCH v2 04/10] pinctrl: rockchip: Special treatment for RK3288 gpio0 pins' iomux David Wu
2019-04-04 7:19 ` Philipp Tomsich
2019-04-04 8:16 ` David Wu
2019-04-04 8:57 ` Heiko Stuebner [this message]
2019-04-04 3:55 ` [U-Boot] [PATCH v2 05/10] pinctrl: rockchip: Split the common set_drive() func into per Soc David Wu
2019-04-04 3:55 ` [U-Boot] [PATCH v2 06/10] pinctrl: rockchip: Special treatment for RK3288 gpio0 pins' drive strength David Wu
2019-04-04 3:56 ` [U-Boot] [PATCH v2 07/10] pinctrl: rockchip: Split the common set_pull() func into per Soc David Wu
2019-04-04 3:56 ` [U-Boot] [PATCH v2 08/10] pinctrl: rockchip: Special treatment for RK3288 gpio0 pins' pull David Wu
2019-04-04 3:57 ` [U-Boot] [PATCH v2 09/10] pinctrl: rockchip: Clean the unused type and label David Wu
2019-04-04 3:57 ` [U-Boot] [PATCH v2 10/10] pinctrl: rockchip: Also move common set_schmitter func into per Soc file David Wu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=22538145.JIIDXa7gCV@phil \
--to=heiko@sntech.de \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox