Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1603092

Re: [PATCH 00/13] Add HD44780 Character LCD support

From Geert Uytterhoeven <geert@linux-m68k.org>
Newsgroups linux.kernel
Subject Re: [PATCH 00/13] Add HD44780 Character LCD support
Date 2017-03-17 08:50 +0100
Message-ID <tlUO5-2W2-5@gated-at.bofh.it> (permalink)
References <t7SCt-68H-3@gated-at.bofh.it> <tlL85-4dF-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Hi Linus,

On Thu, Mar 16, 2017 at 9:50 PM, Linus Walleij <linus.walleij@linaro.org> wrote:
> On Mon, Feb 6, 2017 at 3:38 PM, Geert Uytterhoeven <geert@linux-m68k.org> 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

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Re: [PATCH 00/13] Add HD44780 Character LCD support Linus Walleij <linus.walleij@linaro.org> - 2017-03-16 22:30 +0100
  Re: [PATCH 00/13] Add HD44780 Character LCD support Geert Uytterhoeven <geert@linux-m68k.org> - 2017-03-17 08:50 +0100

csiph-web