17 Jul, 2017

1 commit

  • charlcd_ops are not supposed to change at runtime. All functions
    working with charlcd_ops provided by work with
    const charlcd_ops. So mark the non-const structs as const.

    File size before:
    text data bss dec hex filename
    12750 560 362 13672 3568 drivers/auxdisplay/panel.o

    File size After adding 'const':
    text data bss dec hex filename
    12942 368 362 13672 3568 drivers/auxdisplay/panel.o

    Signed-off-by: Arvind Yadav
    Reviewed-by: Andy Shevchenko
    Signed-off-by: Greg Kroah-Hartman

    Arvind Yadav
     

26 May, 2017

1 commit


08 Apr, 2017

6 commits

  • It looks like arm-charlcd.c belongs to auxdisplay subsystem.

    Move it to drivers/auxdisplay folder.
    No functional changes intended.

    Reviewed-by: Linus Walleij
    Signed-off-by: Andy Shevchenko
    Signed-off-by: Greg Kroah-Hartman

    Andy Shevchenko
     
  • It looks like panel.c belongs to auxdisplay subsystem.

    Move it to drivers/auxdisplay folder.
    No functional changes intended.

    Acked-by: Geert Uytterhoeven
    Signed-off-by: Andy Shevchenko
    Signed-off-by: Greg Kroah-Hartman

    Andy Shevchenko
     
  • The data read from the device is 3 little-endian words, so let's
    annotate them as such and use le16_to_cpu() to convert them to host
    endianness - it might turn out to be a bit more performant, and it
    expresses the conversion more clearly.

    Signed-off-by: Dmitry Torokhov
    Signed-off-by: Greg Kroah-Hartman

    Dmitry Torokhov
     
  • If the driver is built as a module, autoload won't work because the module
    alias information is not filled. So user-space can't match the registered
    device with the corresponding module.

    Export the module alias information using the MODULE_DEVICE_TABLE() macro.

    Before this patch:

    $ modinfo drivers/auxdisplay/img-ascii-lcd.ko | grep alias
    $

    After this patch:

    $ modinfo drivers/auxdisplay/img-ascii-lcd.ko | grep alias
    alias: of:N*T*Cmti,sead3-lcdC*
    alias: of:N*T*Cmti,sead3-lcd
    alias: of:N*T*Cmti,malta-lcdC*
    alias: of:N*T*Cmti,malta-lcd
    alias: of:N*T*Cimg,boston-lcdC*
    alias: of:N*T*Cimg,boston-lcd

    Signed-off-by: Javier Martinez Canillas
    Signed-off-by: Greg Kroah-Hartman

    Javier Martinez Canillas
     
  • gcc-7.0.1 points out that we copy uninitialized data from the stack
    into a per-device structure:

    drivers/auxdisplay/ht16k33.c: In function 'ht16k33_keypad_irq_thread':
    arch/x86/include/asm/string_32.h:78:16: error: 'new_state' may be used uninitialized in this function [-Werror=maybe-uninitialized]
    arch/x86/include/asm/string_32.h:79:22: error: '*((void *)&new_state+4)' may be used uninitialized in this function [-Werror=maybe-uninitialized]

    The access is harmless because we never read the data, but we are better
    off not doing this, so this changes the code to only copy the data
    that was actually initialized. To make sure we don't overflow the
    stack with an incorrect DT, we also need to add a sanity checkin the
    probe function.

    Signed-off-by: Arnd Bergmann
    Reviewed-by: Robin van der Gracht
    Reviewed-by: Dmitry Torokhov
    Signed-off-by: Greg Kroah-Hartman

    Arnd Bergmann
     
  • DT properties specifying physical properties should contain appropriate
    suffices indicating the units of measurement.

    Hence amend the HD44780 DT bindings to add "chars" suffixes to the
    "display-height" and "display-width" properties, and update the driver
    to parse them.

    Fixes: dd9502a9e9156dd8 ("dt-bindings: auxdisplay: Add bindings for Hitachi HD44780")
    Fixes: d47d88361feea2ce ("auxdisplay: Add HD44780 Character LCD support")
    Signed-off-by: Geert Uytterhoeven
    Acked-by: Rob Herring
    Signed-off-by: Greg Kroah-Hartman

    Geert Uytterhoeven
     

27 Mar, 2017

1 commit


17 Mar, 2017

