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: 1406401 Return-Path: X-Original-To: patchwork-linux-omap@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 A4A4240220 for ; Wed, 5 Sep 2012 08:28:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758093Ab2IEI14 (ORCPT ); Wed, 5 Sep 2012 04:27:56 -0400 Received: from na3sys009aog130.obsmtp.com ([74.125.149.143]:49276 "EHLO na3sys009aog130.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758086Ab2IEI0c (ORCPT ); Wed, 5 Sep 2012 04:26:32 -0400 Received: from mail-lpp01m010-f46.google.com ([209.85.215.46]) (using TLSv1) by na3sys009aob130.postini.com ([74.125.148.12]) with SMTP ID DSNKUEcMt1bxZbZKSC2adb+wwDdveSqXQ3F0@postini.com; Wed, 05 Sep 2012 01:26:31 PDT Received: by lagy9 with SMTP id y9so139396lag.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=K9tExML9fVDTpd9eKG2h2xNUDywG+xvMEPR7aABbbIK1WTcPNT6xD7j4KCd0nIcUjr zKp7qexFwcgOzxDOsooN2euGO7fn28ipJPi7b+OSeWgS8pPA7MIIitS1o2GcOFgbzw6C HiXvp0+mO5IJWamY1V22LTiddqP+BWdrUKfWsgFBsXdzbxBNCoIx6HO1GfwHhEQ8f39F sEpHSwk+O49utuhnYo2pRjKrE4Uc19ODyliXV3nhfzhd2Vc2L+Y8hOkyn24mPrimp9tx oKghTWvRGaS8Xheh7gxFJy5rKntkw/krWabrP/HdKcionZOLsdTgWi9BbYmegYlCj3rV 74fw== 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: ALoCoQlK3NIDoIOkdHYTdvRTbJLUoMNcDil4LoODvhBNRG60EXwOzvDBp51X5q29I1vcYc1ynZjb Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@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