From patchwork Fri May 19 13:04:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Kurbanov X-Patchwork-Id: 9571 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1227697vqo; Fri, 19 May 2023 06:17:02 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ58pnhtgkTowuIxLkl+YLgqmH1+uvZ28Fgw8CB+69Do+gyB607O5mSm+5JtQBvZ6ndCrnHP X-Received: by 2002:a17:90a:eb8a:b0:246:af1f:62ef with SMTP id o10-20020a17090aeb8a00b00246af1f62efmr2171712pjy.5.1684502222495; Fri, 19 May 2023 06:17:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684502222; cv=none; d=google.com; s=arc-20160816; b=RO86z9gUXz8QXHJ3E4tS7CtUJRMEeMADaAdSg4W08EDfxbBGp5AafoV+k1ROtnW0X/ S0E07rRxkr1c4gAMzOHkX3P20n+mda0ivK4lo9Sd5/KFCMSDYPV3mra/PZZFOFsR+GMY 9BxqGoXMR5O90EwJ+fgabVEkg7B9Ny5IW8kp3p6mPtvbe3zUBUCnaafcjmwZfYQAxlSY LqtTOPGcrqGkupxJH1cCw9VnnRh2ZFr4hnSDqsPZ0MveCmqcRZB73hm0hdZYQ/Nvs4wK 50e2BnGUUOe5PYX/sCbBRkigc2+Ozo492XLOaoSQc9xmttn3JSoiFAM39215gw6jdTq0 wxNQ== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=HCxGQu5Ziev+/+dwkAk9uiRJEtmR/ivN/N2cwWC5VjA=; b=Y9QZfPuEtkVpk44JJ155xU57gy5Hfau1E6ucbi+qUDnNfDFjDMnFd5PLN1cewprrsw jFsyXMPI0zR2AhopBO0aWMy0lLdfNSMAEpGWxAwI+6AKQRy1KcLOmxL3siFHKCe2+HkF zcBbzw3qkWhBLoe4IGn5HTtR9uFGus/Mv87wZPCewgIH4jTAiGPSZbzBcO/+fpkON/nF NM6928jenCws5aXE6j/lTUp5d8Rjwx4P39oaKZHTzQxPAszIg7Q2Q1bQGc3d0RAhSU4K lvoTAW9VAYu5wHXXdw20AIPvJ7nDwuJTca466A9laEFKc74MC1KPR0Y7FWbx+RQPYjsO c41g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sberdevices.ru header.s=mail header.b=reXJ6mUV; 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=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=sberdevices.ru Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x4-20020a17090a9dc400b0024e500f3749si1689594pjv.68.2023.05.19.06.16.50; Fri, 19 May 2023 06:17:02 -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=pass header.i=@sberdevices.ru header.s=mail header.b=reXJ6mUV; 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=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=sberdevices.ru Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231715AbjESNFM (ORCPT + 99 others); Fri, 19 May 2023 09:05:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40764 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231890AbjESNEu (ORCPT ); Fri, 19 May 2023 09:04:50 -0400 Received: from mx.sberdevices.ru (mx.sberdevices.ru [45.89.227.171]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DDAB3D8; Fri, 19 May 2023 06:04:46 -0700 (PDT) Received: from s-lin-edge02.sberdevices.ru (localhost [127.0.0.1]) by mx.sberdevices.ru (Postfix) with ESMTP id 547AD5FFBF; Fri, 19 May 2023 16:04:43 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sberdevices.ru; s=mail; t=1684501483; bh=HCxGQu5Ziev+/+dwkAk9uiRJEtmR/ivN/N2cwWC5VjA=; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type; b=reXJ6mUVe2iieQBpPvHF8R4YbJvTI/CcvfLfvRbHlRPY+rrbZrsXxgK8VM0UbQIz8 IQLMFEqX9aNnWwyid0tZvWr67lRMzo0j6Rj8MxRR4hNOuXD3un9ruaXFM3KQrPG2Ek ymCouz+W49XbpGnjbXa7RVudHbgTyvxeAyOsHpFjtus9k0DEX9ldm6P/o2l3fw3IOi ks5rbsBgv9Zx2QrUmbkYm+xgm+pcp5uzc11RaFy143rZCt4rXFXmVMEcFDk070RkfT fKTad92aCJ8NSc39x5GYVxBAAwRIgzfO3uq51SXR6yhe9i2TTZmUB1kH+objJmz4yC PgwcGgQKdcDnQ== Received: from S-MS-EXCH01.sberdevices.ru (S-MS-EXCH01.sberdevices.ru [172.16.1.4]) by mx.sberdevices.ru (Postfix) with ESMTP; Fri, 19 May 2023 16:04:42 +0300 (MSK) From: Martin Kurbanov To: Pavel Machek , Lee Jones , Rob Herring , Krzysztof Kozlowski , Andy Shevchenko CC: , , , , Martin Kurbanov Subject: [PATCH v5 0/2] leds: add aw20xx driver Date: Fri, 19 May 2023 16:04:01 +0300 Message-ID: <20230519130403.212479-1-mmkurbanov@sberdevices.ru> X-Mailer: git-send-email 2.40.0 MIME-Version: 1.0 X-Originating-IP: [172.16.1.6] X-ClientProxiedBy: S-MS-EXCH02.sberdevices.ru (172.16.1.5) To S-MS-EXCH01.sberdevices.ru (172.16.1.4) X-KSMG-Rule-ID: 4 X-KSMG-Message-Action: clean X-KSMG-AntiSpam-Status: not scanned, disabled by settings X-KSMG-AntiSpam-Interceptor-Info: not scanned X-KSMG-AntiPhishing: not scanned, disabled by settings X-KSMG-AntiVirus: Kaspersky Secure Mail Gateway, version 1.1.2.30, bases: 2023/05/19 06:43:00 #21342157 X-KSMG-AntiVirus-Status: Clean, skipped 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_NONE, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1766328026467978801?= X-GMAIL-MSGID: =?utf-8?q?1766328602352755549?= This patch series adds support for AWINIC AW20036/AW20054/AW20072 LED driver programmed via an I2C interface. This driver supports following AW200XX features: - Individual 64-level DIM currents Datasheet: aw20036 - https://www.awinic.com/en/productDetail/AW20036QNR#tech-docs aw20054 - https://www.awinic.com/en/productDetail/AW20054QNR#tech-docs aw20072 - https://www.awinic.com/en/productDetail/AW20072QNR#tech-docs Add YAML dt-binding schema for AW200XX. Changelog: v4 -> v5: - Cosmetic changes (rename aw200xx_probe_dt() to aw200xx_probe_fw() and etc) v3 -> v4: - Calculate the value of imax instead of retrieving it from a table - Cosmetic changes v2 -> v3: - Update datasheet links - Make cosmetic changes as Andy suggested at [1] v1 -> v2: - Remove the hardware pattern support (I will send a separate patch) - Support the 'led-max-microamp' property [1] https://lore.kernel.org/all/20230228211046.109693-1-mmkurbanov@sberdevices.ru/ Martin Kurbanov (2): dt-bindings: leds: add binding for aw200xx leds: add aw20xx driver .../testing/sysfs-class-led-driver-aw200xx | 5 + .../bindings/leds/awinic,aw200xx.yaml | 126 ++++ drivers/leds/Kconfig | 13 + drivers/leds/Makefile | 1 + drivers/leds/leds-aw200xx.c | 594 ++++++++++++++++++ 5 files changed, 739 insertions(+) create mode 100644 Documentation/ABI/testing/sysfs-class-led-driver-aw200xx create mode 100644 Documentation/devicetree/bindings/leds/awinic,aw200xx.yaml create mode 100644 drivers/leds/leds-aw200xx.c --- 2.40.0