From patchwork Sun Jul 14 07:10:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Trimarchi X-Patchwork-Id: 3250 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-lf1-f69.google.com (mail-lf1-f69.google.com [209.85.167.69]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 9D0064130C for ; Sun, 14 Jul 2024 09:10:52 +0200 (CEST) Received: by mail-lf1-f69.google.com with SMTP id 2adb3069b0e04-52e969d34a9sf3822429e87.2 for ; Sun, 14 Jul 2024 00:10:52 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1720941052; cv=pass; d=google.com; s=arc-20160816; b=qj8VC2ePo2HhFDb41VcjFc43S8Gt++n+9RMV2yC85E5WsPxi0AxboUWcdiXUEh/Qiq vYNmrTRAuRUnIcgi9PnkL2j07FWhkIDfcXFW78Zho8/j10G5pjKnuDK5nK9c4W1sW5Vo wTgtyFzq1/yWgJnCnF6M0OkIV/AiARdAEft4nrSWcbkGs0qzPWXQEnX1PXea+AOkCPuU /ZTY7/Q7e4ieChn64KQoXOUW2QXxRqy5z1wEWmgt1lzTxC4gowgQDYghaGHAodPFSMAb t55jx9bCEgABHwIof69GSyUXmLXVoodWMkwwlgc5aOv7Vbav3ehZ5Ec8cdx1+/Y8qzch fVYQ== 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=c554Tec6qKoi2KwIxuC6PFQuYRDCWnMXiTiX3l4IsCE=; b=sbBriYzZUVqAxkPEM+w8+HMu9lXcPbeVznnm5dDe52YEgbwOVXUStlnyFjM5S+qyYT dzbkac7wRQjYnba1z+kM5LIkSJq7lQSAYvMLoPGboqkNAvY4ZvugWXbZKGjI1eUJeRvJ xJRbkK/xqn5I1vGOJcwfGm1aQ4szrjzw5ohvDDJxv1oWv1qTkmUs1BVjlDp+I3g3FLCp zP7Ry4+QeMhbUcS10WQ7wb1SAPgn3ai7m3q4l8bpE69rXdn8/vY4aVEKowvWVv9Bwu2t rtaUCMFVArFtDMQcBuO+9UT5DTMSPII/AyBj+OGhFuH5Pgqp8ifnvTioEJgjvg2Q2GHX WgRQ==; darn=patchwork.amarulasolutions.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=YwYK6+Pv; 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=1720941052; x=1721545852; 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=VINk4Vv333ecmNI76LyXdpOodglU+T44bq08qqaJL8UXJ3Q4y8W+DxFXvrfS6dms9j +uHCa3wdyAlBLjFkz38J6TPv04XYX7XKAFqBjUEfecHFaVQvUI1KWodvnyam/6vc6sIb XAYLvOAVJ42RFWPXp1F8q81DVlJ7ZKF3BINu0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720941052; x=1721545852; 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=WhwAfhIKeTyDzFXIEKlHXafH8IihbxvfTHoiBEA3Olfi0uGysNazbwYfRb03QNnZ00 XPdM6hqvTH3mrF4yjNYIrMR+Pg0bam1dOtSl9kamdFTI5xyG6nySrXmRywYEocMJTGK5 cMwRqjkpswu4wNN9+jv57pIgnxUqN3gAR8IP6PN3R1eCnERs2bf06yu4mKsdIIyvIxCk LNbJpYhdIp374q8kqyenbEzUHNPoB9eNw/qntJ5LdNUtLTEqb9nSoadFFrWt4FIYrBiZ b37hylkHFdFfdzwdjsjD5ElF7p80h9tpjpMvHyV9vBpp2MtxWcPFvrpQjWToE+IJRjU/ d4oQ== X-Forwarded-Encrypted: i=2; AJvYcCWPGFZs7t3fJt5RujtWLmQVFnxmJtkkNBwnSsdeHgNTWYD8toMLb0Pi2NAOtLkxlk/d+8Oi+l/DkDRhl89QTceXw8Fe5E0tBRcH/b5fS+9IpWMw+NReJEaRyDP9Fg== X-Gm-Message-State: AOJu0YwPeaweMgun/wqPx11aatmCsAIq3PcWmoKuWytzcJAGvb7wxWt5 Th0hRtVPhSqVTGoMblS/H0U4e+UYErH+z5d3YiXIoNRSvXUD3uM8RHhXsaMoykeuJw== X-Google-Smtp-Source: AGHT+IEJfRJ2yrd7/DrxU+cOopMPOLMznyciG84pHol/PfXxr+P6o2uDhUKGLZuf42ZNKEJ8BL9yEQ== X-Received: by 2002:a05:6512:4016:b0:52e:d0f8:2d43 with SMTP id 2adb3069b0e04-52ed0f82f09mr3226497e87.17.1720941052080; Sun, 14 Jul 2024 00:10:52 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a19:ac02:0:b0:52e:97da:24d7 with SMTP id 2adb3069b0e04-52ec4504d84ls1715365e87.1.-pod-prod-05-eu; Sun, 14 Jul 2024 00:10:50 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWUrfWjcsiu3HXDw6e7DPrm2IPYt9hCvgsWaygaFPM3+9Z1+Pt4ucgZMvLmM6xrvsdMG3YgFsM3lfMCz1xQ1/hlvzrYf116yGzKfDBfaOmFnLb0 X-Received: by 2002:a05:6512:3ca5:b0:52b:c33a:aa7c with SMTP id 2adb3069b0e04-52eb99d652emr12711241e87.65.1720941048077; Sun, 14 Jul 2024 00:10:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1720941048; cv=none; d=google.com; s=arc-20160816; b=blRReDL8CKb5UI4AuQkgR3SETcI+vep5JJye4qZ43ZOaUyhwopYTXyhJFlfF61Ju++ jDpg8g5Jd+lElj5DA59KGWeaDP96C+kOKteCXAkh+1E8aTmw0lgtS+fWt3aZSFVkBuKz 7LM+bwW/3ll3F4zkGMW+qkoBW4PLnJJ2jKtw6cF+UliHy/9M3SiKO7xqe1l+RcgdMxB1 EKmSE3DV5c9PCsE8GQpfsuPSe40UB6N0gzI+HzbUTBqV2CDCM+wfy+toiLyCmsHkR6mU twWrLo47G76w7tmWZp3TRfITWd54kyMAw9nz50wWy/lryASaOjQAd2yb3XP0TwpA1w3m rUtA== 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=AOMtFlnClidtKrXSwj75CSt8dLfJaW8XYO6OncuthHE=; b=TEEtyyTi7OM79b6I5fTOZdOjmq9DWL2fSlSmiM5iEbAUE5EV0JCvwqps8EnkQs19Ht tvezhLs5FkRFGAzWYdYifsY4IH3js9zJr9dd2GJQsQzKDQzipbxdY4oV038ok6uqpMXV /XTQtFD3XIiKhXLHW78puY+8rgID7LMAGyUoyXr9tHf/dAZTEJFK4e4LfKgH5KKON6Mo fPiumPoCPL6ysUZM5QRvoUhHRLbL08hROPLIJgBXdR6vjJmPKAkU1l+ts0hznrgR7Z6r RbljifEqaAdXxHWJdQYtMDSgV77lTk3hrTzPWeM17PwuuELJqVclCGkNWxxDZR8SKWfc S2bw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=YwYK6+Pv; 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 2adb3069b0e04-52ed25929aesor454764e87.26.2024.07.14.00.10.47 for (Google Transport Security); Sun, 14 Jul 2024 00:10:48 -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; AJvYcCXWzrJzdlVL4MGv3CXbRu4cyQvtdghFVq4be7y+wRE60oKbTMbgdV5aRgg8TYyWJsn2/AvtHO7Iu9RgPeDb2k5m+zrvQ7+mth3LLIeEL0fvMv8s X-Received: by 2002:a05:6512:4016:b0:52e:d0f8:2d43 with SMTP id 2adb3069b0e04-52ed0f82f09mr3226332e87.17.1720941047571; Sun, 14 Jul 2024 00:10:47 -0700 (PDT) Received: from panicking.. (93-35-128-17.ip55.fastwebnet.it. [93.35.128.17]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a79bc820d52sm104950266b.214.2024.07.14.00.10.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 14 Jul 2024 00:10:46 -0700 (PDT) From: Michael Trimarchi To: Michael Trimarchi Cc: Dario Binacchi , Patrick Barsanti , linux-amarula@amarulasolutions.com Subject: [PATCH 16/25] video: dsi_host: add disable host interface Date: Sun, 14 Jul 2024 09:10:14 +0200 Message-ID: <20240714071023.10417-16-michael@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240714071023.10417-1-michael@amarulasolutions.com> References: <20240714071023.10417-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=YwYK6+Pv; 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