linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzk@kernel.org>
To: Junjie Cao <caojunjie650@gmail.com>
Cc: Lee Jones <lee@kernel.org>, Daniel Thompson <danielt@kernel.org>,
	Jingoo Han <jingoohan1@gmail.com>,
	Pavel Machek <pavel@kernel.org>, Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>, Helge Deller <deller@gmx.de>,
	dri-devel@lists.freedesktop.org, linux-leds@vger.kernel.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-fbdev@vger.kernel.org
Subject: Re: [PATCH 1/2] dt-bindings: leds: backlight: Add Awinic AW99706 backlight
Date: Mon, 27 Oct 2025 09:38:23 +0100	[thread overview]
Message-ID: <c32970a8-c1d1-4130-839b-981bca5373f3@kernel.org> (raw)
In-Reply-To: <CAK6c68gqHMR-FpH3MY9E_9R+V0J75V9zOii=x81e+bRcnBYOig@mail.gmail.com>

On 27/10/2025 07:58, Junjie Cao wrote:
> On Sun, Oct 26, 2025 at 9:48 PM Krzysztof Kozlowski <krzk@kernel.org> wrote:
>>
>> On 26/10/2025 13:39, Junjie Cao wrote:
>>> +
>>> +  reg:
>>> +    maxItems: 1
>>> +
>>> +  enable-gpios:
>>> +    description: GPIO to use to enable/disable the backlight (HWEN pin).
>>> +    maxItems: 1
>>> +
>>> +  awinic,dim-mode:
>>> +    $ref: /schemas/types.yaml#/definitions/uint32
>>> +    description: >
>>> +      Select dimming mode of the device.
>>> +        0 = Bypass mode.
>>> +        1 = DC mode.
>>> +        2 = MIX mode.
>>> +        3 = MIX-26k.
>>> +    enum: [0, 1, 2, 3]
>>> +    default: 1
>>> +
>>> +  awinic,sw-freq:
>>
>> Please use proper units, see:
>> https://github.com/devicetree-org/dt-schema/blob/main/dtschema/schemas/property-units.yaml
>> and other examples
>>
>> Same everywhere else.
>>
> 
> ACK
> 
>>
>>> +    $ref: /schemas/types.yaml#/definitions/uint32
>>> +    description: Boost switching frequency in kHz.
>>> +    enum: [300, 400, 500, 600, 660, 750, 850, 1000, 1200, 1330, 1500, 1700]
>>> +    default: 750
>>> +
>>> +  awinic,sw-ilmt:
>>> +    $ref: /schemas/types.yaml#/definitions/uint32
>>> +    description: Switching current limitation in mA.
>>> +    enum: [1500, 2000, 2500, 3000]
>>> +    default: 3000
>>> +
>>> +  awinic,iled-max:
>>> +    $ref: /schemas/types.yaml#/definitions/uint32
>>> +    description: Maximum LED current setting in uA.
>>> +    minimum: 5000
>>> +    maximum: 50000
>>> +    multipleOf: 500
>>> +    default: 20000
>>> +
>>> +  awinic,uvlo-thres:
>>> +    $ref: /schemas/types.yaml#/definitions/uint32
>>> +    description: UVLO(Under Voltage Lock Out) in mV.
>>> +    enum: [2200, 5000]
>>> +    default: 2200
>>> +
>>> +  awinic,fade-time:
>>> +    $ref: /schemas/types.yaml#/definitions/uint32
>>> +    description: Fade In/Out Time(per step) in us.
>>> +    enum: [8, 16, 32, 64, 128, 256, 512, 1024]
>>
>> Why would this be fixed setting? This really looks like runtime, drop.
>>
> 
> Yes, it is fixed. I am quoting this from the datasheet.

Fixed per board.


