linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Han Jingoo <jingoohan1@gmail.com>
To: Andy Shevchenko <andy.shevchenko@gmail.com>,
	torvalds@linux-foundation.org,
	 Andrew Morton <akpm@linux-foundation.org>,
	Joe Perches <joe@perches.com>,
	Julia.Lawall@inria.fr,  krzysztof.kozlowski@linaro.org
Cc: ChiaEn Wu <peterwu.pub@gmail.com>,
	lee@kernel.org,  Daniel Thompson <daniel.thompson@linaro.org>,
	Pavel Machek <pavel@ucw.cz>,  Rob Herring <robh+dt@kernel.org>,
	 Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	 Matthias Brugger <matthias.bgg@gmail.com>,
	Sebastian Reichel <sre@kernel.org>,
	 Jonathan Cameron <jic23@kernel.org>,
	Lars-Peter Clausen <lars@metafoo.de>,
	Helge Deller <deller@gmx.de>,  Mark Brown <broonie@kernel.org>,
	mazziesaccount@gmail.com,  andriy.shevchenko@linux.intel.com,
	ChiaEn Wu <chiaen_wu@richtek.com>,
	 Alice Chen <alice_chen@richtek.com>,
	ChiYuan Huang <cy_huang@richtek.com>,
	 dri-devel <dri-devel@lists.freedesktop.org>,
	 Linux LED Subsystem <linux-leds@vger.kernel.org>,
	devicetree <devicetree@vger.kernel.org>,
	 linux-arm Mailing List <linux-arm-kernel@lists.infradead.org>,
	 "moderated list:ARM/Mediatek SoC support"
	<linux-mediatek@lists.infradead.org>,
	 Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Linux PM <linux-pm@vger.kernel.org>,
	 linux-iio <linux-iio@vger.kernel.org>,
	 "open list:FRAMEBUFFER LAYER" <linux-fbdev@vger.kernel.org>,
	szuni chen <szunichen@gmail.com>
Subject: Re: [PATCH v9 09/10] leds: flash: mt6370: Add MediaTek MT6370 flashlight support
Date: Fri, 23 Sep 2022 14:34:07 -0700	[thread overview]
Message-ID: <CAPOBaE7mcNqgQvsPpqewmq=Na9MC9RH5AW8CHn5ZJFAUsq6_eg@mail.gmail.com> (raw)
In-Reply-To: <CAHp75VeRgRdv54yO51nBwKx8O2pNLvOD2mrqn31zvx4ffSpCHw@mail.gmail.com>

On Wed, Sep 21, 2022 Andy Shevchenko <andy.shevchenko@gmail.com> wrote:
>
> On Wed, Sep 21, 2022 at 4:48 AM ChiaEn Wu <peterwu.pub@gmail.com> wrote:
> > On Sun, Sep 18, 2022 at 3:22 AM Han Jingoo <jingoohan1@gmail.com> wrote:
> > > On Mon, Aug 29, 2022 ChiaEn Wu <peterwu.pub@gmail.com> wrote:
>
> > > > +#define MT6370_ITORCH_MIN_uA           25000
> > > > +#define MT6370_ITORCH_STEP_uA          12500
> > > > +#define MT6370_ITORCH_MAX_uA           400000
> > > > +#define MT6370_ITORCH_DOUBLE_MAX_uA    800000
> > > > +#define MT6370_ISTRB_MIN_uA            50000
> > > > +#define MT6370_ISTRB_STEP_uA           12500
> > > > +#define MT6370_ISTRB_MAX_uA            1500000
> > > > +#define MT6370_ISTRB_DOUBLE_MAX_uA     3000000
> > >
> > > Use upper letters as below:
>
> For microseconds (and other -seconds) the common practice (I assume
> historically) is to use upper letters, indeed. But for current it's
> more natural to use small letters for unit multiplier as it's easier
> to read and understand.

(CC'ed Linus Torvalds, Andrew Morton, Joe Perches, Julia Lawall,
Krzysztof Kozlowski,)

Yep, it is common practice. Long time ago, I met the same problem on
how to present micro-ampere:
visibility vs coding practice. At that time, I followed the coding
practice. So, was there anyone who
rejected this decision to mix upper and lower letters when you gave
your comment last July?
If there is no objection, or most of maintainers and long-term
contributors agree with that,
I am ok with that.

To Tovalds, Andrew, Joe, Julia, Krzysztof,

I just need your feedback on coding styles. Are you ok with mixing
upper and lower letters for visibility
to present micro-seconds or micro-ampere? Andy (one of very-active
contributors) gives his opinion that
mixing upper and lower letters can be acceptable. I remain neutral on
this coding style issue.

e.g., #define MT6370_ITORCH_DOUBLE_MAX_uA    800000

