diff options
author | Noralf Trønnes <noralf@tronnes.org> | 2019-07-19 17:59:12 +0200 |
---|---|---|
committer | Noralf Trønnes <noralf@tronnes.org> | 2019-07-23 15:47:33 +0200 |
commit | d23d4d4dac0119c7bfba63342a86a68b38c01779 (patch) | |
tree | 1478832fab43424a1759f4528d384baaa35a4956 /include/drm/tinydrm | |
parent | 083a6c23b9ecf478265bb27ccacb8d587732058e (diff) | |
download | blackbird-op-linux-d23d4d4dac0119c7bfba63342a86a68b38c01779.tar.gz blackbird-op-linux-d23d4d4dac0119c7bfba63342a86a68b38c01779.zip |
drm/tinydrm: Move tinydrm_spi_transfer()
This is only used by mipi-dbi drivers so move it there.
The reason this isn't moved to the SPI subsystem is that it will in a
later patch pass a dummy rx buffer for SPI controllers that need this.
Low memory boards (64MB) can run into a problem allocating such a "large"
contiguous buffer on every transfer after a long up time.
This leaves a very specific use case, so we'll keep the function here.
mipi-dbi will first go through a refactoring though, before this will
be done.
Remove SPI todo entry now that we're done with the tinydrm.ko SPI code.
v2: Drop moving the mipi_dbi_spi_init() declaration (Sam)
Cc: David Lechner <david@lechnology.com>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
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-8-noralf@tronnes.org
Diffstat (limited to 'include/drm/tinydrm')
-rw-r--r-- | include/drm/tinydrm/mipi-dbi.h | 3 | ||||
-rw-r--r-- | include/drm/tinydrm/tinydrm-helpers.h | 5 |
2 files changed, 3 insertions, 5 deletions
diff --git a/include/drm/tinydrm/mipi-dbi.h b/include/drm/tinydrm/mipi-dbi.h index 51fc667beef7..35a1413f2122 100644 --- a/include/drm/tinydrm/mipi-dbi.h +++ b/include/drm/tinydrm/mipi-dbi.h @@ -83,7 +83,10 @@ void mipi_dbi_hw_reset(struct mipi_dbi *mipi); bool mipi_dbi_display_is_on(struct mipi_dbi *mipi); int mipi_dbi_poweron_reset(struct mipi_dbi *mipi); int mipi_dbi_poweron_conditional_reset(struct mipi_dbi *mipi); + u32 mipi_dbi_spi_cmd_max_speed(struct spi_device *spi, size_t len); +int mipi_dbi_spi_transfer(struct spi_device *spi, u32 speed_hz, + u8 bpw, const void *buf, size_t len); int mipi_dbi_command_read(struct mipi_dbi *mipi, u8 cmd, u8 *val); int mipi_dbi_command_buf(struct mipi_dbi *mipi, u8 cmd, u8 *data, size_t len); diff --git a/include/drm/tinydrm/tinydrm-helpers.h b/include/drm/tinydrm/tinydrm-helpers.h index 708c5a7d51e0..8c5d20efeaa1 100644 --- a/include/drm/tinydrm/tinydrm-helpers.h +++ b/include/drm/tinydrm/tinydrm-helpers.h @@ -13,8 +13,6 @@ struct drm_framebuffer; struct drm_rect; struct drm_simple_display_pipe; struct drm_simple_display_pipe_funcs; -struct spi_transfer; -struct spi_device; struct device; /** @@ -41,7 +39,4 @@ int tinydrm_display_pipe_init(struct drm_device *drm, const struct drm_display_mode *mode, unsigned int rotation); -int tinydrm_spi_transfer(struct spi_device *spi, u32 speed_hz, - u8 bpw, const void *buf, size_t len); - #endif /* __LINUX_TINYDRM_HELPERS_H */ |