Skip to contentSkip to conversation

Add Lontium LT9611C(EX/UXD) MIPI DSI to HDMI driver

PATCH Superseded [email protected] 4 participants 26 messages May 8 – Jun 26

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

v6 cover Add Lontium LT9611C(EX/UXD) MIPI DSI to HDMI driver

From: Sunyun Yang <[email protected]>

This series introduces:
- A device tree binding YAML file describing the hardware
- A new DRM bridge driver implementing the basic functionality

LT9611C(EX/UXD) is an I2C-controlled chip that Receiver signal/dual port mipi dsi and output hdmi, differences in hardware features:
- LT9611C: supports 1-port mipi dsi to hdmi 1.4
- LT9611EX: supports 2-port mipi dsi to hdmi 1.4
- LT9611UXD: supports 2-port mipi dsi to hdmi 1.4/2.0

---
Changes in v6:
- dt-binding:
1. sorted the compatible list alphabetically. [Dmitry]
- drm/bridge:
- Link to v5: https://lore.kernel.org/lkml/[email protected]/

Changes in v5:
- dt-binding:
- drm/bridge:
1. use #define FW_FILE "Lontium/lt9611c_fw.bin" to match linux-firmware [Dmitry]
2. add atomic state management
- Link to v4: https://lore.kernel.org/lkml/[email protected]/

Changes in v4:
- dt-binding:
1. fix commit message [Krzysztof]
- drm/bridge:
1. use lt9611c_fw.bin [Dmitry]
2. use drm_bridge::next_bridge
3. use enum lt9611_chip_type
4. remove *fw from the lt9611c struct
5. "bool hdmi_connected;" variable add comment
6. use read_poll_timeout and -ETIMEDOUT in the "lt9611c_read_write_flow" function
7. replace mutex_lock(&lt9611c->ocm_lock) with guard(mutex)(&lt9611c->ocm_lock) in some place
8. switch to ARRAY_SIZE instead of specifying lengths directly
9. use dev_err_probe
10. add clear functions for AVI and audio infoframes
11. add DRM_BRIDGE_OP_HDMI and remove .hpd_notify
12. remove the sample_rate validation code
13. fix MODULE_DESCRIPTION
14. replace "GPL v2" with "GPL"
- Link to v3: https://lore.kernel.org/lkml/[email protected]/

Changes in v3:
- dt-binding:
1. lt9611c(ex/uxd) content merged into lontium,lt9611.yaml
- drm/bridge:
1. Drop the licence text, only use SPDX header
2. Sort the headers
3. Use library functions for crc8
4. Drop i2c_read_byte and i2c_write_byte
5. Lowercase all hex values
6. Use paged writes as implemented for LT9611C(EX/UXD)
7. Drop dev_info, use dev_dbg
8. Modify lt9611c_get_edid_block, don't store EDID in the long-term structures
9. Use HDMI audio helpers.
10. Remove unnecessary flags,Implement proper cleanup path, unwinding resources one by one.
11. Replace devm_kzalloc with devm_drm_bridge_alloc.
12. Remove extra kthread.
- Link to v1: https://lore.kernel.org/lkml/[email protected]/

Changes in v2:
1. Forget modify code, operation error, Please disregard this submit.

Changes in v1:
- dt-binding:
1. Submit the first version of the code.
- drm/bridge:
1. Submit the first version of the code.

---
Sunyun Yang (2):
dt-bindings: bridge: Add Lontium LT9611C(EX/UXD) MIPI DSI to HDMI
driver
drm/bridge: Add Lontium LT9611C(EX/UXD) MIPI DSI to HDMI driver

 .../display/bridge/lontium,lt9611.yaml        |    8 +-
 drivers/gpu/drm/bridge/Kconfig                |   18 +
 drivers/gpu/drm/bridge/Makefile               |    1 +
 drivers/gpu/drm/bridge/lontium-lt9611c.c      | 1241 +++++++++++++++++
 4 files changed, 1266 insertions(+), 2 deletions(-)
 create mode 100644 drivers/gpu/drm/bridge/lontium-lt9611c.c
Signature · 1 line
2.34.1
#1 lore raw

PATCH v6 1/2 dt-bindings: bridge: Add Lontium LT9611C(EX/UXD) MIPI DSI to HDMI driver

From: Sunyun Yang <[email protected]>

LT9611C(EX/UXD) is an I2C-controlled chip that Receiver signal/dual port mipi dsi and output hdmi, differences in hardware features:
- LT9611C: supports 1-port mipi dsi to hdmi 1.4
- LT9611EX: supports 2-port mipi dsi to hdmi 1.4
- LT9611UXD: supports 2-port mipi dsi to hdmi 1.4/2.0

---
 .../bindings/display/bridge/lontium,lt9611.yaml           | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
Documentation/devicetree/bindings/display/bridge/lontium,lt9611.yaml +6 -2
index 429a06057ae8..e0821a63d9d7 100644
@@ -4,19 +4,23 @@
 $id: http://devicetree.org/schemas/display/bridge/lontium,lt9611.yaml#
 $schema: http://devicetree.org/meta-schemas/core.yaml#
 
-title: Lontium LT9611(UXC) 2 Port MIPI to HDMI Bridge
+title: Lontium LT9611(UXC/C/EX/UXD) 2 Port MIPI DSI to HDMI Bridge
 
 maintainers:
   - Vinod Koul <[email protected]>
 
 description: |
-  The LT9611 and LT9611UXC are bridge devices which convert DSI to HDMI
+  The LT9611、LT9611UXC、LT9611C、LT9611EX and LT9611UXD
+  are bridge devices which convert DSI to HDMI
 
 properties:
   compatible:
     enum:
       - lontium,lt9611
+      - lontium,lt9611c
+      - lontium,lt9611ex
       - lontium,lt9611uxc
+      - lontium,lt9611uxd
 
   reg:
     maxItems: 1
Signature · 1 line
2.34.1
#2 lore raw

PATCH v6 2/2 drm/bridge: Add Lontium LT9611C(EX/UXD) MIPI DSI to HDMI driver

In reply to [email protected]

From: Sunyun Yang <[email protected]>

LT9611C(EX/UXD) is an I2C-controlled chip that Receiver signal/dual port mipi dsi and output hdmi, differences in hardware features:
- LT9611C: supports 1-port mipi dsi to hdmi 1.4
- LT9611EX: supports 2-port mipi dsi to hdmi 1.4
- LT9611UXD: supports 2-port mipi dsi to hdmi 1.4/2.0

---
 drivers/gpu/drm/bridge/Kconfig           |   18 +
 drivers/gpu/drm/bridge/Makefile          |    1 +
 drivers/gpu/drm/bridge/lontium-lt9611c.c | 1241 ++++++++++++++++++++++
 3 files changed, 1260 insertions(+)
 create mode 100644 drivers/gpu/drm/bridge/lontium-lt9611c.c
drivers/gpu/drm/bridge/Kconfig +18 -0
index c3209b0f4678..32b85a2a65d9 100644
@@ -177,6 +177,24 @@ config DRM_LONTIUM_LT9611
 	  HDMI signals
 	  Please say Y if you have such hardware.
 
+config DRM_LONTIUM_LT9611C
+	tristate "Lontium LT9611C DSI/HDMI bridge"
+	select SND_SOC_HDMI_CODEC if SND_SOC
+	depends on OF
+	select CRC8
+	select FW_LOADER
+	select DRM_PANEL_BRIDGE
+	select DRM_KMS_HELPER
+	select DRM_MIPI_DSI
+	select DRM_DISPLAY_HELPER
+	select DRM_DISPLAY_HDMI_STATE_HELPER
+	select REGMAP_I2C
+	help
+	  Driver for Lontium DSI to HDMI bridge
+	  chip driver that converts dual DSI and I2S to
+	  HDMI signals
+	  Please say Y if you have such hardware.
+
 config DRM_LONTIUM_LT9611UXC
 	tristate "Lontium LT9611UXC DSI/HDMI bridge"
 	select SND_SOC_HDMI_CODEC if SND_SOC
drivers/gpu/drm/bridge/Makefile +1 -0
index beab5b695a6e..92688be9692f 100644
@@ -16,6 +16,7 @@ obj-$(CONFIG_DRM_ITE_IT6505) += ite-it6505.o
 obj-$(CONFIG_DRM_LONTIUM_LT8912B) += lontium-lt8912b.o
 obj-$(CONFIG_DRM_LONTIUM_LT9211) += lontium-lt9211.o
 obj-$(CONFIG_DRM_LONTIUM_LT9611) += lontium-lt9611.o
+obj-$(CONFIG_DRM_LONTIUM_LT9611C) += lontium-lt9611c.o
 obj-$(CONFIG_DRM_LONTIUM_LT9611UXC) += lontium-lt9611uxc.o
 obj-$(CONFIG_DRM_LONTIUM_LT8713SX) += lontium-lt8713sx.o
 obj-$(CONFIG_DRM_LVDS_CODEC) += lvds-codec.o
drivers/gpu/drm/bridge/lontium-lt9611c.c new file +1241 -0

1,241 lines not on this page · raw message

Signature · 1 line
2.34.1
#3 lore raw

Re: [PATCH v6 2/2] drm/bridge: Add Lontium LT9611C(EX/UXD) MIPI DSI to HDMI driver

drivers/gpu/drm/bridge/lontium-lt9611c.c line 320

