Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp6852994ybc; Thu, 28 Nov 2019 06:36:04 -0800 (PST) X-Google-Smtp-Source: APXvYqyJ9F5Mr52gd1im/Z+hJNJeP6lfFFHK+87sanrGiQEcTt7DJCZ/MyCN5x3UIvJV8A1RQdfH X-Received: by 2002:aa7:da0e:: with SMTP id r14mr38755042eds.49.1574951763750; Thu, 28 Nov 2019 06:36:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574951763; cv=none; d=google.com; s=arc-20160816; b=xbGcyJpg0d/Ct4oVtyIN+OROi5Ji9SWgTEIz7ekIwq8cR1n3d4jmWml4RFB5ZzmPbZ 77vYddhfu42ULjTKvKg0fRDjCE92BRxiL0becpuT20IQ03MJaXD4a4ezp9SaJ+T20J0N xxbqGKhpCAxUnl6paHOFwaQPNox/SprKPuwsE/mi8pKJSbpVnu9Yoy7xG2E3z+WUnWDs Pguq2JRbFlNbQ7TANYT3RuWPQbzngb7EcTGNUNor+Vp+0c4mQKpPE2KbJqxwVrV6WOwd CNOOb2b8YmSk9AHwXuim5GmNjD40EhZavRrJKD/jAni+YqKO3uWtmS/7vw8Un8aPeFgd vWnw== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:autocrypt:openpgp:references:cc:to:from:subject:reply-to :dkim-signature; bh=9F8I2WmQPdsX5qOL1qYz6e2vPlm0dDnhLc0tOagIl48=; b=uzaTqPhyAYexeYm6zTW+x3/eUmzrcPUEhh8/DogiEsOLz2+rPwHlHPOTLOfV9wtcC7 6TL8drOYYD9y/i4nJ2dPfCqEGWjA0G5LtOkaBmKtqGPZ2soU0R9SqNvPFyuEB0qX34ds 4388G/uyApKywYivOjDTJqyQOq9iyIQbUNtDzBcaHl+ANsW4Pm65X987JW1nx60Mhozk ev2qAAPFYXRAI68M0Q7IeDxfIDkghLJh87H/9ufko8n3legrpKjfJ4wa32WB25skpach WQQzWgRvJw1a/o+6zzhDDZPAmKxe5HD+tsWFyy5p5wk3UwWUKRLNPVccyeLjHofjx7Dn fxQg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=r9dFHHn6; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n25si5641145ejb.416.2019.11.28.06.35.38; Thu, 28 Nov 2019 06:36:03 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=r9dFHHn6; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726608AbfK1Oe0 (ORCPT + 99 others); Thu, 28 Nov 2019 09:34:26 -0500 Received: from mail.kernel.org ([198.145.29.99]:58610 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726401AbfK1Oe0 (ORCPT ); Thu, 28 Nov 2019 09:34:26 -0500 Received: from [192.168.0.20] (cpc89242-aztw30-2-0-cust488.18-1.cable.virginm.net [86.31.129.233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id DF6622071F; Thu, 28 Nov 2019 14:34:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574951665; bh=EgeUU4IayHL4JT8g39X4o2o/GERIIpTcGciFtRo83Sc=; h=Reply-To:Subject:From:To:Cc:References:Date:In-Reply-To:From; b=r9dFHHn65cpvkSZVaaHOfoxV2SH5GbXnXTrUhkYDonbnMnNUOcJ89z2Gy32Jd2dk1 mEC5RN3juinlZGDNtStVG2g7t5KdWV9ggOafjhBLcz9zlyzHBAXnYUEK+tOFfZULYZ 0oYABq6dWnHOAR5ikm4i/kxw1uw6ddoR7OuqPPnc= Reply-To: kbingham@kernel.org, kbingham@kernel.org Subject: Re: [PATCH 3/3] drivers: auxdisplay: Add JHD1313 I2C interface driver From: Kieran Bingham To: Miguel Ojeda Cc: linux-kernel , devicetree@vger.kernel.org, Rob Herring , Simon Goda References: <20191128105508.3916-1-kbingham@kernel.org> <20191128105508.3916-4-kbingham@kernel.org> <41212589-163f-63a2-38ab-1a1fb05f4813@kernel.org> Openpgp: preference=signencrypt Autocrypt: addr=kbingham@kernel.org; keydata= mQINBFYE/WYBEACs1PwjMD9rgCu1hlIiUA1AXR4rv2v+BCLUq//vrX5S5bjzxKAryRf0uHat V/zwz6hiDrZuHUACDB7X8OaQcwhLaVlq6byfoBr25+hbZG7G3+5EUl9cQ7dQEdvNj6V6y/SC rRanWfelwQThCHckbobWiQJfK9n7rYNcPMq9B8e9F020LFH7Kj6YmO95ewJGgLm+idg1Kb3C potzWkXc1xmPzcQ1fvQMOfMwdS+4SNw4rY9f07Xb2K99rjMwZVDgESKIzhsDB5GY465sCsiQ cSAZRxqE49RTBq2+EQsbrQpIc8XiffAB8qexh5/QPzCmR4kJgCGeHIXBtgRj+nIkCJPZvZtf Kr2EAbc6tgg6DkAEHJb+1okosV09+0+TXywYvtEop/WUOWQ+zo+Y/OBd+8Ptgt1pDRyOBzL8 RXa8ZqRf0Mwg75D+dKntZeJHzPRJyrlfQokngAAs4PaFt6UfS+ypMAF37T6CeDArQC41V3ko lPn1yMsVD0p+6i3DPvA/GPIksDC4owjnz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jIAuo8JiRWctP16KjzUM7MO0/+4zllM8EY57rXrj48jsbEYX0YQnzaj+jO6kJto ZsIaYR7rMMq9aUAjyiaEZpmP1qF/2sYenDx0Fg2BSlLvLvXM0vU8pQk3kgDu7kb/7PRYrZvB sr21EIQoIjXbZxDz/o7z95frkP71EaICttZ6k9q5oxxA5WC6sTXcMW8zs8avFNuA9VpXt0Yu pJd2ijtZy2mpZNG02fFVXhIn4G807G7+9mhuC4XG5rKlBBUXTvPUAfYnB4JBDLmLzBFavQfv onSfbitgXwCG3vS+9HEwAjU30Bar1PEOmIbiAoMzuKeRm2LVpmq4WZw01QYHU/GUV/zHJSFk Message-ID: <22736d5f-b078-eb1f-8ee7-bff2f7774a6f@kernel.org> Date: Thu, 28 Nov 2019 14:34:21 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <41212589-163f-63a2-38ab-1a1fb05f4813@kernel.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello again, On 28/11/2019 14:08, Kieran Bingham wrote: > Hi Miguel, > > On 28/11/2019 13:43, Miguel Ojeda wrote: >> Hi Kieran, >> >> On Thu, Nov 28, 2019 at 11:55 AM wrote: >>> >>> diff --git a/MAINTAINERS b/MAINTAINERS >>> index 8f075b866aaf..640f099ff7fb 100644 >>> --- a/MAINTAINERS >>> +++ b/MAINTAINERS >>> @@ -8837,6 +8837,10 @@ S: Maintained >>> F: Documentation/admin-guide/jfs.rst >>> F: fs/jfs/ >>> >>> +JHD1313 LCD Dispaly driver >> >> Typo (and it should be all uppercase; and perhaps "Display" is not >> needed given LCD is there; but see also comments on the title below). > > Good spot, and good point "Liquid Crystal Display Display" is a bit > redundant. > >> Also missing the "S:" entry. > > Ah yes, I think we can add the following here: > > S: Maintained > >>> diff --git a/drivers/auxdisplay/Kconfig b/drivers/auxdisplay/Kconfig >>> index b8313a04422d..cfc61c1abdee 100644 >>> --- a/drivers/auxdisplay/Kconfig >>> +++ b/drivers/auxdisplay/Kconfig >>> @@ -27,6 +27,18 @@ config HD44780 >>> kernel and started at boot. >>> If you don't understand what all this is about, say N. >>> >>> +config JHD1313 >>> + tristate "JHD1313 Character LCD support" >>> + depends on I2C >>> + select CHARLCD >>> + ---help--- >>> + Enable support for Character LCDs using a JHD1313 controller on I2C. >>> + The LCD is accessible through the /dev/lcd char device (10, 156). >>> + This code can either be compiled as a module, or linked into the >>> + kernel and started at boot. >>> + This supports the LCD panel on the Grove 16x2 LCD series. >>> + If you don't understand what all this is about, say N. >> >> Would it be useful/worth for users to put "Grove series" and/or "I2C" >> in the tristate title? (i.e. like the help section explains and also >> like the MODULE_DESCRIPTION says). > > I have struggled with the difference between the definition of this > driver (which supports a 'JHD1313') vs the 'product' that uses it (the > Grove display), and I also suspect that as it's just an implementation > of a more generic part, so I'm also contemplating renaming this. For > instance, the products at: > > http://www.jhdlcd.com.cn/162character.html > > All seem to reference an SPLC780D controller, and have varying > properties of backlight colour, and text colour. > > Thus I highly suspect that the JHD1313 is just a specific > variant/implementation of the range which is utilised by the Grove LCD > board. (which makes jhd1313 a bad name for this driver...) > > Do you have any experience in these various part numbers, to suggest > perhaps a better naming? > > Or I wonder if anyone has any relevant contacts at either Seeed, or JHD > or any other related part here... > > Now that I track down the SPLC780D, I see: > > https://www.newhavendisplay.com/app_notes/SPLC780D.pdf Following the rabbit-hole even deeper, I have now discovered that Seed have now put up a /real/ JHD1313 datasheet: https://github.com/SeeedDocument/Grove_LCD_RGB_Backlight/blob/master/res/JHD1313%20FP-RGB-1%201.4.pdf However, that leads down a further path - as it references in the block diagram on page 12 that the I2C component (which is really what this driver is about) is an AIP31068L (or equivalence) which handles the bridging between the I2C interface, and the segment driver. (And this is yet again, another newhaven-display part) So that's pushing me towards the idea that this is in fact a newhaven,aip31068l device driver. Perhaps we would support compatibles such as "jhd,jhd1313", "jhd,jhd1214" as convenience aliases though ? Any thoughts from anyone? > Which leads to 'yet another vendor', and actually I already see > newhaven,.* in vendor-prefixes.yaml ... however this looks like it > relates to just the 'LCD driver', and does not provide the I2C interface > - so the device is of course more complex than a single part. > > Anyway, certainly adding in I2C would be beneficial though. > > >>> diff --git a/drivers/auxdisplay/jhd1313.c b/drivers/auxdisplay/jhd1313.c >>> new file mode 100644 >>> index 000000000000..abf270e128ac >>> --- /dev/null >>> +++ b/drivers/auxdisplay/jhd1313.c >>> @@ -0,0 +1,111 @@ >>> +// SPDX-License-Identifier: GPL-2.0+ >>> + >> >> Unconventional (AFAIK) empty line. > > Ooops, I can drop that one :-D > >> Thanks for the driver! > > You're welcome. The charlcd_ framework makes it easy to add an LCD over > I2C, and I hope this can be useful to others. > >> Cheers, >> Miguel -- Kieran