aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mfd/rave-sp.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2018-07-27mfd: rave-sp: Emulate CMD_GET_STATUS on device that don't support itAndrey Smirnov1-33/+63
CMD_GET_STATUS is not supported by some devices implementing RDU2-compatible ICD as well as "legacy" devices. To account for that fact, add code that obtains the same information (app/bootloader FW version) using several different commands. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2018-07-27mfd: rave-sp: Add legacy watchdog ping command translationAndrey Smirnov1-0/+2
This is needed to make rave-sp-wdt driver to properly ping the watchdog on "legacy" firmware. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2018-07-27mfd: rave-sp: Add legacy EEPROM access command translationAndrey Smirnov1-0/+2
This is needed to make rave-sp-eeprom driver work on "legacy" firmware. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2018-07-27mfd: rave-sp: Initialize flow control and parity of the portAndrey Smirnov1-0/+7
Relying on serial port defaults for flow control and parity can result in complete breakdown of communication with RAVE SP on some platforms where defaults are not what we need them to be. One such case is VF610-base ZII SPU3 board (not supported upstream). To avoid this problem in the future, add code to explicitly configure both. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2018-07-27mfd: rave-sp: Fix incorrectly specified checksum typeAndrey Smirnov1-1/+1
RAVE SP firmware covered by "legacy" variant uses 16-bit CCITT checksum algorithm. Change the code to correctly reflect that. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2018-07-27mfd: rave-sp: Remove unused definesAndrey Smirnov1-10/+0
Remove unusded defines that are a leftover from earlier iterations of the driver. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2018-05-16mfd: rave-sp: Remove VLAKyle Spiers1-2/+9
As part of the effort to remove VLAs from the kernel[1], this creates constants for the checksum lengths of CCITT and 8B2C and changes crc_calculated to be the maximum size of a checksum. https://lkml.org/lkml/2018/3/7/621 Signed-off-by: Kyle Spiers <ksspiers@google.com> Reviewed-by: Kees Cook <keescook@chromium.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2018-05-16mfd: rave-sp: Check received frame length before accepting next byteAndrey Smirnov1-2/+2
Check received frame length _before_ accepting next byte in order to avoid incorrectly rejecting payloads that are RAVE_SP_RX_BUFFER_SIZE long. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Tested-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2018-05-16mfd: rave-sp: Convert print_hex_dump() to print_hex_dump_debug()Andrey Smirnov1-4/+4
Convert print_hex_dump() to print_hex_dump_debug() to be able to leverage CONFIG_DYNAMIC_DEBUG. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Reviewed-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2018-05-16mfd: rave-sp: Add code to print firmware versionsAndrey Smirnov1-0/+95
Add code that would query and print out bootloader and application firmware version info. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Tested-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2018-01-08mfd: Add driver for RAVE Supervisory ProcessorAndrey Smirnov1-0/+710
Add a driver for RAVE Supervisory Processor, an MCU implementing various bits of housekeeping functionality (watchdoging, backlight control, LED control, etc) on RAVE family of products by Zodiac Inflight Innovations. This driver implementes core MFD/serdev device as well as communication subroutines necessary for commanding the device. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Acked-by: Philippe Ombredanne <pombredanne@nexb.com> Acked-by: Pavel Machek <pavel@ucw.cz> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Tested-by: Chris Healy <cphealy@gmail.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>