From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3903DC433E0 for ; Mon, 18 Jan 2021 12:42:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0859522AAA for ; Mon, 18 Jan 2021 12:42:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2404212AbhARMms (ORCPT ); Mon, 18 Jan 2021 07:42:48 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57854 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2404047AbhARMg5 (ORCPT ); Mon, 18 Jan 2021 07:36:57 -0500 Received: from albert.telenet-ops.be (albert.telenet-ops.be [IPv6:2a02:1800:110:4::f00:1a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2DCFFC0613CF for ; Mon, 18 Jan 2021 04:35:44 -0800 (PST) Received: from ramsan.of.borg ([84.195.186.194]) by albert.telenet-ops.be with bizsmtp id JCbi2400h4C55Sk06CbiEp; Mon, 18 Jan 2021 13:35:42 +0100 Received: from rox.of.borg ([192.168.97.57]) by ramsan.of.borg with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1l1Tl0-004aJd-3l; Mon, 18 Jan 2021 13:35:42 +0100 Received: from geert by rox.of.borg with local (Exim 4.93) (envelope-from ) id 1l1Tkz-002MtG-9f; Mon, 18 Jan 2021 13:35:41 +0100 From: Geert Uytterhoeven To: Robin van der Gracht , Rob Herring , Miguel Ojeda Sandonis Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Michael Kaplan , Geert Uytterhoeven Subject: [PATCH 1/3] dt-bindings: auxdisplay: ht16k33: Keyscan function should be optional Date: Mon, 18 Jan 2021 13:35:36 +0100 Message-Id: <20210118123538.564597-2-geert@linux-m68k.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210118123538.564597-1-geert@linux-m68k.org> References: <20210118123538.564597-1-geert@linux-m68k.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Robin van der Gracht Keyscan should be optional to support simple LED matrix displays (output only). Reported-by: Michael Kaplan Signed-off-by: Robin van der Gracht [geert: Rebased] Signed-off-by: Geert Uytterhoeven --- .../devicetree/bindings/display/ht16k33.txt | 11 +++++++---- drivers/auxdisplay/ht16k33.c | 14 ++++++-------- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/Documentation/devicetree/bindings/display/ht16k33.txt b/Documentation/devicetree/bindings/display/ht16k33.txt index d5a8b070b46779a4..3d602f5b9eb6bb74 100644 --- a/Documentation/devicetree/bindings/display/ht16k33.txt +++ b/Documentation/devicetree/bindings/display/ht16k33.txt @@ -4,16 +4,19 @@ Holtek ht16k33 RAM mapping 16*8 LED controller driver with keyscan Required properties: - compatible: "holtek,ht16k33" - reg: I2C slave address of the chip. -- interrupts: Interrupt specification for the key pressed interrupt. - refresh-rate-hz: Display update interval in HZ. -- debounce-delay-ms: Debouncing interval time in milliseconds. -- linux,keymap: The keymap for keys as described in the binding - document (devicetree/bindings/input/matrix-keymap.txt). Optional properties: - linux,no-autorepeat: Disable keyrepeat. - default-brightness-level: Initial brightness level [0-15] (default: 15). +- Keypad + Supply the 'interrupts' property to enable the keyscan feature. + - interrupts: Interrupt specification for the key pressed interrupt. + - debounce-delay-ms: Debouncing interval time in milliseconds. + - linux,keymap: The keymap for keys as described in the binding + document (devicetree/bindings/input/matrix-keymap.txt). + Example: &i2c1 { diff --git a/drivers/auxdisplay/ht16k33.c b/drivers/auxdisplay/ht16k33.c index d951d54b26f5239b..444f3b1019e3d425 100644 --- a/drivers/auxdisplay/ht16k33.c +++ b/drivers/auxdisplay/ht16k33.c @@ -402,11 +402,6 @@ static int ht16k33_probe(struct i2c_client *client, return -EIO; } - if (client->irq <= 0) { - dev_err(&client->dev, "No IRQ specified\n"); - return -EINVAL; - } - priv = devm_kzalloc(&client->dev, sizeof(*priv), GFP_KERNEL); if (!priv) return -ENOMEM; @@ -459,9 +454,12 @@ static int ht16k33_probe(struct i2c_client *client, if (err) goto err_fbdev_info; - err = ht16k33_keypad_probe(client, &priv->keypad); - if (err) - goto err_fbdev_unregister; + /* Keypad */ + if (client->irq > 0) { + err = ht16k33_keypad_probe(client, &priv->keypad); + if (err) + goto err_fbdev_unregister; + } /* Backlight */ memset(&bl_props, 0, sizeof(struct backlight_properties)); -- 2.25.1