Re: [PATCH 4/4] leds: lm3532: Introduce the lm3532 LED driver

From: Dan Murphy
Date: Mon Mar 11 2019 - 13:24:37 EST


Jacek

On 3/11/19 12:22 PM, Jacek Anaszewski wrote:
> Dan,
>
> One more thing I forgot to mention before.
>
> On 3/11/19 12:36 PM, Dan Murphy wrote:
>> Jacek
> [...]
>>
>>>> @@ -0,0 +1,72 @@
>>>> +/* SPDX-License-Identifier: GPL-2.0 */
>>>> +/* TI LM3532 LED driver
>>>> + * Copyright (C) 2019 Texas Instruments Incorporated - http://www.ti.com/
>>>> + */
>
> Let's have "//" comments here.
>

Like I said earlier in v2 this header went away.

And checkpatch takes issue with // in headers.

Unless they have removed that requirement.

Dan

>>>> +#ifndef __DT_BINDINGS_LEDS_LM3532_H
>>>> +#define __DT_BINDINGS_LEDS_LM3532_H
>>>> +
>>>> +#define LM3532_BL_MODE_MANUALÂÂÂ 0x00 /* "man" */
>>>> +#define LM3532_BL_MODE_ALSÂÂÂ 0x01 /* "als" */
>>>> +
>>>> +/* ALS Resistor Select */
>>>> +#define LM3532_IMP_HIGHÂÂÂÂÂÂÂ 0x00
>>>> +#define LM3532_IMP_37KÂÂÂÂÂÂÂ 0x01
>>>> +#define LM3532_IMP_18_5KÂÂÂ 0x02
>>>> +#define LM3532_IMP_12_33KÂÂÂ 0x03
>>>> +#define LM3532_IMP_9_25KÂÂÂ 0x04
>>>> +#define LM3532_IMP_7_4KÂÂÂÂÂÂÂ 0x05
>>>> +#define LM3532_IMP_6_17KÂÂÂ 0x06
>>>> +#define LM3532_IMP_5_29KÂÂÂ 0x07
>>>> +#define LM3532_IMP_4_63KÂÂÂ 0x08
>>>> +#define LM3532_IMP_4_11KÂÂÂ 0x09
>>>> +#define LM3532_IMP_3_7KÂÂÂÂÂÂÂ 0x0a
>>>> +#define LM3532_IMP_3_36KÂÂÂ 0x0b
>>>> +#define LM3532_IMP_3_08KÂÂÂ 0x0c
>>>> +#define LM3532_IMP_2_85KÂÂÂ 0x0d
>>>> +#define LM3532_IMP_2_64KÂÂÂ 0x0e
>>>> +#define LM3532_IMP_2_44KÂÂÂ 0x0f
>>>> +#define LM3532_IMP_2_31KÂÂÂ 0x10
>>>> +#define LM3532_IMP_2_18KÂÂÂ 0x11
>>>> +#define LM3532_IMP_2_06KÂÂÂ 0x12
>>>> +#define LM3532_IMP_1_95KÂÂÂ 0x13
>>>> +#define LM3532_IMP_1_85KÂÂÂ 0x14
>>>> +#define LM3532_IMP_1_76KÂÂÂ 0x15
>>>> +#define LM3532_IMP_1_68KÂÂÂ 0x16
>>>> +#define LM3532_IMP_1_61KÂÂÂ 0x17
>>>> +#define LM3532_IMP_1_54KÂÂÂ 0x18
>>>> +#define LM3532_IMP_1_48KÂÂÂ 0x19
>>>> +#define LM3532_IMP_1_42KÂÂÂ 0x1a
>>>> +#define LM3532_IMP_1_37KÂÂÂ 0x1b
>>>> +#define LM3532_IMP_1_32KÂÂÂ 0x1c
>>>> +#define LM3532_IMP_1_28KÂÂÂ 0x1d
>>>> +#define LM3532_IMP_1_23KÂÂÂ 0x1e
>>>> +#define LM3532_IMP_1_19KÂÂÂ 0x1f
>>>> +
>>>> +/* ALS Averaging Time */
>>>> +#define LM3532_ALS_AVRG_TIME_17_92msÂÂÂ 0x00
>>>> +#define LM3532_ALS_AVRG_TIME_35_84msÂÂÂ 0x01
>>>> +#define LM3532_ALS_AVRG_TIME_71_68msÂÂÂ 0x02
>>>> +#define LM3532_ALS_AVRG_TIME_143_36msÂÂÂ 0x03
>>>> +#define LM3532_ALS_AVRG_TIME_286_72msÂÂÂ 0x04
>>>> +#define LM3532_ALS_AVRG_TIME_573_44msÂÂÂ 0x05
>>>> +#define LM3532_ALS_AVRG_TIME_1146_88msÂÂÂ 0x06
>>>> +#define LM3532_ALS_AVRG_TIME_2293_76msÂÂÂ 0x07
>>>> +
>>>> +/* ALS input select */
>>>> +#define LM3532_ALS_INPUT_AVRGÂÂÂ 0x00 /* ALS1 and ALS2 input average */
>>>> +#define LM3532_ALS_INPUT_ALS1ÂÂÂ 0x01 /* ALS1 Input */
>>>> +#define LM3532_ALS_INPUT_ALS2ÂÂÂ 0x02 /* ALS2 Input */
>>>> +#define LM3532_ALS_INPUT_CEILÂÂÂ 0x03 /* Max of ALS1 and ALS2 */
>>>> +
>>>> +/* Ramp Times */
>>>> +#define LM3532_RAMP_8usÂÂÂÂÂÂÂ 0x00
>>>> +#define LM3532_RAMP_1024usÂÂÂ 0x01
>>>> +#define LM3532_RAMP_2048usÂÂÂ 0x02
>>>> +#define LM3532_RAMP_4096usÂÂÂ 0x03
>>>> +#define LM3532_RAMP_8192usÂÂÂ 0x04
>>>> +#define LM3532_RAMP_16384usÂÂÂ 0x05
>>>> +#define LM3532_RAMP_32768usÂÂÂ 0x06
>>>> +#define LM3532_RAMP_65536usÂÂÂ 0x07
>>>> +
>>>> +#endif /* __DT_BINDINGS_LEDS_LM3532_H */
>>>>
>>>
>>
>>
>


--
------------------
Dan Murphy