Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp945303pxu; Thu, 15 Oct 2020 22:48:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyz/XqG1sip2iR05ywoX+sIrjuEhHVPOyQhW2m6NUvylt+KeSH5NR3L6Ae3Pi+xGuFGAfnW X-Received: by 2002:a17:906:cb82:: with SMTP id mf2mr1962256ejb.435.1602827315477; Thu, 15 Oct 2020 22:48:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602827315; cv=none; d=google.com; s=arc-20160816; b=O91fQZXRlJFRjMk0NR+Fwe+1ZhlmYDRr99xk/2UJjrDlrqO6ZVqHOJPz7jlwlxEWlF 6fM3tFxPu+qLphj24YPV0Vjv4eogUqnEfKUteyeqEzJ8cXYZ+UvFJc+eyQCjCsU+ar7S FQfLrbMqGDQTdxYPRqq6cvK3uCK5XM9mTAeHzjK4GxTSFNmdDpCjmufVl+kgrqzLB/CP H7DjL3Y+nYwdB+HQymU/IFyiOi/Tyoxq+iTYZdHw5iOF/Rc1K1SZwPr5bsPznFpOlVG+ TvKDex0yOX1q/5dMKmwGw6G3zkjNt8AEoK9PPnU63R/Ff+Lkc+iGu2NUwOmc/aAWu1PH q6Sw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=g+MCSHQfgSORuZx/1XnTQkQ53w9FR3g4o7/ENoC+YN8=; b=CHKDMD9J9i9iQVmJzfDyATnLZq4mHzZZ17xQ/5S4jFVda8PL/gApTRBlJRbnnjxif2 yhdx8jfR4KjAfOgHdMmfbgPYArbMQz1gMpBdeSgMkSzb/xyyp2uLNkhdZIxVbTU1+o0F 91phjDA1yBHqScIc1x8S5QGnupH3RthUDcuJFouOt6qCVN5+y4xP+kL5Qf6c3jcUNgPa fhMHFcmr/VhZYtJ+5+8Yu5cc7YV2jjAK1dg7xOYUQqH/QB7dz9+6rlzu2TsBCfc2+LPK kPc7N1GscG4RNyUfz9sYiFLdXL1DOTjXTnPam2Qf22O+E/vJFbZB7GtawzRQpbWeC6LA 3p+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=UZnBO6UT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m6si1072496ejc.527.2020.10.15.22.48.13; Thu, 15 Oct 2020 22:48:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=UZnBO6UT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2394135AbgJPDZ7 (ORCPT + 99 others); Thu, 15 Oct 2020 23:25:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36304 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2394131AbgJPDZ7 (ORCPT ); Thu, 15 Oct 2020 23:25:59 -0400 Received: from mail-yb1-xb41.google.com (mail-yb1-xb41.google.com [IPv6:2607:f8b0:4864:20::b41]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 44F73C061755 for ; Thu, 15 Oct 2020 20:25:59 -0700 (PDT) Received: by mail-yb1-xb41.google.com with SMTP id x20so748197ybs.8 for ; Thu, 15 Oct 2020 20:25:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=g+MCSHQfgSORuZx/1XnTQkQ53w9FR3g4o7/ENoC+YN8=; b=UZnBO6UTtk0gYB1onefNKWD2zbE3haDtOYM1nzUDRD/LZYG22i8lCL8lWTS0zqFxox iLL4MAR0UejpyPlAdoxx2G6QC5L+bnnqUOMaCzNFHrlAX/Xs0sTurBZNOh5ir/uERaGB 136NRHJLaEDmUYzJpzBnX9qOLunWLg7kdUJsNtUinM1Jy43WuhQ2+4ce0hgJuGaf/LIa YOC3J8KfcfdXe7ODtweuuy1BtmqIzpGu0F9ALxECQ7TldSHEYGRcP3CuioxQvR/UfLHN bQantwqzKZ1hmo+A869kiuRu8TrnjUn769clLqmnqWLsy3WV1rCTnaaKvLXjyzBDTvMK MTkQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=g+MCSHQfgSORuZx/1XnTQkQ53w9FR3g4o7/ENoC+YN8=; b=iJDtFlPN5xT/0o5eaMqiWOa+mxZ4uzvn4dPc4GBaweRWZQuE6bZ49PewPOewCMu65N CDVZ5ovHoo8qY+X3RCl8cKmlDMUrA81VjvzIPAHSRpBqpS3ioJCToQKJySBw7U1Ywvu1 4GOqzdAmu2hKhV0OLDZz4z/CqHkjaoB/5nEzAeVNxV+KnU+eLmBoLkakSlB75+95Ny7G wsEcm9kAR800bQ+aSggjQ50t9e99VTfp645dF7kxgC7Czctv4EL5os+w48aPcZGBg5kC hpee+KpJFRCLOtydlOL/tlcctVEv36GcU6ApwBLjrj3Hfc8Y3p66r0RSnmM3RT0gWpFo sESQ== X-Gm-Message-State: AOAM532Pc9XMd3Ht3qCVIzLWMNeqqkxuCP+xXcJzAoOXQwMIG+VpGcTW aX7VfH8AZzbG/4bAe64xnETwJ8fS2XWofGJbzv0KgsYc X-Received: by 2002:a25:3b4b:: with SMTP id i72mr2313633yba.22.1602818758479; Thu, 15 Oct 2020 20:25:58 -0700 (PDT) MIME-Version: 1.0 References: <20201005130128.3430804-1-poeschel@lemonage.de> <20201005130128.3430804-20-poeschel@lemonage.de> In-Reply-To: <20201005130128.3430804-20-poeschel@lemonage.de> From: Miguel Ojeda Date: Fri, 16 Oct 2020 05:25:47 +0200 Message-ID: Subject: Re: [PATCH v4 32/32] auxdisplay: add a driver for lcd2s character display To: Lars Poeschel Cc: open list Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Oct 5, 2020 at 3:01 PM wrote: > > + while (*esc && i < LCD2S_CHARACTER_SIZE + 2) { > + shift ^= 4; > + if (*esc >= '0' && *esc <= '9') { > + value |= (*esc - '0') << shift; > + } else if (*esc >= 'A' && *esc <= 'Z') { > + value |= (*esc - 'A' + 10) << shift; > + } else if (*esc >= 'a' && *esc <= 'z') { > + value |= (*esc - 'a' + 10) << shift; This should also probably use hex_to_bin() or similar (see my other comment on patch 24) and/or share the implementation as much as possible. Cheers, Miguel