From patchwork Tue Jun 28 17:41:15 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vincent Knecht X-Patchwork-Id: 586209 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 81E20CCA481 for ; Tue, 28 Jun 2022 18:03:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234070AbiF1SDI (ORCPT ); Tue, 28 Jun 2022 14:03:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48022 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233961AbiF1SCv (ORCPT ); Tue, 28 Jun 2022 14:02:51 -0400 Received: from msg-2.mailo.com (msg-2.mailo.com [213.182.54.12]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AA4E512AF1; Tue, 28 Jun 2022 11:02:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=mailoo.org; s=mailo; t=1656438116; bh=vDRo6n6+RakJAT66r0udKc/DY6YnG0bhUMMuNDc/DBg=; h=X-EA-Auth:From:To:Subject:Date:Message-Id:X-Mailer:MIME-Version: Content-Transfer-Encoding; b=eqKLt8wVQ067GjhlAfRjYE74up8K/4iRgOW3lGQxv8OijV82Y8rh373Rsg9mZ9H2F MJdB82WlNLLEMKWBrh6vcbfzO5j85xcgOQKNmTE7K5BX97kAiQb59djOw9e7xqszvA Il14Nk+awIe1MxjEGW+aqWINB1itt0ZqzmiEf4bc= Received: by b-1.in.mailobj.net [192.168.90.11] with ESMTP via [213.182.55.207] Tue, 28 Jun 2022 19:41:56 +0200 (CEST) X-EA-Auth: 3MnPSvpoD2/RL1zc5ouy3XYMkjEVCTTCl8Ut9aXrsEXN4e8K/L2YlCm2P6S7ZE9/Wb/R2eMxwXQjFrIOis7JX/Yzra+62uPGKB2sB7Si7EU= 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 Subject: [PATCH v1 0/7] Fix/Add is31fl319{0,1,3} support Date: Tue, 28 Jun 2022 19:41:15 +0200 Message-Id: <20220628174124.2819238-1-vincent.knecht@mailoo.org> X-Mailer: git-send-email 2.35.3 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-leds@vger.kernel.org The is31fl3190, is31fl3191 and is31fl3193 chips (1 or 3 PWM channels) cannot be handled the same as is31fl3196 and is31fl3199, if only because the register map is different. Also: - the software shutdown bit is reversed - and additional field needs to be set to enable all channels - the led-max-microamp current values and setting are not the same Datasheets: https://lumissil.com/assets/pdf/core/IS31FL3190_DS.pdf https://lumissil.com/assets/pdf/core/IS31FL3191_DS.pdf https://lumissil.com/assets/pdf/core/IS31FL3193_DS.pdf https://lumissil.com/assets/pdf/core/IS31FL3196_DS.pdf https://lumissil.com/assets/pdf/core/IS31FL3199_DS.pdf This series: - converts dt-bindings to dtschema, adding all si-en compatibles for convenience and consistency, and adding constraints on supported values for eg. reg address and led-max-microamp - changes vars, structs and defines to not use 319X suffix but 3190 for 319{0,1,3} and 3196 for 319{6,9} - adds fields in chipdef struct for chip-specific values - only in the last patch, adds is31fl319{0,1,3} specific values so those chips can work. Tested on msm8916-alcatel-idol347, which probably has an is31fl3190 or is31fl3191 (only one white led indicator). Vincent Knecht (7): dt-bindings: leds: Convert is31fl319x to dtschema dt-bindings: leds: is31fl319x: Add missing si-en compatibles leds: is31fl319x: Add missing si-en compatibles dt-bindings: leds: is31fl319x: Document variants specificities leds: is31fl319x: Use non-wildcard names for vars, structs and defines leds: is31fl319x: Move chipset-specific values in chipdef struct leds: is31fl319x: Add support for is31fl319{0,1,3} chips .../bindings/leds/issi,is31fl319x.yaml | 193 +++++++++ .../bindings/leds/leds-is31fl319x.txt | 61 --- drivers/leds/leds-is31fl319x.c | 406 +++++++++++++----- 3 files changed, 488 insertions(+), 172 deletions(-) create mode 100644 Documentation/devicetree/bindings/leds/issi,is31fl319x.yaml delete mode 100644 Documentation/devicetree/bindings/leds/leds-is31fl319x.txt