From patchwork Fri Sep 13 09:55:53 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 3479 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-lf1-f71.google.com (mail-lf1-f71.google.com [209.85.167.71]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 54788411AB for ; Fri, 13 Sep 2024 11:57:15 +0200 (CEST) Received: by mail-lf1-f71.google.com with SMTP id 2adb3069b0e04-5366124fe3fsf1744084e87.0 for ; Fri, 13 Sep 2024 02:57:15 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1726221435; cv=pass; d=google.com; s=arc-20240605; b=Nnu6vxtZnZcRuMO1vbCUgSSoJKjusLVt608+0dLPoM4guetHEdDoZlahdbJW+leboK xdjwMHTSq4sV7b1G0ItJlXd4VLugNZK5GFTfG5ayx6M1sRjI/YU9eIbou0uLeglils6J uoDc5nyQdVc5BZaf/cdMVDii0siBNgsuziChiKdLZKcZTJ3rQHM8sbSnRWSI4hckg/UH wXVD0ecavXuQmRqMM2tUcV7onKVtwUE54jXy7PdwE+WI1gfGHvoXQmgm9JKdPRHDldON pxEOA9x9eAjgNht6EYJjjG6RW8uLzFA1BeWL+T0yaJf393bZC2AGnPU0MGX//8iXev6a sj4Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; 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=UClicEcAVC/CqTMq9B6fjFHwlAS7gSMbuedwX0MrCVo=; fh=chNrxHjLk7vo61n+ry6Y/j9smtFkS8rBoO/S+VAnGdQ=; b=EVMTVUlEHMs5hEL6tYapbJuC+JP58PA2xTjN6a3a94HnH2FAwog+xCLxHJZT+uM+XW YcydZpV+4rMqAIxjSPUuuwBr1CRzj5r5RhkKZeaH2BEZLHXeWblA/4SFkLdJOSdvo7Je JUruC6wwG/0OruX2W8o0p796VU5f8Cl9aAQDjk+XwcLkU496N0PSSP6ofIlQ3AsFCjP9 sSeN99KuxwhAqD8Yk1xD71/3l3Ne4q6Aqfo7Iy3eC3XT8LDw5CAGRCRCf+UPM2/r8+9Z 9CjZlnfA8yh/07y1XPxM+a9w2a4Onk7y9l4a8Ph2q3jkDMkNORJbRn7ROdgqCGhKsuCo 5IAA==; darn=patchwork.amarulasolutions.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=qdf34cDy; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@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=1726221435; x=1726826235; 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=UClicEcAVC/CqTMq9B6fjFHwlAS7gSMbuedwX0MrCVo=; b=N7Prvma5D3Ao6Lqb3Vq+zeGEzRLiJmmnKXMWAvAPwir9OXUyHf3HBLQgrTxGbth3un d/erAE5ZWQf+KOqDvxpDIPZwQ6G1fFHqPYhocDfC+pd9t+YkBhFcoBkDb73lJmt2SN5/ Cqy/TortxRgmsSAoOa3fTxRPneeV621lbaMLE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726221435; x=1726826235; 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=UClicEcAVC/CqTMq9B6fjFHwlAS7gSMbuedwX0MrCVo=; b=C0DYNpMyb57F3z30VFRWGwehUuBGMR1Vvv99jWfRoiCq1u+Si3cSR0jKTh+bgEB9Gx 0oyQfkL1QcUI/vIlLSUN+DGGL0j8F4yBQ1xvQeEh1QW6YAQxvUAdSKJd8GhDpjaP8td5 m5xgvmEbwVMzw3+NyL7rlFtV4amdqbOnlt4wNFTeTpvQSuXq96oa1Y+RyZeRyn25O/H7 DOkVd70hOXFyyCvRqn21u7YVBzCwVO8s3BO+kZqfD4rZvAvnGpGEtXthzHAOCLA81WYm u1nvx5Tdleg6UwjdxbiYV7JEqhh7kTpb4wysBcL7CLxP3eJMdWwQKOc7CYh+HyFA3MOq IcUg== X-Forwarded-Encrypted: i=2; AJvYcCWARS4nymntgQsbrtvyIgHv8YbAkXCX4PTYnYGic9mU1PY5SfFQA8g7pJ0aKsV5ZoU4cZkJorkuOOG8sjoN@patchwork.amarulasolutions.com X-Gm-Message-State: AOJu0Yx6Ll52e4bbGxaJT/ewQYZvEPhIiCIWqT71527DCaLHJUmvLaWq RzX7H2/DMfWds0nNuUi5XbRfBmWoIABKKdXvb1haM9ZwPwlvTD66cXXLn/wU75oehw== X-Google-Smtp-Source: AGHT+IHBUp7MJLj8veUTyEhcYIpsVql6+yGWJlQPYez+vJHpnzKY3KzCKbTAX022h2XZMD7A/76wFg== X-Received: by 2002:a05:6512:10ca:b0:535:6ad6:2d40 with SMTP id 2adb3069b0e04-53678fb7386mr3788185e87.11.1726221434669; Fri, 13 Sep 2024 02:57:14 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a05:6402:35cc:b0:5c2:7524:8454 with SMTP id 4fb4d7f45d1cf-5c4140908e4ls1351979a12.2.-pod-prod-01-eu; Fri, 13 Sep 2024 02:57:13 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCX/u2zt8MB2CkT1HCWIIj37sqG6nl+CIgd1kVVRlFAHGIemL2dHiHQVaN/RsuYCdEo4uiKmqSvipP5mmVeA@amarulasolutions.com X-Received: by 2002:a17:907:6d14:b0:a8e:a578:2b63 with SMTP id a640c23a62f3a-a902966303amr561931266b.55.1726221433115; Fri, 13 Sep 2024 02:57:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1726221433; cv=none; d=google.com; s=arc-20160816; b=itD4c8vNLwotuB0e01N9GNyPyBBFvkR3ZEjE0VfA/iUNU5wSqjvRi7wLVqIgd9myW/ O8fD3bw8XV5tkYswM8OB2s/wPPwgUvj+6r1tJUgIQ+z70pGqyRt32BPTv1Nw8zpA94CM RvfoitSGGhhdgVMc4V+lkqk+71UYDLNzgXDouODAJ3zlF6Mm/38LDE9vcKn+OzrggPHC 2iG/QgwKblh+nJmNP2o8aVFUET9DFLpmuiwM0YAN6nsxP2e867PNtQ7QTsUxpl4cL6Gp Ktn6uWkyKCDfrymgDEm23WpbXdqCySfNWsPLcZyJhWs8EYZZGYHlFJ9bkph2S5eh0o38 rFHg== 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=sxKn7zYHdkKdM/iSFyU24zxOLq0ckhHvTkHpRTNJoDw=; fh=VAw4Gy2/+jyBvX25B72X4j/VKAEUQMfjhraJGJxM0m0=; b=rgl4svvMSC72hFgO/hXYM/mgM+3hxg4Dr9sIKy6MGKB2oepszpgyi9T1ZXdOCjSG/G ayA9zu7Nz5xoDzsJu2p8qFpq5Oj0tDt8EmypcM6KOxkxqjIzbgCAdl08xBCovX7zqxis 5Xgri+Rr5y0C6Yeku9iY/qBIDObJrqUQWObInnkF/aPIqdOLfuZsfLEBHp8Z+COAAtSE dR8Zloyq8bYGZ/Qf19Ew8dax+/7DfdN98TmTpkDOxx3Mxfejiez2eB8+qPuf6jJ1cwBy 23v8hxMrL/tCjmuBvlTPfr3L4tg6HFCflP6LH+gNLlpk95w4/t2QYbcfuqbqHr3nRR4x BYgA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=qdf34cDy; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@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-a8d258f117dsor457173466b.6.2024.09.13.02.57.13 for (Google Transport Security); Fri, 13 Sep 2024 02:57:13 -0700 (PDT) Received-SPF: pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; X-Forwarded-Encrypted: i=1; AJvYcCXIR49Udq/Ln8r0P31e8VBP40D9g30q93Acu7oIsq/cRVDf7bbbSBElufWNruPxbnPwqAmaqxpBpG6HY5jM@amarulasolutions.com X-Received: by 2002:a17:907:e61a:b0:a8a:913e:418b with SMTP id a640c23a62f3a-a9029438eedmr569126066b.20.1726221432570; Fri, 13 Sep 2024 02:57:12 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.homenet.telecomitalia.it (host-87-4-102-18.retail.telecomitalia.it. [87.4.102.18]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a8d25cee72bsm863224766b.173.2024.09.13.02.57.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Sep 2024 02:57:12 -0700 (PDT) From: Dario Binacchi To: u-boot@lists.denx.de Cc: Fabio Estevam , linux-amarula@amarulasolutions.com, michael@amarulasolutions.com, Miquel Raynal , Ye Li , Dario Binacchi , Anatolij Gustschin , Peter Robinson , Tom Rini Subject: [PATCH 11/26] video: dsi_host: add disable host interface Date: Fri, 13 Sep 2024 11:55:53 +0200 Message-ID: <20240913095622.72377-12-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240913095622.72377-1-dario.binacchi@amarulasolutions.com> References: <20240913095622.72377-1-dario.binacchi@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: dario.binacchi@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=qdf34cDy; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@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: , From: Michael Trimarchi 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 Signed-off-by: Dario Binacchi --- 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 fde275ad7e2e..745991f8dd94 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 83f8839db68d..5873ab698d9e 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