> AW99706B provides Fade in/out mode to transform backlight from one brightness
> to another or turn on/off backlight with a fixed slope. Writing 0b00 into
> RAMP_CTR (CFG 0x06) to enter Fade in/out mode, and the the slope of current
> transition can be set in FADE_TIME (CFG 0x06).
> 
>>> +    default: 16
>>> +
>>> +  awinic,slope-time:
>>> +    $ref: /schemas/types.yaml#/definitions/uint32
>>> +    description: Slope time in ms.
>>
>> Slope of what?
>>
> 
> Ramp time in slope mode, it is retained from downstream drivers, it will
> be more clear in the next version.
> 
>>> +    enum: [8, 24, 48, 96, 200, 300, 400, 500]
>>> +    default: 300
>>> +
>>> +  awinic,ramp-ctl:
>>> +    $ref: /schemas/types.yaml#/definitions/uint32
>>> +    description: >
>>> +      Select ramp control and filter of the device.
>>> +        0 = Fade in/fade out.
>>> +        1 = Light filter.
>>> +        2 = Medium filter.
>>> +        3 = Heavy filter.
>>> +    enum: [0, 1, 2, 3]
>>> +    default: 2
>>> +
>>> +  awinic,brt-mode:
>>> +    $ref: /schemas/types.yaml#/definitions/uint32
>>> +    description: >
>>> +      Select brightness control of the device.
>>> +        0 = PWM.
>>> +        1 = IIC.
>>> +        2 = IIC x PWM.
>>> +        3 = IIC x PWM(P-ramp).
>>> +    enum: [0, 1, 2, 3]
>>> +    default: 1
>>> +
>>> +  awinic,onoff-time:
>>> +    $ref: /schemas/types.yaml#/definitions/uint32
>>> +    description: Turn on/off time(per step) in ns.
>>> +    enum: [250, 500, 1000, 2000, 4000, 8000, 16000]
>>
>> Not a DT property.
>>
> 
> It is mandatory in the downstream driver, I keep it.

Huh? I don't care about downstream driver. Again, not a DT property. You
cannot add here runtime properties and when, we tell you that, you just
ignore our review.

NAK


> 
> The following is the description about it,
> 
> If the value in ONOFF_CTR(CFG 0x08 [4:3]) is 0b00, the turning on/off ramp of
> AW99706B is soft start and fast end. In this mode, the ramp time can be
> programmed by ONOFF_TIME (CFG 0x08 [2:0]).
> 
>>> +    default: 2000
>>> +
>>> +required:
>>> +  - compatible
>>> +  - reg
>>> +  - enable-gpios
>>> +
>>> +unevaluatedProperties: false
>>> +
>>> +examples:
>>> +  - |
>>> +    #include <dt-bindings/gpio/gpio.h>
>>> +
>>> +    i2c {
>>> +        #address-cells = <1>;
>>> +        #size-cells = <0>;
>>> +
>>> +        aw99706@76 {
>>> +            compatible = "awinic,aw99706";
>>> +            reg = <0x76>;
>>> +            enable-gpios = <&tlmm 88 GPIO_ACTIVE_HIGH>;
>>
>> Where are other properties from common.yaml? Looks like you re-invented
>> some parts.
>>
> 
> Sorry, I forgot it, when writing the bindings, I used ktz8866.yaml as a
> template. I  should have dropped the common.yaml. This driver does
> not require other properties in common.yaml.


I don't care about driver much, but anyway it should use common.yaml.
Please read the feedback very carefully.

Best regards,
Krzysztof

  reply	other threads:[~2025-10-27  8:38 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20251026123923.1531727-1-caojunjie650@gmail.com>
2025-10-26 12:39 ` [PATCH 1/2] dt-bindings: leds: backlight: Add Awinic AW99706 backlight Junjie Cao
2025-10-26 13:47   ` Krzysztof Kozlowski
2025-10-27  6:58     ` Junjie Cao
2025-10-27  8:38       ` Krzysztof Kozlowski [this message]
2025-10-27 10:29         ` Junjie Cao
2025-10-26 12:39 ` [PATCH 2/2] backlight: aw99706: Add support for " Junjie Cao
2025-10-27 12:06   ` kernel test robot
2025-10-27 18:59   ` kernel test robot
2025-10-28 13:22   ` Daniel Thompson
2025-10-29 11:49     ` Junjie Cao
2025-10-29 17:53       ` Daniel Thompson

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=c32970a8-c1d1-4130-839b-981bca5373f3@kernel.org \
    --to=krzk@kernel.org \
    --cc=caojunjie650@gmail.com \
    --cc=conor+dt@kernel.org \
    --cc=danielt@kernel.org \
    --cc=deller@gmx.de \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jingoohan1@gmail.com \
    --cc=krzk+dt@kernel.org \
    --cc=lee@kernel.org \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=pavel@kernel.org \
    --cc=robh@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;
as well as URLs for NNTP newsgroup(s).