lkml.org 
[lkml]   [2020]   [Apr]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 2/4] clk: meson: meson8b: Fix the polarity of the RESET_N lines
Date

On Thu 16 Apr 2020 at 20:12, Martin Blumenstingl <martin.blumenstingl@googlemail.com> wrote:

> Hi Jerome,
>
> On Thu, Apr 16, 2020 at 12:38 PM Jerome Brunet <jbrunet@baylibre.com> wrote:
> [...]
>> >
>> > if (id >= ARRAY_SIZE(meson8b_clk_reset_bits))
>> > return -EINVAL;
>> >
>> > reset = &meson8b_clk_reset_bits[id];
>> >
>> > + if (assert == reset->active_low)
>> > + value = 0;
>> > + else
>> > + value = BIT(reset->bit_idx);
>>
>> if (assert ^ reset->active_low)
>> value = BIT(reset->bit_idx);
> I can do that, but I prefer "!=" over "^" because the result is
> expected to be a bool (and because I'm not used to reading "^" for
> logical comparisons)
> will this work for you as well?

yes

>
>
> Martin

\
 
 \ /
  Last update: 2020-04-17 09:46    [W:0.045 / U:0.000 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site