From patchwork Mon Jan 16 11:08:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pin-yen Lin X-Patchwork-Id: 13102914 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 24F6DC54EBE for ; Mon, 16 Jan 2023 11:08:33 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1CA3710E3C6; Mon, 16 Jan 2023 11:08:32 +0000 (UTC) Received: from mail-pj1-x102b.google.com (mail-pj1-x102b.google.com [IPv6:2607:f8b0:4864:20::102b]) by gabe.freedesktop.org (Postfix) with ESMTPS id 180A010E3C6 for ; Mon, 16 Jan 2023 11:08:30 +0000 (UTC) Received: by mail-pj1-x102b.google.com with SMTP id z1-20020a17090a66c100b00226f05b9595so15629753pjl.0 for ; Mon, 16 Jan 2023 03:08:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=dfRiQXYTUx6y8hhtdcAlsfGS9AhT12f1GNqfx+pyyDk=; b=Eztij/jKwvQgLi8FDIq5tc40NYED6o9kyjWUtMs94tSD3Q0DoNhh88GZK3QOx5Mbjl rqQtvulivsl9z30WiH5kwhs7vxyc4rBEs5Fa8Om0dq5CDMPtVdMp6i/fb/Ex37GBMe9q TDCD8Ft7g+ZKdLIbmLWSTdQqsosUGLE69BZUI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=dfRiQXYTUx6y8hhtdcAlsfGS9AhT12f1GNqfx+pyyDk=; b=ZQ1UGYVUQQAkCRYBdQiZx5tvqqBN+LefPAA//4UX/GW6JLJW6MhkJAT/mFr5QaUtD9 LID/Q1iOVchX/GpGiYWD7WdGscbF5+tE/uoqE8rLL6wtlvmo8d/0iVhlx2UpNRsRUaqf RYJbWiCtt2CtGUPDy2SDSzZUsD/kClFPP45lUQ4ZkuTc9se9BRyrVl1DwDNMFoVtbvjM SPffhVe2RSFmcB18942Lj7FnnKmtLibsS3JmFPA6TkXzsVSorMlbilLl5Pg7JxXTgXST 6FBkF3MBfqwItu7NaE0xCOfeYlWF3uQREKyoIjQm9X2fWAx6rPUjZLJH2VR9l2OXR1OF EQaA== X-Gm-Message-State: AFqh2kokWDsOIYpPlALw+sNyHRjsyQ2M2TgCfRoNkqzkk7fCDO8k5FNB jWBDC7MxIRZgDuNPIJzr3fzd0A== X-Google-Smtp-Source: AMrXdXsggwYVYYGhO1zejEuuLPLjf5Zi64UVNlp925UPkPrexYScta5K/8VyKE2HL32TxjKI4YFFag== X-Received: by 2002:a17:90a:b110:b0:223:4308:1ab4 with SMTP id z16-20020a17090ab11000b0022343081ab4mr93379792pjq.46.1673867309636; Mon, 16 Jan 2023 03:08:29 -0800 (PST) Received: from treapking.tpe.corp.google.com ([2401:fa00:1:10:a3f3:9ba9:fe36:fbcb]) by smtp.gmail.com with ESMTPSA id i8-20020a17090a138800b00226369149cesm17993686pja.21.2023.01.16.03.08.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Jan 2023 03:08:29 -0800 (PST) From: Pin-yen Lin To: Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , David Airlie , Daniel Vetter , Rob Herring , Krzysztof Kozlowski Subject: [PATCH v2 0/2] Add generic-display-mux driver and bindings Date: Mon, 16 Jan 2023 19:08:18 +0800 Message-Id: <20230116110820.2615650-1-treapking@chromium.org> X-Mailer: git-send-email 2.39.0.314.g84b9a713c41-goog MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Nicolas Boichat , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Pin-yen Lin , Hsin-Yi Wang Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" This is the v2 the mux driver part of v1. This series is developed for and tested on MT8173 board, whose layout looks like: /-- anx7688 -- MT8173 HDMI bridge -- GPIO mux \-- native HDMI v1: https://patchwork.kernel.org/project/dri-devel/cover/20191211061911.238393-1-hsinyi@chromium.org/ The other drm bridge callbacks is dropped in this version because: - The non-atomic callbacks are deprecated - It would be complicated to pass the atomic state to the downstream - We actually don't have the hardware to test them Changes in v2: - Referenced existing dt-binding schemas from graph.yaml - Added ddc-i2c-bus into the bindings - Dropped attach/mode_set/enable/disable callbacks - Fixed style issues - Removed the special case for the HDMI connector - Made the driver only read the GPIO status in IRQ handler - Rebased to drm-misc-next - Updated the license: "GPL v2" --> "GPL" Nicolas Boichat (2): dt-bindings: display: bridge: Add GPIO display mux binding drm: bridge: Generic GPIO mux driver .../bindings/display/bridge/gpio-mux.yaml | 95 +++++++++ drivers/gpu/drm/bridge/Kconfig | 10 + drivers/gpu/drm/bridge/Makefile | 1 + drivers/gpu/drm/bridge/generic-gpio-mux.c | 201 ++++++++++++++++++ 4 files changed, 307 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/bridge/gpio-mux.yaml create mode 100644 drivers/gpu/drm/bridge/generic-gpio-mux.c