From patchwork Mon Feb 21 20:19:21 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 12754108 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 E91E6C433F5 for ; Mon, 21 Feb 2022 20:20:43 +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:Subject:Cc:To: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=ScOiKpoPnQnjLK/QljZwdnKRPJAahGmopZPo/U+gt6M=; b=c+GXot0Loj8iHF Xtj5qq7zYo0Gloe0855vl33OqcBNjdiX79usE8rFR2epWIk48DpWaymEX1PV15zApolI3kR39ATcJ mjAZpBCAFLKNmY0VO1gxmK622qa26H68DKw8cCLE3ezfpE6uBfkI/tG7/nTkGuOKhBKm9mPDnRVZU cHkj34THl5e55ZjVtJxqOnNGTWbQOlEcL5dkvts5Q3CQbLVJwSURbPxfmb26xokVWIw3CV0InVWSS q4Rf+wGg799Hi1NZ6B+j2yBPmaDkI7hQrPKToQpbsC8NhIA2yQn1Nb27wflhKsXWKIuOujprgkPee 5nULCBDfQBfBAu2cc/Zw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nMF9c-0079qO-9W; Mon, 21 Feb 2022 20:19:28 +0000 Received: from mail-ed1-x52b.google.com ([2a00:1450:4864:20::52b]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nMF9Z-0079pn-0y; Mon, 21 Feb 2022 20:19:26 +0000 Received: by mail-ed1-x52b.google.com with SMTP id cm8so22096069edb.3; Mon, 21 Feb 2022 12:19:24 -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:to:cc:content-language :subject:content-transfer-encoding; bh=uzQB996Y6w229dzKjEpHtyaZ7eebPm32v5je8cXlqR4=; b=jVNl55HnQFSHL8r2zu48hDsc9I9R9lGA7ty4tBY0aCiODO0x2JBnfif39D/IPKhWXJ IeN0lLb6IxqKOeWIcVo85V096xgnBb7+RKdFBJLyVQYeg2WP6cQDBWvtoygheTEdrQSQ LbG6/5bqj2mo1gXAhzEmYpMZejCMfUh8/D0RINOB+klffi+dG6c7g5g5v0IkxEU3PDE6 fNYj9fBSrp44ZaxcWDCwFpDTvrjU4SQ1y5o8ytkmwq2r1ImNHVs+Ntp09ZIYS67+ak5z HI3PA4fTJdQw7UgvFh0unwn3HjfxJH9aju9Oy5hECnN8atFsAOyxI8qqvKF43vNl43mU +sZA== 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:to :cc:content-language:subject:content-transfer-encoding; bh=uzQB996Y6w229dzKjEpHtyaZ7eebPm32v5je8cXlqR4=; b=LxwZi700/U5MRYUp+EPrZVx9peAPilMPnKCrqZFCd3G/7Exe3pmnnXofyxJquRs41G tKRE4lzyevlFfFKh4zsG8s2CJtrNzJ9o9tTijZVqryD8b/n4zGmj/6hAgwzd07tq44Mw Zk4RiY+IY6yGuPiyjdn9/AomFqZV/J7notCTnlPSEMQquzzy1asrNFvKPs8FT01Y2EZW x0Jtq4+6WQft8YPjfphqfLuV+FPDIUBp9FyfH4JqVEwqplwwUu2RaP4Q8lGx5jwiw3MC r1cqovJel61LCZTkoWZz3CbAmbLDN7aq8TnYHKX4sGHv9ZOawrh1crRehsW/rDxuRqH6 SUzw== X-Gm-Message-State: AOAM530xYk3uII7tSEI9NDk3AY8jZjC9KrjFizsGWlyrO9yjdmhQWmrH AlDvjTGZYTOHGb0epvfpa+Q= X-Google-Smtp-Source: ABdhPJzSq41NOGFPIVddi9Ip9Vo0oSHcoCBoG7JmEJiUUAk3c9bVD79HtxuyXJdRc9xFd3VfjuPrJQ== X-Received: by 2002:a05:6402:c10:b0:40f:33cd:a39 with SMTP id co16-20020a0564020c1000b0040f33cd0a39mr23038572edb.234.1645474763115; Mon, 21 Feb 2022 12:19:23 -0800 (PST) Received: from ?IPV6:2003:ea:8f4d:2b00:b141:a0d:4aad:2a06? (p200300ea8f4d2b00b1410a0d4aad2a06.dip0.t-ipconnect.de. [2003:ea:8f4d:2b00:b141:a0d:4aad:2a06]) by smtp.googlemail.com with ESMTPSA id 23sm5681807ejf.175.2022.02.21.12.19.22 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 21 Feb 2022 12:19:22 -0800 (PST) Message-ID: <1f39432b-84e2-e6dc-a6b8-c48ad5cf2210@gmail.com> Date: Mon, 21 Feb 2022 21:19:21 +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 To: Mark Brown , Rob Herring , Krzysztof Kozlowski , =?utf-8?q?Andreas_?= =?utf-8?q?F=C3=A4rber?= , Geert Uytterhoeven , Miguel Ojeda , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl Cc: "linux-spi@vger.kernel.org" , "devicetree@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "open list:ARM/Amlogic Meson..." Content-Language: en-US Subject: [PATCH v2 0/6] auxdisplay: Add support for the Titanmec TM1628 7 segment display controller X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220221_121925_101417_1D973C99 X-CRM114-Status: GOOD ( 15.04 ) 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. To be decided is through which tree this series should go. I'd think SPI would be most suited, but that's a decision I leave up to the respective maintainers. 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() Andreas Färber (2): spi: gpio: Implement LSB First bitbang support 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 | 88 ++++ .../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 ++++++++++++++++++ drivers/spi/spi-bitbang-txrx.h | 66 +++ drivers/spi/spi-gpio.c | 42 +- 9 files changed, 642 insertions(+), 9 deletions(-) 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