drm/solomon: Move device info from ssd130x-i2c to the core driver
authorJavier Martinez Canillas <javierm@redhat.com>
Tue, 19 Apr 2022 21:48:22 +0000 (23:48 +0200)
committerJavier Martinez Canillas <javierm@redhat.com>
Wed, 20 Apr 2022 16:48:17 +0000 (18:48 +0200)
commit4203e88ba80bbcdfaa7689db286d07cf4f2993d0
treec9fe0ad96948534358834d2102ebe5df4fd15ad7
parentfb197474eddc9369492228f1e423f4ccf0f309b4
drm/solomon: Move device info from ssd130x-i2c to the core driver

These are declared in the ssd130x-i2c transport driver but the information
is not I2C specific, and could be used by other SSD130x transport drivers.

Move them to the ssd130x core driver and just set the OF device entries to
an ID that could be used to lookup the correct device info from an array.

While being there, also move the SSD130X_DATA and SSD130X_COMMAND control
bytes. Since even though they are used by the I2C interface, they could
also be useful for other transport protocols such as SPI.

Suggested-by: Chen-Yu Tsai <wens@kernel.org>
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
Acked-by: Mark Brown <broonie@kernel.org>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://patchwork.freedesktop.org/patch/msgid/20220419214824.335075-5-javierm@redhat.com
drivers/gpu/drm/solomon/ssd130x-i2c.c
drivers/gpu/drm/solomon/ssd130x.c
drivers/gpu/drm/solomon/ssd130x.h