Quoted 10 lines · On 08/05/2026 15:40, [email protected] wrote:
drivers/gpu/drm/bridge/lontium-lt9611c.c new file +10 -0
+
+static void lt9611c_reset(struct lt9611c *lt9611c)
+{
+	gpiod_set_value_cansleep(lt9611c->reset_gpio, 1);
+	msleep(20);
+
+	gpiod_set_value_cansleep(lt9611c->reset_gpio, 0);
+	msleep(20);
+
+	gpiod_set_value_cansleep(lt9611c->reset_gpio, 1);

This is just plain wrong. Why do you assert, then de-assert and then finally assert AGAIN the reset leaving the device in powerdown stage?

drivers/gpu/drm/bridge/lontium-lt9611c.c line 323

Quoted 3 lines
drivers/gpu/drm/bridge/lontium-lt9611c.c new file +3 -0
+	msleep(400);
+
+	dev_dbg(lt9611c->dev, "lt9611c reset");

Drop such debug statements. This is some downstream, semi-useless code. You are not supposed to add debug to every call.

Best regards,
Krzysztof

#4 lore raw

Re: [PATCH v6 2/2] drm/bridge: Add Lontium LT9611C(EX/UXD) MIPI DSI to HDMI driver

Quoted 16 lines · Krzysztof Kozlowski <[email protected]> 于2026年6月25日周四 20:54写道:

drivers/gpu/drm/bridge/lontium-lt9611c.c line 320

Quoted 10 lines · On 08/05/2026 15:40, [email protected] wrote:
drivers/gpu/drm/bridge/lontium-lt9611c.c new file +10 -0
+
+static void lt9611c_reset(struct lt9611c *lt9611c)
+{
+     gpiod_set_value_cansleep(lt9611c->reset_gpio, 1);
+     msleep(20);
+
+     gpiod_set_value_cansleep(lt9611c->reset_gpio, 0);
+     msleep(20);
+
+     gpiod_set_value_cansleep(lt9611c->reset_gpio, 1);

This is just plain wrong. Why do you assert, then de-assert and then finally assert AGAIN the reset leaving the device in powerdown stage?

I am using software to emulate the hardware RESET button on our EVB. When the hardware RESET button is pressed while our chip is running, the signal level changes from HIGH to LOW and then back to HIGH.

Of course, we can also use the following:
static void lt9611c_reset(struct lt9611c *lt9611c)

{
    gpiod_set_value_cansleep(lt9611c->reset_gpio, 0);
    msleep(50);
    gpiod_set_value_cansleep(lt9611c->reset_gpio, 1);
    msleep(20);
}
Quoted 7 lines

drivers/gpu/drm/bridge/lontium-lt9611c.c line 323

Quoted 3 lines
drivers/gpu/drm/bridge/lontium-lt9611c.c new file +3 -0
+     msleep(400);
+
+     dev_dbg(lt9611c->dev, "lt9611c reset");

Drop such debug statements. This is some downstream, semi-useless code. You are not supposed to add debug to every call.

it will be fixed in next version.

Quoted 3 lines

Best regards,
Krzysztof

#5 lore raw

Re: [PATCH v6 2/2] drm/bridge: Add Lontium LT9611C(EX/UXD) MIPI DSI to HDMI driver

Quoted 21 lines · Sunyun Yang
Quoted 16 lines · Krzysztof Kozlowski <[email protected]> 于2026年6月25日周四 20:54写道:

drivers/gpu/drm/bridge/lontium-lt9611c.c line 320

Quoted 10 lines · On 08/05/2026 15:40, [email protected] wrote:
drivers/gpu/drm/bridge/lontium-lt9611c.c new file +10 -0
+
+static void lt9611c_reset(struct lt9611c *lt9611c)
+{
+     gpiod_set_value_cansleep(lt9611c->reset_gpio, 1);
+     msleep(20);
+
+     gpiod_set_value_cansleep(lt9611c->reset_gpio, 0);
+     msleep(20);
+
+     gpiod_set_value_cansleep(lt9611c->reset_gpio, 1);

This is just plain wrong. Why do you assert, then de-assert and then finally assert AGAIN the reset leaving the device in powerdown stage?

I am using software to emulate the hardware RESET button on our EVB. When the hardware RESET button is pressed while our chip is running, the signal level changes from HIGH to LOW and then back to HIGH.

Quoted 8 lines

Of course, we can also use the following:
static void lt9611c_reset(struct lt9611c *lt9611c)

{
    gpiod_set_value_cansleep(lt9611c->reset_gpio, 0);
    msleep(50);
    gpiod_set_value_cansleep(lt9611c->reset_gpio, 1);
    msleep(20);
}

Makes no sense either and you just did not get the point and did not answer my question. I asked WHY you leave asserted. Answer "we emulate" is just plain wrong.

So again please answer:

Why do you leave device with reset asserted?

Best regards,
Krzysztof

#6 lore raw

Re: [PATCH v6 2/2] drm/bridge: Add Lontium LT9611C(EX/UXD) MIPI DSI to HDMI driver

Quoted 32 lines · Krzysztof Kozlowski <[email protected]> 于2026年6月25日周四 21:17写道:
Quoted 21 lines · Sunyun Yang
Quoted 16 lines · Krzysztof Kozlowski <[email protected]> 于2026年6月25日周四 20:54写道:

drivers/gpu/drm/bridge/lontium-lt9611c.c line 320

Quoted 10 lines · On 08/05/2026 15:40, [email protected] wrote:
drivers/gpu/drm/bridge/lontium-lt9611c.c new file +10 -0
+
+static void lt9611c_reset(struct lt9611c *lt9611c)
+{
+     gpiod_set_value_cansleep(lt9611c->reset_gpio, 1);
+     msleep(20);
+
+     gpiod_set_value_cansleep(lt9611c->reset_gpio, 0);
+     msleep(20);
+
+     gpiod_set_value_cansleep(lt9611c->reset_gpio, 1);

This is just plain wrong. Why do you assert, then de-assert and then finally assert AGAIN the reset leaving the device in powerdown stage?

I am using software to emulate the hardware RESET button on our EVB. When the hardware RESET button is pressed while our chip is running, the signal level changes from HIGH to LOW and then back to HIGH.

Quoted 8 lines

Of course, we can also use the following:
static void lt9611c_reset(struct lt9611c *lt9611c)

{
    gpiod_set_value_cansleep(lt9611c->reset_gpio, 0);
    msleep(50);
    gpiod_set_value_cansleep(lt9611c->reset_gpio, 1);
    msleep(20);
}
Quoted 8 lines

Makes no sense either and you just did not get the point and did not answer my question. I asked WHY you leave asserted. Answer "we emulate" is just plain wrong.

So again please answer:

Why do you leave device with reset asserted?

devicetree: reset-gpios = <&tlmm 128 GPIO_ACTIVE_HIGH>;

GPIO_ACTIVE_HIGH:

gpiod_set_value_cansleep(lt9611c->reset_gpio, 0); ------ reset pin
is Low level : Clear the register configuration in the chip to stop the chip from working.

gpiod_set_value_cansleep(lt9611c->reset_gpio, 1); ------ reset pin
is high level: The chip resumes operation.

Quoted 2 lines

Best regards,
Krzysztof

#7 lore raw

Re: [PATCH v6 2/2] drm/bridge: Add Lontium LT9611C(EX/UXD) MIPI DSI to HDMI driver

Quoted 45 lines · Sunyun Yang <[email protected]> 于2026年6月25日周四 21:26写道:
Quoted 32 lines · Krzysztof Kozlowski <[email protected]> 于2026年6月25日周四 21:17写道:
Quoted 21 lines · Sunyun Yang
Quoted 16 lines · Krzysztof Kozlowski <[email protected]> 于2026年6月25日周四 20:54写道:

drivers/gpu/drm/bridge/lontium-lt9611c.c line 320

Quoted 10 lines · On 08/05/2026 15:40, [email protected] wrote:
drivers/gpu/drm/bridge/lontium-lt9611c.c new file +10 -0
+
+static void lt9611c_reset(struct lt9611c *lt9611c)
+{
+     gpiod_set_value_cansleep(lt9611c->reset_gpio, 1);
+     msleep(20);
+
+     gpiod_set_value_cansleep(lt9611c->reset_gpio, 0);
+     msleep(20);
+
+     gpiod_set_value_cansleep(lt9611c->reset_gpio, 1);

This is just plain wrong. Why do you assert, then de-assert and then finally assert AGAIN the reset leaving the device in powerdown stage?

I am using software to emulate the hardware RESET button on our EVB. When the hardware RESET button is pressed while our chip is running, the signal level changes from HIGH to LOW and then back to HIGH.

Quoted 8 lines

Of course, we can also use the following:
static void lt9611c_reset(struct lt9611c *lt9611c)

{
    gpiod_set_value_cansleep(lt9611c->reset_gpio, 0);
    msleep(50);
    gpiod_set_value_cansleep(lt9611c->reset_gpio, 1);
    msleep(20);
}
Quoted 8 lines

Makes no sense either and you just did not get the point and did not answer my question. I asked WHY you leave asserted. Answer "we emulate" is just plain wrong.

So again please answer:

Why do you leave device with reset asserted?

devicetree: reset-gpios = <&tlmm 128 GPIO_ACTIVE_HIGH>;

Quoted 10 lines

GPIO_ACTIVE_HIGH:

gpiod_set_value_cansleep(lt9611c->reset_gpio, 0); ------ reset pin
is Low level : Clear the register configuration in the chip to stop the chip from working.

gpiod_set_value_cansleep(lt9611c->reset_gpio, 1); ------ reset pin
is high level: The chip resumes operation.

Our purpose is: pull the level low to clear the register configuration in the chip, and then pull it high to allow the MCU inside the chip to re‑initialize the registers.

Quoted 3 lines
Quoted 3 lines

Best regards,
Krzysztof

#8 lore raw

Re: [PATCH v6 2/2] drm/bridge: Add Lontium LT9611C(EX/UXD) MIPI DSI to HDMI driver

Quoted 52 lines · Sunyun Yang
Quoted 51 lines · Sunyun Yang <[email protected]> 于2026年6月25日周四 21:26写道:
Quoted 32 lines · Krzysztof Kozlowski <[email protected]> 于2026年6月25日周四 21:17写道:
Quoted 21 lines · Sunyun Yang
Quoted 16 lines · Krzysztof Kozlowski <[email protected]> 于2026年6月25日周四 20:54写道:

drivers/gpu/drm/bridge/lontium-lt9611c.c line 320

Quoted 10 lines · On 08/05/2026 15:40, [email protected] wrote:
drivers/gpu/drm/bridge/lontium-lt9611c.c new file +10 -0
+
+static void lt9611c_reset(struct lt9611c *lt9611c)
+{
+     gpiod_set_value_cansleep(lt9611c->reset_gpio, 1);
+     msleep(20);
+
+     gpiod_set_value_cansleep(lt9611c->reset_gpio, 0);
+     msleep(20);
+
+     gpiod_set_value_cansleep(lt9611c->reset_gpio, 1);

This is just plain wrong. Why do you assert, then de-assert and then finally assert AGAIN the reset leaving the device in powerdown stage?

I am using software to emulate the hardware RESET button on our EVB. When the hardware RESET button is pressed while our chip is running, the signal level changes from HIGH to LOW and then back to HIGH.

Quoted 8 lines

Of course, we can also use the following:
static void lt9611c_reset(struct lt9611c *lt9611c)

{
    gpiod_set_value_cansleep(lt9611c->reset_gpio, 0);
    msleep(50);
    gpiod_set_value_cansleep(lt9611c->reset_gpio, 1);
    msleep(20);
}
Quoted 8 lines

Makes no sense either and you just did not get the point and did not answer my question. I asked WHY you leave asserted. Answer "we emulate" is just plain wrong.

So again please answer:

Why do you leave device with reset asserted?

devicetree: reset-gpios = <&tlmm 128 GPIO_ACTIVE_HIGH>;

GPIO_ACTIVE_HIGH:

gpiod_set_value_cansleep(lt9611c->reset_gpio, 0); ------ reset pin
is Low level : Clear the register configuration in the chip to stop the chip from working.

Quoted 8 lines
Quoted 4 lines

gpiod_set_value_cansleep(lt9611c->reset_gpio, 1); ------ reset pin
is high level: The chip resumes operation.

Our purpose is: pull the level low to clear the register configuration in the chip, and then pull it high to allow the MCU inside the chip to re‑initialize the registers.

And you do completely opposite... so that confirms your code is just wrong.

Best regards,
Krzysztof

#9 lore raw

Re: [PATCH v6 2/2] drm/bridge: Add Lontium LT9611C(EX/UXD) MIPI DSI to HDMI driver

Quoted 59 lines · Krzysztof Kozlowski <[email protected]> 于2026年6月25日周四 21:51写道:
Quoted 57 lines · Sunyun Yang
Quoted 55 lines · Sunyun Yang <[email protected]> 于2026年6月25日周四 21:26写道:
Quoted 32 lines · Krzysztof Kozlowski <[email protected]> 于2026年6月25日周四 21:17写道:
Quoted 21 lines · Sunyun Yang
Quoted 16 lines · Krzysztof Kozlowski <[email protected]> 于2026年6月25日周四 20:54写道:

Review

Quoted 10 lines · On 08/05/2026 15:40, [email protected] wrote:
(quoted diff) +10 -0
+
+static void lt9611c_reset(struct lt9611c *lt9611c)
+{
+     gpiod_set_value_cansleep(lt9611c->reset_gpio, 1);
+     msleep(20);
+
+     gpiod_set_value_cansleep(lt9611c->reset_gpio, 0);
+     msleep(20);
+
+     gpiod_set_value_cansleep(lt9611c->reset_gpio, 1);

This is just plain wrong. Why do you assert, then de-assert and then finally assert AGAIN the reset leaving the device in powerdown stage?

I am using software to emulate the hardware RESET button on our EVB. When the hardware RESET button is pressed while our chip is running, the signal level changes from HIGH to LOW and then back to HIGH.

Quoted 8 lines

Of course, we can also use the following:
static void lt9611c_reset(struct lt9611c *lt9611c)

{
    gpiod_set_value_cansleep(lt9611c->reset_gpio, 0);
    msleep(50);
    gpiod_set_value_cansleep(lt9611c->reset_gpio, 1);
    msleep(20);
}
Quoted 8 lines

Makes no sense either and you just did not get the point and did not answer my question. I asked WHY you leave asserted. Answer "we emulate" is just plain wrong.

So again please answer:

Why do you leave device with reset asserted?

devicetree: reset-gpios = <&tlmm 128 GPIO_ACTIVE_HIGH>;

GPIO_ACTIVE_HIGH:

gpiod_set_value_cansleep(lt9611c->reset_gpio, 0); ------ reset pin
is Low level : Clear the register configuration in the chip to stop the chip from working.

gpiod_set_value_cansleep(lt9611c->reset_gpio, 1); ------ reset pin
is high level: The chip resumes operation.

Quoted 7 lines
Quoted 3 lines

Our purpose is: pull the level low to clear the register configuration in the chip, and then pull it high to allow the MCU inside the chip to re‑initialize the registers.

And you do completely opposite... so that confirms your code is just wrong.

The lontium-lt9611.yaml uses GPIO_ACTIVE_HIGH. I am just following the rule of this device tree. If I modify the device tree to use GPIO_ACTIVE_LOW,
and use the following code in my driver, then my driver would be correct. However, would the existing kernel drivers lontium-lt9611uxc.c and lontium-lt9611.c be affected?
static void lt9611c_reset(struct lt9611c *lt9611c)

{
    gpiod_set_value_cansleep(lt9611c->reset_gpio, 1);
    msleep(50);
    gpiod_set_value_cansleep(lt9611c->reset_gpio, 0);
    msleep(20);
}
Quoted 3 lines

Best regards,
Krzysztof

#10 lore raw

Re: [PATCH v6 2/2] drm/bridge: Add Lontium LT9611C(EX/UXD) MIPI DSI to HDMI driver

Quoted 68 lines · Sunyun Yang
Quoted 59 lines · Krzysztof Kozlowski <[email protected]> 于2026年6月25日周四 21:51写道:
Quoted 57 lines · Sunyun Yang
Quoted 55 lines · Sunyun Yang <[email protected]> 于2026年6月25日周四 21:26写道:
Quoted 32 lines · Krzysztof Kozlowski <[email protected]> 于2026年6月25日周四 21:17写道:
Quoted 21 lines · Sunyun Yang
Quoted 16 lines · Krzysztof Kozlowski <[email protected]> 于2026年6月25日周四 20:54写道:

Review

Quoted 10 lines · On 08/05/2026 15:40, [email protected] wrote:
(quoted diff) +10 -0
+
+static void lt9611c_reset(struct lt9611c *lt9611c)
+{
+     gpiod_set_value_cansleep(lt9611c->reset_gpio, 1);
+     msleep(20);
+
+     gpiod_set_value_cansleep(lt9611c->reset_gpio, 0);
+     msleep(20);
+
+     gpiod_set_value_cansleep(lt9611c->reset_gpio, 1);

This is just plain wrong. Why do you assert, then de-assert and then finally assert AGAIN the reset leaving the device in powerdown stage?

I am using software to emulate the hardware RESET button on our EVB. When the hardware RESET button is pressed while our chip is running, the signal level changes from HIGH to LOW and then back to HIGH.

Quoted 8 lines

Of course, we can also use the following:
static void lt9611c_reset(struct lt9611c *lt9611c)

{
    gpiod_set_value_cansleep(lt9611c->reset_gpio, 0);
    msleep(50);
    gpiod_set_value_cansleep(lt9611c->reset_gpio, 1);
    msleep(20);
}
Quoted 8 lines

Makes no sense either and you just did not get the point and did not answer my question. I asked WHY you leave asserted. Answer "we emulate" is just plain wrong.

So again please answer:

Why do you leave device with reset asserted?

devicetree: reset-gpios = <&tlmm 128 GPIO_ACTIVE_HIGH>;

GPIO_ACTIVE_HIGH:

gpiod_set_value_cansleep(lt9611c->reset_gpio, 0); ------ reset pin
is Low level : Clear the register configuration in the chip to stop the chip from working.

gpiod_set_value_cansleep(lt9611c->reset_gpio, 1); ------ reset pin
is high level: The chip resumes operation.

Quoted 7 lines
Quoted 3 lines

Our purpose is: pull the level low to clear the register configuration in the chip, and then pull it high to allow the MCU inside the chip to re‑initialize the registers.

And you do completely opposite... so that confirms your code is just wrong.

Quoted 6 lines

The lontium-lt9611.yaml uses GPIO_ACTIVE_HIGH. I am just following the rule of this device tree. If I modify the device tree to use GPIO_ACTIVE_LOW,
and use the following code in my driver, then my driver would be correct. However, would the existing kernel drivers lontium-lt9611uxc.c and lontium-lt9611.c be affected?

DT has nothing to do here. 1 is assert, 0 is de-assert. Your code does things opposite to any logic, because you finish function with reset asserted.

Best regards,
Krzysztof

#11 lore raw

Re: [PATCH v6 2/2] drm/bridge: Add Lontium LT9611C(EX/UXD) MIPI DSI to HDMI driver

Quoted 77 lines · Krzysztof Kozlowski <[email protected]> 于2026年6月26日周五 15:38写道:
Quoted 68 lines · Sunyun Yang
Quoted 59 lines · Krzysztof Kozlowski <[email protected]> 于2026年6月25日周四 21:51写道:
Quoted 57 lines · Sunyun Yang
Quoted 55 lines · Sunyun Yang <[email protected]> 于2026年6月25日周四 21:26写道:
Quoted 32 lines · Krzysztof Kozlowski <[email protected]> 于2026年6月25日周四 21:17写道:
Quoted 21 lines · Sunyun Yang
Quoted 16 lines · Krzysztof Kozlowski <[email protected]> 于2026年6月25日周四 20:54写道:

Review

Quoted 10 lines · On 08/05/2026 15:40, [email protected] wrote:
(quoted diff) +10 -0
+
+static void lt9611c_reset(struct lt9611c *lt9611c)
+{
+     gpiod_set_value_cansleep(lt9611c->reset_gpio, 1);
+     msleep(20);
+
+     gpiod_set_value_cansleep(lt9611c->reset_gpio, 0);
+     msleep(20);
+
+     gpiod_set_value_cansleep(lt9611c->reset_gpio, 1);

This is just plain wrong. Why do you assert, then de-assert and then finally assert AGAIN the reset leaving the device in powerdown stage?

I am using software to emulate the hardware RESET button on our EVB. When the hardware RESET button is pressed while our chip is running, the signal level changes from HIGH to LOW and then back to HIGH.

Quoted 8 lines

Of course, we can also use the following:
static void lt9611c_reset(struct lt9611c *lt9611c)

{
    gpiod_set_value_cansleep(lt9611c->reset_gpio, 0);
    msleep(50);
    gpiod_set_value_cansleep(lt9611c->reset_gpio, 1);
    msleep(20);
}
Quoted 8 lines

Makes no sense either and you just did not get the point and did not answer my question. I asked WHY you leave asserted. Answer "we emulate" is just plain wrong.

So again please answer:

Why do you leave device with reset asserted?

devicetree: reset-gpios = <&tlmm 128 GPIO_ACTIVE_HIGH>;

GPIO_ACTIVE_HIGH:

gpiod_set_value_cansleep(lt9611c->reset_gpio, 0); ------ reset pin
is Low level : Clear the register configuration in the chip to stop the chip from working.

gpiod_set_value_cansleep(lt9611c->reset_gpio, 1); ------ reset pin
is high level: The chip resumes operation.

Quoted 7 lines
Quoted 3 lines

Our purpose is: pull the level low to clear the register configuration in the chip, and then pull it high to allow the MCU inside the chip to re‑initialize the registers.

And you do completely opposite... so that confirms your code is just wrong.

Quoted 6 lines

The lontium-lt9611.yaml uses GPIO_ACTIVE_HIGH. I am just following the rule of this device tree. If I modify the device tree to use GPIO_ACTIVE_LOW,
and use the following code in my driver, then my driver would be correct. However, would the existing kernel drivers lontium-lt9611uxc.c and lontium-lt9611.c be affected?

Quoted 4 lines

DT has nothing to do here. 1 is assert, 0 is de-assert. Your code does things opposite to any logic, because you finish function with reset asserted.

I understand your point, and I will make the changes in the next version.

Additionally, I have another question I would like to ask you regarding [email protected]. Since sashiko-bot sometimes has opinions that differ from yours, whose advice should I follow?

If I do not adopt sashiko-bot's suggestions, will my patches still be accepted into the upstream Linux kernel?

Quoted 3 lines

Best regards,
Krzysztof

maintainer
#12 lore raw

Re: [PATCH v6 2/2] drm/bridge: Add Lontium LT9611C(EX/UXD) MIPI DSI to HDMI driver

In reply to Sunyun Yang
Quoted 68 lines · Sunyun Yang
Quoted 59 lines · Krzysztof Kozlowski <[email protected]> 于2026年6月25日周四 21:51写道:
Quoted 57 lines · Sunyun Yang
Quoted 55 lines · Sunyun Yang <[email protected]> 于2026年6月25日周四 21:26写道:
Quoted 32 lines · Krzysztof Kozlowski <[email protected]> 于2026年6月25日周四 21:17写道:
Quoted 21 lines · Sunyun Yang
Quoted 16 lines · Krzysztof Kozlowski <[email protected]> 于2026年6月25日周四 20:54写道:

Review

Quoted 10 lines · On 08/05/2026 15:40, [email protected] wrote:
(quoted diff) +10 -0
+
+static void lt9611c_reset(struct lt9611c *lt9611c)
+{
+     gpiod_set_value_cansleep(lt9611c->reset_gpio, 1);
+     msleep(20);
+
+     gpiod_set_value_cansleep(lt9611c->reset_gpio, 0);
+     msleep(20);
+
+     gpiod_set_value_cansleep(lt9611c->reset_gpio, 1);

This is just plain wrong. Why do you assert, then de-assert and then finally assert AGAIN the reset leaving the device in powerdown stage?

I am using software to emulate the hardware RESET button on our EVB. When the hardware RESET button is pressed while our chip is running, the signal level changes from HIGH to LOW and then back to HIGH.

Quoted 8 lines

Of course, we can also use the following:
static void lt9611c_reset(struct lt9611c *lt9611c)

{
    gpiod_set_value_cansleep(lt9611c->reset_gpio, 0);
    msleep(50);
    gpiod_set_value_cansleep(lt9611c->reset_gpio, 1);
    msleep(20);
}
Quoted 8 lines

Makes no sense either and you just did not get the point and did not answer my question. I asked WHY you leave asserted. Answer "we emulate" is just plain wrong.

So again please answer:

Why do you leave device with reset asserted?

devicetree: reset-gpios = <&tlmm 128 GPIO_ACTIVE_HIGH>;

GPIO_ACTIVE_HIGH:

gpiod_set_value_cansleep(lt9611c->reset_gpio, 0); ------ reset pin
is Low level : Clear the register configuration in the chip to stop the chip from working.

gpiod_set_value_cansleep(lt9611c->reset_gpio, 1); ------ reset pin
is high level: The chip resumes operation.

Quoted 7 lines
Quoted 3 lines

Our purpose is: pull the level low to clear the register configuration in the chip, and then pull it high to allow the MCU inside the chip to re‑initialize the registers.

And you do completely opposite... so that confirms your code is just wrong.

Quoted 6 lines

The lontium-lt9611.yaml uses GPIO_ACTIVE_HIGH. I am just following the rule of this device tree. If I modify the device tree to use GPIO_ACTIVE_LOW,
and use the following code in my driver, then my driver would be correct. However, would the existing kernel drivers lontium-lt9611uxc.c and lontium-lt9611.c be affected?

It might, but then it's a DT problem. The GPIO API for drivers always considers the logical state of a GPIO, so if you need to assert a signal, you'll always need to set 1. That's what Krzysztof was trying to explain.

The DT will provide with GPIO_ACTIVE_* how that logical state translates to a physical GPIO state.

If the DT says that this particular GPIO is active-high, then it means that we need to set the GPIO to 1 to assert reset. Now of course, it might not make sense for the controller itself, but it might for the board if there's a GPIO inverter in the middle for example.

Anyway, in the case you're raising, the issue definitely lies in the DT, and that's what would need to be fixed.

I also wouldn't be too concerned about lontium-lt9611.yaml, it's just an example.

Maxime

#13 lore raw

Re: [PATCH v6 2/2] drm/bridge: Add Lontium LT9611C(EX/UXD) MIPI DSI to HDMI driver

Quoted 90 lines · Maxime Ripard <[email protected]> 于2026年6月26日周五 15:49写道:
Quoted 68 lines · Sunyun Yang
Quoted 59 lines · Krzysztof Kozlowski <[email protected]> 于2026年6月25日周四 21:51写道:
Quoted 57 lines · Sunyun Yang
Quoted 55 lines · Sunyun Yang <[email protected]> 于2026年6月25日周四 21:26写道:
Quoted 32 lines · Krzysztof Kozlowski <[email protected]> 于2026年6月25日周四 21:17写道:
Quoted 21 lines · Sunyun Yang
Quoted 16 lines · Krzysztof Kozlowski <[email protected]> 于2026年6月25日周四 20:54写道:

Review

Quoted 10 lines · On 08/05/2026 15:40, [email protected] wrote:
(quoted diff) +10 -0
+
+static void lt9611c_reset(struct lt9611c *lt9611c)
+{
+     gpiod_set_value_cansleep(lt9611c->reset_gpio, 1);
+     msleep(20);
+
+     gpiod_set_value_cansleep(lt9611c->reset_gpio, 0);
+     msleep(20);
+
+     gpiod_set_value_cansleep(lt9611c->reset_gpio, 1);

This is just plain wrong. Why do you assert, then de-assert and then finally assert AGAIN the reset leaving the device in powerdown stage?

I am using software to emulate the hardware RESET button on our EVB. When the hardware RESET button is pressed while our chip is running, the signal level changes from HIGH to LOW and then back to HIGH.

Quoted 8 lines

Of course, we can also use the following:
static void lt9611c_reset(struct lt9611c *lt9611c)

{
    gpiod_set_value_cansleep(lt9611c->reset_gpio, 0);
    msleep(50);
    gpiod_set_value_cansleep(lt9611c->reset_gpio, 1);
    msleep(20);
}
Quoted 8 lines

Makes no sense either and you just did not get the point and did not answer my question. I asked WHY you leave asserted. Answer "we emulate" is just plain wrong.

So again please answer:

Why do you leave device with reset asserted?

devicetree: reset-gpios = <&tlmm 128 GPIO_ACTIVE_HIGH>;

GPIO_ACTIVE_HIGH:

gpiod_set_value_cansleep(lt9611c->reset_gpio, 0); ------ reset pin
is Low level : Clear the register configuration in the chip to stop the chip from working.

gpiod_set_value_cansleep(lt9611c->reset_gpio, 1); ------ reset pin
is high level: The chip resumes operation.

Quoted 7 lines
Quoted 3 lines

Our purpose is: pull the level low to clear the register configuration in the chip, and then pull it high to allow the MCU inside the chip to re‑initialize the registers.

And you do completely opposite... so that confirms your code is just wrong.

Quoted 6 lines

The lontium-lt9611.yaml uses GPIO_ACTIVE_HIGH. I am just following the rule of this device tree. If I modify the device tree to use GPIO_ACTIVE_LOW,
and use the following code in my driver, then my driver would be correct. However, would the existing kernel drivers lontium-lt9611uxc.c and lontium-lt9611.c be affected?

It might, but then it's a DT problem. The GPIO API for drivers always considers the logical state of a GPIO, so if you need to assert a signal, you'll always need to set 1. That's what Krzysztof was trying to explain.

The DT will provide with GPIO_ACTIVE_* how that logical state translates to a physical GPIO state.

If the DT says that this particular GPIO is active-high, then it means that we need to set the GPIO to 1 to assert reset. Now of course, it might not make sense for the controller itself, but it might for the board if there's a GPIO inverter in the middle for example.

Quoted 7 lines

Anyway, in the case you're raising, the issue definitely lies in the DT, and that's what would need to be fixed.

I also wouldn't be too concerned about lontium-lt9611.yaml, it's just an example.

Maxime

thanks Maxime, I will modify this code in the next version of the driver, and I hope you can accept these changes.

Maxime:
I have another question I would like to ask you regarding [email protected]. Since sashiko-bot sometimes has opinions that differ from yours, whose advice should I follow?

If I do not adopt sashiko-bot's suggestions, will my patches still be accepted into the upstream Linux kernel?

maintainer
#14 lore raw

Re: [PATCH v6 2/2] drm/bridge: Add Lontium LT9611C(EX/UXD) MIPI DSI to HDMI driver

Quoted 102 lines · Sunyun Yang
Quoted 90 lines · Maxime Ripard <[email protected]> 于2026年6月26日周五 15:49写道:
Quoted 68 lines · Sunyun Yang
Quoted 59 lines · Krzysztof Kozlowski <[email protected]> 于2026年6月25日周四 21:51写道:
Quoted 57 lines · Sunyun Yang
Quoted 55 lines · Sunyun Yang <[email protected]> 于2026年6月25日周四 21:26写道:
Quoted 32 lines · Krzysztof Kozlowski <[email protected]> 于2026年6月25日周四 21:17写道:
Quoted 21 lines · Sunyun Yang
Quoted 16 lines · Krzysztof Kozlowski <[email protected]> 于2026年6月25日周四 20:54写道:

Review

Quoted 10 lines · On 08/05/2026 15:40, [email protected] wrote:
(quoted diff) +10 -0
+
+static void lt9611c_reset(struct lt9611c *lt9611c)
+{
+     gpiod_set_value_cansleep(lt9611c->reset_gpio, 1);
+     msleep(20);
+
+     gpiod_set_value_cansleep(lt9611c->reset_gpio, 0);
+     msleep(20);
+
+     gpiod_set_value_cansleep(lt9611c->reset_gpio, 1);

This is just plain wrong. Why do you assert, then de-assert and then finally assert AGAIN the reset leaving the device in powerdown stage?

I am using software to emulate the hardware RESET button on our EVB. When the hardware RESET button is pressed while our chip is running, the signal level changes from HIGH to LOW and then back to HIGH.

Quoted 8 lines

Of course, we can also use the following:
static void lt9611c_reset(struct lt9611c *lt9611c)

{
    gpiod_set_value_cansleep(lt9611c->reset_gpio, 0);
    msleep(50);
    gpiod_set_value_cansleep(lt9611c->reset_gpio, 1);
    msleep(20);
}
Quoted 8 lines

Makes no sense either and you just did not get the point and did not answer my question. I asked WHY you leave asserted. Answer "we emulate" is just plain wrong.

So again please answer:

Why do you leave device with reset asserted?

devicetree: reset-gpios = <&tlmm 128 GPIO_ACTIVE_HIGH>;

GPIO_ACTIVE_HIGH:

gpiod_set_value_cansleep(lt9611c->reset_gpio, 0); ------ reset pin
is Low level : Clear the register configuration in the chip to stop the chip from working.

gpiod_set_value_cansleep(lt9611c->reset_gpio, 1); ------ reset pin
is high level: The chip resumes operation.

Quoted 7 lines
Quoted 3 lines

Our purpose is: pull the level low to clear the register configuration in the chip, and then pull it high to allow the MCU inside the chip to re‑initialize the registers.

And you do completely opposite... so that confirms your code is just wrong.

Quoted 6 lines

The lontium-lt9611.yaml uses GPIO_ACTIVE_HIGH. I am just following the rule of this device tree. If I modify the device tree to use GPIO_ACTIVE_LOW,
and use the following code in my driver, then my driver would be correct. However, would the existing kernel drivers lontium-lt9611uxc.c and lontium-lt9611.c be affected?

It might, but then it's a DT problem. The GPIO API for drivers always considers the logical state of a GPIO, so if you need to assert a signal, you'll always need to set 1. That's what Krzysztof was trying to explain.

The DT will provide with GPIO_ACTIVE_* how that logical state translates to a physical GPIO state.

If the DT says that this particular GPIO is active-high, then it means that we need to set the GPIO to 1 to assert reset. Now of course, it might not make sense for the controller itself, but it might for the board if there's a GPIO inverter in the middle for example.

Quoted 7 lines

Anyway, in the case you're raising, the issue definitely lies in the DT, and that's what would need to be fixed.

I also wouldn't be too concerned about lontium-lt9611.yaml, it's just an example.

Maxime

thanks Maxime, I will modify this code in the next version of the driver, and I hope you can accept these changes.

Quoted 7 lines

Maxime:
I have another question I would like to ask you regarding [email protected]. Since sashiko-bot sometimes has opinions that differ from yours, whose advice should I follow?

If I do not adopt sashiko-bot's suggestions, will my patches still be accepted into the upstream Linux kernel?

I can't give a blanket answer. It depends on what you ignore exactly.

Maxime

#15 lore raw

Re: [PATCH v6 2/2] drm/bridge: Add Lontium LT9611C(EX/UXD) MIPI DSI to HDMI driver

Quoted 109 lines · Maxime Ripard <[email protected]> 于2026年6月26日周五 16:26写道:
Quoted 107 lines · Sunyun Yang
Quoted 90 lines · Maxime Ripard <[email protected]> 于2026年6月26日周五 15:49写道:
Quoted 68 lines · Sunyun Yang
Quoted 59 lines · Krzysztof Kozlowski <[email protected]> 于2026年6月25日周四 21:51写道:
Quoted 57 lines · Sunyun Yang
Quoted 55 lines · Sunyun Yang <[email protected]> 于2026年6月25日周四 21:26写道:
Quoted 32 lines · Krzysztof Kozlowski <[email protected]> 于2026年6月25日周四 21:17写道:
Quoted 21 lines · Sunyun Yang
Quoted 16 lines · Krzysztof Kozlowski <[email protected]> 于2026年6月25日周四 20:54写道:

Review

Quoted 10 lines · On 08/05/2026 15:40, [email protected] wrote:
(quoted diff) +10 -0
+
+static void lt9611c_reset(struct lt9611c *lt9611c)
+{
+     gpiod_set_value_cansleep(lt9611c->reset_gpio, 1);
+     msleep(20);
+
+     gpiod_set_value_cansleep(lt9611c->reset_gpio, 0);
+     msleep(20);
+
+     gpiod_set_value_cansleep(lt9611c->reset_gpio, 1);

This is just plain wrong. Why do you assert, then de-assert and then finally assert AGAIN the reset leaving the device in powerdown stage?

I am using software to emulate the hardware RESET button on our EVB. When the hardware RESET button is pressed while our chip is running, the signal level changes from HIGH to LOW and then back to HIGH.

Quoted 8 lines

Of course, we can also use the following:
static void lt9611c_reset(struct lt9611c *lt9611c)

{
    gpiod_set_value_cansleep(lt9611c->reset_gpio, 0);
    msleep(50);
    gpiod_set_value_cansleep(lt9611c->reset_gpio, 1);
    msleep(20);
}
Quoted 8 lines

Makes no sense either and you just did not get the point and did not answer my question. I asked WHY you leave asserted. Answer "we emulate" is just plain wrong.

So again please answer:

Why do you leave device with reset asserted?

devicetree: reset-gpios = <&tlmm 128 GPIO_ACTIVE_HIGH>;

GPIO_ACTIVE_HIGH:

gpiod_set_value_cansleep(lt9611c->reset_gpio, 0); ------ reset pin
is Low level : Clear the register configuration in the chip to stop the chip from working.

gpiod_set_value_cansleep(lt9611c->reset_gpio, 1); ------ reset pin
is high level: The chip resumes operation.

Quoted 7 lines
Quoted 3 lines

Our purpose is: pull the level low to clear the register configuration in the chip, and then pull it high to allow the MCU inside the chip to re‑initialize the registers.

And you do completely opposite... so that confirms your code is just wrong.

Quoted 6 lines

The lontium-lt9611.yaml uses GPIO_ACTIVE_HIGH. I am just following the rule of this device tree. If I modify the device tree to use GPIO_ACTIVE_LOW,
and use the following code in my driver, then my driver would be correct. However, would the existing kernel drivers lontium-lt9611uxc.c and lontium-lt9611.c be affected?

It might, but then it's a DT problem. The GPIO API for drivers always considers the logical state of a GPIO, so if you need to assert a signal, you'll always need to set 1. That's what Krzysztof was trying to explain.

The DT will provide with GPIO_ACTIVE_* how that logical state translates to a physical GPIO state.

If the DT says that this particular GPIO is active-high, then it means that we need to set the GPIO to 1 to assert reset. Now of course, it might not make sense for the controller itself, but it might for the board if there's a GPIO inverter in the middle for example.

Quoted 7 lines

Anyway, in the case you're raising, the issue definitely lies in the DT, and that's what would need to be fixed.

I also wouldn't be too concerned about lontium-lt9611.yaml, it's just an example.

Maxime

thanks Maxime, I will modify this code in the next version of the driver, and I hope you can accept these changes.

Maxime:
I have another question I would like to ask you regarding [email protected]. Since sashiko-bot sometimes has opinions that differ from yours, whose advice should I follow?

Quoted 5 lines
Quoted 2 lines

If I do not adopt sashiko-bot's suggestions, will my patches still be accepted into the upstream Linux kernel?

I can't give a blanket answer. It depends on what you ignore exactly.

Okay, another question: sashiko-bot is an AI bot. Are its review comments optional, or must they be followed?

Quoted 1 line

Maxime

#16 lore raw

Re: [PATCH v6 2/2] drm/bridge: Add Lontium LT9611C(EX/UXD) MIPI DSI to HDMI driver

Quoted 111 lines · Sunyun Yang <[email protected]> 于2026年6月26日周五 16:40写道:
Quoted 109 lines · Maxime Ripard <[email protected]> 于2026年6月26日周五 16:26写道:
Quoted 107 lines · Sunyun Yang
Quoted 90 lines · Maxime Ripard <[email protected]> 于2026年6月26日周五 15:49写道:
Quoted 68 lines · Sunyun Yang
Quoted 59 lines · Krzysztof Kozlowski <[email protected]> 于2026年6月25日周四 21:51写道:
Quoted 57 lines · Sunyun Yang
Quoted 55 lines · Sunyun Yang <[email protected]> 于2026年6月25日周四 21:26写道:
Quoted 32 lines · Krzysztof Kozlowski <[email protected]> 于2026年6月25日周四 21:17写道:
Quoted 21 lines · Sunyun Yang
Quoted 16 lines · Krzysztof Kozlowski <[email protected]> 于2026年6月25日周四 20:54写道:

Review

Quoted 10 lines · On 08/05/2026 15:40, [email protected] wrote:
(quoted diff) +10 -0
+
+static void lt9611c_reset(struct lt9611c *lt9611c)
+{
+     gpiod_set_value_cansleep(lt9611c->reset_gpio, 1);
+     msleep(20);
+
+     gpiod_set_value_cansleep(lt9611c->reset_gpio, 0);
+     msleep(20);
+
+     gpiod_set_value_cansleep(lt9611c->reset_gpio, 1);

This is just plain wrong. Why do you assert, then de-assert and then finally assert AGAIN the reset leaving the device in powerdown stage?

I am using software to emulate the hardware RESET button on our EVB. When the hardware RESET button is pressed while our chip is running, the signal level changes from HIGH to LOW and then back to HIGH.

Quoted 8 lines

Of course, we can also use the following:
static void lt9611c_reset(struct lt9611c *lt9611c)

{
    gpiod_set_value_cansleep(lt9611c->reset_gpio, 0);
    msleep(50);
    gpiod_set_value_cansleep(lt9611c->reset_gpio, 1);
    msleep(20);
}
Quoted 8 lines

Makes no sense either and you just did not get the point and did not answer my question. I asked WHY you leave asserted. Answer "we emulate" is just plain wrong.

So again please answer:

Why do you leave device with reset asserted?

devicetree: reset-gpios = <&tlmm 128 GPIO_ACTIVE_HIGH>;

GPIO_ACTIVE_HIGH:

gpiod_set_value_cansleep(lt9611c->reset_gpio, 0); ------ reset pin
is Low level : Clear the register configuration in the chip to stop the chip from working.

gpiod_set_value_cansleep(lt9611c->reset_gpio, 1); ------ reset pin
is high level: The chip resumes operation.

Quoted 7 lines
Quoted 3 lines

Our purpose is: pull the level low to clear the register configuration in the chip, and then pull it high to allow the MCU inside the chip to re‑initialize the registers.

And you do completely opposite... so that confirms your code is just wrong.

Quoted 6 lines

The lontium-lt9611.yaml uses GPIO_ACTIVE_HIGH. I am just following the rule of this device tree. If I modify the device tree to use GPIO_ACTIVE_LOW,
and use the following code in my driver, then my driver would be correct. However, would the existing kernel drivers lontium-lt9611uxc.c and lontium-lt9611.c be affected?

It might, but then it's a DT problem. The GPIO API for drivers always considers the logical state of a GPIO, so if you need to assert a signal, you'll always need to set 1. That's what Krzysztof was trying to explain.

The DT will provide with GPIO_ACTIVE_* how that logical state translates to a physical GPIO state.

If the DT says that this particular GPIO is active-high, then it means that we need to set the GPIO to 1 to assert reset. Now of course, it might not make sense for the controller itself, but it might for the board if there's a GPIO inverter in the middle for example.

Quoted 7 lines

Anyway, in the case you're raising, the issue definitely lies in the DT, and that's what would need to be fixed.

I also wouldn't be too concerned about lontium-lt9611.yaml, it's just an example.

Maxime

thanks Maxime, I will modify this code in the next version of the driver, and I hope you can accept these changes.

Maxime:
I have another question I would like to ask you regarding [email protected]. Since sashiko-bot sometimes has opinions that differ from yours, whose advice should I follow?

Quoted 9 lines
Quoted 5 lines
Quoted 2 lines

If I do not adopt sashiko-bot's suggestions, will my patches still be accepted into the upstream Linux kernel?

I can't give a blanket answer. It depends on what you ignore exactly.

Okay, another question: sashiko-bot is an AI bot. Are its review comments optional, or must they be followed?

For example, in my driver, there is a function for upgrading the chip firmware. During debugging or production, upgrading the chip firmware will acquire a lock, which will block the DRM callback and affect display. It will be fine after the upgrade is completed and some devices are restarted. As long as there is no subsequent upgrade, display can work normally.

From a purely software perspective, the AI bot considered this approach unacceptable and proposed synchronizing the pre-upgrade state to the DRM framework. From my personal perspective, I think the AI bot's suggestion would only make my driver more complex and redundant. Do you think I need to adopt the AI bot's suggestion?

In addition, if I follow the AI bot's suggestion, the lontium-lt9611uxc.c and lontium-lt8713sx.c drivers that have been merged into the upstream Linux kernel would not meet the AI bot's requirements.

When I get a reviewer's Reviewed-by flag, can I ignore the opinion of sashiko-bot (the AI bot)?

Quoted 1 line
Quoted 1 line

Maxime

maintainer
#17 lore raw

Re: [PATCH v6 2/2] drm/bridge: Add Lontium LT9611C(EX/UXD) MIPI DSI to HDMI driver

Quoted 130 lines · Sunyun Yang
Quoted 111 lines · Sunyun Yang <[email protected]> 于2026年6月26日周五 16:40写道:
Quoted 109 lines · Maxime Ripard <[email protected]> 于2026年6月26日周五 16:26写道:
Quoted 107 lines · Sunyun Yang
Quoted 90 lines · Maxime Ripard <[email protected]> 于2026年6月26日周五 15:49写道:
Quoted 68 lines · Sunyun Yang
Quoted 59 lines · Krzysztof Kozlowski <[email protected]> 于2026年6月25日周四 21:51写道:
Quoted 57 lines · Sunyun Yang
Quoted 55 lines · Sunyun Yang <[email protected]> 于2026年6月25日周四 21:26写道:
Quoted 32 lines · Krzysztof Kozlowski <[email protected]> 于2026年6月25日周四 21:17写道:
Quoted 21 lines · Sunyun Yang
Quoted 16 lines · Krzysztof Kozlowski <[email protected]> 于2026年6月25日周四 20:54写道:
Quoted 10 lines · On 08/05/2026 15:40, [email protected] wrote:

+
+static void lt9611c_reset(struct lt9611c *lt9611c)
+{
+ gpiod_set_value_cansleep(lt9611c->reset_gpio, 1);
+ msleep(20);
+
+ gpiod_set_value_cansleep(lt9611c->reset_gpio, 0);
+ msleep(20);
+
+ gpiod_set_value_cansleep(lt9611c->reset_gpio, 1);

This is just plain wrong. Why do you assert, then de-assert and then finally assert AGAIN the reset leaving the device in powerdown stage?

I am using software to emulate the hardware RESET button on our EVB. When the hardware RESET button is pressed while our chip is running, the signal level changes from HIGH to LOW and then back to HIGH.

Quoted 8 lines

Of course, we can also use the following:
static void lt9611c_reset(struct lt9611c *lt9611c)

{
    gpiod_set_value_cansleep(lt9611c->reset_gpio, 0);
    msleep(50);
    gpiod_set_value_cansleep(lt9611c->reset_gpio, 1);
    msleep(20);
}
Quoted 8 lines

Makes no sense either and you just did not get the point and did not answer my question. I asked WHY you leave asserted. Answer "we emulate" is just plain wrong.

So again please answer:

Why do you leave device with reset asserted?

devicetree: reset-gpios = <&tlmm 128 GPIO_ACTIVE_HIGH>;

GPIO_ACTIVE_HIGH:

gpiod_set_value_cansleep(lt9611c->reset_gpio, 0); ------ reset pin
is Low level : Clear the register configuration in the chip to stop the chip from working.

gpiod_set_value_cansleep(lt9611c->reset_gpio, 1); ------ reset pin
is high level: The chip resumes operation.

Quoted 7 lines
Quoted 3 lines

Our purpose is: pull the level low to clear the register configuration in the chip, and then pull it high to allow the MCU inside the chip to re‑initialize the registers.

And you do completely opposite... so that confirms your code is just wrong.

Quoted 6 lines

The lontium-lt9611.yaml uses GPIO_ACTIVE_HIGH. I am just following the rule of this device tree. If I modify the device tree to use GPIO_ACTIVE_LOW,
and use the following code in my driver, then my driver would be correct. However, would the existing kernel drivers lontium-lt9611uxc.c and lontium-lt9611.c be affected?

It might, but then it's a DT problem. The GPIO API for drivers always considers the logical state of a GPIO, so if you need to assert a signal, you'll always need to set 1. That's what Krzysztof was trying to explain.

The DT will provide with GPIO_ACTIVE_* how that logical state translates to a physical GPIO state.

If the DT says that this particular GPIO is active-high, then it means that we need to set the GPIO to 1 to assert reset. Now of course, it might not make sense for the controller itself, but it might for the board if there's a GPIO inverter in the middle for example.

Quoted 7 lines

Anyway, in the case you're raising, the issue definitely lies in the DT, and that's what would need to be fixed.

I also wouldn't be too concerned about lontium-lt9611.yaml, it's just an example.

Maxime

thanks Maxime, I will modify this code in the next version of the driver, and I hope you can accept these changes.

Maxime:
I have another question I would like to ask you regarding [email protected]. Since sashiko-bot sometimes has opinions that differ from yours, whose advice should I follow?

Quoted 9 lines
Quoted 5 lines
Quoted 2 lines

If I do not adopt sashiko-bot's suggestions, will my patches still be accepted into the upstream Linux kernel?

I can't give a blanket answer. It depends on what you ignore exactly.

Okay, another question: sashiko-bot is an AI bot. Are its review comments optional, or must they be followed?

For example, in my driver, there is a function for upgrading the chip firmware. During debugging or production, upgrading the chip firmware will acquire a lock, which will block the DRM callback and affect display. It will be fine after the upgrade is completed and some devices are restarted. As long as there is no subsequent upgrade, display can work normally.

Quoted 5 lines

From a purely software perspective, the AI bot considered this approach unacceptable and proposed synchronizing the pre-upgrade state to the DRM framework. From my personal perspective, I think the AI bot's suggestion would only make my driver more complex and redundant. Do you think I need to adopt the AI bot's suggestion?

You're right it's wrong, but there's also no reason to allow that firmware upgrade during the driver lifetime either through a debugfs file. So you should get rid of the debugfs file and now you won't have to bother with that comment anymore.

Quoted 4 lines

In addition, if I follow the AI bot's suggestion, the lontium-lt9611uxc.c and lontium-lt8713sx.c drivers that have been merged into the upstream Linux kernel would not meet the AI bot's requirements.

Maybe, but it's not relevant either way. These drivers are merged, yours isn't. Feel free to fix these if you spot any issue though.

Quoted 2 lines

When I get a reviewer's Reviewed-by flag, can I ignore the opinion of sashiko-bot (the AI bot)?

Again, it depends on the comment. If you feel like one can be ignored, you should at least argue why.

Maxime

#18 lore raw

Re: [PATCH v6 2/2] drm/bridge: Add Lontium LT9611C(EX/UXD) MIPI DSI to HDMI driver

Quoted 148 lines · Maxime Ripard <[email protected]> 于2026年6月26日周五 17:31写道:
Quoted 130 lines · Sunyun Yang
Quoted 111 lines · Sunyun Yang <[email protected]> 于2026年6月26日周五 16:40写道:
Quoted 109 lines · Maxime Ripard <[email protected]> 于2026年6月26日周五 16:26写道:
Quoted 107 lines · Sunyun Yang
Quoted 90 lines · Maxime Ripard <[email protected]> 于2026年6月26日周五 15:49写道:
Quoted 68 lines · Sunyun Yang
Quoted 59 lines · Krzysztof Kozlowski <[email protected]> 于2026年6月25日周四 21:51写道:
Quoted 57 lines · Sunyun Yang
Quoted 55 lines · Sunyun Yang <[email protected]> 于2026年6月25日周四 21:26写道:
Quoted 32 lines · Krzysztof Kozlowski <[email protected]> 于2026年6月25日周四 21:17写道:
Quoted 21 lines · Sunyun Yang
Quoted 16 lines · Krzysztof Kozlowski <[email protected]> 于2026年6月25日周四 20:54写道:

On 08/05/2026 15:40, [email protected] wrote:
+
+static void lt9611c_reset(struct lt9611c *lt9611c)
+{
+ gpiod_set_value_cansleep(lt9611c->reset_gpio, 1);
+ msleep(20);
+
+ gpiod_set_value_cansleep(lt9611c->reset_gpio, 0);
+ msleep(20);
+
+ gpiod_set_value_cansleep(lt9611c->reset_gpio, 1);

This is just plain wrong. Why do you assert, then de-assert and then
finally assert AGAIN the reset leaving the device in powerdown stage?

I am using software to emulate the hardware RESET button on our EVB. When the hardware RESET button is pressed while our chip is running, the signal level changes from HIGH to LOW and then back to HIGH.

Quoted 8 lines

Of course, we can also use the following:
static void lt9611c_reset(struct lt9611c *lt9611c)

{
    gpiod_set_value_cansleep(lt9611c->reset_gpio, 0);
    msleep(50);
    gpiod_set_value_cansleep(lt9611c->reset_gpio, 1);
    msleep(20);
}
Quoted 8 lines

Makes no sense either and you just did not get the point and did not answer my question. I asked WHY you leave asserted. Answer "we emulate" is just plain wrong.

So again please answer:

Why do you leave device with reset asserted?

devicetree: reset-gpios = <&tlmm 128 GPIO_ACTIVE_HIGH>;

GPIO_ACTIVE_HIGH:

gpiod_set_value_cansleep(lt9611c->reset_gpio, 0); ------ reset pin
is Low level : Clear the register configuration in the chip to stop the chip from working.

gpiod_set_value_cansleep(lt9611c->reset_gpio, 1); ------ reset pin
is high level: The chip resumes operation.

Quoted 7 lines
Quoted 3 lines

Our purpose is: pull the level low to clear the register configuration in the chip, and then pull it high to allow the MCU inside the chip to re‑initialize the registers.

And you do completely opposite... so that confirms your code is just wrong.

Quoted 6 lines

The lontium-lt9611.yaml uses GPIO_ACTIVE_HIGH. I am just following the rule of this device tree. If I modify the device tree to use GPIO_ACTIVE_LOW,
and use the following code in my driver, then my driver would be correct. However, would the existing kernel drivers lontium-lt9611uxc.c and lontium-lt9611.c be affected?

It might, but then it's a DT problem. The GPIO API for drivers always considers the logical state of a GPIO, so if you need to assert a signal, you'll always need to set 1. That's what Krzysztof was trying to explain.

The DT will provide with GPIO_ACTIVE_* how that logical state translates to a physical GPIO state.

If the DT says that this particular GPIO is active-high, then it means that we need to set the GPIO to 1 to assert reset. Now of course, it might not make sense for the controller itself, but it might for the board if there's a GPIO inverter in the middle for example.

Quoted 7 lines

Anyway, in the case you're raising, the issue definitely lies in the DT, and that's what would need to be fixed.

I also wouldn't be too concerned about lontium-lt9611.yaml, it's just an example.

Maxime

thanks Maxime, I will modify this code in the next version of the driver, and I hope you can accept these changes.

Maxime:
I have another question I would like to ask you regarding [email protected]. Since sashiko-bot sometimes has opinions that differ from yours, whose advice should I follow?

Quoted 9 lines
Quoted 5 lines
Quoted 2 lines

If I do not adopt sashiko-bot's suggestions, will my patches still be accepted into the upstream Linux kernel?

I can't give a blanket answer. It depends on what you ignore exactly.

Okay, another question: sashiko-bot is an AI bot. Are its review comments optional, or must they be followed?

For example, in my driver, there is a function for upgrading the chip firmware. During debugging or production, upgrading the chip firmware will acquire a lock, which will block the DRM callback and affect display. It will be fine after the upgrade is completed and some devices are restarted. As long as there is no subsequent upgrade, display can work normally.

Quoted 5 lines

From a purely software perspective, the AI bot considered this approach unacceptable and proposed synchronizing the pre-upgrade state to the DRM framework. From my personal perspective, I think the AI bot's suggestion would only make my driver more complex and redundant. Do you think I need to adopt the AI bot's suggestion?

You're right it's wrong, but there's also no reason to allow that firmware upgrade during the driver lifetime either through a debugfs file. So you should get rid of the debugfs file and now you won't have to bother with that comment anymore.

Quoted 4 lines

In addition, if I follow the AI bot's suggestion, the lontium-lt9611uxc.c and lontium-lt8713sx.c drivers that have been merged into the upstream Linux kernel would not meet the AI bot's requirements.

Quoted 9 lines

Maybe, but it's not relevant either way. These drivers are merged, yours isn't. Feel free to fix these if you spot any issue though.

Quoted 2 lines

When I get a reviewer's Reviewed-by flag, can I ignore the opinion of sashiko-bot (the AI bot)?

Again, it depends on the comment. If you feel like one can be ignored, you should at least argue why.

sashiko‑bot (AI bot) does not communicate or interact with me. Even if I explain the reasons, the AI bot never replies to me, and it only sends its review comments to me alone.

If I do not make changes according to the AI bot's suggestions, will that affect my driver being merged into the upstream Linux kernel? I would like to know the answer to this question.

Quoted 1 line

Maxime

maintainer
#19 lore raw

Re: [PATCH v6 2/2] drm/bridge: Add Lontium LT9611C(EX/UXD) MIPI DSI to HDMI driver

Quoted 155 lines · Sunyun Yang
Quoted 154 lines · Maxime Ripard <[email protected]> 于2026年6月26日周五 17:31写道:
Quoted 130 lines · Sunyun Yang
Quoted 111 lines · Sunyun Yang <[email protected]> 于2026年6月26日周五 16:40写道:
Quoted 109 lines · Maxime Ripard <[email protected]> 于2026年6月26日周五 16:26写道:
Quoted 107 lines · Sunyun Yang
Quoted 90 lines · Maxime Ripard <[email protected]> 于2026年6月26日周五 15:49写道:
Quoted 68 lines · Sunyun Yang
Quoted 59 lines · Krzysztof Kozlowski <[email protected]> 于2026年6月25日周四 21:51写道:
Quoted 57 lines · Sunyun Yang
Quoted 55 lines · Sunyun Yang <[email protected]> 于2026年6月25日周四 21:26写道:
Quoted 32 lines · Krzysztof Kozlowski <[email protected]> 于2026年6月25日周四 21:17写道:
Quoted 29 lines · Sunyun Yang

Krzysztof Kozlowski <[email protected]> 于2026年6月25日周四 20:54写道:

On 08/05/2026 15:40, [email protected] wrote:
+
+static void lt9611c_reset(struct lt9611c *lt9611c)
+{
+ gpiod_set_value_cansleep(lt9611c->reset_gpio, 1);
+ msleep(20);
+
+ gpiod_set_value_cansleep(lt9611c->reset_gpio, 0);
+ msleep(20);
+
+ gpiod_set_value_cansleep(lt9611c->reset_gpio, 1);

This is just plain wrong. Why do you assert, then de-assert and then
finally assert AGAIN the reset leaving the device in powerdown stage?

I am using software to emulate the hardware RESET button on our EVB.
When the hardware RESET button is pressed while our chip is running,
the signal level changes from HIGH to LOW and then back to HIGH.

Of course, we can also use the following:
static void lt9611c_reset(struct lt9611c *lt9611c)
{
gpiod_set_value_cansleep(lt9611c->reset_gpio, 0);
msleep(50);
gpiod_set_value_cansleep(lt9611c->reset_gpio, 1);
msleep(20);
}

Quoted 8 lines

Makes no sense either and you just did not get the point and did not answer my question. I asked WHY you leave asserted. Answer "we emulate" is just plain wrong.

So again please answer:

Why do you leave device with reset asserted?

devicetree: reset-gpios = <&tlmm 128 GPIO_ACTIVE_HIGH>;

GPIO_ACTIVE_HIGH:

gpiod_set_value_cansleep(lt9611c->reset_gpio, 0); ------ reset pin
is Low level : Clear the register configuration in the chip to stop the chip from working.

gpiod_set_value_cansleep(lt9611c->reset_gpio, 1); ------ reset pin
is high level: The chip resumes operation.

Quoted 7 lines
Quoted 3 lines

Our purpose is: pull the level low to clear the register configuration in the chip, and then pull it high to allow the MCU inside the chip to re‑initialize the registers.

And you do completely opposite... so that confirms your code is just wrong.

Quoted 6 lines

The lontium-lt9611.yaml uses GPIO_ACTIVE_HIGH. I am just following the rule of this device tree. If I modify the device tree to use GPIO_ACTIVE_LOW,
and use the following code in my driver, then my driver would be correct. However, would the existing kernel drivers lontium-lt9611uxc.c and lontium-lt9611.c be affected?

It might, but then it's a DT problem. The GPIO API for drivers always considers the logical state of a GPIO, so if you need to assert a signal, you'll always need to set 1. That's what Krzysztof was trying to explain.

The DT will provide with GPIO_ACTIVE_* how that logical state translates to a physical GPIO state.

If the DT says that this particular GPIO is active-high, then it means that we need to set the GPIO to 1 to assert reset. Now of course, it might not make sense for the controller itself, but it might for the board if there's a GPIO inverter in the middle for example.

Quoted 7 lines

Anyway, in the case you're raising, the issue definitely lies in the DT, and that's what would need to be fixed.

I also wouldn't be too concerned about lontium-lt9611.yaml, it's just an example.

Maxime

thanks Maxime, I will modify this code in the next version of the driver, and I hope you can accept these changes.

Maxime:
I have another question I would like to ask you regarding [email protected]. Since sashiko-bot sometimes has opinions that differ from yours, whose advice should I follow?

Quoted 9 lines
Quoted 5 lines
Quoted 2 lines

If I do not adopt sashiko-bot's suggestions, will my patches still be accepted into the upstream Linux kernel?

I can't give a blanket answer. It depends on what you ignore exactly.

Okay, another question: sashiko-bot is an AI bot. Are its review comments optional, or must they be followed?

For example, in my driver, there is a function for upgrading the chip firmware. During debugging or production, upgrading the chip firmware will acquire a lock, which will block the DRM callback and affect display. It will be fine after the upgrade is completed and some devices are restarted. As long as there is no subsequent upgrade, display can work normally.

Quoted 5 lines

From a purely software perspective, the AI bot considered this approach unacceptable and proposed synchronizing the pre-upgrade state to the DRM framework. From my personal perspective, I think the AI bot's suggestion would only make my driver more complex and redundant. Do you think I need to adopt the AI bot's suggestion?

You're right it's wrong, but there's also no reason to allow that firmware upgrade during the driver lifetime either through a debugfs file. So you should get rid of the debugfs file and now you won't have to bother with that comment anymore.

Quoted 4 lines

In addition, if I follow the AI bot's suggestion, the lontium-lt9611uxc.c and lontium-lt8713sx.c drivers that have been merged into the upstream Linux kernel would not meet the AI bot's requirements.

Maybe, but it's not relevant either way. These drivers are merged, yours isn't. Feel free to fix these if you spot any issue though.

Quoted 2 lines

When I get a reviewer's Reviewed-by flag, can I ignore the opinion of sashiko-bot (the AI bot)?

Quoted 7 lines
Quoted 3 lines

Again, it depends on the comment. If you feel like one can be ignored, you should at least argue why.

sashiko‑bot (AI bot) does not communicate or interact with me. Even if I explain the reasons, the AI bot never replies to me, and it only sends its review comments to me alone.

Then put it into the cover letter?

Quoted 3 lines

If I do not make changes according to the AI bot's suggestions, will that affect my driver being merged into the upstream Linux kernel? I would like to know the answer to this question.

I told you twice already.

#20 lore raw

Re: [PATCH v6 2/2] drm/bridge: Add Lontium LT9611C(EX/UXD) MIPI DSI to HDMI driver

Quoted 161 lines · Maxime Ripard <[email protected]> 于2026年6月26日周五 17:53写道:
Quoted 159 lines · Sunyun Yang
Quoted 157 lines · Maxime Ripard <[email protected]> 于2026年6月26日周五 17:31写道:
Quoted 130 lines · Sunyun Yang
Quoted 111 lines · Sunyun Yang <[email protected]> 于2026年6月26日周五 16:40写道:
Quoted 109 lines · Maxime Ripard <[email protected]> 于2026年6月26日周五 16:26写道:
Quoted 107 lines · Sunyun Yang
Quoted 90 lines · Maxime Ripard <[email protected]> 于2026年6月26日周五 15:49写道:
Quoted 68 lines · Sunyun Yang
Quoted 59 lines · Krzysztof Kozlowski <[email protected]> 于2026年6月25日周四 21:51写道:
Quoted 57 lines · Sunyun Yang
Quoted 55 lines · Sunyun Yang <[email protected]> 于2026年6月25日周四 21:26写道:
Quoted 40 lines · Krzysztof Kozlowski <[email protected]> 于2026年6月25日周四 21:17写道:

On 25/06/2026 15:14, Sunyun Yang wrote:
Krzysztof Kozlowski <[email protected]> 于2026年6月25日周四 20:54写道:

On 08/05/2026 15:40, [email protected] wrote:
+
+static void lt9611c_reset(struct lt9611c *lt9611c)
+{
+ gpiod_set_value_cansleep(lt9611c->reset_gpio, 1);
+ msleep(20);
+
+ gpiod_set_value_cansleep(lt9611c->reset_gpio, 0);
+ msleep(20);
+
+ gpiod_set_value_cansleep(lt9611c->reset_gpio, 1);

This is just plain wrong. Why do you assert, then de-assert and then
finally assert AGAIN the reset leaving the device in powerdown stage?

I am using software to emulate the hardware RESET button on our EVB.
When the hardware RESET button is pressed while our chip is running,
the signal level changes from HIGH to LOW and then back to HIGH.

Of course, we can also use the following:
static void lt9611c_reset(struct lt9611c *lt9611c)
{
gpiod_set_value_cansleep(lt9611c->reset_gpio, 0);
msleep(50);
gpiod_set_value_cansleep(lt9611c->reset_gpio, 1);
msleep(20);
}

Makes no sense either and you just did not get the point and did not
answer my question. I asked WHY you leave asserted. Answer "we emulate"
is just plain wrong.

So again please answer:

Why do you leave device with reset asserted?

devicetree: reset-gpios = <&tlmm 128 GPIO_ACTIVE_HIGH>;

GPIO_ACTIVE_HIGH:

gpiod_set_value_cansleep(lt9611c->reset_gpio, 0); ------ reset pin
is Low level : Clear the register configuration in the chip to stop the chip from working.

gpiod_set_value_cansleep(lt9611c->reset_gpio, 1); ------ reset pin
is high level: The chip resumes operation.

Quoted 7 lines
Quoted 3 lines

Our purpose is: pull the level low to clear the register configuration in the chip, and then pull it high to allow the MCU inside the chip to re‑initialize the registers.

And you do completely opposite... so that confirms your code is just wrong.

Quoted 6 lines

The lontium-lt9611.yaml uses GPIO_ACTIVE_HIGH. I am just following the rule of this device tree. If I modify the device tree to use GPIO_ACTIVE_LOW,
and use the following code in my driver, then my driver would be correct. However, would the existing kernel drivers lontium-lt9611uxc.c and lontium-lt9611.c be affected?

It might, but then it's a DT problem. The GPIO API for drivers always considers the logical state of a GPIO, so if you need to assert a signal, you'll always need to set 1. That's what Krzysztof was trying to explain.

The DT will provide with GPIO_ACTIVE_* how that logical state translates to a physical GPIO state.

If the DT says that this particular GPIO is active-high, then it means that we need to set the GPIO to 1 to assert reset. Now of course, it might not make sense for the controller itself, but it might for the board if there's a GPIO inverter in the middle for example.

Quoted 7 lines

Anyway, in the case you're raising, the issue definitely lies in the DT, and that's what would need to be fixed.

I also wouldn't be too concerned about lontium-lt9611.yaml, it's just an example.

Maxime

thanks Maxime, I will modify this code in the next version of the driver, and I hope you can accept these changes.

Maxime:
I have another question I would like to ask you regarding [email protected]. Since sashiko-bot sometimes has opinions that differ from yours, whose advice should I follow?

Quoted 9 lines
Quoted 5 lines
Quoted 2 lines

If I do not adopt sashiko-bot's suggestions, will my patches still be accepted into the upstream Linux kernel?

I can't give a blanket answer. It depends on what you ignore exactly.

Okay, another question: sashiko-bot is an AI bot. Are its review comments optional, or must they be followed?

For example, in my driver, there is a function for upgrading the chip firmware. During debugging or production, upgrading the chip firmware will acquire a lock, which will block the DRM callback and affect display. It will be fine after the upgrade is completed and some devices are restarted. As long as there is no subsequent upgrade, display can work normally.

Quoted 5 lines

From a purely software perspective, the AI bot considered this approach unacceptable and proposed synchronizing the pre-upgrade state to the DRM framework. From my personal perspective, I think the AI bot's suggestion would only make my driver more complex and redundant. Do you think I need to adopt the AI bot's suggestion?

You're right it's wrong, but there's also no reason to allow that firmware upgrade during the driver lifetime either through a debugfs file. So you should get rid of the debugfs file and now you won't have to bother with that comment anymore.

Quoted 4 lines

In addition, if I follow the AI bot's suggestion, the lontium-lt9611uxc.c and lontium-lt8713sx.c drivers that have been merged into the upstream Linux kernel would not meet the AI bot's requirements.

Maybe, but it's not relevant either way. These drivers are merged, yours isn't. Feel free to fix these if you spot any issue though.

Quoted 2 lines

When I get a reviewer's Reviewed-by flag, can I ignore the opinion of sashiko-bot (the AI bot)?

Again, it depends on the comment. If you feel like one can be ignored, you should at least argue why.

Quoted 6 lines
Quoted 3 lines

sashiko‑bot (AI bot) does not communicate or interact with me. Even if I explain the reasons, the AI bot never replies to me, and it only sends its review comments to me alone.

Then put it into the cover letter?

thanks Maxime,
I will modify the driver patch, include the relevant explanation in the cover letter, and then submit it.

Quoted 5 lines
Quoted 3 lines

If I do not make changes according to the AI bot's suggestions, will that affect my driver being merged into the upstream Linux kernel? I would like to know the answer to this question.

I told you twice already.

#21 lore raw

Re: [PATCH v6 2/2] drm/bridge: Add Lontium LT9611C(EX/UXD) MIPI DSI to HDMI driver

In reply to Sunyun Yang
Quoted 37 lines · Sunyun Yang
Quoted 36 lines · Krzysztof Kozlowski <[email protected]> 于2026年6月25日周四 21:17写道:
Quoted 21 lines · Sunyun Yang
Quoted 16 lines · Krzysztof Kozlowski <[email protected]> 于2026年6月25日周四 20:54写道:

drivers/gpu/drm/bridge/lontium-lt9611c.c line 320

Quoted 10 lines · On 08/05/2026 15:40, [email protected] wrote:
drivers/gpu/drm/bridge/lontium-lt9611c.c new file +10 -0
+
+static void lt9611c_reset(struct lt9611c *lt9611c)
+{
+     gpiod_set_value_cansleep(lt9611c->reset_gpio, 1);
+     msleep(20);
+
+     gpiod_set_value_cansleep(lt9611c->reset_gpio, 0);
+     msleep(20);
+
+     gpiod_set_value_cansleep(lt9611c->reset_gpio, 1);

This is just plain wrong. Why do you assert, then de-assert and then finally assert AGAIN the reset leaving the device in powerdown stage?

I am using software to emulate the hardware RESET button on our EVB. When the hardware RESET button is pressed while our chip is running, the signal level changes from HIGH to LOW and then back to HIGH.

Quoted 8 lines

Of course, we can also use the following:
static void lt9611c_reset(struct lt9611c *lt9611c)

{
    gpiod_set_value_cansleep(lt9611c->reset_gpio, 0);
    msleep(50);
    gpiod_set_value_cansleep(lt9611c->reset_gpio, 1);
    msleep(20);
}

Makes no sense either and you just did not get the point and did not answer my question. I asked WHY you leave asserted. Answer "we emulate" is just plain wrong.

Quoted 6 lines
Quoted 4 lines

So again please answer:

Why do you leave device with reset asserted?

devicetree: reset-gpios = <&tlmm 128 GPIO_ACTIVE_HIGH>;

That's irrelevant. I do not talk about DT.

Review is happening in specific place - here I question driver code. If you do not have actual arguments why device is left in reset stage, then please fix it.

Best regards,
Krzysztof

#22 lore raw

Re: [PATCH v6 2/2] drm/bridge: Add Lontium LT9611C(EX/UXD) MIPI DSI to HDMI driver

In reply to Sunyun Yang
Quoted 37 lines · Sunyun Yang
Quoted 36 lines · Krzysztof Kozlowski <[email protected]> 于2026年6月25日周四 21:17写道:
Quoted 21 lines · Sunyun Yang
Quoted 16 lines · Krzysztof Kozlowski <[email protected]> 于2026年6月25日周四 20:54写道:

drivers/gpu/drm/bridge/lontium-lt9611c.c line 320

Quoted 10 lines · On 08/05/2026 15:40, [email protected] wrote:
drivers/gpu/drm/bridge/lontium-lt9611c.c new file +10 -0
+
+static void lt9611c_reset(struct lt9611c *lt9611c)
+{
+     gpiod_set_value_cansleep(lt9611c->reset_gpio, 1);
+     msleep(20);
+
+     gpiod_set_value_cansleep(lt9611c->reset_gpio, 0);
+     msleep(20);
+
+     gpiod_set_value_cansleep(lt9611c->reset_gpio, 1);

This is just plain wrong. Why do you assert, then de-assert and then finally assert AGAIN the reset leaving the device in powerdown stage?

I am using software to emulate the hardware RESET button on our EVB. When the hardware RESET button is pressed while our chip is running, the signal level changes from HIGH to LOW and then back to HIGH.

Quoted 8 lines

Of course, we can also use the following:
static void lt9611c_reset(struct lt9611c *lt9611c)

{
    gpiod_set_value_cansleep(lt9611c->reset_gpio, 0);
    msleep(50);
    gpiod_set_value_cansleep(lt9611c->reset_gpio, 1);
    msleep(20);
}

Makes no sense either and you just did not get the point and did not answer my question. I asked WHY you leave asserted. Answer "we emulate" is just plain wrong.

Quoted 6 lines
Quoted 4 lines

So again please answer:

Why do you leave device with reset asserted?

devicetree: reset-gpios = <&tlmm 128 GPIO_ACTIVE_HIGH>;

It should be GPIO_ACTIVE_LOW, if the pin as active-low.

Quoted 14 lines

GPIO_ACTIVE_HIGH:

gpiod_set_value_cansleep(lt9611c->reset_gpio, 0); ------ reset pin
is Low level : Clear the register configuration in the chip to stop the chip from working.

gpiod_set_value_cansleep(lt9611c->reset_gpio, 1); ------ reset pin
is high level: The chip resumes operation.

Quoted 2 lines

Best regards,
Krzysztof

Signature · 2 lines
With best wishes
Dmitry
#23 lore raw

Re: [PATCH v6 2/2] drm/bridge: Add Lontium LT9611C(EX/UXD) MIPI DSI to HDMI driver

Quoted 39 lines · Dmitry Baryshkov <[email protected]> 于2026年6月25日周四 22:57写道:
Quoted 37 lines · Sunyun Yang
Quoted 36 lines · Krzysztof Kozlowski <[email protected]> 于2026年6月25日周四 21:17写道:
Quoted 21 lines · Sunyun Yang
Quoted 16 lines · Krzysztof Kozlowski <[email protected]> 于2026年6月25日周四 20:54写道:

drivers/gpu/drm/bridge/lontium-lt9611c.c line 320

Quoted 10 lines · On 08/05/2026 15:40, [email protected] wrote:
drivers/gpu/drm/bridge/lontium-lt9611c.c new file +10 -0
+
+static void lt9611c_reset(struct lt9611c *lt9611c)
+{
+     gpiod_set_value_cansleep(lt9611c->reset_gpio, 1);
+     msleep(20);
+
+     gpiod_set_value_cansleep(lt9611c->reset_gpio, 0);
+     msleep(20);
+
+     gpiod_set_value_cansleep(lt9611c->reset_gpio, 1);

This is just plain wrong. Why do you assert, then de-assert and then finally assert AGAIN the reset leaving the device in powerdown stage?

I am using software to emulate the hardware RESET button on our EVB. When the hardware RESET button is pressed while our chip is running, the signal level changes from HIGH to LOW and then back to HIGH.

Quoted 8 lines

Of course, we can also use the following:
static void lt9611c_reset(struct lt9611c *lt9611c)

{
    gpiod_set_value_cansleep(lt9611c->reset_gpio, 0);
    msleep(50);
    gpiod_set_value_cansleep(lt9611c->reset_gpio, 1);
    msleep(20);
}

Makes no sense either and you just did not get the point and did not answer my question. I asked WHY you leave asserted. Answer "we emulate" is just plain wrong.

Quoted 9 lines
Quoted 6 lines
Quoted 4 lines

So again please answer:

Why do you leave device with reset asserted?

devicetree: reset-gpios = <&tlmm 128 GPIO_ACTIVE_HIGH>;

It should be GPIO_ACTIVE_LOW, if the pin as active-low.

Yes, I understand that.

I used GPIO_ACTIVE_HIGH intentionally, because I did not want to modify the existing reset-gpios = <&tlmm 128 GPIO_ACTIVE_HIGH> property in the lontium-lt9611.yaml device tree file that was submitted by others. If I used GPIO_ACTIVE_LOW, I would have to change that line in the device tree binding, and also update the driver files lontium-lt9611.c and lontium-lt9611uxc.c accordingly. That would add a significant amount of extra work for me.

Moreover, in much earlier versions, I had added a separate lontium-lt9611c.yaml file to decouple this new chip from the existing lontium-lt9611 / lontium-lt9611uxc support. However, Dmitry Baryshkov considered that unnecessary and asked me to merge lontium-lt9611c together with the existing drivers. He also told me that the differences in reset‑pin and VDD/VCC supply did not matter.

The existing device tree and driver code already had issues, and I had raised them with you before. At that time, you did not seem to care, and the community reviewers insisted that I must follow your directions. So I did exactly what you told me to do.

Quoted 18 lines
Quoted 14 lines

GPIO_ACTIVE_HIGH:

gpiod_set_value_cansleep(lt9611c->reset_gpio, 0); ------ reset pin
is Low level : Clear the register configuration in the chip to stop the chip from working.

gpiod_set_value_cansleep(lt9611c->reset_gpio, 1); ------ reset pin
is high level: The chip resumes operation.

Quoted 2 lines

Best regards,
Krzysztof

--
With best wishes
Dmitry

#24 lore raw

Re: [PATCH v6 2/2] drm/bridge: Add Lontium LT9611C(EX/UXD) MIPI DSI to HDMI driver

Quoted 47 lines · Sunyun Yang
Quoted 46 lines · Dmitry Baryshkov <[email protected]> 于2026年6月25日周四 22:57写道:
Quoted 43 lines · Sunyun Yang
Quoted 32 lines · Krzysztof Kozlowski <[email protected]> 于2026年6月25日周四 21:17写道:
Quoted 21 lines · Sunyun Yang
Quoted 16 lines · Krzysztof Kozlowski <[email protected]> 于2026年6月25日周四 20:54写道:

Review

Quoted 10 lines · On 08/05/2026 15:40, [email protected] wrote:
(quoted diff) +10 -0
+
+static void lt9611c_reset(struct lt9611c *lt9611c)
+{
+     gpiod_set_value_cansleep(lt9611c->reset_gpio, 1);
+     msleep(20);
+
+     gpiod_set_value_cansleep(lt9611c->reset_gpio, 0);
+     msleep(20);
+
+     gpiod_set_value_cansleep(lt9611c->reset_gpio, 1);

This is just plain wrong. Why do you assert, then de-assert and then finally assert AGAIN the reset leaving the device in powerdown stage?

I am using software to emulate the hardware RESET button on our EVB. When the hardware RESET button is pressed while our chip is running, the signal level changes from HIGH to LOW and then back to HIGH.

Quoted 8 lines

Of course, we can also use the following:
static void lt9611c_reset(struct lt9611c *lt9611c)

{
    gpiod_set_value_cansleep(lt9611c->reset_gpio, 0);
    msleep(50);
    gpiod_set_value_cansleep(lt9611c->reset_gpio, 1);
    msleep(20);
}
Quoted 8 lines

Makes no sense either and you just did not get the point and did not answer my question. I asked WHY you leave asserted. Answer "we emulate" is just plain wrong.

So again please answer:

Why do you leave device with reset asserted?

devicetree: reset-gpios = <&tlmm 128 GPIO_ACTIVE_HIGH>;

Quoted 8 lines
Quoted 2 lines

It should be GPIO_ACTIVE_LOW, if the pin as active-low.

Yes, I understand that.

I used GPIO_ACTIVE_HIGH intentionally, because I did not want to modify the existing reset-gpios = <&tlmm 128 GPIO_ACTIVE_HIGH> property in the lontium-lt9611.yaml device tree file that was

The example there does not matter. You must write correct driver.

That is it.

If you cannot bring the arguments why reset must be asserted for the normal operation of the device, then this is the end of discussion.

Best regards,
Krzysztof

#25 lore raw

Re: [PATCH v6 2/2] drm/bridge: Add Lontium LT9611C(EX/UXD) MIPI DSI to HDMI driver

In reply to [email protected]
Quoted 11 lines · On 08/05/2026 15:40, [email protected] wrote:
drivers/gpu/drm/bridge/lontium-lt9611c.c new file +11 -0
+
+static int lt9611c_probe(struct i2c_client *client)
+{
+	const struct i2c_device_id *id = i2c_client_get_device_id(client);
+	struct lt9611c *lt9611c;
+	struct device *dev = &client->dev;
+	bool fw_updated = false;
+	int ret;
+
+	crc8_populate_msb(lt9611c_crc8_table, LT9611C_CRC_POLYNOMIAL);
+

drivers/gpu/drm/bridge/lontium-lt9611c.c line 1027

Quoted 10 lines
drivers/gpu/drm/bridge/lontium-lt9611c.c new file +10 -0
+	if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C))
+		return dev_err_probe(dev, -ENODEV, "device doesn't support I2C\n");
+
+	lt9611c = devm_drm_bridge_alloc(dev, struct lt9611c, bridge, &lt9611c_bridge_funcs);
+	if (IS_ERR(lt9611c))
+		return dev_err_probe(dev, PTR_ERR(lt9611c), "drm bridge alloc failed.\n");
+
+	lt9611c->dev = dev;
+	lt9611c->client = client;
+	lt9611c->chip_type = id->driver_data;

Also, NULL pointer exception here. With simple look I found at least two easy to reproduce and trigger bugs which makes me questioning how did you test it.

Best regards,
Krzysztof