Thank you.

Best regards,
Jingoo Han

>
> > > #define MT6370_ITORCH_MIN_UA           25000
> > > #define MT6370_ITORCH_STEP_UA          12500
> > > #define MT6370_ITORCH_MAX_UA           400000
> > > #define MT6370_ITORCH_DOUBLE_MAX_UA    800000
> > > #define MT6370_ISTRB_MIN_UA            50000
> > > #define MT6370_ISTRB_STEP_UA           12500
> > > #define MT6370_ISTRB_MAX_UA            1500000
> > > #define MT6370_ISTRB_DOUBLE_MAX_UA     3000000
> > >
> > > > +#define MT6370_STRBTO_MIN_US           64000
> > > > +#define MT6370_STRBTO_STEP_US          32000
> > > > +#define MT6370_STRBTO_MAX_US           2432000
> >
> > Hi Jingoo,
> >
> > This coding style is in accordance with Andy's opinion in this mail:
> > https://lore.kernel.org/linux-arm-kernel/CAHp75Vciq4M4kVrabNV9vTLLcd1vR=bMe8JLEdAF9MkRTpcB5g@mail.gmail.com/
>
> True.
>
> --
> With Best Regards,
> Andy Shevchenko

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2022-09-23 21:35 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-30  3:40 [PATCH v9 01/10] dt-bindings: power: supply: Add MediaTek MT6370 Charger ChiaEn Wu
2022-08-30  3:40 ` [PATCH v9 02/10] dt-bindings: leds: mt6370: Add MediaTek MT6370 current sink type LED indicator ChiaEn Wu
2022-08-30  3:40 ` [PATCH v9 03/10] dt-bindings: leds: Add MediaTek MT6370 flashlight ChiaEn Wu
2022-08-30  3:40 ` [PATCH v9 04/10] dt-bindings: backlight: Add MediaTek MT6370 backlight ChiaEn Wu
2022-09-05 15:18   ` Lee Jones
2022-08-30  3:40 ` [PATCH v9 05/10] lib: add linear range index macro ChiaEn Wu
2022-08-30 10:22   ` Matti Vaittinen
2022-08-30  3:40 ` [PATCH v9 06/10] iio: adc: mt6370: Add MediaTek MT6370 support ChiaEn Wu
2022-08-30  3:40 ` [PATCH v9 07/10] power: supply: mt6370: Add MediaTek MT6370 charger driver ChiaEn Wu
2022-08-30 10:34   ` Matti Vaittinen
2022-08-30  3:40 ` [PATCH v9 08/10] leds: rgb: mt6370: Add MediaTek MT6370 current sink type LED Indicator support ChiaEn Wu
2022-08-30  3:40 ` [PATCH v9 09/10] leds: flash: mt6370: Add MediaTek MT6370 flashlight support ChiaEn Wu
2022-08-30  8:49   ` AngeloGioacchino Del Regno
     [not found]   ` <CAPOBaE7rz2F-sij-LbYau6TRxFoOfmoUc=R__Z7iUrFWmZPgrg@mail.gmail.com>
2022-09-21  1:48     ` ChiaEn Wu
2022-09-21 11:47       ` Andy Shevchenko
2022-09-23 21:34         ` Han Jingoo [this message]
2022-09-23 22:02           ` Joe Perches
2022-08-30  3:40 ` [PATCH v9 10/10] video: backlight: mt6370: Add MediaTek MT6370 support ChiaEn Wu
2022-09-05 15:17   ` Lee Jones
2022-09-05 15:17   ` Lee Jones

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='CAPOBaE7mcNqgQvsPpqewmq=Na9MC9RH5AW8CHn5ZJFAUsq6_eg@mail.gmail.com' \
    --to=jingoohan1@gmail.com \
    --cc=Julia.Lawall@inria.fr \
    --cc=akpm@linux-foundation.org \
    --cc=alice_chen@richtek.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=andy.shevchenko@gmail.com \
    --cc=broonie@kernel.org \
    --cc=chiaen_wu@richtek.com \
    --cc=cy_huang@richtek.com \
    --cc=daniel.thompson@linaro.org \
    --cc=deller@gmx.de \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jic23@kernel.org \
    --cc=joe@perches.com \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=krzysztof.kozlowski@linaro.org \
    --cc=lars@metafoo.de \
    --cc=lee@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=matthias.bgg@gmail.com \
    --cc=mazziesaccount@gmail.com \
    --cc=pavel@ucw.cz \
    --cc=peterwu.pub@gmail.com \
    --cc=robh+dt@kernel.org \
    --cc=sre@kernel.org \
    --cc=szunichen@gmail.com \
    --cc=torvalds@linux-foundation.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).