From patchwork Wed Feb 23 17:56:35 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 12757244 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0960FC433F5 for ; Wed, 23 Feb 2022 17:58:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:Subject:From:MIME-Version:Date: Message-ID:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=5zkNDyk4m3LalE5oItXOupS3I7SLcORvm5hmix1zasg=; b=G2hBZ1ttx30xsV 7fmpQkOwf88Vz7LzPEsYUwlMZfa++jgrqbNPi87LTOu0ATFxzxqNFfW556gw5fMsT0YH4BG5ioU2+ RfrxloIVV6xGKHuG3AdmWLiTh0zseF/OMBHfsolD6exlDuBStAR9U7BwUCqzN9nVK1l1M2X4INa/M ezQrvZXCXiuAAOXzyqi2b1uQJz/a9km9TVlomllCll24cNT75KoRBctDXPCp7QvSMvgYxXMSQXyHg Rrm+Lt3L8vuB1ie+xpMJSy5d5Hqleqa4+MGn3f1BF10xER+EXzDFDPfxdSCF+GfV14k+0yyIkjAUC 39JZVS9Ev2vgwSS0kC1g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nMvsf-00Fc7v-FJ; Wed, 23 Feb 2022 17:56:49 +0000 Received: from mail-ej1-x632.google.com ([2a00:1450:4864:20::632]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nMvsZ-00Fc6i-RU; Wed, 23 Feb 2022 17:56:45 +0000 Received: by mail-ej1-x632.google.com with SMTP id gb39so54240111ejc.1; Wed, 23 Feb 2022 09:56:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:date:mime-version:user-agent:from:subject:to:cc :content-language:content-transfer-encoding; bh=/PO6oqBBGLbyvnqDkql90p5GH0BalUjP2WrLAq+W6DM=; b=X3C0wg3eFLnHA9PM74bynyVtyRjKYKBcIwrmbsmKgoypi6OAPm98mCcej94ww9OypS YwcLXyfFURJcodXTmmH8Ai05ohGE2Zsjk+lH3/Ui5KYWDtGZbcnVKDU7hn3kfcdCrQ5X BDwTE5FjAY/fEwAYlXmrK5bv917qFcFlc/QrKSX4yl0uIQEHdiOz0bMb0xY6cc9R2bqo 9/ArYoxhOekhmKcf/2cPKEPqVpXxpmdLygDk1Ris0ZFweTk08cbJk1vqSZcTSJCzHi3r t/1uvCd2dYqvNPAwpV5BzJiOyXSD0dJ6uJ54DRIj5dIfayiS+5OOv9CBX7xwwgAiEY/2 /0Iw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:from :subject:to:cc:content-language:content-transfer-encoding; bh=/PO6oqBBGLbyvnqDkql90p5GH0BalUjP2WrLAq+W6DM=; b=u+y6uUyMmd7k2Nae/S5O2TqHLRSRtN9jEyr4EjNuLQDeqXhQYc1ZVAf8kksz8T5RNO zzHXFqkUCW0+69xiuZq6o1t6qrrh937cgw5YAnn6p972Sb34W7E6CR4BMNZsZmkLQZdb QiIHby+0oBWz2l4W+i6r2Snj993RrxWZX8SA/pDCPC8fWGp0gQwl1kDDG4Ft5mhl6ybo p5JEuNxjxt8hLbtPqRZFCZ66MM5PR6dxXH4coqdtrZf3vP/paQb9QEAefBESgTxFAJwE oMW4rO29yhKYGy6jHP2a4KE+q9Cew4GI+pJKemSBL+GEjd91NGdEc4UlAIEjdIsF7Xds oJIA== X-Gm-Message-State: AOAM5328hwfCR7rzmHFmOR0zVt/dEP6JuHUhUT5OaWNDQMyHR+cT9whE I/SRbHNF8Gq1p7R4O+qtmcVHRM3Jbng= X-Google-Smtp-Source: ABdhPJyKbqAtnZB6CoBgZ25tIKyZpF49TmXYoUgQOdRxHjja/3AY3gCHBz6ChJ9vPCjvUTj9+IdTDQ== X-Received: by 2002:a17:906:848f:b0:6cf:7234:8ae with SMTP id m15-20020a170906848f00b006cf723408aemr686250ejx.620.1645639001900; Wed, 23 Feb 2022 09:56:41 -0800 (PST) Received: from ?IPV6:2003:ea:8f4d:2b00:d12c:c0a:f603:b44d? (p200300ea8f4d2b00d12c0c0af603b44d.dip0.t-ipconnect.de. [2003:ea:8f4d:2b00:d12c:c0a:f603:b44d]) by smtp.googlemail.com with ESMTPSA id j6sm141682eje.158.2022.02.23.09.56.40 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 23 Feb 2022 09:56:41 -0800 (PST) Message-ID: <4eb7b036-a9b9-3bd2-4e84-f56ba4b1a740@gmail.com> Date: Wed, 23 Feb 2022 18:56:35 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.6.1 From: Heiner Kallweit Subject: [PATCH v3 0/5] auxdisplay: Add support for the Titanmec TM1628 7 segment display controller To: Rob Herring , Krzysztof Kozlowski , =?utf-8?q?Andreas_?= =?utf-8?q?F=C3=A4rber?= , Miguel Ojeda Cc: "linux-spi@vger.kernel.org" , "devicetree@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "open list:ARM/Amlogic Meson..." , Jerome Brunet , Martin Blumenstingl , Kevin Hilman , Neil Armstrong , Geert Uytterhoeven Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220223_095643_921981_A0245F3E X-CRM114-Status: GOOD ( 15.09 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org This series adds support for the Titanmec TM1628 7 segment display controller. It's based on previous RFC work from Andreas Färber. The RFC version placed the driver in the LED subsystem, but this was NAK'ed by the LED maintainer. Therefore I moved the driver to /drivers/auxdisplay what seems most reasonable to me. Further changes to the RFC version: - Driver can be built also w/o LED class support, for displays that don't have any symbols to be exposed as LED's. - Simplified the code and rewrote a lot of it. - Driver is now kind of a MVP, but functionality should be sufficient for most use cases. - Use the existing 7 segment support in uapi/linux/map_to_7segment.h as suggested by Geert Uytterhoeven. Note: There's a number of chips from other manufacturers that are almost identical, e.g. FD628, SM1628. Only difference I saw so far is that they partially support other display modes. TM1628: 6x12, 7x11 SM1628C: 4x13, 5x12, 6x11, 7x10 For typical displays on devices using these chips this difference shouldn't matter. Successfully tested on a TX3 Mini TV box that has an SM1628C and a display with 4 digits and 7 symbols. v2: - (re-)add Andreas' SoB to two patches - fix YAML issues - include ctype.h explicitly - add info message in probe() v3: - remove patch 1 because it has been applied via the SPI tree already - fix remaining YAML issues in patch 2 - follow Miguel's suggestion on usage of Co-Developed-by Andreas Färber (1): dt-bindings: vendor-prefixes: Add Titan Micro Electronics Heiner Kallweit (4): dt-bindings: auxdisplay: Add Titan Micro Electronics TM1628 docs: ABI: document tm1628 attribute display-text auxdisplay: add support for Titanmec TM1628 7 segment display controller arm64: dts: meson-gxl-s905w-tx3-mini: add support for the 7 segment display .../testing/sysfs-devices-auxdisplay-tm1628 | 7 + .../bindings/auxdisplay/titanmec,tm1628.yaml | 92 +++++ .../devicetree/bindings/vendor-prefixes.yaml | 2 + .../dts/amlogic/meson-gxl-s905w-tx3-mini.dts | 59 +++ drivers/auxdisplay/Kconfig | 10 + drivers/auxdisplay/Makefile | 1 + drivers/auxdisplay/tm1628.c | 376 ++++++++++++++++++ 7 files changed, 547 insertions(+) create mode 100644 Documentation/ABI/testing/sysfs-devices-auxdisplay-tm1628 create mode 100644 Documentation/devicetree/bindings/auxdisplay/titanmec,tm1628.yaml create mode 100644 drivers/auxdisplay/tm1628.c