From: "Lh Kuo 郭力豪" <lh.Kuo@sunplus.com>
To: Andy Shevchenko <andy.shevchenko@gmail.com>,
Li-hao Kuo <lhjeff911@gmail.com>
Cc: "Philipp Zabel" <p.zabel@pengutronix.de>,
"Mark Brown" <broonie@kernel.org>,
"Rob Herring" <robh+dt@kernel.org>,
linux-spi <linux-spi@vger.kernel.org>,
devicetree <devicetree@vger.kernel.org>,
"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>,
"Wells Lu 呂芳騰" <wells.lu@sunplus.com>
Subject: RE: [PATCH v5 1/2] SPI: Add SPI driver for Sunplus SP7021
Date: Fri, 14 Jan 2022 01:31:41 +0000 [thread overview]
Message-ID: <7d79c45a37f64a41947f05b6cae96bd6@sphcmbx02.sunplus.com.tw> (raw)
In-Reply-To: <CAHp75VecMe_KxgV1adr5Z7_EDz0s9MWB_RNeS4nY0m6e_eZ9Yw@mail.gmail.com>
> > + writel(readl(pspim->m_base + SP7021_INT_BUSY_REG)
> > + | SP7021_CLR_MAS_INT, pspim->m_base +
> > + SP7021_INT_BUSY_REG);
>
> It's better to read with temporary variable being used:
>
> value = readl(pspim->m_base + SP7021_INT_BUSY_REG);
> value |= SP7021_CLR_MAS_INT;
> writel(value, pspim->m_base + SP7021_INT_BUSY_REG);
I will add it in next next submission
> > + pspim->xfer_conf |= ((clk_sel & 0xffff) << 16);
>
> Is xfer_conf bigger than 32-bit? If not, why do you need the ' & 0xffff' part?
>
> ...
I will add it in next next submission
> > + mode = SP7021_SLAVE_MODE;
>
> ...belongs to this condition, so do not interleave them.
>
> On top of that you may use device property API:
>
> if (device_property_read_bool(&pdev->dev, "spi-slave"))
> mode = SP7021_SLAVE_MODE;
> else
> mode = SP7021_MASTER_MODE;
I will add it in next next submission
> > + return dev_err_probe(dev, ret, "spi_register_master fail\n");
> > + }
> > +
> > + return ret;
>
> return 0;
>
> ...
>
> > +MODULE_LICENSE("GPL v2");
>
> "GPL", the one you used is legacy.
>
I will add it in next next submission
next prev parent reply other threads:[~2022-01-14 1:31 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-10 6:47 [PATCH v5 0/2] Add SPI control driver for Sunplus SP7021 SoC Li-hao Kuo
2022-01-10 6:47 ` [PATCH v5 1/2] SPI: Add SPI driver for Sunplus SP7021 Li-hao Kuo
2022-01-10 10:58 ` Andy Shevchenko
2022-01-14 1:31 ` Lh Kuo 郭力豪 [this message]
2022-01-10 11:40 ` kernel test robot
2022-01-10 6:47 ` [PATCH v5 2/2] devicetree: bindings SPI Add bindings doc " Li-hao Kuo
2022-01-10 17:35 ` Rob Herring
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=7d79c45a37f64a41947f05b6cae96bd6@sphcmbx02.sunplus.com.tw \
--to=lh.kuo@sunplus.com \
--cc=andy.shevchenko@gmail.com \
--cc=broonie@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=lhjeff911@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
--cc=p.zabel@pengutronix.de \
--cc=robh+dt@kernel.org \
--cc=wells.lu@sunplus.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
all inboxes | Powered by JetHome®