From patchwork Wed Sep 5 08:25:48 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomi Valkeinen X-Patchwork-Id: 1406391 Return-Path: X-Original-To: patchwork-linux-fbdev@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 4CEDF40220 for ; Wed, 5 Sep 2012 08:28:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758086Ab2IEI15 (ORCPT ); Wed, 5 Sep 2012 04:27:57 -0400 Received: from na3sys009aog131.obsmtp.com ([74.125.149.247]:46390 "EHLO na3sys009aog131.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758108Ab2IEI0c (ORCPT ); Wed, 5 Sep 2012 04:26:32 -0400 Received: from mail-lb0-f174.google.com ([209.85.217.174]) (using TLSv1) by na3sys009aob131.postini.com ([74.125.148.12]) with SMTP ID DSNKUEcMt1bxZbZKSC2adb+wwDdveSqXQ3F0@postini.com; Wed, 05 Sep 2012 01:26:31 PDT Received: by lbbgj3 with SMTP id gj3so189895lbb.19 for ; Wed, 05 Sep 2012 01:26:29 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=Ib/C7G5Rtp+7bXxWYmObtxQNqDzenhgTBqRkJ4UTZxY=; b=X56Ehb1hXo2STfQ9jlcofpe/GxcMmxFG4RBUK4gO1NmnD6T+QI9Eg6RzBcWmZlyDuD 0Qt23vCOGo7lWeIMycL4N8F8hI1Q614kjAqPUAlxDjUcdTtIRPSy3kCkC1jJfrg0nHQx Dw7NF4IwysRfcjzk2vVpQwoc+J+kalFPjyOiFNF5mjWnvhDS5umA+MQrrzzpAbJ4nkkm sek2suL5Cx+fIv/8dIRkHMuDta7yQnRQa4rMnVX5stnC60Rcu78DYXZPgu2T1EAjpI5i U+TRp9caiAmi1na7eIGU6QkSwoxSiAFZDE6AU82z0Qg7+qvhgWPytUHuw072h/A1OmSm Wj6A== Received: by 10.152.103.146 with SMTP id fw18mr19309972lab.30.1346833589621; Wed, 05 Sep 2012 01:26:29 -0700 (PDT) Received: from localhost.localdomain (a91-156-160-115.elisa-laajakaista.fi. [91.156.160.115]) by mx.google.com with ESMTPS id bc2sm279735lbb.3.2012.09.05.01.26.26 (version=SSLv3 cipher=OTHER); Wed, 05 Sep 2012 01:26:28 -0700 (PDT) From: Tomi Valkeinen To: linux-omap@vger.kernel.org, linux-fbdev@vger.kernel.org, archit@ti.com Cc: Tomi Valkeinen Subject: [PATCH 10/17] OMAPDSS: split manager sysfs code Date: Wed, 5 Sep 2012 11:25:48 +0300 Message-Id: <1346833555-31258-11-git-send-email-tomi.valkeinen@ti.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1346833555-31258-1-git-send-email-tomi.valkeinen@ti.com> References: <1346833555-31258-1-git-send-email-tomi.valkeinen@ti.com> X-Gm-Message-State: ALoCoQllKEbEthYWcZsmD68cRVJW92e/ZUndLe/JvV88iY1WbDkl1xXBJVBbx3PvkML8vWGO+wNu Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org Separate sysfs code for managers to a separate file. This is a bit cleaner, and will allow us later to easily switch off the sysfs support via Kconfig option. Signed-off-by: Tomi Valkeinen --- drivers/video/omap2/dss/Makefile | 2 +- drivers/video/omap2/dss/dss.h | 4 + drivers/video/omap2/dss/manager-sysfs.c | 499 +++++++++++++++++++++++++++++++ drivers/video/omap2/dss/manager.c | 462 +--------------------------- 4 files changed, 506 insertions(+), 461 deletions(-) create mode 100644 drivers/video/omap2/dss/manager-sysfs.c diff --git a/drivers/video/omap2/dss/Makefile b/drivers/video/omap2/dss/Makefile index 927d5ce..00a6eb5 100644 --- a/drivers/video/omap2/dss/Makefile +++ b/drivers/video/omap2/dss/Makefile @@ -1,6 +1,6 @@ obj-$(CONFIG_OMAP2_DSS) += omapdss.o omapdss-y := core.o dss.o dss_features.o dispc.o dispc_coefs.o display.o \ - manager.o overlay.o overlay-sysfs.o apply.o + manager.o manager-sysfs.o overlay.o overlay-sysfs.o apply.o omapdss-$(CONFIG_OMAP2_DSS_DPI) += dpi.o omapdss-$(CONFIG_OMAP2_DSS_RFBI) += rfbi.o omapdss-$(CONFIG_OMAP2_DSS_VENC) += venc.o venc_panel.o diff --git a/drivers/video/omap2/dss/dss.h b/drivers/video/omap2/dss/dss.h index 11b053e..5e9fd769 100644 --- a/drivers/video/omap2/dss/dss.h +++ b/drivers/video/omap2/dss/dss.h @@ -254,6 +254,10 @@ static inline bool dss_mgr_is_lcd(enum omap_channel id) return false; } +int dss_manager_kobj_init(struct omap_overlay_manager *mgr, + struct platform_device *pdev); +void dss_manager_kobj_uninit(struct omap_overlay_manager *mgr); + /* overlay */ void dss_init_overlays(struct platform_device *pdev); void dss_uninit_overlays(struct platform_device *pdev); diff --git a/drivers/video/omap2/dss/manager-sysfs.c b/drivers/video/omap2/dss/manager-sysfs.c new file mode 100644 index 0000000..9b875fb --- /dev/null +++ b/drivers/video/omap2/dss/manager-sysfs.c @@ -0,0 +1,499 @@ +/* + * Copyright (C) 2009 Nokia Corporation + * Author: Tomi Valkeinen + * + * Some code and ideas taken from drivers/video/omap/ driver + * by Imre Deak. + * + * 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. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along with + * this program. If not, see . + */ + +#define DSS_SUBSYS_NAME "MANAGER" + +#include +#include +#include +#include +#include + +#include