From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751182AbdCQHkm (ORCPT ); Fri, 17 Mar 2017 03:40:42 -0400 Received: from mail-it0-f66.google.com ([209.85.214.66]:35940 "EHLO mail-it0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750997AbdCQHkk (ORCPT ); Fri, 17 Mar 2017 03:40:40 -0400 MIME-Version: 1.0 In-Reply-To: References: <1486391895-9554-1-git-send-email-geert@linux-m68k.org> From: Geert Uytterhoeven Date: Fri, 17 Mar 2017 08:40:38 +0100 X-Google-Sender-Auth: j1wpdkJZWQ3R34sX0yGkd45pOJs Message-ID: Subject: Re: [PATCH 00/13] Add HD44780 Character LCD support To: Linus Walleij Cc: Miguel Ojeda Sandonis , Greg Kroah-Hartman , Willy Tarreau , Ksenija Stanojevic , Arnd Bergmann , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Linus, On Thu, Mar 16, 2017 at 9:50 PM, Linus Walleij wrote: > On Mon, Feb 6, 2017 at 3:38 PM, Geert Uytterhoeven wrote: > >> Note that Linux has other support for HD44780 Character LCDs, but none of >> it is generic: >> - drivers/misc/arm-charlcd.c involves a custom IP block for interfacing >> to the LCD controller, > > I can move this over to the generic framework if I get some example > of what needs to be done. At the very least the file should be moved > over to auxdisplay. Should be as simple as setting up the ops: static const struct charlcd_ops arm_charlcd_ops = { .write_cmd = charlcd_4bit_command, .write_cmd_raw4 = wrapper around writel(x, lcd->virtbase + CHAR_COM), .write_data = charlcd_4bit_char, }; and replacing the custom initialization with: lcd = charlcd_alloc(sizeof(size(struct arm_charlcd)); ... lcd->ifwidth = 4; lcd->width = FIXME; lcd->height = 2; cd->ops = &arm_charlcd_ops; charlcd_register(lcd); There's no suspend/resume support in the charlcd core yet, though. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds