From patchwork Wed May 24 00:09:06 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Niklas_S=C3=B6derlund?= X-Patchwork-Id: 9744581 X-Patchwork-Delegate: geert@linux-m68k.org Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 9CD986032B for ; Wed, 24 May 2017 00:09:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 908E628863 for ; Wed, 24 May 2017 00:09:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8567728867; Wed, 24 May 2017 00:09:58 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1F56228863 for ; Wed, 24 May 2017 00:09:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1765639AbdEXAJa (ORCPT ); Tue, 23 May 2017 20:09:30 -0400 Received: from smtp-3.sys.kth.se ([130.237.48.192]:42018 "EHLO smtp-3.sys.kth.se" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S937664AbdEXAJ2 (ORCPT ); Tue, 23 May 2017 20:09:28 -0400 Received: from smtp-3.sys.kth.se (localhost.localdomain [127.0.0.1]) by smtp-3.sys.kth.se (Postfix) with ESMTP id E6E6E3503; Wed, 24 May 2017 02:09:25 +0200 (CEST) X-Virus-Scanned: by amavisd-new at kth.se Received: from smtp-3.sys.kth.se ([127.0.0.1]) by smtp-3.sys.kth.se (smtp-3.sys.kth.se [127.0.0.1]) (amavisd-new, port 10024) with LMTP id iBT2G7XFj65l; Wed, 24 May 2017 02:09:25 +0200 (CEST) X-KTH-Auth: niso [89.233.230.99] X-KTH-mail-from: niklas.soderlund@ragnatech.se Received: from bismarck.berto.se (unknown [89.233.230.99]) by smtp-3.sys.kth.se (Postfix) with ESMTPSA id 0DE21350F; Wed, 24 May 2017 02:09:25 +0200 (CEST) From: =?UTF-8?q?Niklas=20S=C3=B6derlund?= To: Mauro Carvalho Chehab , Sakari Ailus , linux-media@vger.kernel.org Cc: Kieran Bingham , linux-renesas-soc@vger.kernel.org, Laurent Pinchart , =?UTF-8?q?Niklas=20S=C3=B6derlund?= Subject: [PATCH v2 1/2] media: entity: Add pad_from_fwnode entity operation Date: Wed, 24 May 2017 02:09:06 +0200 Message-Id: <20170524000907.13061-2-niklas.soderlund@ragnatech.se> X-Mailer: git-send-email 2.13.0 In-Reply-To: <20170524000907.13061-1-niklas.soderlund@ragnatech.se> References: <20170524000907.13061-1-niklas.soderlund@ragnatech.se> MIME-Version: 1.0 Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Niklas Söderlund The optional operation can be used by entities to report how it maps its fwnode endpoints to media pad numbers. This is useful for devices which require advanced mappings of pads. Signed-off-by: Niklas Söderlund --- include/media/media-entity.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/media/media-entity.h b/include/media/media-entity.h index c7c254c5bca1761b..2aea22b0409d1070 100644 --- a/include/media/media-entity.h +++ b/include/media/media-entity.h @@ -21,6 +21,7 @@ #include #include +#include #include #include #include @@ -171,6 +172,9 @@ struct media_pad { /** * struct media_entity_operations - Media entity operations + * @pad_from_fwnode: Return the pad number based on a fwnode endpoint. + * This operation can be used to map a fwnode to a + * media pad number. Optional. * @link_setup: Notify the entity of link changes. The operation can * return an error, in which case link setup will be * cancelled. Optional. @@ -184,6 +188,8 @@ struct media_pad { * mutex held. */ struct media_entity_operations { + int (*pad_from_fwnode)(struct fwnode_endpoint *endpoint, + unsigned int *pad); int (*link_setup)(struct media_entity *entity, const struct media_pad *local, const struct media_pad *remote, u32 flags);