mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Kalle Valo <kvalo@kernel.org>
To: David Mosberger-Tang <davidm@egauge.net>
Cc: Claudiu.Beznea@microchip.com, Ajay.Kathat@microchip.com,
	adham.abozaeid@microchip.com, davem@davemloft.net,
	devicetree@vger.kernel.org, kuba@kernel.org,
	linux-kernel@vger.kernel.org, linux-wireless@vger.kernel.org,
	netdev@vger.kernel.org, robh+dt@kernel.org
Subject: Re: [PATCH v5 1/2] wilc1000: Add reset/enable GPIO support to SPI driver
Date: Mon, 20 Dec 2021 10:46:43 +0200	[thread overview]
Message-ID: <87bl1bmznw.fsf@tynnyri.adurom.net> (raw)
In-Reply-To: <938a54814087ca8c4b4011c2f418e773baf2b228.camel@egauge.net> (David Mosberger-Tang's message of "Thu, 16 Dec 2021 08:26:22 -0700")

David Mosberger-Tang <davidm@egauge.net> writes:

> On Thu, 2021-12-16 at 10:10 +0200, Kalle Valo wrote:
>> David Mosberger-Tang <davidm@egauge.net> writes:
>> 
>> > > > +       } else {
>> > > > +               gpiod_set_value(gpios->reset, 1);       /* assert RESET */
>> > > > +               gpiod_set_value(gpios->enable, 0);      /* deassert ENABLE */
>> > > 
>> > > I don't usually see comments near the code line in kernel. Maybe move them
>> > > before the actual code line or remove them at all as the code is impler enough?
>> > 
>> > You're kidding, right?
>> 
>> I agree with Claudiu, the comments are not really providing more
>> information from what can be seen from the code. And the style of having
>> the comment in the same line is not commonly used in upstream.
>
> The code is obvious if you think of 1 as "assert" and 0 as "deassert".  It looks
> utterly wrong if you think of 1 as outputting 3.3V and 0 as outputting 0V.

Yeah, I guess for people who are more hardware orientated that looks
wrong :)

> But if you insist, I'll remove the comments.

I don't insist removing the comments, but please move them to their own
line so that the style is consistent.

-- 
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

  reply	other threads:[~2021-12-20  8:46 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-15  3:05 [PATCH v5 0/2] " David Mosberger-Tang
2021-12-15  3:05 ` [PATCH v5 1/2] " David Mosberger-Tang
2021-12-15  6:41   ` Claudiu.Beznea
2021-12-15 14:59     ` David Mosberger-Tang
2021-12-16  7:08       ` Claudiu.Beznea
2021-12-16  8:10       ` Kalle Valo
2021-12-16 15:26         ` David Mosberger-Tang
2021-12-20  8:46           ` Kalle Valo [this message]
2021-12-15  3:05 ` [PATCH v5 2/2] wilc1000: Document enable-gpios and reset-gpios properties David Mosberger-Tang
2021-12-16 19:00   ` Rob Herring
2021-12-15  5:37 ` [PATCH v5 0/2] wilc1000: Add reset/enable GPIO support to SPI driver Claudiu.Beznea
2021-12-15 14:48   ` David Mosberger-Tang
2021-12-16  8:03 ` Claudiu.Beznea

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=87bl1bmznw.fsf@tynnyri.adurom.net \
    --to=kvalo@kernel.org \
    --cc=Ajay.Kathat@microchip.com \
    --cc=Claudiu.Beznea@microchip.com \
    --cc=adham.abozaeid@microchip.com \
    --cc=davem@davemloft.net \
    --cc=davidm@egauge.net \
    --cc=devicetree@vger.kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=robh+dt@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

all inboxes | Powered by JetHome®