Skip to content

Commit d9eb5a9

Browse files
Crescentlovegregkh
authored andcommitted
platform/x86: int3472: add hpd pin support
commit a032fe3 upstream. 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 <dongcheng.yan@intel.com> Reviewed-by: Sakari Ailus <sakari.ailus@linux.intel.com> Acked-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Fixes: 20244cb ("media: i2c: change lt6911uxe irq_gpio name to "hpd"") Cc: stable@vger.kernel.org Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 88e6c42 commit d9eb5a9

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

drivers/platform/x86/intel/int3472/discrete.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,10 @@ static void int3472_get_con_id_and_polarity(struct int3472_discrete_device *int3
193193
*con_id = "privacy-led";
194194
*gpio_flags = GPIO_ACTIVE_HIGH;
195195
break;
196+
case INT3472_GPIO_TYPE_HOTPLUG_DETECT:
197+
*con_id = "hpd";
198+
*gpio_flags = GPIO_ACTIVE_HIGH;
199+
break;
196200
case INT3472_GPIO_TYPE_POWER_ENABLE:
197201
*con_id = "avdd";
198202
*gpio_flags = GPIO_ACTIVE_HIGH;
@@ -223,6 +227,7 @@ static void int3472_get_con_id_and_polarity(struct int3472_discrete_device *int3
223227
* 0x0b Power enable
224228
* 0x0c Clock enable
225229
* 0x0d Privacy LED
230+
* 0x13 Hotplug detect
226231
*
227232
* There are some known platform specific quirks where that does not quite
228233
* hold up; for example where a pin with type 0x01 (Power down) is mapped to
@@ -292,6 +297,7 @@ static int skl_int3472_handle_gpio_resources(struct acpi_resource *ares,
292297
switch (type) {
293298
case INT3472_GPIO_TYPE_RESET:
294299
case INT3472_GPIO_TYPE_POWERDOWN:
300+
case INT3472_GPIO_TYPE_HOTPLUG_DETECT:
295301
ret = skl_int3472_map_gpio_to_sensor(int3472, agpio, con_id, gpio_flags);
296302
if (ret)
297303
err_msg = "Failed to map GPIO pin to sensor\n";

include/linux/platform_data/x86/int3472.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
#define INT3472_GPIO_TYPE_CLK_ENABLE 0x0c
2828
#define INT3472_GPIO_TYPE_PRIVACY_LED 0x0d
2929
#define INT3472_GPIO_TYPE_HANDSHAKE 0x12
30+
#define INT3472_GPIO_TYPE_HOTPLUG_DETECT 0x13
3031

3132
#define INT3472_PDEV_MAX_NAME_LEN 23
3233
#define INT3472_MAX_SENSOR_GPIOS 3

0 commit comments

Comments
 (0)