drm/panel/panel-sitronix-st7701: Make gamma correction TFT specific
authorMarek Vasut <marex@denx.de>
Sun, 10 Jul 2022 19:44:32 +0000 (21:44 +0200)
committerLinus Walleij <linus.walleij@linaro.org>
Tue, 19 Jul 2022 08:38:56 +0000 (10:38 +0200)
commit779c84fea3dbd658d3c4b72937732193cb01bf15
treec5f575db9f98042f18c27e09a9d0ea5d11fb4b8f
parent7fa8e07128ed660c97c4a8fe615967e654b84f32
drm/panel/panel-sitronix-st7701: Make gamma correction TFT specific

The gamma correction values are specific to the TFT which is attached to
the ST7701 TFT matrix driver, move the gamma correction values from what
incorrectly looks like common init sequence into TFT matrix specific
settings.

While doing so, add macros which defined fields within the gamma register
file and a macro which mimics FIELD_PREP except works with constant
expressions.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Guido Günther <agx@sigxcpu.org>
Cc: Jagan Teki <jagan@amarulasolutions.com>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Thierry Reding <thierry.reding@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20220710194437.289042-4-marex@denx.de
drivers/gpu/drm/panel/panel-sitronix-st7701.c