Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp1356803imw; Sat, 9 Jul 2022 02:48:50 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sGkyz956yFSft7NRKql0J81MpZmQisqsRO0lIUnvJxky7qvVcByxmnSSFi4GLFKrjxp35g X-Received: by 2002:a17:90a:d581:b0:1ef:a1d5:9904 with SMTP id v1-20020a17090ad58100b001efa1d59904mr5142413pju.93.1657360129996; Sat, 09 Jul 2022 02:48:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657360129; cv=none; d=google.com; s=arc-20160816; b=HoSSKxTlG+A1vYGKT48yjl4aKoP4p7TqSGpVPk1JF/b4ZroyCwNwgJXUxXC3Qi8E0X LabT/j/OMUjSx5qV3hlasgQIVbzVhw0XXH+l5Hw5l/nuv+NnJSm9tWLPpaxZx/3XyuwZ AGcXDVvS+K33UZBO0Rv9iHt5uL9oV8WAkyC9W+x83FQ0hHxcIeHwZm4zHJVsncEovIt5 yMb8LEN1NcdyTrQxXwnPDwMmACjeEBY7HYtlh1jthxjUhQs1K+dlQuPFD59wim80tS/D PVLSELvTgeh9/bHV5wN2CSj3XSOFQt2mPTNNH2HZQ+5L92HnDVmMJZ5eVEGc1yIplDFC LG2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=DD++8qoEIWEmKuDkpZ4yMh+zjjY71ZjiUsRiag+4yUc=; b=ghtveZp0GvKBpLLcO6p8fG8kYjIy9vXAWn7zOG3lxtVBL5tqs2uXV9FkyBgSGE2QRC RgJXFwLzr50HvJxOvh9GDlKSIrDuAyCjz9IhpixuHBY49ftprSZ9ad9DdPdxUIoTFh05 f0Rd0Ga/PCH2QjkZ2jvOl00/TSgr78UDCD1+2n2m1sHrwF5lhgNK0mwZfPkjX7IqgRF+ MCpBZP8kj2W8bsTQBycCIt62ogpnYzg1n2QNlCHK7bpPmUEHMgbslXKtL2ORn40dVQ+w jJ9uCiOr1H/Be+vokdq/PfcwsV78YS55t8R5jwJDC6Iprl6rpKq4u6QFJT1AJmH1EGX7 DK0A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@mailoo.org header.s=mailo header.b=Z1H7Ls2F; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mailoo.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d126-20020a636884000000b00415d595a7eesi1400022pgc.446.2022.07.09.02.48.38; Sat, 09 Jul 2022 02:48:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=fail header.i=@mailoo.org header.s=mailo header.b=Z1H7Ls2F; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mailoo.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229587AbiGIJro (ORCPT + 99 others); Sat, 9 Jul 2022 05:47:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47214 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229528AbiGIJr1 (ORCPT ); Sat, 9 Jul 2022 05:47:27 -0400 Received: from msg-2.mailo.com (msg-2.mailo.com [213.182.54.12]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 57B6966B9B; Sat, 9 Jul 2022 02:47:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=mailoo.org; s=mailo; t=1657360023; bh=Obre5IIa+wQZbNnEgE6NenQzK6E616sCX+q9jkhLXDk=; h=X-EA-Auth:From:To:Cc:Subject:Date:Message-Id:X-Mailer:In-Reply-To: References:MIME-Version:Content-Transfer-Encoding; b=Z1H7Ls2FCcmFW/+4JjQQnGpvZo1kRj5kBT1+S0Ts5DxU7SBI7EJrsU+gF1MYQ7qZY GaalcZOrrcIoGMVcyJ2kfT+7EbR2TzgZ6jQolYqX25vvoUFHjzthAFhZD1c7oGhBnY m9ULAPZNOo14/LpJq0g+3nqKBOyyx8kQqVSxAgYo= Received: by b-5.in.mailobj.net [192.168.90.15] with ESMTP via [213.182.55.207] Sat, 9 Jul 2022 11:47:03 +0200 (CEST) X-EA-Auth: wf1NjvsjLOpPtEATFe5kJfj6bXmxyhGNXjjjQBXHcQWcToGINga8S4zUjvzsZ7aFkLHcz910ixuGwSt/4kvOeGQd5Yd/ky+6qvitiOk3/WY= From: Vincent Knecht To: Pavel Machek , Rob Herring , Krzysztof Kozlowski , Vincent Knecht , linux-leds@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: ~postmarketos/upstreaming@lists.sr.ht, phone-devel@vger.kernel.org, hns@goldelico.com, Rob Herring Subject: [PATCH v4 2/7] dt-bindings: leds: is31fl319x: Document variants specificities Date: Sat, 9 Jul 2022 11:46:35 +0200 Message-Id: <20220709094642.4078222-3-vincent.knecht@mailoo.org> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20220709094642.4078222-1-vincent.knecht@mailoo.org> References: <20220709094642.4078222-1-vincent.knecht@mailoo.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add si-en compatibles for all chip variants and add conditionals depending on compatibles to document variants specs: - possible reg addresses - whether audio-gain-db is supported or not - maximum number of leds - led-max-microamp values Reviewed-by: Rob Herring Signed-off-by: Vincent Knecht --- .../bindings/leds/issi,is31fl319x.yaml | 84 ++++++++++++++++++- 1 file changed, 82 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/leds/issi,is31fl319x.yaml b/Documentation/devicetree/bindings/leds/issi,is31fl319x.yaml index 0d684aeeb8cd..940333f2d69c 100644 --- a/Documentation/devicetree/bindings/leds/issi,is31fl319x.yaml +++ b/Documentation/devicetree/bindings/leds/issi,is31fl319x.yaml @@ -28,6 +28,10 @@ properties: - issi,is31fl3193 - issi,is31fl3196 - issi,is31fl3199 + - si-en,sn3190 + - si-en,sn3191 + - si-en,sn3193 + - si-en,sn3196 - si-en,sn3199 reg: @@ -61,8 +65,6 @@ patternProperties: maximum: 9 led-max-microamp: - default: 20000 - enum: [5000, 10000, 15000, 20000, 25000, 30000, 35000, 40000] description: Note that a driver will take the lowest of all LED limits since the chip has a single global setting. The lowest value @@ -71,6 +73,84 @@ patternProperties: and not the current, which will always have its peak value equal to led-max-microamp. +allOf: + - if: + properties: + compatible: + contains: + enum: + - issi,is31fl3190 + - issi,is31fl3191 + - issi,is31fl3193 + - si-en,sn3190 + - si-en,sn3191 + - si-en,sn3193 + then: + properties: + reg: + enum: [0x68, 0x69, 0x6a, 0x6b] + + audio-gain-db: false + + patternProperties: + "^led@[1-9]$": + properties: + led-max-microamp: + default: 42000 + enum: [5000, 10000, 17500, 30000, 42000] + else: + properties: + reg: + enum: [0x64, 0x65, 0x66, 0x67] + + patternProperties: + "^led@[1-9]$": + properties: + led-max-microamp: + default: 20000 + enum: [5000, 10000, 15000, 20000, 25000, 30000, 35000, 40000] + - if: + properties: + compatible: + contains: + enum: + - issi,is31fl3190 + - issi,is31fl3191 + - si-en,sn3190 + - si-en,sn3191 + then: + patternProperties: + "^led@[1-9]$": + properties: + reg: + maximum: 1 + - if: + properties: + compatible: + contains: + enum: + - issi,is31fl3193 + - si-en,sn3193 + then: + patternProperties: + "^led@[1-9]$": + properties: + reg: + maximum: 3 + - if: + properties: + compatible: + contains: + enum: + - issi,is31fl3196 + - si-en,sn3196 + then: + patternProperties: + "^led@[1-9]$": + properties: + reg: + maximum: 6 + required: - compatible - reg -- 2.35.3