From: "Heiko Stübner" <heiko@sntech.de>
To: Yang Yingliang <yangyingliang@huawei.com>,
Geert Uytterhoeven <geert@linux-m68k.org>
Cc: linux-spi@vger.kernel.org, broonie@kernel.org, lukas@wunner.de
Subject: Re: [PATCH -next 13/24] spi: rockchip: switch to use modern name
Date: Wed, 16 Aug 2023 12:38:37 +0200 [thread overview]
Message-ID: <2351422.atdPhlSkOF@diego> (raw)
In-Reply-To: <CAMuHMdXfov+UhdpapX4h-nANByUc9hAJY5aQmQB5+j4iFLyPgQ@mail.gmail.com>
Hi,
Am Mittwoch, 16. August 2023, 12:20:55 CEST schrieb Geert Uytterhoeven:
> Hi Yang,
>
> CC Heiko
>
> On Wed, Aug 16, 2023 at 11:43 AM Yang Yingliang
> <yangyingliang@huawei.com> wrote:
> > Change legacy name master/slave to modern name host/target or controller.
> >
> > No functional changed.
> >
> > Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
>
> Thanks for your patch!
>
> > --- a/drivers/spi/spi-rockchip.c
> > +++ b/drivers/spi/spi-rockchip.c
> > @@ -104,8 +104,8 @@
> > #define CR0_XFM_RO 0x2
> >
> > #define CR0_OPM_OFFSET 20
> > -#define CR0_OPM_MASTER 0x0
> > -#define CR0_OPM_SLAVE 0x1
> > +#define CR0_OPM_HOST 0x0
> > +#define CR0_OPM_TARGET 0x1
> >
> > #define CR0_SOI_OFFSET 23
> >
> > @@ -125,7 +125,7 @@
> > #define SR_TF_EMPTY (1 << 2)
> > #define SR_RF_EMPTY (1 << 3)
> > #define SR_RF_FULL (1 << 4)
> > -#define SR_SLAVE_TX_BUSY (1 << 5)
> > +#define SR_TARGET_TX_BUSY (1 << 5)
>
> I assume the register bit names come straight from the hardware
> documentation, so you cannot just change them without making future
> maintenance harder.
Not necessarily. I.e. the TRM up to the most recent rk3588 does talk about
that bit as master/slave, but the bit itself is just named OPM.
----- 8< -----
opm
Master and slave mode select.
1'b0: Master Mode
1'b1: Slave Mode
----- 8< -----
So I'd call that a grey area. I.e. grepping for the field in the manual
won't work directly, but when reading people need to make the connection
every time that master in the TRM means host in the kernel etc.
If that is the way to go is a call for someone else, I guess
Regards,
Heiko
next prev parent reply other threads:[~2023-08-16 10:39 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-16 9:39 [PATCH -next 00/24] spi: switch to use modern name (part4) Yang Yingliang
2023-08-16 9:39 ` [PATCH -next 01/24] spi: orion: switch to use modern name Yang Yingliang
2023-08-16 9:39 ` [PATCH -next 02/24] spi: mchp-pci1xxxx: " Yang Yingliang
2023-08-16 9:39 ` [PATCH -next 03/24] spi: pic32-sqi: " Yang Yingliang
2023-08-16 9:39 ` [PATCH -next 04/24] spi: pic32: " Yang Yingliang
2023-08-16 10:18 ` Geert Uytterhoeven
2023-08-16 9:39 ` [PATCH -next 05/24] spi: spl022: " Yang Yingliang
2023-08-16 9:39 ` [PATCH -next 06/24] spi: ppc4xx: " Yang Yingliang
2023-08-16 9:39 ` [PATCH -next 07/24] spi: pxa2xx: " Yang Yingliang
2023-08-16 9:39 ` [PATCH -next 08/24] spi: spi-qcom-qspi: " Yang Yingliang
2023-08-16 9:39 ` [PATCH -next 09/24] spi: qup: " Yang Yingliang
2023-08-16 9:39 ` [PATCH -next 10/24] spi: rb4xx: " Yang Yingliang
2023-08-16 9:40 ` [PATCH -next 11/24] spi: realtek-rtl: switch to use devm_spi_alloc_host() Yang Yingliang
2023-08-16 9:40 ` [PATCH -next 12/24] spi: rockchip-sfc: switch to use modern name Yang Yingliang
2023-08-16 9:40 ` [PATCH -next 13/24] spi: rockchip: " Yang Yingliang
2023-08-16 10:20 ` Geert Uytterhoeven
2023-08-16 10:38 ` Heiko Stübner [this message]
2023-08-16 9:40 ` [PATCH -next 14/24] spi: rpc-if: switch to use devm_spi_alloc_host() Yang Yingliang
2023-08-16 10:28 ` Geert Uytterhoeven
2023-08-16 9:40 ` [PATCH -next 15/24] spi: rspi: switch to use modern name Yang Yingliang
2023-08-16 10:34 ` Geert Uytterhoeven
2023-08-16 9:40 ` [PATCH -next 16/24] spi: rzv2m-csi: " Yang Yingliang
2023-08-16 10:25 ` Geert Uytterhoeven
2023-08-16 9:40 ` [PATCH -next 17/24] spi: s3c64xx: " Yang Yingliang
2023-08-16 10:27 ` Geert Uytterhoeven
2023-08-18 10:58 ` Krzysztof Kozlowski
2023-08-16 9:40 ` [PATCH -next 18/24] spi: sc18is602: " Yang Yingliang
2023-08-16 9:40 ` [PATCH -next 19/24] spi: sh-hspi: " Yang Yingliang
2023-08-16 10:41 ` Geert Uytterhoeven
2023-08-16 9:40 ` [PATCH -next 20/24] spi: sh-msiof: " Yang Yingliang
2023-08-16 10:37 ` Geert Uytterhoeven
2023-08-17 3:18 ` Yang Yingliang
2023-08-16 9:40 ` [PATCH -next 21/24] spi: sh-sci: " Yang Yingliang
2023-08-16 9:40 ` [PATCH -next 22/24] spi: sh: " Yang Yingliang
2023-08-16 9:40 ` [PATCH -next 23/24] spi: sifive: " Yang Yingliang
2023-08-16 9:40 ` [PATCH -next 24/24] spi: spi-sn-f-ospi: " Yang Yingliang
2023-08-16 16:16 ` (subset) [PATCH -next 00/24] spi: switch to use modern name (part4) Mark Brown
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=2351422.atdPhlSkOF@diego \
--to=heiko@sntech.de \
--cc=broonie@kernel.org \
--cc=geert@linux-m68k.org \
--cc=linux-spi@vger.kernel.org \
--cc=lukas@wunner.de \
--cc=yangyingliang@huawei.com \
/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;
as well as URLs for NNTP newsgroup(s).