4 commits

  • The Hitachi HD44780 Character LCD Controller is commonly used on
    character LCDs that can display one or more lines of text.

    This driver supports character LCDs connected to GPIOs, using either a
    4-bit or 8-bit data bus, and provides access through the charlcd core
    and /dev/lcd.

    Signed-off-by: Geert Uytterhoeven
    Signed-off-by: Greg Kroah-Hartman

    Geert Uytterhoeven
     
  • On displays with more than two lines, the additional lines are stored in
    the buffers used for the first two lines, but beyond the visible parts.
    Adjust the DDRAM address calculation to cater for this.

    When clearing the display, avoid writing more spaces than the actual
    size of the physical buffer.

    Signed-off-by: Geert Uytterhoeven
    Signed-off-by: Greg Kroah-Hartman

    Geert Uytterhoeven
     
  • In 4-bit mode, 8-bit commands and data are written using two raw writes
    to the data interface: high nibble first, low nibble last. This must be
    handled by the low-level driver.

    However, as we don't know in which mode (4-bit or 8-bit) nor 4-bit phase
    the LCD was left, initialization must always be handled using raw
    writes, and needs to configure the LCD for 8-bit mode first.

    Signed-off-by: Geert Uytterhoeven
    Signed-off-by: Greg Kroah-Hartman

    Geert Uytterhoeven
     
  • Extract the character LCD core from the Parallel port LCD/Keypad Panel
    driver in the misc subsystem, and convert it into a subdriver in the
    auxdisplay subsystem. This allows the character LCD core to be used by
    other drivers later.

    Compilation is controlled by its own Kconfig symbol CHARLCD, which is to
    be selected by its users, but can be enabled manually for
    compile-testing.

    All functions changed their prefix from "lcd_" to "charlcd_", and gained
    a "struct charlcd *" parameter to operate on a specific instance.
    While the driver API thus is ready to support multiple instances, the
    current limitation of a single display (/dev/lcd has a single misc minor
    assigned) is retained.

    No functional changes intended.

    Signed-off-by: Geert Uytterhoeven
    Signed-off-by: Greg Kroah-Hartman

    Geert Uytterhoeven
     

16 Mar, 2017

1 commit


10 Feb, 2017

3 commits

  • There is no need for the driver to use private workqueue, standard system
    workqueue should suffice as they are going to use the same worker pool
    anyway.

    Acked-by: Robin van der Gracht
    Signed-off-by: Dmitry Torokhov
    Signed-off-by: Greg Kroah-Hartman

    Dmitry Torokhov
     
  • This patch fixes following issues in input device (keypad) handling:

    - requesting IRQ before allocating and initializing parts of the device
    that can be referenced from IRQ handler is racy, even if we try to
    disable interrupt after requesting it. Let's move allocations around
    so that everything is ready by the time we request IRQ.

    - using threaded interrupt handler to schedule a work item it sub-optimal.
    Disabling and then re-enabling interrupts in work item and in open/close
    methods is prone to races and exactly the reason theraded interrupts were
    introduced. Let's use the infrastructure properly and keep scanning the
    matrix array in IRQ thread, stopping when there are no keys, or when told
    to do so.

    Signed-off-by: Dmitry Torokhov
    Tested-by: Robin van der Gracht
    Signed-off-by: Greg Kroah-Hartman

    Dmitry Torokhov
     
  • 'fbdev' is allocated as part of larger ht16k33_priv structure; trying to
    free it will cause troubles.

    Acked-by: Robin van der Gracht
    Signed-off-by: Dmitry Torokhov
    Signed-off-by: Greg Kroah-Hartman

    Dmitry Torokhov
     

11 Jan, 2017

1 commit

  • Fix build errors caused by selecting incorrect kconfig symbols.

    drivers/built-in.o:(.data+0x19cec): undefined reference to `sys_fillrect'
    drivers/built-in.o:(.data+0x19cf0): undefined reference to `sys_copyarea'
    drivers/built-in.o:(.data+0x19cf4): undefined reference to `sys_imageblit'

    Fixes: 31114fa95bdb (auxdisplay: ht16k33: select framebuffer helper modules)

    Signed-off-by: Randy Dunlap
    Cc: Miguel Ojeda Sandonis
    Reported-by: kbuild test robot
    Acked-by: Robin van der Gracht
    Signed-off-by: Greg Kroah-Hartman

    Randy Dunlap
     

30 Nov, 2016

1 commit

  • The new driver caused a rare randconfig failure:

    drivers/auxdisplay/ht16k33.o:(.data.ht16k33_fb_ops+0xc): undefined reference to `fb_sys_read'
    drivers/auxdisplay/ht16k33.o:(.data.ht16k33_fb_ops+0x10): undefined reference to `fb_sys_write'

    This selects the respective helper modules.

    Reported-by: Arnd Bergmann
    Signed-off-by: Robin van der Gracht
    Signed-off-by: Greg Kroah-Hartman

    Robin van der Gracht
     

10 Nov, 2016

1 commit


06 Oct, 2016

1 commit

  • Add a driver for simple ASCII LCD displays found on the MIPS Boston,
    Malta & SEAD3 development boards. The Boston display is an independent
    memory mapped device with a simple memory mapped 8 byte register space
    containing the 8 ASCII characters to display. The Malta display is
    exposed as part of the Malta board registers, and provides 8 registers
    each of which corresponds to one of the ASCII characters to display. The
    SEAD3 display is slightly more complex, exposing an interface to an
    S6A0069 LCD controller via registers provided by the boards CPLD.
    However although the displays differ in their register interface, we
    require similar functionality on each board so abstracting away the
    differences within a single driver allows us to share a significant
    amount of code & ensure consistent behaviour.

    The driver displays the Linux kernel version as the default message, but
    allows the message to be changed via a character device. Messages longer
    then the number of characters that the display can show will scroll.

    This provides different behaviour to the existing LCD display code for
    the MIPS Malta or MIPS SEAD3 platforms in the following ways:

    - The default string to display is not "LINUX ON MALTA" or "LINUX ON
    SEAD3" but "Linux" followed by the version number of the kernel
    (UTS_RELEASE).

    - Since that string tends to be significantly longer it scrolls twice
    as fast, moving every 500ms rather than every 1s.

    - The LCD won't be updated until the driver is probed, so it doesn't
    provide the early "LINUX" string.

    Signed-off-by: Paul Burton
    Cc: Mauro Carvalho Chehab
    Cc: Miguel Ojeda Sandonis
    Cc: Guenter Roeck
    Cc: David S. Miller
    Cc: Greg Kroah-Hartman
    Cc: Geert Uytterhoeven
    Cc: Andrew Morton
    Cc: linux-mips@linux-mips.org
    Cc: linux-kernel@vger.kernel.org
    Patchwork: https://patchwork.linux-mips.org/patch/14062/
    Signed-off-by: Ralf Baechle

    Paul Burton
     

15 Aug, 2015

1 commit

  • The local variable ks0108_parport is used by other functions to write to
    the parallel port. We missed initializing it when we converted the
    driver to use new Parallel Port codes.

    Fixes: 4edd70c133f3 ("auxdisplay: ks0108: use new parport device model")
    Reported-by: Fengguang Wu
    Signed-off-by: Sudip Mukherjee
    Signed-off-by: Greg Kroah-Hartman

    Sudip Mukherjee
     

06 Aug, 2015

4 commits


29 Oct, 2013

1 commit


04 Jan, 2013

1 commit

  • CONFIG_HOTPLUG is going away as an option. As a result, the __dev*
    markings need to be removed.

    This change removes the use of __devinit, __devexit_p, __devinitdata,
    __devinitconst, and __devexit from these drivers.

    Based on patches originally written by Bill Pemberton, but redone by me
    in order to handle some of the coding style issues better, by hand.

    Cc: Bill Pemberton
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

31 Mar, 2011

1 commit


25 May, 2010

1 commit


30 Mar, 2010

1 commit

  • …it slab.h inclusion from percpu.h

    percpu.h is included by sched.h and module.h and thus ends up being
    included when building most .c files. percpu.h includes slab.h which
    in turn includes gfp.h making everything defined by the two files
    universally available and complicating inclusion dependencies.

    percpu.h -> slab.h dependency is about to be removed. Prepare for
    this change by updating users of gfp and slab facilities include those
    headers directly instead of assuming availability. As this conversion
    needs to touch large number of source files, the following script is
    used as the basis of conversion.

    http://userweb.kernel.org/~tj/misc/slabh-sweep.py

    The script does the followings.

    * Scan files for gfp and slab usages and update includes such that
    only the necessary includes are there. ie. if only gfp is used,
    gfp.h, if slab is used, slab.h.

    * When the script inserts a new include, it looks at the include
    blocks and try to put the new include such that its order conforms
    to its surrounding. It's put in the include block which contains
    core kernel includes, in the same order that the rest are ordered -
    alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
    doesn't seem to be any matching order.

    * If the script can't find a place to put a new include (mostly
    because the file doesn't have fitting include block), it prints out
    an error message indicating which .h file needs to be added to the
    file.

    The conversion was done in the following steps.

    1. The initial automatic conversion of all .c files updated slightly
    over 4000 files, deleting around 700 includes and adding ~480 gfp.h
    and ~3000 slab.h inclusions. The script emitted errors for ~400
    files.

    2. Each error was manually checked. Some didn't need the inclusion,
    some needed manual addition while adding it to implementation .h or
    embedding .c file was more appropriate for others. This step added
    inclusions to around 150 files.

    3. The script was run again and the output was compared to the edits
    from #2 to make sure no file was left behind.

    4. Several build tests were done and a couple of problems were fixed.
    e.g. lib/decompress_*.c used malloc/free() wrappers around slab
    APIs requiring slab.h to be added manually.

    5. The script was run on all .h files but without automatically
    editing them as sprinkling gfp.h and slab.h inclusions around .h
    files could easily lead to inclusion dependency hell. Most gfp.h
    inclusion directives were ignored as stuff from gfp.h was usually
    wildly available and often used in preprocessor macros. Each
    slab.h inclusion directive was examined and added manually as
    necessary.

    6. percpu.h was updated not to include slab.h.

    7. Build test were done on the following configurations and failures
    were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my
    distributed build env didn't work with gcov compiles) and a few
    more options had to be turned off depending on archs to make things
    build (like ipr on powerpc/64 which failed due to missing writeq).

    * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
    * powerpc and powerpc64 SMP allmodconfig
    * sparc and sparc64 SMP allmodconfig
    * ia64 SMP allmodconfig
    * s390 SMP allmodconfig
    * alpha SMP allmodconfig
    * um on x86_64 SMP allmodconfig

    8. percpu.h modifications were reverted so that it could be applied as
    a separate patch and serve as bisection point.

    Given the fact that I had only a couple of failures from tests on step
    6, I'm fairly confident about the coverage of this conversion patch.
    If there is a breakage, it's likely to be something in one of the arch
    headers which should be easily discoverable easily on most builds of
    the specific arch.

    Signed-off-by: Tejun Heo <tj@kernel.org>
    Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org>
    Cc: Ingo Molnar <mingo@redhat.com>
    Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>

    Tejun Heo
     

08 Mar, 2010

1 commit

  • A pointer to cfag12864bfb_probe is passed to the core via
    platform_driver_register and so the function must not disappear when the
    .init sections are discarded. Otherwise (if also having HOTPLUG=y)
    unbinding and binding a device to the driver via sysfs will result in an
    oops as does a device being registered late.

    An alternative to this patch is using platform_driver_probe instead of
    platform_driver_register plus removing the pointer to the probe function
    from the struct platform_driver.

    Signed-off-by: Uwe Kleine-König
    Acked-by: Miguel Ojeda
    Cc: Andrew Morton
    Cc: Avuton Olrich
    Cc: Antonino Daplas
    Signed-off-by: Greg Kroah-Hartman

    Uwe Kleine-König
     

01 Apr, 2009

1 commit

  • Remove PARPORT dependency for Auxiliary Display support.

    This is not needed since the dependency for the KS0108 driver is
    PARPORT_PC.

    Signed-off-by: H Hartley Sweeten
    Cc: Miguel Ojeda Sandonis
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    H Hartley Sweeten
     

25 Jul, 2008

1 commit

  • - Use BUILD_BUG_ON for CFAG12864B_SIZE instead of runtime-check

    - Use get_zeroed_page()

    Signed-off-by: Akinobu Mita
    Cc: Miguel Ojeda Sandonis
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Akinobu Mita
     

05 Jul, 2008

1 commit


23 Aug, 2007

1 commit

  • This one-liner patch fixes a bug in drivers/auxdisplay/cfag12864b.c

    At cfag12864b_init(), the driver tries to kalloc some memory in the
    variable cfag12864b_cache.

    Then, as usual, it checks if the call failed. However, it checks
    cfag12864b_buffer instead.

    This patch changes the "cfag12864b_buffer" to "cfag12864b_cache" so the
    correct variable is checked.

    Signed-off-by: Miguel Ojeda
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Miguel Ojeda
     

19 Aug, 2007

1 commit


17 Jul, 2007

1 commit

  • Make a "menuconfig" out of the Kconfig objects "menu, ..., endmenu",
    so that the user can disable all the options in that menu at once
    instead of having to disable each option separately.

    Signed-off-by: Jan Engelhardt
    Acked-by: Miguel Ojeda Sandonis
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jan Engelhardt
     

01 Jun, 2007

1 commit

  • Because the framebuffer memory is allocated system RAM, use the sys_ drawing
    libraries. It also fixes the following compile error:

    LD .tmp_vmlinux1
    drivers/built-in.o:(.data+0x8b48): undefined reference to `cfb_fillrect'
    drivers/built-in.o:(.data+0x8b50): undefined reference to `cfb_copyarea'
    drivers/built-in.o:(.data+0x8b58): undefined reference to `cfb_imageblit'

    [adaplas]
    Use fb_sys_read/write for the same reasons as above.

    Signed-off-by: Avuton Olrich
    Signed-off-by: Antonino Daplas
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Avuton Olrich
     

10 May, 2007

1 commit