From patchwork Sat Jul 13 08:45:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Trimarchi X-Patchwork-Id: 3222 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-ed1-f69.google.com (mail-ed1-f69.google.com [209.85.208.69]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 3D28540F45 for ; Sat, 13 Jul 2024 10:46:00 +0200 (CEST) Received: by mail-ed1-f69.google.com with SMTP id 4fb4d7f45d1cf-58bd84067fdsf2687714a12.0 for ; Sat, 13 Jul 2024 01:46:00 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1720860360; cv=pass; d=google.com; s=arc-20160816; b=LoXzbFcMxa5cRphSCJ7CRHm7N7uR8iE3P2sTnvg52Ph4GODMgr6DfActbisHeU6ETe W+eR8QFx8g+D9QCA4gp8nC9AtzGba/f9abfLWjlbW94OWbUJpcbsB7B/qnFsDY/vhjSq rGg32QRfS4yLfk2QWJH3I9np4rlTvHgprB0zuIkA/kVafE9+qlCu39rWj/UFUtKewmFH sgLsNizvpfzzvJChmS/iPEPYRhEGB5QA4Oj8/OPhN5bb5OVBeTGhev6DRGszmtuI/jbS SG9X2j1LLBqM3iBLNmXspT6EQvhJ/3Jz5ng9rIyxW/FmobErvOzvY94yFbIqk6oa6WOP mVOA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=4xfP90RdggRJLNG0N6//LJOQdFV/TURb60b9BTLPZ64=; fh=8f0brc332PQup+qAdBW2fClBUXe81QIl359vHnpB3yI=; b=aFj8ujityWVwypjmYSMvOQuyrTN6inS/Nq5sZHkc4M0lzk1OoprveEbMvILsGaCvL+ ceOIXhpPz1ck35M50GPB957AAeCRiEViLbbg7uCHODUBwZNngIksjd0kmTeIaBe0Me76 WrqlW0NhLsPKLiQEokYUNGQqVYAjwaiPSK+HFat0tsbYjmRN/q7fADpvSUIjy7L6DiiL Y/iZIIaEGkFUHLHI3tg9E+XnZaTYwh/CAi9gnKmWiUcAgWsXgdUfitL3k7F2vZ/BiXVY BqPc929jMqx/lf9EALNkD64XiXdvdn/a4EjSLlmFyhqfwQ7xKSd8H1xfHGm6/1jkqzSK KnZQ==; darn=patchwork.amarulasolutions.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=g7rePXUm; spf=pass (google.com: domain of michael@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=michael@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=pass header.i=@amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1720860360; x=1721465160; darn=patchwork.amarulasolutions.com; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:x-original-authentication-results :x-original-sender:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=4xfP90RdggRJLNG0N6//LJOQdFV/TURb60b9BTLPZ64=; b=CiCq2UfX64EXJwnyTrFfdfRF9e8kWjeDhjfv0XlwOWVvkTpIteOpeP0P4WKXXM94td YSkHVcxZxhMXxeMvqohd/LsfifFbP+rIu6tgrOwsy/R3uY1uwDG8HkMhzsEAkGlclKCg NcXj0FZv/8WSCz3hrkDMcwVNF38FEN3Ad3Kuo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720860360; x=1721465160; h=list-unsubscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :x-beenthere:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=4xfP90RdggRJLNG0N6//LJOQdFV/TURb60b9BTLPZ64=; b=aMbsHnAx0piwf5xFprZXN0+uh/17cR/poRt5jiUrMT1KknwR3H3i3DXaYEuCmkysSF c0TvrukQkNxhIqNOkWw9uMBrfC5oTEaIm64ModaggOBkt8IazpP7sAHlpKm+CFms4Mcb E7ZsucVBsDihp4pZioZr2zAxxS8a8bos9IRVmWsZRXqEuBUoWx6EVpvhtqnjTcxi/dNJ E0bY9VNvnD/CR4SpOJeAsuj3qTEWuscpfEUXzz1/7IMqVY/QlUG8qCZO55dJ5O0/qyik jwBNETYcpn/f3ZNqO4/dF6E+TdMGG3eHSoFTN6bKenbnL3Z+sSMo21sLn4L9hqDaatWO MPbQ== X-Forwarded-Encrypted: i=2; AJvYcCXrQn51JG1D206E6G/AFH1FERMXHrovfyqDKlhG1JAdLDzuKA1XyqvuFfUW9++T12xnfRpPKFw9e3tCssQy2+eNJPdzgQrBxnGIQwcY/G2fr41CHpqX1HghBAgfGg== X-Gm-Message-State: AOJu0YzU58F2wT4YlOek8Hha+v3AzzMgLIzkA0+BXj4d0qSqouHWCeCU JKtzf5QTE0Y8145HWzmaD4D49ugZXgxHzwiqWnStX5RLLGgFV8ZSC1d6o2zkyh6OuA== X-Google-Smtp-Source: AGHT+IEBSwkb72l0sn2uVQEdIaq8ucy1Ulw6vavL0pD5+So2yXihXNIgHOw+o31S0ZrO5rAIWMRSPA== X-Received: by 2002:a05:6402:50d1:b0:57c:6d9a:9149 with SMTP id 4fb4d7f45d1cf-594b9ee143dmr11356906a12.15.1720860359856; Sat, 13 Jul 2024 01:45:59 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a05:6402:28af:b0:584:b54c:52ad with SMTP id 4fb4d7f45d1cf-59826225ad3ls1441575a12.1.-pod-prod-07-eu; Sat, 13 Jul 2024 01:45:58 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWsJ7LTYLsWgIHxxmVZQmDQq3dfZ1+T0rFtJFA4DzSwFNfuPRLwl40nB0He/NjQhKZhrAwMZpdE3t7XEv/Bm/xMm0sIFYDOvg5uFqCHqI7+9HyK X-Received: by 2002:a17:907:d8a:b0:a72:7c0d:8fdc with SMTP id a640c23a62f3a-a780b68a311mr1129187766b.14.1720860358238; Sat, 13 Jul 2024 01:45:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1720860358; cv=none; d=google.com; s=arc-20160816; b=tXhxk5VBZTIVJZwj/jDXKGd5stbMhJi+QwZ7+xT8sn0ZLJY8HlQHb71MYgRkZlSP/a 8vCJOMWtf5AaedoJRDDh4JGOgd/y2MZAzUqlcwSJB9q7uzoMXreGC+t+GJzJi4KlCLCU ALP1ncm650jCyi5HOb/QpIw4DQUHD+oOPPAxGnMlz5CCZrGF2zObdTn4ai4HmqDBkTXe H4at4jbKtMyynx/Sg4CUK/QRYsAbjJju/Yikd3m0/bimdmLzlW6x7VJYhwP0ZUFTq5PQ NyK1V43U6EfTv7751CcUsCbAXPeEvONX4iAS9HVacnlwNJn1ABFm4Jy2HhGqUBZRO9kh E94w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=YxMxmC45u6BRcdQ8JSeIqRT2MubiYL3G2YLSKPpcuPk=; fh=34GU1C+B4cwIhIHqVAsT4G51ROrDI6fT29/7rSljN+I=; b=AJ+F6V17m9Vjwv2Jfu1dOwivZ/8X9ojH5H7TnRI42mf9AkC3Ey5YchKZMRR+YwjLHD futmTj8uDiYp6ZJBPYpuQNtnTPHNo0qBx0IQiZGjxb7ADQwKtabfm+KCMAcU6txDoYxU jtwhdEyA04VmXpjDSeq0quT6eZTKRcEyPwcjgMfN07tIi0yJ6mljqoZpe6GIdpjqYJ5g SYNkhYlgB+XYaMZAwGSK2JP0ofHZR59khvxhK918s6QroQbewiBwg6fE+D9SRbh1cj5z smRJ1CDZ02QMI2OKd17dMgqN9uDiF+XELkIrjZrGP8gdccmarDsRvJKSxbkYkfmjEW7R 81zg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=g7rePXUm; spf=pass (google.com: domain of michael@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=michael@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=pass header.i=@amarulasolutions.com Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id a640c23a62f3a-a79bc5b7df6sor12428466b.10.2024.07.13.01.45.58 for (Google Transport Security); Sat, 13 Jul 2024 01:45:58 -0700 (PDT) Received-SPF: pass (google.com: domain of michael@amarulasolutions.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; X-Forwarded-Encrypted: i=1; AJvYcCW/n8deMRpO7emJrhgRDhXE8FPIeqHVuWenZAvu4mIM2vXGaFrIJ0WfIrOvh2if7gtecL021AuiiDc0OL1niUYM1vlfKqLw7DFb5vI3mbN0YXBx X-Received: by 2002:a17:906:d195:b0:a72:b4c9:2be8 with SMTP id a640c23a62f3a-a780b89f634mr750709066b.72.1720860357902; Sat, 13 Jul 2024 01:45:57 -0700 (PDT) Received: from panicking.amarulasolutions.com (93-35-128-17.ip55.fastwebnet.it. [93.35.128.17]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a79bc7f1e20sm31483966b.116.2024.07.13.01.45.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 13 Jul 2024 01:45:57 -0700 (PDT) From: Michael Trimarchi To: Michael Trimarchi Cc: Dario Binacchi , Patrick Barsanti , linux-amarula@amarulasolutions.com, Ye Li Subject: [PATCH 16/21] video: dsi_host: add disable host interface Date: Sat, 13 Jul 2024 10:45:21 +0200 Message-ID: <20240713084526.922537-16-michael@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240713084526.922537-1-michael@amarulasolutions.com> References: <20240713084526.922537-1-michael@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: michael@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=g7rePXUm; spf=pass (google.com: domain of michael@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=michael@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=pass header.i=@amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Current operations structure has provided disable callback, but there is no API from dsi_host uclass to use it. Add this disable host interface, so that dsi bridge can call it to disable host Signed-off-by: Ye Li Signed-off-by: Michael Trimarchi --- drivers/video/dsi-host-uclass.c | 10 ++++++++++ include/dsi_host.h | 8 ++++++++ 2 files changed, 18 insertions(+) diff --git a/drivers/video/dsi-host-uclass.c b/drivers/video/dsi-host-uclass.c index fde275ad7e..745991f8dd 100644 --- a/drivers/video/dsi-host-uclass.c +++ b/drivers/video/dsi-host-uclass.c @@ -34,6 +34,16 @@ int dsi_host_enable(struct udevice *dev) return ops->enable(dev); } +int dsi_host_disable(struct udevice *dev) +{ + struct dsi_host_ops *ops = dsi_host_get_ops(dev); + + if (!ops->disable) + return -ENOSYS; + + return ops->disable(dev); +} + UCLASS_DRIVER(dsi_host) = { .id = UCLASS_DSI_HOST, .name = "dsi_host", diff --git a/include/dsi_host.h b/include/dsi_host.h index 83f8839db6..5873ab698d 100644 --- a/include/dsi_host.h +++ b/include/dsi_host.h @@ -70,4 +70,12 @@ int dsi_host_init(struct udevice *dev, */ int dsi_host_enable(struct udevice *dev); +/** + * dsi_host_disable + * + * @dev: dsi host device + * @return 0 if OK, -ve on error + */ +int dsi_host_disable(struct udevice *dev); + #endif