[PATCH v2 6/7] ratp: use pr_ macros to print messages

2018-09-12 Thread Aleksander Morgado
Following suggestions in other patch reviews, the RAPT commands are updated to use pr_err() instead of plain printf() to report errors to the user. Signed-off-by: Aleksander Morgado --- common/ratp/md.c| 12 +++- common/ratp/mw.c| 14 -- common/ratp/reset.c | 6

[PATCH v2 0/7] RATP i2c and GPIO support

2018-09-12 Thread Aleksander Morgado
support depend on CONFIG_I2C and the RATP GPIO support on CONFIG_GENERIC_GPIO. That was missing, and was breaking build if RATP was selected but no i2c or GPIO support was included in the build. Comments welcome! Aleksander Morgado (7): ratp: implement i2c read/write support bbremote

[PATCH v2 1/7] ratp: implement i2c read/write support

2018-09-12 Thread Aleksander Morgado
in the message flags field. If this flag is unset, the start register address is assumed 8-bit long. If the message includes the I2C_FLAG_MASTER_MODE flag, the start register field is ignored and a i2c master send/receive operation is performed. Signed-off-by: Aleksander Morgado --- common/ratp

[PATCH v2 2/7] bbremote: implement i2c read/write support

2018-09-12 Thread Aleksander Morgado
i2c-write 0x00 0x68 0x06A0 0x01 "8f30" 4 bytes written $ ./scripts/bbremote --port /dev/ttyUSB2 i2c-read 0x00 0x68 0x06A0 0x01 4 8f300000 Signed-off-by: Aleksander Morgado --- scripts/remote/controller.py | 24 ++ scripts/remote/main.py | 37

[PATCH v2 4/7] bbremote: implement support for GPIO operations

2018-09-12 Thread Aleksander Morgado
Signed-off-by: Aleksander Morgado --- scripts/remote/controller.py | 36 ++ scripts/remote/main.py | 37 ++ scripts/remote/messages.py | 93 3 files changed, 166 insertions(+) diff --git a/scripts/remote/controller.py b

[PATCH v2 5/7] ratp: use __packed instead of the full form

2018-09-12 Thread Aleksander Morgado
Just a minor coding style change to follow the suggestions given in patch reviews for other RATP commands. Signed-off-by: Aleksander Morgado --- common/ratp/md.c| 4 ++-- common/ratp/mw.c| 4 ++-- common/ratp/reset.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git

[PATCH v2 3/7] ratp: implement support for GPIO commands

2018-09-12 Thread Aleksander Morgado
Introduce three new RATP commands that allow getting and setting GPIO values as well as configuring the direction of the GPIO pins. Signed-off-by: Aleksander Morgado --- common/ratp/Kconfig | 10 ++- common/ratp/Makefile | 1 + common/ratp/gpio.c | 144

Re: [PATCH 1/4] ratp: implement i2c read/write support

2018-09-12 Thread Aleksander Morgado
Hey Andrey, Thanks for the review :) see some comments below. >> + /* Don't read anything on error or if 0 bytes were requested */ >> + if (size > 0) { >> + adapter = i2c_get_adapter(i2c_read_req->bus); >> + if (!adapter) { >> +

<    1   2