linux-clk.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: <Claudiu.Beznea@microchip.com>
To: <alexandre.belloni@bootlin.com>
Cc: <mturquette@baylibre.com>, <sboyd@kernel.org>,
	<robh+dt@kernel.org>, <mark.rutland@arm.com>,
	<Nicolas.Ferre@microchip.com>, <linux-clk@vger.kernel.org>,
	<devicetree@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v3 2/4] clk: at91: sckc: add support to specify registers bit offsets
Date: Mon, 20 May 2019 08:54:24 +0000	[thread overview]
Message-ID: <8900ba46-7166-2b5e-961b-3786121c845f@microchip.com> (raw)
In-Reply-To: <20190517211336.GB7685@piout.net>



On 18.05.2019 00:13, Alexandre Belloni wrote:
> External E-Mail
> 
> 
> On 16/05/2019 08:10:34+0000, Claudiu.Beznea@microchip.com wrote:
>>>> @@ -69,10 +80,11 @@ static int clk_slow_osc_prepare(struct clk_hw *hw)
>>>>  	void __iomem *sckcr = osc->sckcr;
>>>>  	u32 tmp = readl(sckcr);
>>>>  
>>>> -	if (tmp & (AT91_SCKC_OSC32BYP | AT91_SCKC_OSC32EN))
>>>> +	if (tmp & (AT91_SCKC_OSC32BYP(osc->bits) |
>>>> +		   AT91_SCKC_OSC32EN(osc->bits)))
>>>
>>> I still find that:
>>>
>>> 	if (tmp & (osc->bits->cr_osc32byp | osc->bits->cr_osc32en))
>>>
>>> would be shorter and easier to read and still fits on one line.
>>
>> Agree, but I thought to use the same interface everywhere. Anyway, tell me
>> if you want to resend with these changes.
>>
> My comment applies to all the AT91_SCKC_.*() macros. I don't feel that
> the macros make the code clearer, accessing bits->cr_.* is self
> documenting enough (and makes the code shorter).

OK, I'll send a new version taking this into consideration.

> 

  reply	other threads:[~2019-05-20  8:54 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-10 11:23 [PATCH v3 0/4] add slow clock support for SAM9X60 Claudiu.Beznea
2019-05-10 11:23 ` [PATCH v3 1/4] clk: at91: sckc: sama5d4 has no bypass support Claudiu.Beznea
2019-05-10 20:11   ` Alexandre Belloni
2019-05-10 11:23 ` [PATCH v3 2/4] clk: at91: sckc: add support to specify registers bit offsets Claudiu.Beznea
2019-05-10 21:32   ` Alexandre Belloni
2019-05-16  8:10     ` Claudiu.Beznea
2019-05-17 21:13       ` Alexandre Belloni
2019-05-20  8:54         ` Claudiu.Beznea [this message]
2019-05-10 11:23 ` [PATCH v3 3/4] dt-bindings: clk: at91: add bindings for SAM9X60's slow clock controller Claudiu.Beznea
2019-05-10 21:33   ` Alexandre Belloni
2019-05-13 17:48   ` Rob Herring
2019-05-10 11:23 ` [PATCH v3 4/4] clk: at91: sckc: add support for SAM9X60 Claudiu.Beznea
2019-05-10 21:42   ` Alexandre Belloni

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=8900ba46-7166-2b5e-961b-3786121c845f@microchip.com \
    --to=claudiu.beznea@microchip.com \
    --cc=Nicolas.Ferre@microchip.com \
    --cc=alexandre.belloni@bootlin.com \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mturquette@baylibre.com \
    --cc=robh+dt@kernel.org \
    --cc=sboyd@kernel.org \
    /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).