All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andy.shevchenko@gmail.com>
To: Fabrizio Castro <fabrizio.castro.jz@renesas.com>
Cc: Mark Brown <broonie@kernel.org>,
	Geert Uytterhoeven <geert+renesas@glider.be>,
	"linux-spi@vger.kernel.org" <linux-spi@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Chris Paterson <Chris.Paterson2@renesas.com>,
	Biju Das <biju.das@bp.renesas.com>,
	Prabhakar Mahadev Lad <prabhakar.mahadev-lad.rj@bp.renesas.com>,
	"linux-renesas-soc@vger.kernel.org" 
	<linux-renesas-soc@vger.kernel.org>
Subject: Re: [PATCH 06/10] spi: rzv2m-csi: Squash timing settings into one statement
Date: Mon, 17 Jul 2023 14:15:19 +0300	[thread overview]
Message-ID: <CAHp75Ve7dHQVtYWvq8DjtGe+9nM_vkkmLj2-MUvwzozqOXAaTQ@mail.gmail.com> (raw)
In-Reply-To: <TYWPR01MB8775831C81B7153DB24F86C2C23BA@TYWPR01MB8775.jpnprd01.prod.outlook.com>

On Mon, Jul 17, 2023 at 1:44 PM Fabrizio Castro
<fabrizio.castro.jz@renesas.com> wrote:
> > From: Andy Shevchenko <andy.shevchenko@gmail.com>
> > On Sat, Jul 15, 2023 at 4:04 AM Fabrizio Castro
> > <fabrizio.castro.jz@renesas.com> wrote:

...

> > >         /* Setup clock polarity and phase timing */
> > > -       rzv2m_csi_reg_write_bit(csi, CSI_CLKSEL, CSI_CLKSEL_CKP,
> > > -                               !(spi->mode & SPI_CPOL));
> > > -       rzv2m_csi_reg_write_bit(csi, CSI_CLKSEL, CSI_CLKSEL_DAP,
> > > -                               !(spi->mode & SPI_CPHA));
> > > +       rzv2m_csi_reg_write_bit(csi, CSI_CLKSEL, CSI_CLKSEL_MODE,
> > > +                               ~spi->mode & SPI_MODE_X_MASK);
> >
> > I think this now regresses due to the absence of parentheses.
>
> This looks okay to me. CSI_CLKSEL_CKP needs to contain the inverted value
> of SPI_CPOL, and CSI_CLKSEL_DAP needs to contain the inverted value of
> SPI_CPHA, and that happens with both use cases.

Ah, this is interchangeable since we will get the same bits in the end, indeed.

-- 
With Best Regards,
Andy Shevchenko

  reply	other threads:[~2023-07-17 11:16 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-15  1:03 [PATCH 00/10] spi: rzv2m-csi: Code refactoring Fabrizio Castro
2023-07-15  1:03 ` [PATCH 01/10] spi: rzv2m-csi: Add missing include Fabrizio Castro
2023-07-15  1:03 ` [PATCH 02/10] spi: rzv2m-csi: Adopt HZ_PER_MHZ for max spi clock Fabrizio Castro
2023-07-17  9:24   ` Geert Uytterhoeven
2023-07-15  1:04 ` [PATCH 03/10] spi: rzv2m-csi: Rework CSI_CKS_MAX definition Fabrizio Castro
2023-07-17  9:27   ` Geert Uytterhoeven
2023-07-15  1:04 ` [PATCH 04/10] spi: rzv2m-csi: Leave readl_poll_timeout calls for last Fabrizio Castro
2023-07-17  9:29   ` Geert Uytterhoeven
2023-07-15  1:04 ` [PATCH 05/10] spi: rzv2m-csi: Replace unnecessary ternary operators Fabrizio Castro
2023-07-17  9:30   ` Geert Uytterhoeven
2023-07-15  1:04 ` [PATCH 06/10] spi: rzv2m-csi: Squash timing settings into one statement Fabrizio Castro
2023-07-15  7:54   ` Andy Shevchenko
2023-07-17 10:44     ` Fabrizio Castro
2023-07-17 11:15       ` Andy Shevchenko [this message]
2023-07-15  1:04 ` [PATCH 07/10] spi: rzv2m-csi: Switch to using {read,write}s{b,w} Fabrizio Castro
2023-07-17  9:37   ` Geert Uytterhoeven
2023-07-17 10:36     ` Fabrizio Castro
2023-07-17 11:18       ` Andy Shevchenko
2023-07-17 13:00         ` Fabrizio Castro
2023-07-17 16:31           ` Fabrizio Castro
2023-07-15  1:04 ` [PATCH 08/10] spi: rzv2m-csi: Improve data types and alignment Fabrizio Castro
2023-07-17  9:44   ` Geert Uytterhoeven
2023-07-15  1:04 ` [PATCH 09/10] spi: rzv2m-csi: Get rid of the x_trg{_words} tables Fabrizio Castro
2023-07-15  7:57   ` Andy Shevchenko
2023-07-17  9:49   ` Geert Uytterhoeven
2023-07-15  1:04 ` [PATCH 10/10] spi: rzv2m-csi: Make use of device_set_node Fabrizio Castro
2023-07-15  7:58   ` Andy Shevchenko
2023-07-17 15:05     ` Fabrizio Castro
2023-07-15  8:00 ` [PATCH 00/10] spi: rzv2m-csi: Code refactoring Andy Shevchenko
2023-07-18 18:46 ` (subset) " 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=CAHp75Ve7dHQVtYWvq8DjtGe+9nM_vkkmLj2-MUvwzozqOXAaTQ@mail.gmail.com \
    --to=andy.shevchenko@gmail.com \
    --cc=Chris.Paterson2@renesas.com \
    --cc=biju.das@bp.renesas.com \
    --cc=broonie@kernel.org \
    --cc=fabrizio.castro.jz@renesas.com \
    --cc=geert+renesas@glider.be \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=prabhakar.mahadev-lad.rj@bp.renesas.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.