From patchwork Fri Aug 9 23:03:03 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 2842198 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 725CB9F271 for ; Fri, 9 Aug 2013 23:03:27 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 043D320265 for ; Fri, 9 Aug 2013 23:03:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A4F6F20257 for ; Fri, 9 Aug 2013 23:03:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1031509Ab3HIXDJ (ORCPT ); Fri, 9 Aug 2013 19:03:09 -0400 Received: from perceval.ideasonboard.com ([95.142.166.194]:54863 "EHLO perceval.ideasonboard.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1031434Ab3HIXCZ (ORCPT ); Fri, 9 Aug 2013 19:02:25 -0400 Received: from avalon.ideasonboard.com (58.11-200-80.adsl-dyn.isp.belgacom.be [80.200.11.58]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 6E75236704; Sat, 10 Aug 2013 01:02:02 +0200 (CEST) From: Laurent Pinchart To: dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-media@vger.kernel.org Subject: [PATCH/RFC v3 04/19] video: display: Add display entity notifier Date: Sat, 10 Aug 2013 01:03:03 +0200 Message-Id: <1376089398-13322-5-git-send-email-laurent.pinchart+renesas@ideasonboard.com> X-Mailer: git-send-email 1.8.1.5 In-Reply-To: <1376089398-13322-1-git-send-email-laurent.pinchart+renesas@ideasonboard.com> References: <1376089398-13322-1-git-send-email-laurent.pinchart+renesas@ideasonboard.com> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Display entities are initialized by they respective drivers asynchronously with the master display driver. The notifier infrastructure allows display drivers to create a list of entities they need (based on platform data) and be notified when those entities are added to or removed from the system. Signed-off-by: Laurent Pinchart --- drivers/video/display/Makefile | 3 +- drivers/video/display/display-notifier.c | 304 +++++++++++++++++++++++++++++++ include/video/display.h | 66 +++++++ 3 files changed, 372 insertions(+), 1 deletion(-) create mode 100644 drivers/video/display/display-notifier.c diff --git a/drivers/video/display/Makefile b/drivers/video/display/Makefile index 3054adc..b907aad 100644 --- a/drivers/video/display/Makefile +++ b/drivers/video/display/Makefile @@ -1,2 +1,3 @@ -display-y := display-core.o +display-y := display-core.o \ + display-notifier.o obj-$(CONFIG_DISPLAY_CORE) += display.o diff --git a/drivers/video/display/display-notifier.c b/drivers/video/display/display-notifier.c new file mode 100644 index 0000000..c9210ec --- /dev/null +++ b/drivers/video/display/display-notifier.c @@ -0,0 +1,304 @@ +/* + * Display Notifier + * + * Copyright (C) 2013 Renesas Solutions Corp. + * + * Contacts: Laurent Pinchart + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +#include +#include +#include +#include +#include +#include + +#include