platform/x86: int3472: add hpd pin support
Subsystems (4)
PATCH v2 1/2 platform/x86: int3472: add hpd pin support
Typically HDMI to MIPI CSI-2 bridges have a pin to signal image data is being received. On the host side this is wired to a GPIO for polling or interrupts. This includes the Lontium HDMI to MIPI CSI-2 bridges lt6911uxe and lt6911uxc.
The GPIO "hpd" is used already by other HDMI to CSI-2 bridges, use it here as well.
--- drivers/platform/x86/intel/int3472/common.h | 1 + drivers/platform/x86/intel/int3472/discrete.c | 6 ++++++ 2 files changed, 7 insertions(+)
drivers/platform/x86/intel/int3472/common.h +1 -0
@@ -22,6 +22,7 @@#define INT3472_GPIO_TYPE_POWER_ENABLE 0x0b#define INT3472_GPIO_TYPE_CLK_ENABLE 0x0c#define INT3472_GPIO_TYPE_PRIVACY_LED 0x0d +#define INT3472_GPIO_TYPE_HOTPLUG_DETECT 0x13#define INT3472_PDEV_MAX_NAME_LEN 23#define INT3472_MAX_SENSOR_GPIOS 3
drivers/platform/x86/intel/int3472/discrete.c +6 -0
@@ -186,6 +186,10 @@ static void int3472_get_con_id_and_polarity(struct acpi_device *adev, u8 *type, *con_id ="privacy-led" ; *gpio_flags =GPIO_ACTIVE_HIGH ;break ; +case INT3472_GPIO_TYPE_HOTPLUG_DETECT : + *con_id ="hpd" ; + *gpio_flags =GPIO_ACTIVE_HIGH ; +break ;case INT3472_GPIO_TYPE_POWER_ENABLE : *con_id ="power-enable" ; *gpio_flags =GPIO_ACTIVE_HIGH ;
@@ -212,6 +216,7 @@ static void int3472_get_con_id_and_polarity(struct acpi_device *adev, u8 *type,* 0x0b Power enable * 0x0c Clock enable * 0x0d Privacy LED +* 0x13 Hotplug detect * * There are some known platform specific quirks where that does not quite * hold up; for example where a pin with type 0x01 (Power down) is mapped to
@@ -281,6 +286,7 @@ static int skl_int3472_handle_gpio_resources(struct acpi_resource *ares,switch (type) {case INT3472_GPIO_TYPE_RESET :case INT3472_GPIO_TYPE_POWERDOWN : +case INT3472_GPIO_TYPE_HOTPLUG_DETECT : ret =skl_int3472_map_gpio_to_sensor (int3472, agpio, con_id, gpio_flags);if (ret) err_msg ="Failed to map GPIO pin to sensor\n" ;
base-commit: 01c6df60d5d4ae00cd5c1648818744838bba7763
Signature · 1 line
2.34.1
PATCH v2 2/2 media: i2c: change lt6911uxe irq_gpio name to "hpd"
Lt6911uxe is used in IPU6 / x86 platform, worked with an out-of-tree int3472 patch and upstream intel/ipu6 before. It is only used on ACPI platforms till now and there are no devicetree bindings for this driver.
The upstream int3472 driver uses "hpd" instead of "readystat" now. this patch updates the irq_gpio name to "hpd" accordingly, so that mere users can now use the upstream version directly without relying on out-of-tree int3472 pin support.
The new name "hpd" (Hotplug Detect) aligns with common naming conventions used in other drivers(like adv7604) and documentation.
--- drivers/media/i2c/lt6911uxe.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/media/i2c/lt6911uxe.c +2 -2
@@ -605,10 +605,10 @@ static int lt6911uxe_probe(struct i2c_client *client)return dev_err_probe (dev,PTR_ERR (lt6911uxe->reset_gpio),"failed to get reset gpio\n" ); - lt6911uxe->irq_gpio =devm_gpiod_get (dev,"readystat" ,GPIOD_IN ); + lt6911uxe->irq_gpio =devm_gpiod_get (dev,"hpd" ,GPIOD_IN );if (IS_ERR (lt6911uxe->irq_gpio))return dev_err_probe (dev,PTR_ERR (lt6911uxe->irq_gpio), -"failed to get ready_stat gpio\n" ); +"failed to get hpd gpio\n" ); ret =lt6911uxe_fwnode_parse (lt6911uxe, dev);if (ret)
Signature · 1 line
2.34.1
kernel test robot
build botFYI: kernel test robot notices the stable kernel rule is not satisfied.
Hi,
Thanks for your patch.
FYI: kernel test robot notices the stable kernel rule is not satisfied.
The check is based on https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html#option-1
Rule: add the tag "Cc: [email protected]" in the sign-off area to have the patch automatically included in the stable tree.
Subject: [PATCH v2 1/2] platform/x86: int3472: add hpd pin support
Signature · 2 lines
0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
Hi Doncheng,
Quoted 9 lines · Dongcheng Yan
Typically HDMI to MIPI CSI-2 bridges have a pin to signal image data is being received. On the host side this is wired to a GPIO for polling or interrupts. This includes the Lontium HDMI to MIPI CSI-2 bridges lt6911uxe and lt6911uxc.
The GPIO "hpd" is used already by other HDMI to CSI-2 bridges, use it here as well.
Signed-off-by Dongcheng Yan <[email protected]>
Thanks, patch looks good to me:
Note my handshake control series has just landed / is on its way to next, see:
Please send a v3 rebased on top of this to resolve the conflict we now have.
Regards,
Hans
Quoted 50 lines
--- drivers/platform/x86/intel/int3472/common.h | 1 + drivers/platform/x86/intel/int3472/discrete.c | 6 ++++++ 2 files changed, 7 insertions(+)drivers/platform/x86/intel/int3472/common.h +1
-0@@ -22,6 +22,7 @@#define INT3472_GPIO_TYPE_POWER_ENABLE 0x0b#define INT3472_GPIO_TYPE_CLK_ENABLE 0x0c#define INT3472_GPIO_TYPE_PRIVACY_LED 0x0d +#define INT3472_GPIO_TYPE_HOTPLUG_DETECT 0x13#define INT3472_PDEV_MAX_NAME_LEN 23#define INT3472_MAX_SENSOR_GPIOS 3drivers/platform/x86/intel/int3472/discrete.c +6
-0@@ -186,6 +186,10 @@ static void int3472_get_con_id_and_polarity(struct acpi_device *adev, u8 *type, *con_id ="privacy-led" ; *gpio_flags =GPIO_ACTIVE_HIGH ;break ; +case INT3472_GPIO_TYPE_HOTPLUG_DETECT : + *con_id ="hpd" ; + *gpio_flags =GPIO_ACTIVE_HIGH ; +break ;case INT3472_GPIO_TYPE_POWER_ENABLE : *con_id ="power-enable" ; *gpio_flags =GPIO_ACTIVE_HIGH ;@@ -212,6 +216,7 @@ static void int3472_get_con_id_and_polarity(struct acpi_device *adev, u8 *type,* 0x0b Power enable * 0x0c Clock enable * 0x0d Privacy LED +* 0x13 Hotplug detect * * There are some known platform specific quirks where that does not quite * hold up; for example where a pin with type 0x01 (Power down) is mapped to @@ -281,6 +286,7 @@ static int skl_int3472_handle_gpio_resources(struct acpi_resource *ares,switch (type) {case INT3472_GPIO_TYPE_RESET :case INT3472_GPIO_TYPE_POWERDOWN : +case INT3472_GPIO_TYPE_HOTPLUG_DETECT : ret =skl_int3472_map_gpio_to_sensor (int3472, agpio, con_id, gpio_flags);if (ret) err_msg ="Failed to map GPIO pin to sensor\n" ;base-commit:
01c6df60d5d4ae00cd5c1648818744838bba7763
Hi hans,
thanks for your review, I have updated v3 within rebasing to review-ilpo-next.
Quoted 85 lines · Hans de Goede
Hi Doncheng,
Quoted 9 lines · Dongcheng Yan
Typically HDMI to MIPI CSI-2 bridges have a pin to signal image data is being received. On the host side this is wired to a GPIO for polling or interrupts. This includes the Lontium HDMI to MIPI CSI-2 bridges lt6911uxe and lt6911uxc.
The GPIO "hpd" is used already by other HDMI to CSI-2 bridges, use it here as well.
Signed-off-by Dongcheng Yan <[email protected]>Thanks, patch looks good to me:
Reviewed-by Hans de Goede <[email protected]>Note my handshake control series has just landed / is on its way to next, see:
Please send a v3 rebased on top of this to resolve the conflict we now have.
Regards,
Hans
Quoted 50 lines
--- drivers/platform/x86/intel/int3472/common.h | 1 + drivers/platform/x86/intel/int3472/discrete.c | 6 ++++++ 2 files changed, 7 insertions(+)drivers/platform/x86/intel/int3472/common.h +1
-0@@ -22,6 +22,7 @@#define INT3472_GPIO_TYPE_POWER_ENABLE 0x0b#define INT3472_GPIO_TYPE_CLK_ENABLE 0x0c#define INT3472_GPIO_TYPE_PRIVACY_LED 0x0d +#define INT3472_GPIO_TYPE_HOTPLUG_DETECT 0x13#define INT3472_PDEV_MAX_NAME_LEN 23#define INT3472_MAX_SENSOR_GPIOS 3drivers/platform/x86/intel/int3472/discrete.c +6
-0@@ -186,6 +186,10 @@ static void int3472_get_con_id_and_polarity(struct acpi_device *adev, u8 *type, *con_id ="privacy-led" ; *gpio_flags =GPIO_ACTIVE_HIGH ;break ; +case INT3472_GPIO_TYPE_HOTPLUG_DETECT : + *con_id ="hpd" ; + *gpio_flags =GPIO_ACTIVE_HIGH ; +break ;case INT3472_GPIO_TYPE_POWER_ENABLE : *con_id ="power-enable" ; *gpio_flags =GPIO_ACTIVE_HIGH ;@@ -212,6 +216,7 @@ static void int3472_get_con_id_and_polarity(struct acpi_device *adev, u8 *type,* 0x0b Power enable * 0x0c Clock enable * 0x0d Privacy LED +* 0x13 Hotplug detect * * There are some known platform specific quirks where that does not quite * hold up; for example where a pin with type 0x01 (Power down) is mapped to @@ -281,6 +286,7 @@ static int skl_int3472_handle_gpio_resources(struct acpi_resource *ares,switch (type) {case INT3472_GPIO_TYPE_RESET :case INT3472_GPIO_TYPE_POWERDOWN : +case INT3472_GPIO_TYPE_HOTPLUG_DETECT : ret =skl_int3472_map_gpio_to_sensor (int3472, agpio, con_id, gpio_flags);if (ret) err_msg ="Failed to map GPIO pin to sensor\n" ;base-commit:
01c6df60d5d4ae00cd5c1648818744838bba7763