Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2468350pxb; Mon, 18 Jan 2021 20:13:09 -0800 (PST) X-Google-Smtp-Source: ABdhPJxuk5TY0vQuDvzYZOkLBjKXkHYuRoE5ryKgkHF6JsTHRj79XsSFjXk+gO1aHmGKZIiNeo9O X-Received: by 2002:a17:906:65a:: with SMTP id t26mr1682900ejb.394.1611029589106; Mon, 18 Jan 2021 20:13:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611029589; cv=none; d=google.com; s=arc-20160816; b=W+vxH8uYtW+JbtQ42IIc2pI6QeOo66Alq7qVnTVPbYAJ2CNAblbIJGjPy30HWcZGkX Y0cxRlKkFKXjP8J5V0SKss9kWw1jitD2mKqDwL12Yoxni+W7p0Rr6MnNNfi5/o9aXntc x92We5nEneHSl07Kv+XYspoJEKiSy3Yd1yEu67fvZqKfrtK6spams/a493dsKLOqfkIz 4lKzY/kL7hhlKeXaprwrWWa3k5fO44qAhL3jx+LOERvAPv6zlikgeEF1oFjVgUG79wQk KpxQ0Bqvz/nCNrtfP/E3yZsVUTHi67zEtduNx3mEbjSBJyAhqDZDWWbvlM3E5SveiLxa ILEg== 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; bh=Ee/DNeKB5tsoH5asu3GvuIDaTT+JaWnzr+PbzivV0GA=; b=jCMKjDEb6Rs44oRxX3oJaHxup4q62REMLnYJ7spMD1tZ5ezsvsWtJVqIHM2WtB5WZS A4hZsh2MTd5PiZodn5HcTl2214dbHamqExf3IeFHiSSOurDuJZ+KnepsuJhnISFPKz42 YzMqR/s8Cl/lTAb+9t8VcZW6tAEpEXEqXLRgiBSngF1TFCZfYoCap4/6w3Ta7zBtnby0 AVXLXJInr5fpUGzE4yC1t/hcGlcZIFDu2oQRb2sUGPVmxrPIVMCDP/O42RVLvnUgPvvf me6X/BIGxAYUNDWXv4lLGUiWm58SjJVaniucyZcjeQzdkmZ9ihRWk/BZqyLMtZitLx3u +3bg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b24si1134542edx.243.2021.01.18.20.12.46; Mon, 18 Jan 2021 20:13:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2404200AbhARMmm (ORCPT + 99 others); Mon, 18 Jan 2021 07:42:42 -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