diff options
author | Noralf Trønnes <noralf@tronnes.org> | 2019-07-19 17:59:11 +0200 |
---|---|---|
committer | Noralf Trønnes <noralf@tronnes.org> | 2019-07-23 15:46:56 +0200 |
commit | 083a6c23b9ecf478265bb27ccacb8d587732058e (patch) | |
tree | 8eb5c8f95bc4b54f2180375b98d4eb153e87d5f1 /drivers/gpu/drm/tinydrm/ili9225.c | |
parent | drm/tinydrm: Remove tinydrm_spi_max_transfer_size() (diff) | |
download | linux-083a6c23b9ecf478265bb27ccacb8d587732058e.tar.xz linux-083a6c23b9ecf478265bb27ccacb8d587732058e.zip |
drm/tinydrm: Clean up tinydrm_spi_transfer()
Prep work before moving the function to mipi-dbi.
tinydrm_spi_transfer() was made to support one class of drivers in
drivers/staging/fbtft that has not been converted to DRM yet, so strip
away the unused functionality:
- Start byte (header) is not used.
- No driver relies on the automatic 16-bit byte swapping on little endian
machines with SPI controllers only supporting 8 bits per word.
Other changes:
- No need to initialize ret
- No need for the WARN since mipi-dbi only uses 8 and 16 bpw.
- Use spi_message_init_with_transfers()
Cc: David Lechner <david@lechnology.com>
Acked-by: : David Lechner <david@lechnology.com>
Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20190719155916.62465-7-noralf@tronnes.org
Diffstat (limited to 'drivers/gpu/drm/tinydrm/ili9225.c')
-rw-r--r-- | drivers/gpu/drm/tinydrm/ili9225.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/tinydrm/ili9225.c b/drivers/gpu/drm/tinydrm/ili9225.c index 7a8e1b4a37ee..21677e3ed38b 100644 --- a/drivers/gpu/drm/tinydrm/ili9225.c +++ b/drivers/gpu/drm/tinydrm/ili9225.c @@ -323,7 +323,7 @@ static int ili9225_dbi_command(struct mipi_dbi *mipi, u8 *cmd, u8 *par, gpiod_set_value_cansleep(mipi->dc, 0); speed_hz = mipi_dbi_spi_cmd_max_speed(spi, 1); - ret = tinydrm_spi_transfer(spi, speed_hz, NULL, 8, cmd, 1); + ret = tinydrm_spi_transfer(spi, speed_hz, 8, cmd, 1); if (ret || !num) return ret; @@ -333,7 +333,7 @@ static int ili9225_dbi_command(struct mipi_dbi *mipi, u8 *cmd, u8 *par, gpiod_set_value_cansleep(mipi->dc, 1); speed_hz = mipi_dbi_spi_cmd_max_speed(spi, num); - return tinydrm_spi_transfer(spi, speed_hz, NULL, bpw, par, num); + return tinydrm_spi_transfer(spi, speed_hz, bpw, par, num); } static const struct drm_simple_display_pipe_funcs ili9225_pipe_funcs = { |