@@ -38,6 +38,7 @@ struct s6e88a0_ams427ap24 {
38
38
struct mipi_dsi_device * dsi ;
39
39
struct regulator_bulk_data * supplies ;
40
40
struct gpio_desc * reset_gpio ;
41
+ bool flip_horizontal ;
41
42
};
42
43
43
44
static const struct regulator_bulk_data s6e88a0_ams427ap24_supplies [] = {
@@ -550,6 +551,10 @@ static int s6e88a0_ams427ap24_on(struct s6e88a0_ams427ap24 *ctx)
550
551
mipi_dsi_dcs_write_seq_multi (& dsi_ctx , 0xcc , 0x4c ); // pixel clock divider pol.
551
552
mipi_dsi_dcs_write_seq_multi (& dsi_ctx , 0xf2 , 0x03 , 0x0d ); // unknown
552
553
mipi_dsi_dcs_write_seq_multi (& dsi_ctx , 0xf1 , 0xa5 , 0xa5 ); // level 3 key off
554
+
555
+ if (ctx -> flip_horizontal )
556
+ mipi_dsi_dcs_write_seq_multi (& dsi_ctx , 0xcb , 0x0e ); // flip display
557
+
553
558
mipi_dsi_dcs_write_seq_multi (& dsi_ctx , 0xf0 , 0xa5 , 0xa5 ); // level 1 key off
554
559
mipi_dsi_dcs_write_seq_multi (& dsi_ctx , 0xfc , 0xa5 , 0xa5 ); // level 2 key off
555
560
@@ -710,6 +715,8 @@ static int s6e88a0_ams427ap24_probe(struct mipi_dsi_device *dsi)
710
715
DRM_MODE_CONNECTOR_DSI );
711
716
ctx -> panel .prepare_prev_first = true;
712
717
718
+ ctx -> flip_horizontal = device_property_read_bool (dev , "flip-horizontal" );
719
+
713
720
ret = s6e88a0_ams427ap24_register_backlight (ctx );
714
721
if (ret < 0 )
715
722
return ret ;
0 commit comments