From patchwork Sun Sep 13 20:56:45 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 517221 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 875AF14076C for ; Mon, 14 Sep 2015 06:58:18 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755386AbbIMU5R (ORCPT ); Sun, 13 Sep 2015 16:57:17 -0400 Received: from galahad.ideasonboard.com ([185.26.127.97]:52349 "EHLO galahad.ideasonboard.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755359AbbIMU5Q (ORCPT ); Sun, 13 Sep 2015 16:57:16 -0400 Received: from avalon.pp.htv.fi (85-23-193-79.bb.dnainternet.fi [85.23.193.79]) by galahad.ideasonboard.com (Postfix) with ESMTPSA id 9C1F5202DF; Sun, 13 Sep 2015 22:54:56 +0200 (CEST) From: Laurent Pinchart To: linux-media@vger.kernel.org Cc: linux-sh@vger.kernel.org, devicetree@vger.kernel.org Subject: [PATCH 07/32] v4l: vsp1: Support VSP1 instances without any UDS Date: Sun, 13 Sep 2015 23:56:45 +0300 Message-Id: <1442177830-24536-8-git-send-email-laurent.pinchart+renesas@ideasonboard.com> X-Mailer: git-send-email 2.4.6 In-Reply-To: <1442177830-24536-1-git-send-email-laurent.pinchart+renesas@ideasonboard.com> References: <1442177830-24536-1-git-send-email-laurent.pinchart+renesas@ideasonboard.com> Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Not all VSP1 instances include a UDS. Make the renesas,#uds DT property optional and accept a number of UDS equal to 0 as valid. Cc: devicetree@vger.kernel.org Signed-off-by: Laurent Pinchart --- Documentation/devicetree/bindings/media/renesas,vsp1.txt | 3 ++- drivers/media/platform/vsp1/vsp1_drv.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/media/renesas,vsp1.txt b/Documentation/devicetree/bindings/media/renesas,vsp1.txt index 87fe08abf36d..674c8c30d046 100644 --- a/Documentation/devicetree/bindings/media/renesas,vsp1.txt +++ b/Documentation/devicetree/bindings/media/renesas,vsp1.txt @@ -13,12 +13,13 @@ Required properties: - clocks: A phandle + clock-specifier pair for the VSP1 functional clock. - renesas,#rpf: Number of Read Pixel Formatter (RPF) modules in the VSP1. - - renesas,#uds: Number of Up Down Scaler (UDS) modules in the VSP1. - renesas,#wpf: Number of Write Pixel Formatter (WPF) modules in the VSP1. Optional properties: + - renesas,#uds: Number of Up Down Scaler (UDS) modules in the VSP1. Defaults + to 0 if not present. - renesas,has-lif: Boolean, indicates that the LCD Interface (LIF) module is available. - renesas,has-lut: Boolean, indicates that the Look Up Table (LUT) module is diff --git a/drivers/media/platform/vsp1/vsp1_drv.c b/drivers/media/platform/vsp1/vsp1_drv.c index de0b80e8d048..5f93cbdcb0f1 100644 --- a/drivers/media/platform/vsp1/vsp1_drv.c +++ b/drivers/media/platform/vsp1/vsp1_drv.c @@ -513,7 +513,7 @@ static int vsp1_parse_dt(struct vsp1_device *vsp1) return -EINVAL; } - if (pdata->uds_count <= 0 || pdata->uds_count > VSP1_MAX_UDS) { + if (pdata->uds_count > VSP1_MAX_UDS) { dev_err(vsp1->dev, "invalid number of UDS (%u)\n", pdata->uds_count); return -EINVAL;