Re: [PATCH v9 09/10] leds: flash: mt6370: Add MediaTek MT6370 flashlight support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Sep 21, 2022 Andy Shevchenko <andy.shevchenko@xxxxxxxxx> wrote:
>
> On Wed, Sep 21, 2022 at 4:48 AM ChiaEn Wu <peterwu.pub@xxxxxxxxx> wrote:
> > On Sun, Sep 18, 2022 at 3:22 AM Han Jingoo <jingoohan1@xxxxxxxxx> wrote:
> > > On Mon, Aug 29, 2022 ChiaEn Wu <peterwu.pub@xxxxxxxxx> 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@xxxxxxxxxxxxxx/
>
> True.
>
> --
> With Best Regards,
> Andy Shevchenko



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux