From patchwork Fri Feb 25 21:09:10 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 12760939 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 ECA4BC433F5 for ; Fri, 25 Feb 2022 21:09:44 +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=Mp6zmuYhPJkAjFSN022hzQFG/90lx74ZE4ZM+d+QZuI=; b=jonEhTIiMVW1JF kMJ6TNHYOT+Yw85a48hk02hkmXzu/8Rf5eZJGQPRI7jpNXWYEbj5Hl/PWBbSKsGn26Fvr3qm0qL0e 0gnjQzfEfXaRwzIm09IMn44wC8SvyqA3X/Tkb1TJWsUm9SDIkEWK2iT5orZXGgwRyof1ZJ79+0njG UVuPt6H8mV6TLjWTSJ+NjJu/wjHyf3L23anZRvgFoqKpkib/1WFY5zV6HU89ScEKl2HK7AJNCQ4RB L8joAjK6sx5MtKR0WaJoNW9PuQb4CRKglOmzyjW/LShBAOZiNEsiAdi+I41TZRKLCzu+7JWr+YqZY ZBu+XxCNJN6IUN/87MWw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nNhqM-006zJk-Nf; Fri, 25 Feb 2022 21:09:38 +0000 Received: from mail-ed1-x531.google.com ([2a00:1450:4864:20::531]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nNhqA-006zI4-1E; Fri, 25 Feb 2022 21:09:27 +0000 Received: by mail-ed1-x531.google.com with SMTP id s14so9171148edw.0; Fri, 25 Feb 2022 13:09:19 -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=r+q3BnS/yso16BsfWpj6w5rHbh3h6hD4bXPBdy/jvnw=; b=SQL4BzgeZziN33zoc6V/odBjyMQxLclakUGEpkl/6UCYpqfkMIREM07lR4PB83NC93 1SX+v7FtmA9tMGYAeC06LGaulgvP43oncv6HMhI1e5YZN0fTVwXtNZ1Ed0QkKBkdRkrR U2aKy61UxG0yaWWyYOX/XfoQvyR2WMNJMtqGZOsvryyVl3uokTqWnct5m478wtKG13mI velXDoyOrmafbDCUejXxUUVtRgR13jQmi813xhv4hIjlXKPy1ZmU26YKC9GkP7gredi5 0VHzs7zthOKrXh2CRmKIXmuBMhSRQzdUAZPQxTcdT3dXAJOV7WnYkg+sQ6ZNgeKDAQL8 qmfQ== 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=r+q3BnS/yso16BsfWpj6w5rHbh3h6hD4bXPBdy/jvnw=; b=fDrznnsB2Q3YXOsz3KmlEiSYKI7qgRufe0Z925+6NheJFbYQNy3mG2tn1Zdg3+xTgZ sHRxNsiJ0kzmQXxroPojmN3gEcqOf8LjPfyT3AtMLUj+mmSWdRNhysWx1Zw91y9rLEU5 9qUqpY0uuSBBFTqBrGj4hOdgoqWUoG+KEBDapYRTOaORslZ4AwL0J3ta3Bxh31jGlXZZ ZjTsWcdUDNK0vW77nSeQAr/fN3yQKpgFUpw19pGHIabgtLwHRFYCNPmTphKqFoYDnd57 JnWziWMQRk8fiE/4ViCJYuPu9+Ru7B9CnAIEWJmfUn80qEoTPr7A43LGeMDlrWQsb5Fc kVUg== X-Gm-Message-State: AOAM532nwEpYPCVh7+maEl6h15KnQIiiOo5P+nazYbWGcQ8oXRSSIqZT in3QIPZSABAnZOT2pv4iQD4= X-Google-Smtp-Source: ABdhPJydKnvqx3rNZJ9qOOIWYHnadxaIIv4GvoIfoNio5jMICEuJlGcgOaL1GudECWijxYd8LzIKrg== X-Received: by 2002:a05:6402:50cb:b0:412:ab6d:c807 with SMTP id h11-20020a05640250cb00b00412ab6dc807mr8879863edb.382.1645823357711; Fri, 25 Feb 2022 13:09:17 -0800 (PST) Received: from ?IPV6:2a01:c22:7326:e100:c9d3:3c62:2c99:d44b? (dynamic-2a01-0c22-7326-e100-c9d3-3c62-2c99-d44b.c22.pool.telefonica.de. [2a01:c22:7326:e100:c9d3:3c62:2c99:d44b]) by smtp.googlemail.com with ESMTPSA id r3-20020aa7cb83000000b0040decce18bdsm1838499edt.99.2022.02.25.13.09.16 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 25 Feb 2022 13:09:17 -0800 (PST) Message-ID: <90668779-b53d-b3e7-5327-af11ff4a1d18@gmail.com> Date: Fri, 25 Feb 2022 22:09:10 +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 v5 0/6] 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-20220225_130926_107674_FADE433C X-CRM114-Status: GOOD ( 14.24 ) X-BeenThere: linux-amlogic@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-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=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 v4: - add patch for MAINTAINERS entry - incorporate Miguel's review comments - Replace Co-Developed-by with Co-developed-by (checkpatch) v5: - add vendor prefix to driver-specific dt properties Andreas Färber (1): dt-bindings: vendor-prefixes: Add Titan Micro Electronics Heiner Kallweit (5): 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 MAINTAINERS: Add entry for tm1628 auxdisplay driver .../testing/sysfs-devices-auxdisplay-tm1628 | 7 + .../bindings/auxdisplay/titanmec,tm1628.yaml | 92 +++++ .../devicetree/bindings/vendor-prefixes.yaml | 2 + MAINTAINERS | 7 + .../dts/amlogic/meson-gxl-s905w-tx3-mini.dts | 59 +++ drivers/auxdisplay/Kconfig | 11 + drivers/auxdisplay/Makefile | 1 + drivers/auxdisplay/tm1628.c | 376 ++++++++++++++++++ 8 files changed, 555 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