From patchwork Mon Feb 12 17:01:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 20264 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:bc8a:b0:106:860b:bbdd with SMTP id dn10csp80635dyb; Mon, 12 Feb 2024 10:05:15 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWOTEakUtMXNqWm6TeyxMrumcW3lBNdFrZjY03sQqh+zAgTYyiaxDMnwQdjdbWbOmkOpTILeJIguxWKc8YV/Lv7F4OOhg== X-Google-Smtp-Source: AGHT+IHQiXnR6JsolOVAdk5BGEJbNCCxqOtNvy5H//zHNC3zaDIU5eZI0Xlu639q98+DZZirV3xD X-Received: by 2002:a05:6a21:1707:b0:19e:a217:fd20 with SMTP id nv7-20020a056a21170700b0019ea217fd20mr5215238pzb.45.1707761115598; Mon, 12 Feb 2024 10:05:15 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707761115; cv=pass; d=google.com; s=arc-20160816; b=Z+p4QnjqnJ2o0xDJaXf5VebnuG1hT9Gnj8gbIV2HaPaFZhwgvT1QW4IBWqZO+NJDDA lomyPMe0i2/sR7+uYJTVMJnqtcYdGCMWmruRQTrWJg/8y6g+Hw2vyOFcuCurytlwlcDt SWJcWV7K9cKfVUE+Hp658bB78Pt07EphuSoHjFjb7T5PCuppsTB2Ai+ZbmfHcoWym0/R BgA/SBp2DVoQd88HjGay1kq8ENCxDOVL/KzNBKVgN62KEWJgAV5ElocPCOxbMVrKtB6T toMM2ENfSnJ70FiYg4AA54puaaX/P7J1gKz2aifgntNGPZfxS9w+Tx4ZTV6h80HcWMVY VBoQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=z0llAScewnWidFWFMuVld8MZ54vbvpfBWdll+OYwjpk=; fh=AvqfH53XSIFKqGuEYHw8D36TKYrgyDdPha3jVqbDZ6k=; b=r8EnETSxoaReKiaCCyky2QzWrVUkgQ6W2MeWZyXrt07v16Z+gTGowzfKVxX2m+XZIJ 1tqXsjFS3PoF/J4+QNy3M+/e315CeEnh/wSOKrVvPk6BBSW+tjpfl+5zm5UZPPA/Zsv5 4QUFaVr3ZvciC0u821HExfWJd15g/XXgLw1xAnsNiXLOZf376Zo3DqTJJwpg9rY5gWhV YsRyq77vQ9sLof1zUXeJcVBmbx4tjCrC8gHrNNGixe8rQ9Iy7obkrdhjTCjjFtseHjAT 4JTAkFbUyXMXCKoriWqfVlNDhCh2SFl4kX9olfWmz0pbQpvEIMxCOFyntCfGWw8d09U0 YMVg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=BqoQBjpx; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-62040-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-62040-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com X-Forwarded-Encrypted: i=2; AJvYcCXnX3pOUSoXpJ10/tK+Lb4xG+2HtNVHKe3WIDXwddL/WODTCw8+A0avyhletxJwZWIhbMFFsMO6CXymcvUo6CaPtVuypw== Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id d63-20020a633642000000b005cdfb96ea62si560744pga.243.2024.02.12.10.05.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Feb 2024 10:05:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-62040-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=BqoQBjpx; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-62040-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-62040-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id CAFAC282DD0 for ; Mon, 12 Feb 2024 17:06:35 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5D3C740BF0; Mon, 12 Feb 2024 17:04:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="BqoQBjpx" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C42CC3F9EC; Mon, 12 Feb 2024 17:04:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.10 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707757488; cv=none; b=MBHxyHedKBWlphXPNxljicW1RVev+wLoWZQJ6ukjOc93MKqhLlMb8Kq0cbV6kpn2Cxf7lMz9z2e3c9tmmRQxpzQjLHDSfRw+nIxNdh5Wpwt7sPeycNXR3K74qIxng2ZIAXj1DlJoi8I7OGJk2dGU7Qm/ufSzKl0lBSG2bRNj3lo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707757488; c=relaxed/simple; bh=sx3KCnAxxS/1z9NLbOZFyEHW1jrQXTW0YVfX+eUGbSA=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=ZzWDkNKoDo33HrfRt+4pp5bfcwWAGBIPA32BHtz9qTBJNp42g8B61UIdXhM+amBVjDfrJePaIRKTxCVnzF4o4PJi00MvKyczst9DQClmRAFZVw4ItEUV4OoXZ4aspWME3y3vAQb6BQ0xZ8op581o292fy3JDxV62riRuTYZMv+s= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=BqoQBjpx; arc=none smtp.client-ip=198.175.65.10 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1707757487; x=1739293487; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=sx3KCnAxxS/1z9NLbOZFyEHW1jrQXTW0YVfX+eUGbSA=; b=BqoQBjpx50bNBwcZbmwkK0yoltTQes4QLFepALrRIXPhYWNZIFNT3rz/ 7gGMxAZwKhOpX3h/Dq4NJdICY6T0Vt2HwlTHhzHx899UBe+4skgLcP86C pCffbxtRZPL4kmkXaVmWxGJ6Tm0aV1uXL/A4NuygqycIAUB3u7ztbNrLv qiuWopepqEKPLoRyyR+28xek1uU2cqLz9iTR0vg9AjEtDnqmt0X/Hgpa2 ESyHcu48NYGGg2MuCUbcaN4W9rsaFuRN3qP+VXqVD7MxkA3naVeL8KiFm eayBmXeHGQ6qeKu2Zj0M7Nc20eDDB1gQtzyFK4gD9gKYJSFB0qSGsM0fq w==; X-IronPort-AV: E=McAfee;i="6600,9927,10982"; a="19153165" X-IronPort-AV: E=Sophos;i="6.06,264,1705392000"; d="scan'208";a="19153165" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orvoesa102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Feb 2024 09:04:46 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10982"; a="935116807" X-IronPort-AV: E=Sophos;i="6.06,264,1705392000"; d="scan'208";a="935116807" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga001.fm.intel.com with ESMTP; 12 Feb 2024 09:04:43 -0800 Received: by black.fi.intel.com (Postfix, from userid 1003) id 7B37DF7; Mon, 12 Feb 2024 19:04:42 +0200 (EET) From: Andy Shevchenko To: Andy Shevchenko , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Andy Shevchenko , Geert Uytterhoeven , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Robin van der Gracht , Paul Burton Subject: [PATCH v2 00/15] auxdisplay: linedisp: Clean up and add new driver Date: Mon, 12 Feb 2024 19:01:33 +0200 Message-ID: <20240212170423.2860895-1-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1.gbec44491f096 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790717319132101137 X-GMAIL-MSGID: 1790717319132101137 Add a new initial driver for Maxim MAX6958/6959 chips. While developing that driver I realised that there is a lot of duplication between ht16k33 and a new one. Hence set of cleanups and refactorings. Note, the new driver has minimum support of the hardware and I have plans to cover more features in the future. In v2: - updated DT bindings to follow specifications and requirements (Krzysztof) - unified return code variable (err everywhere) - left patches 10 and 13 untouched, we may amend later on (Robin) Andy Shevchenko (15): auxdisplay: img-ascii-lcd: Make container_of() no-op for struct linedisp auxdisplay: linedisp: Free allocated resources in ->release() auxdisplay: linedisp: Use unique number for id auxdisplay: linedisp: Unshadow error codes in ->store() auxdisplay: linedisp: Add missing header(s) auxdisplay: linedisp: Move exported symbols to a namespace auxdisplay: linedisp: Group line display drivers together auxdisplay: linedisp: Provide struct linedisp_ops for future extension auxdisplay: linedisp: Add support for overriding character mapping auxdisplay: linedisp: Provide a small buffer in the struct linedisp auxdisplay: ht16k33: Move ht16k33_linedisp_ops down auxdisplay: ht16k33: Switch to use line display character mapping auxdisplay: ht16k33: Use buffer from struct linedisp dt-bindings: auxdisplay: Add Maxim MAX6958/6959 auxdisplay: Add driver for MAX695x 7-segment LED controllers .../bindings/auxdisplay/maxim,max6959.yaml | 35 +++ drivers/auxdisplay/Kconfig | 40 ++-- drivers/auxdisplay/Makefile | 13 +- drivers/auxdisplay/ht16k33.c | 145 +++++-------- drivers/auxdisplay/img-ascii-lcd.c | 24 ++- drivers/auxdisplay/line-display.c | 162 ++++++++++++-- drivers/auxdisplay/line-display.h | 57 ++++- drivers/auxdisplay/max6959.c | 200 ++++++++++++++++++ 8 files changed, 530 insertions(+), 146 deletions(-) create mode 100644 Documentation/devicetree/bindings/auxdisplay/maxim,max6959.yaml create mode 100644 drivers/auxdisplay/max6959.c Signed-off-by: Andy Shevchenko Tested-by: Geert Uytterhoeven