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


Groups > linux.kernel > #1602847 > unrolled thread

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

Started byLinus Walleij <linus.walleij@linaro.org>
First post2017-03-16 22:30 +0100
Last post2017-03-17 08:50 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  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

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

FromLinus Walleij <linus.walleij@linaro.org>
Date2017-03-16 22:30 +0100
SubjectRe: [PATCH 00/13] Add HD44780 Character LCD support
Message-ID<tlL85-4dF-9@gated-at.bofh.it>
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.

Yours,
Linus Walleij

[toc] | [next] | [standalone]


#1603092

FromGeert Uytterhoeven <geert@linux-m68k.org>
Date2017-03-17 08:50 +0100
Message-ID<tlUO5-2W2-5@gated-at.bofh.it>
In reply to#1602847
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

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web