From mboxrd@z Thu Jan 1 00:00:00 1970 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 AD157C5478C for ; Fri, 1 Mar 2024 18:19:02 +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:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=mx0yb162bmwB1mDAhjCCtrJ9zfKtQiTpV/kw80qw8Ac=; b=iMEIwn570ucNnW Vgk7hYsNOefaAT7MpMj5BovNZ3oP2s7LvswjUGgJl0xlBsqTywTTiNf8T0r5qrt7c1cJu0JSP5DVO uzoMcbwIjk7ysJf1m8nW+n79RK/UWhaMehljGbzFWiwiuiJ66UfcGYZaulJ/W/9R/tR+RGKsVA0kP ICIZirO7ciJxTKBB8WIk56LocbQE/qkOibzBAudJmlDMqgSZE+D8ILtQt41PhTf1i988TWip2YRid zjMaPP4o0qGYchEqLfbY3sJq0acnm7QMxz0iaRVqwLzeVkqdsWVBgS4ltruJkgC0Tbm8R7l58MEzv 02MPAEyEc1w+8/LehyAg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rg7T8-00000001Uny-0o04; Fri, 01 Mar 2024 18:18:50 +0000 Received: from mgamail.intel.com ([192.198.163.9]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rg7T6-00000001UmW-1B9x for linux-arm-kernel@lists.infradead.org; Fri, 01 Mar 2024 18:18:49 +0000 X-IronPort-AV: E=McAfee;i="6600,9927,11000"; a="14571921" X-IronPort-AV: E=Sophos;i="6.06,196,1705392000"; d="scan'208";a="14571921" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmvoesa103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Mar 2024 10:18:45 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,11000"; a="914022095" X-IronPort-AV: E=Sophos;i="6.06,196,1705392000"; d="scan'208";a="914022095" Received: from smile.fi.intel.com ([10.237.72.54]) by fmsmga002.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Mar 2024 10:18:41 -0800 Received: from andy by smile.fi.intel.com with local (Exim 4.97) (envelope-from ) id 1rg7Sw-000000091jN-07sS; Fri, 01 Mar 2024 20:18:38 +0200 Date: Fri, 1 Mar 2024 20:18:37 +0200 From: Andy Shevchenko To: Chris Packham Cc: geert@linux-m68k.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, andrew@lunn.ch, gregory.clement@bootlin.com, sebastian.hesselbarth@gmail.com, pavel@ucw.cz, lee@kernel.org, linux-leds@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH v3 1/4] auxdisplay: Add 7-segment LED display driver Message-ID: References: <20240301014203.2033844-1-chris.packham@alliedtelesis.co.nz> <20240301014203.2033844-2-chris.packham@alliedtelesis.co.nz> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20240301014203.2033844-2-chris.packham@alliedtelesis.co.nz> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240301_101848_349887_AEA63B9E X-CRM114-Status: GOOD ( 17.25 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, Mar 01, 2024 at 02:42:00PM +1300, Chris Packham wrote: > Add a driver for a 7-segment LED display. At the moment only one > character is supported but it should be possible to expand this to > support more characters and/or 14-segment displays in the future. ... > + * Driver for a 7 segment LED display 7-segment ... > + * The GPIOs are wired to the 7 segments in a clockwise fashion starting from > + * the top. Not exactly. They can wire them as they wish, we just need to agree on the sequence of the segments in DT to be mapped to the 7-segment diagram. ... > + * -a- > + * | | > + * f b > + * | | > + * -g- > + * | | > + * e c > + * | | > + * -d- I would drop this as it's available in UAPI header... ... > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include ...which you forgot to include here. ... > +static void seg_led_update(struct work_struct *work) > +{ > + struct seg_led_priv *priv = container_of(work, struct seg_led_priv, work.work); > + struct linedisp *linedisp = &priv->linedisp; > + struct linedisp_map *map = linedisp->map; > + DECLARE_BITMAP(values, 8); > + bitmap_zero(values, 8); Why do you need this zeroing? > + bitmap_set_value8(values, map_to_seg7(&map->map.seg7, linedisp->buf[0]), 0); > + > + gpiod_set_array_value_cansleep(priv->segment_gpios->ndescs, priv->segment_gpios->desc, > + priv->segment_gpios->info, values); > +} -- With Best Regards, Andy Shevchenko _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel