• Marek Vasut's avatar
    Input: ili210x - add ili251x firmware update support · c6ac8f0b
    Marek Vasut authored
    The ili251x firmware can be updated, this is used when switching between
    different modes of operation of the touch surface, e.g. glove operation.
    This patch implements the firmware update mechanism triggered by a write
    into an sysfs attribute.
    
    The firmware itself is distributed as an intel hex file with non-standard
    types. The first two lines are of type 0xad, which indicates the start of
    DataFlash payload, that is always at address 0xf000 on the ili251x, so it
    can be dropped, and 0xac which indicates the position of firmware info in
    the Application payload, that is always at address 0x2020 on the ili251x
    and we do not care. The rest of the firmware is data of type 0x00, and we
    care about that. To convert the firmware hex file into something usable
    by the kernel, remove the first two lines and then use ihex2fw:
    
     $ tail -n +3 input.hex > temp.hex
     $ ./tools/firmware/ihex2fw temp.hex firmware/ilitek/ili251x.bin
    
    To trigger the firmware update, place fir...
    c6ac8f0b
Kconfig 37 KB