From patchwork Thu Dec 12 03:39:35 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Andreas_F=C3=A4rber?= X-Patchwork-Id: 181387 Delivered-To: patch@linaro.org Received: by 2002:a92:3001:0:0:0:0:0 with SMTP id x1csp371259ile; Wed, 11 Dec 2019 19:40:03 -0800 (PST) X-Google-Smtp-Source: APXvYqzPrzOwcOBoXvaEoGCzMJciPq+NuSpTqCJ59kZEa0ipHs23pRZfSteOpMnk8G5sDOku5FyR X-Received: by 2002:a05:6830:1097:: with SMTP id y23mr5577496oto.332.1576122003185; Wed, 11 Dec 2019 19:40:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576122003; cv=none; d=google.com; s=arc-20160816; b=AGu6UtWOY/SD790y2nQ1KJ1MNR3y64Vt3aQchvaXSJUmEcTmDvFt/E6QZ4zp3oRYhQ h7O6h7yqCOOO86H9LIPt7jH8L1SrgFPeqMIiDvL1XFYMvqPfmnTonudX2C6AGkNippJH 1MIevIg/hOPM+O7chEjotGmJnMpXjUa6dKQZmiCuGxpZp/mefpDwpCgALZa6XbIBQcF3 Cb2jcjooqW/I9FYduMNrJ0R6vWMiexjZnqFrrcf7G6ceCXfO8LaOlf77qb1KnfSnh8+1 j6lXu1Bxmdnj0lt8lT2HVSkEh1YrpKrli0YzQjMqBA79xo9FNT51n0crbpxHfO842K65 63GA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=qBeMkhUAL1dfrOKAar3jWIL839GnCBAJ4d7KG00ifOc=; b=w36f5UqnCutnncMCo6Sv95uSbN7g4guCVnrOqChhZMEx7TbYTMA2DFJblRf/jmuTyy PMvC1pumGEhm8ItZz56FGZsFFgL23oHTWJ1NMIfwol02Nbz4bDXn2Vtf0yLuwsZ5Hwda 5dAyJRpko1o+WV/ze8ho1b8VGtiWud9QJCV8a5ethV0fTM3cgzwg32+rYFKLuP01FhPO UL7nKSzwZHNBVVrxslTgkJ2mZDos/Qx/aL5FtMLS9to4TVTubMj77d3SFS1oh3gfyvXQ +mYxofhniQ8B2L8LU0YUhOAnB1oo6r81wjTCkZWixutLA/LHqINJ/248EVvGO6xfUFg6 ZaMw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-leds-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-leds-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d13si2394405otp.196.2019.12.11.19.40.03; Wed, 11 Dec 2019 19:40:03 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-leds-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-leds-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-leds-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727666AbfLLDkC (ORCPT + 1 other); Wed, 11 Dec 2019 22:40:02 -0500 Received: from mx2.suse.de ([195.135.220.15]:58692 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727598AbfLLDkC (ORCPT ); Wed, 11 Dec 2019 22:40:02 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 54FADADBB; Thu, 12 Dec 2019 03:40:00 +0000 (UTC) From: =?utf-8?q?Andreas_F=C3=A4rber?= To: linux-realtek-soc@lists.infradead.org, linux-leds@vger.kernel.org Cc: Jacek Anaszewski , Pavel Machek , Dan Murphy , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, =?utf-8?q?Andreas_F=C3=A4rber?= , Roc He , Rob Herring , Mark Rutland , devicetree@vger.kernel.org Subject: [RFC 08/25] arm64: dts: realtek: rtd129x-zidoo-x9s: Add TM1628 LED controller Date: Thu, 12 Dec 2019 04:39:35 +0100 Message-Id: <20191212033952.5967-9-afaerber@suse.de> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20191212033952.5967-1-afaerber@suse.de> References: <20191212033952.5967-1-afaerber@suse.de> MIME-Version: 1.0 Sender: linux-leds-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-leds@vger.kernel.org Add a spi-gpio node and LED controller slave node. Cc: Roc He Signed-off-by: Andreas Färber --- arch/arm64/boot/dts/realtek/rtd1295-zidoo-x9s.dts | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) -- 2.16.4 diff --git a/arch/arm64/boot/dts/realtek/rtd1295-zidoo-x9s.dts b/arch/arm64/boot/dts/realtek/rtd1295-zidoo-x9s.dts index 628dfd123fa1..5183acd851a8 100644 --- a/arch/arm64/boot/dts/realtek/rtd1295-zidoo-x9s.dts +++ b/arch/arm64/boot/dts/realtek/rtd1295-zidoo-x9s.dts @@ -1,6 +1,6 @@ // SPDX-License-Identifier: (GPL-2.0-or-later OR BSD-2-Clause) /* - * Copyright (c) 2016-2017 Andreas Färber + * Copyright (c) 2016-2019 Andreas Färber */ /dts-v1/; @@ -42,6 +42,26 @@ gpio = <&misc_gpio 16 GPIO_ACTIVE_HIGH>; enable-active-high; }; + + spi { + compatible = "spi-gpio"; + sck-gpios = <&iso_gpio 4 GPIO_ACTIVE_HIGH>; + mosi-gpios = <&iso_gpio 3 GPIO_ACTIVE_HIGH>; + cs-gpios = <&iso_gpio 2 GPIO_ACTIVE_LOW>; + num-chipselects = <1>; + #address-cells = <1>; + #size-cells = <0>; + + tm1628: led-controller@0 { + compatible = "titanmec,tm1628"; + reg = <0>; + spi-3wire; + spi-lsb-first; + spi-rx-delay-us = <1>; + spi-max-frequency = <500000>; + #grids = <7>; + }; + }; }; &cpu0 { From patchwork Thu Dec 12 03:39:36 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Andreas_F=C3=A4rber?= X-Patchwork-Id: 181406 Delivered-To: patch@linaro.org Received: by 2002:a92:3001:0:0:0:0:0 with SMTP id x1csp372183ile; Wed, 11 Dec 2019 19:41:16 -0800 (PST) X-Google-Smtp-Source: APXvYqxfqvYihF8DJUOARwlKJvXiKXonjPLTIdv3LrWx0vVDLxE6bIjiu2NXUEQE/DKXmp/r9C9b X-Received: by 2002:a9d:760f:: with SMTP id k15mr5666084otl.65.1576122076829; Wed, 11 Dec 2019 19:41:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576122076; cv=none; d=google.com; s=arc-20160816; b=daPG5SVzWWSTLcByi8UhI/+yzS54A/8GrcRBUeO3sxuWLs+3yFpmOYJT3k8XQdDu/K KtWRzxgvCpB/CI5sgkpDmI/y9jIFakDxzktCTcnhofWrmRilbHguKFfj32k+8YEAhUum YpoK2pZrp/kxUUuuFZexOc7OZGcPCTnlIIuGDrA5NXpndEjBs/W3RcmA0WL7xKpJBvt9 mDK1cNnM+Bwe2ZQn5OhE+Ospt8x/AoXZy3kITRs5K0YKP6Ug1YcEjOA1KkISMtIdSaZv FcG5IAm5wkUH2JnygKlJVxIpPYpeOqIwUBu4L+PXvZcLgI+aHAdxt4WL0fsysvNQQa6Z 6y5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=bzfSHGVGfAhQtotLOpoqv8NwhCMxgPnoDuKHNeKbzg8=; b=NIqFc/7AUVB06AhGXLePWHZ+6Z0A2KhUgm8rMYXxU9gZSgKKgUnPVJ0wtNrt+eGjTO 8WwjTmmw2ibaQCVP8Ozlukkh5sP9sXDINXqLMucZwRlzuU8Eg1gSmXEUH8RAcXNiXCD1 8r/m6bLxqHXQ45Jb04yImt/SWmXYI0iT2BlrZ297STAH93VMBcCxqAklXVxxSH8VlQp2 LzZXKf3iqrz5ZvJH0ZSxg30dT03Pw4mjmPTvZJxs0ljkJiFdvuWcBOeX+2tf93NJSkkT +SyCZsZpidCSe3yCYF+DtiiICzk52kruDTStzkpyi19kVOn2F0e1XCOS8vPq+nD575TH RvwQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-leds-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-leds-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r65si2395195oig.69.2019.12.11.19.41.16; Wed, 11 Dec 2019 19:41:16 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-leds-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-leds-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-leds-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728025AbfLLDlQ (ORCPT + 1 other); Wed, 11 Dec 2019 22:41:16 -0500 Received: from mx2.suse.de ([195.135.220.15]:58728 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727605AbfLLDkC (ORCPT ); Wed, 11 Dec 2019 22:40:02 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id D7461AF27; Thu, 12 Dec 2019 03:40:00 +0000 (UTC) From: =?utf-8?q?Andreas_F=C3=A4rber?= To: linux-realtek-soc@lists.infradead.org, linux-leds@vger.kernel.org Cc: Jacek Anaszewski , Pavel Machek , Dan Murphy , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, =?utf-8?q?Andreas_F=C3=A4rber?= , Roc He , Rob Herring , Mark Rutland , devicetree@vger.kernel.org Subject: [RFC 09/25] arm64: dts: realtek: rtd1295-zidoo-x9s: Add regular LEDs to TM1628 Date: Thu, 12 Dec 2019 04:39:36 +0100 Message-Id: <20191212033952.5967-10-afaerber@suse.de> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20191212033952.5967-1-afaerber@suse.de> References: <20191212033952.5967-1-afaerber@suse.de> MIME-Version: 1.0 Sender: linux-leds-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-leds@vger.kernel.org Add a child node for the half-second colon. Cc: Roc He Signed-off-by: Andreas Färber --- arch/arm64/boot/dts/realtek/rtd1295-zidoo-x9s.dts | 10 ++++++++++ 1 file changed, 10 insertions(+) -- 2.16.4 diff --git a/arch/arm64/boot/dts/realtek/rtd1295-zidoo-x9s.dts b/arch/arm64/boot/dts/realtek/rtd1295-zidoo-x9s.dts index 5183acd851a8..219b4987412c 100644 --- a/arch/arm64/boot/dts/realtek/rtd1295-zidoo-x9s.dts +++ b/arch/arm64/boot/dts/realtek/rtd1295-zidoo-x9s.dts @@ -6,6 +6,7 @@ /dts-v1/; #include +#include #include "rtd1295.dtsi" @@ -60,6 +61,15 @@ spi-rx-delay-us = <1>; spi-max-frequency = <500000>; #grids = <7>; + #address-cells = <2>; + #size-cells = <0>; + + colon@5,4 { + reg = <5 4>; + color = ; + function = LED_FUNCTION_STATUS; + function-enumerator = <5>; + }; }; }; }; From patchwork Thu Dec 12 03:39:47 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Andreas_F=C3=A4rber?= X-Patchwork-Id: 181389 Delivered-To: patch@linaro.org Received: by 2002:a92:3001:0:0:0:0:0 with SMTP id x1csp371342ile; Wed, 11 Dec 2019 19:40:09 -0800 (PST) X-Google-Smtp-Source: APXvYqych8WvQ6h9attl76sXyGvW9FmLq45LhuYo7hWtW4eA4f9hfh7w5D+hPQ+ot8/Lh3ylWLt9 X-Received: by 2002:a9d:6395:: with SMTP id w21mr5765589otk.3.1576122009316; Wed, 11 Dec 2019 19:40:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576122009; cv=none; d=google.com; s=arc-20160816; b=tdN8Rdbs5f+iOVyggkELx9mRlWb7b31sWMJeQYUZr27AH6YsXwUZmbF29TFCa0i1kN RCkcvwvKLj5o/Go3oWu5lFjTjlMHfQRAU6e39mJu21CA7R6q2agr/cja661SN9iBrHaF K/RpAOngWrDwOANwgCmM10oj+B1cn7lUwnr7dY2t/J3+0X+sZXcdROU6Zt3uer0gD+cQ vj5XxnZPdfwV69q08IxdAm3Ufgx4urZPu0UuEacVd+ssFFj5N+vqG07XqAGlj3yviakR Bw8Zqzj/0Ccc22KnrGst6EmlMRBQHZsEazkzfPbzoeYQr99IUG1V6+hunJHn3ZaOyeid 8g+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=OUisRT9MBzxXYEgrjIqD1a9FT/MjUK7W0Ny53eE9XvQ=; b=objkUC3hrbKp1xSt3P+82p1ENq2tNy3xH+gCWsni007/46nGVvtKAD6+IR3l83/yHD eJ8HRvNNEPYLc3+W2Wt7dg5xIPobokBHNzCYPBGDcBU2II9LHWV/j46fi6K1+pQMb807 IA6MMZhu9imYjmLSP1AW71yDuLeZOCmlPn3pnjAVRYqcOnTnifnOFitFO4/P5Is7S+g0 6yLYTBx4qQH+SkcCRWmCrph7DtoAnCn7SxVuVSwwc6UmakRCvSS2k8dLYiNFoBHEfO/I brcCT8W+pZ49JeYbs8SUgfOPhyIhOqUgEQTUjfQDLecxAgJwLvW3TsRJEIiE4A5oGzZr wXiA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-leds-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-leds-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p26si2484408oto.240.2019.12.11.19.40.09; Wed, 11 Dec 2019 19:40:09 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-leds-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-leds-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-leds-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727788AbfLLDkI (ORCPT + 1 other); Wed, 11 Dec 2019 22:40:08 -0500 Received: from mx2.suse.de ([195.135.220.15]:58768 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727771AbfLLDkH (ORCPT ); Wed, 11 Dec 2019 22:40:07 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 6AD9EAF99; Thu, 12 Dec 2019 03:40:06 +0000 (UTC) From: =?utf-8?q?Andreas_F=C3=A4rber?= To: linux-realtek-soc@lists.infradead.org, linux-leds@vger.kernel.org Cc: Jacek Anaszewski , Pavel Machek , Dan Murphy , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, =?utf-8?q?Andreas_F=C3=A4rber?= , Roc He , Rob Herring , Mark Rutland , devicetree@vger.kernel.org Subject: [RFC 20/25] arm64: dts: realtek: rtd1295-zidoo-x9s: Add display to TM1628 Date: Thu, 12 Dec 2019 04:39:47 +0100 Message-Id: <20191212033952.5967-21-afaerber@suse.de> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20191212033952.5967-1-afaerber@suse.de> References: <20191212033952.5967-1-afaerber@suse.de> MIME-Version: 1.0 Sender: linux-leds-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-leds@vger.kernel.org Add a child node for 4-digit 7-segment display. Cc: Roc He Signed-off-by: Andreas Färber --- arch/arm64/boot/dts/realtek/rtd1295-zidoo-x9s.dts | 4 ++++ 1 file changed, 4 insertions(+) -- 2.16.4 diff --git a/arch/arm64/boot/dts/realtek/rtd1295-zidoo-x9s.dts b/arch/arm64/boot/dts/realtek/rtd1295-zidoo-x9s.dts index 219b4987412c..6c2337e9282f 100644 --- a/arch/arm64/boot/dts/realtek/rtd1295-zidoo-x9s.dts +++ b/arch/arm64/boot/dts/realtek/rtd1295-zidoo-x9s.dts @@ -64,6 +64,10 @@ #address-cells = <2>; #size-cells = <0>; + display@0,10 { + reg = <0 10>, <0 9>, <0 8>, <0 7>; + }; + colon@5,4 { reg = <5 4>; color = ; From patchwork Thu Dec 12 03:39:49 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Andreas_F=C3=A4rber?= X-Patchwork-Id: 181399 Delivered-To: patch@linaro.org Received: by 2002:a92:3001:0:0:0:0:0 with SMTP id x1csp371751ile; Wed, 11 Dec 2019 19:40:45 -0800 (PST) X-Google-Smtp-Source: APXvYqyzjK1C4tSQPPj725a5BbX6tVJ3/iqce4Pplv7fZWcLv3QVCc4xqgxwRE8F1NwTJS2OiGxR X-Received: by 2002:a05:6830:605:: with SMTP id w5mr5435477oti.298.1576122045129; Wed, 11 Dec 2019 19:40:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576122045; cv=none; d=google.com; s=arc-20160816; b=A01fG5DcYcrsxl4s2DGs9LGK7uS0krTnzpnMHdmeYkxV6Sf+aTw+pOVRw9/SmdW6k/ PboFwvVucbX/moK3tQQ7VD18JxQeOoMaWpp5sAIOpzSWZE072JNiqDhcbFar49V5Nq0B KZ+X2E6kHmGXv1PtIPB8YrZzc/n6Ctw4VfYL4oCS8feTZmABbtzYF1Ii6YKCd6/NLnlE BB13chQ9E0uBhzE1IWknaD4QwGwVZf/c0Zi7CuQQLi7rkNo5fR2leSG4iRjNwjvwML6I xsutcDTMfpJhXVedVRiXnnxAvoFyuCKcQ+CMTzCHctv4z2tMYUq31aW97ZjPeVta1cWt f2QQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=7riM3QntIGxsBscvH7VR6JZkfjkw590/IAaL9Jv9vMA=; b=XeoAFWY0vT/bvmSVxFLDOxvQ2GMWx3rMDpVKRYq6RP3lJSkVMNzr1sZJw2REK+pChY JSKwr3Ksz5odaodN0xaocFguM0raUGn2xk58xSmnQsy4jRgpkgDUyU5ANsM26hYBUW37 27GL8R3l5vDT/3G+JWf2bSOle0bViPd6hb0CN2sA6ML0MVCS9F9ncbBA45tbHgJlNHoK 4YbDG0gA2LYALnLCR/gR+pIm384QsV9fTFEvkpVrwFe3JVxJV8Dle9nVpAE8z09BlB/v PV2NZw2/5Wih78v0pMWOyDXiTutaMdwZwNcvBN5C2uc4eQGmYohRPmjiMTLKHETPYEt4 bG+Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-leds-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-leds-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k8si2823909otf.76.2019.12.11.19.40.44; Wed, 11 Dec 2019 19:40:45 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-leds-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-leds-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-leds-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727952AbfLLDko (ORCPT + 1 other); Wed, 11 Dec 2019 22:40:44 -0500 Received: from mx2.suse.de ([195.135.220.15]:58556 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727784AbfLLDkJ (ORCPT ); Wed, 11 Dec 2019 22:40:09 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 66D56AF43; Thu, 12 Dec 2019 03:40:07 +0000 (UTC) From: =?utf-8?q?Andreas_F=C3=A4rber?= To: linux-realtek-soc@lists.infradead.org, linux-leds@vger.kernel.org Cc: Jacek Anaszewski , Pavel Machek , Dan Murphy , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, =?utf-8?q?Andreas_F=C3=A4rber?= Subject: [RFC 22/25] leds: tm1826: Add combined glyph support Date: Thu, 12 Dec 2019 04:39:49 +0100 Message-Id: <20191212033952.5967-23-afaerber@suse.de> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20191212033952.5967-1-afaerber@suse.de> References: <20191212033952.5967-1-afaerber@suse.de> MIME-Version: 1.0 Sender: linux-leds-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-leds@vger.kernel.org Allow to squeeze the text "HEllO" into a 4-digit display, as seen on MeLE V9 TV box. Enable this combining mode only if the text would overflow. Signed-off-by: Andreas Färber --- drivers/leds/leds-tm1628.c | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) -- 2.16.4 diff --git a/drivers/leds/leds-tm1628.c b/drivers/leds/leds-tm1628.c index e2c2a5d91596..0c0d099de8b0 100644 --- a/drivers/leds/leds-tm1628.c +++ b/drivers/leds/leds-tm1628.c @@ -347,6 +347,28 @@ static u8 tm1628_get_char_ssd_map(char ch) return 0x0; } +struct tm1628_ssd_glyph { + char *str; + u8 segs; +}; + +static const struct tm1628_ssd_glyph tm1628_glyph_ssd_map[] = { + { "ll", SSD_TOP_LEFT | SSD_BOTTOM_LEFT | + SSD_TOP_RIGHT | SSD_BOTTOM_RIGHT }, +}; + +static u8 tm1628_get_glyph_ssd_map(const char *str) +{ + int i; + + for (i = 0; i < ARRAY_SIZE(tm1628_glyph_ssd_map); i++) { + if (!strncmp(tm1628_glyph_ssd_map[i].str, str, 2)) + return tm1628_glyph_ssd_map[i].segs; + } + + return 0x0; +} + static int tm1628_display_apply_map(struct tm1628 *s, struct tm1628_display *display, u8 map) { @@ -366,7 +388,7 @@ static ssize_t text_store(struct device *dev, { struct tm1628 *s = dev_get_drvdata(dev); size_t offset, len = count; - u8 map; + u8 map, glyph_map; int i, ret; if (len > 0 && buf[len - 1] == '\n') @@ -375,6 +397,13 @@ static ssize_t text_store(struct device *dev, for (i = 0, offset = 0; i < s->num_displays; i++) { if (offset < len) { map = tm1628_get_char_ssd_map(buf[offset]); + if (offset + 1 < len && len > s->num_displays) { + glyph_map = tm1628_get_glyph_ssd_map(buf + offset); + if (glyph_map) { + map = glyph_map; + offset++; + } + } offset++; } else map = 0x0; From patchwork Thu Dec 12 03:39:51 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Andreas_F=C3=A4rber?= X-Patchwork-Id: 181390 Delivered-To: patch@linaro.org Received: by 2002:a92:3001:0:0:0:0:0 with SMTP id x1csp371366ile; Wed, 11 Dec 2019 19:40:11 -0800 (PST) X-Google-Smtp-Source: APXvYqwAupLzwLYUSnERs/W5WaQWNzvK/hOb5Fi1gwtCN3ZoYOjABgYAh6clHI7i3N+Q9RPEseuo X-Received: by 2002:a9d:5616:: with SMTP id e22mr5429430oti.366.1576122011130; Wed, 11 Dec 2019 19:40:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576122011; cv=none; d=google.com; s=arc-20160816; b=wWtBgo+GdlPaKmjZ6bRd+qV0hlcAPEtkDjTVasq2xApkHU/lzk5UJtb0lsM32DhuQ4 2m/2tvWxrM17zwP9f8XasHWA6lgqXH9wZ/ZRlGIFcvh3FHiubs9ErDpqlBorKwsREYNm RIUfsIAbq48h/Ec1AQlg7J845OZLZagjuj+OeIrlmFXUVnPh4nk9n8q4qVSr/xW+LWk1 bNnxSp9bPrwUTg4JKhPPgPGWYI9LayzL+4qlKUgxxHF1DraNvXMI5+RIHARtgqja7/br V0XmjmU99hKqY3W0qMwqd0OKFUcA9BIfgH+tWx9a7BI3WFWylmSWcFoty3HSnNGZVCrm YR/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=kXNfcm8RugRvLx+8tDCrP8xtPXlWVovW6jjDr10L6w4=; b=kxMLQsEuCYPyqlq8nFFZ5/9jbow2eZeVB9DxhqoFFst/yi2cpb5wCzuS3VSIz77wA0 lJjBwmBC+gTClg2fRxONws9+OarfQgtw8Udg3IJU4rgaXxlI+uWvYnVoFGXHJuTvsJ5Y b6G7HF3WEx1VZOR9C4wbIwGMzXuBLx5VQp9dwa+puQx+OYbYwBxnCnbidOE/UVGZiCab zeKm2stIy1OjHnH+uq5S1bJWM9Q2MFOTC2hiTqMizQ9ulqAl6zNVYoq6uxCrR3rZvrMk vnySQMIxNF7wFgp4a4fW7mxfcqnP/mPgmM/uYDE3nr+SYiB6KHnlZLi8fHPGJWa0+PJ5 Mi1w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-leds-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-leds-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o6si2420519otk.201.2019.12.11.19.40.10; Wed, 11 Dec 2019 19:40:11 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-leds-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-leds-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-leds-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727810AbfLLDkK (ORCPT + 1 other); Wed, 11 Dec 2019 22:40:10 -0500 Received: from mx2.suse.de ([195.135.220.15]:58618 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727791AbfLLDkJ (ORCPT ); Wed, 11 Dec 2019 22:40:09 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 578A8AF65; Thu, 12 Dec 2019 03:40:08 +0000 (UTC) From: =?utf-8?q?Andreas_F=C3=A4rber?= To: linux-realtek-soc@lists.infradead.org, linux-leds@vger.kernel.org Cc: Jacek Anaszewski , Pavel Machek , Dan Murphy , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, =?utf-8?q?Andreas_F=C3=A4rber?= , sales@fdhisi.com Subject: [RFC 24/25] WIP: leds: tm1628: Prepare FD628 keys Date: Thu, 12 Dec 2019 04:39:51 +0100 Message-Id: <20191212033952.5967-25-afaerber@suse.de> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20191212033952.5967-1-afaerber@suse.de> References: <20191212033952.5967-1-afaerber@suse.de> MIME-Version: 1.0 Sender: linux-leds-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-leds@vger.kernel.org Extend definition with key input lines. Cc: sales@fdhisi.com Signed-off-by: Andreas Färber --- drivers/leds/leds-tm1628.c | 2 ++ 1 file changed, 2 insertions(+) -- 2.16.4 diff --git a/drivers/leds/leds-tm1628.c b/drivers/leds/leds-tm1628.c index 410f34234811..2caf1e63fc90 100644 --- a/drivers/leds/leds-tm1628.c +++ b/drivers/leds/leds-tm1628.c @@ -669,6 +669,8 @@ static const struct tm1628_info fd628_info = { .seg_mask = GENMASK(14, 12) | GENMASK(10, 1), .modes = tm1628_modes, .default_mode = 3, + .k_mask = GENMASK(2, 1), + .ks_mask = GENMASK(10, 1), .pwm_map = tm1628_pwm_map, .default_pwm = 0, };