From patchwork Thu Jun 16 09:36:13 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 9180257 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 82C2860760 for ; Thu, 16 Jun 2016 09:36:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 73D17282FF for ; Thu, 16 Jun 2016 09:36:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 685BA28309; Thu, 16 Jun 2016 09:36:37 +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.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID 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 405D6282FF for ; Thu, 16 Jun 2016 09:36:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752605AbcFPJgf (ORCPT ); Thu, 16 Jun 2016 05:36:35 -0400 Received: from mail-lf0-f45.google.com ([209.85.215.45]:36100 "EHLO mail-lf0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752217AbcFPJge (ORCPT ); Thu, 16 Jun 2016 05:36:34 -0400 Received: by mail-lf0-f45.google.com with SMTP id q132so36685674lfe.3 for ; Thu, 16 Jun 2016 02:36:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=ybdiyFd5ewccDYMo8tzsyuHiFJvPJ6pSfsg3hd1Wr8g=; b=Me//D36zps9/59/9Fl6WHnEXGDl9Eqxl2ze9Xpd7OLO6SwZvhuf8oXmpkbQiTthgdb cBc9ty8zXpciO3jFHwyFzTItLmA0fXDLmVQ4oBW4wN4cdPUiGqDMsDJpruecoyvrIpng Y7vUDUZUxD8OY6OgwYYPF9IrEls7D5QOhn5fw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=ybdiyFd5ewccDYMo8tzsyuHiFJvPJ6pSfsg3hd1Wr8g=; b=AYHcg7BNNfu8nCArQuaxxV5C4hOBDg1JziKKYVLuciau4ZAjZCP8Gm6vEN+IyyR1Ex o3Y6XOOQfTQ7zO/+D1OZ8CXEI6C32sNX0FQ89eEyUVlrqL0KunvudO8QMxCeL5Rl5Ywa AT19a2vXoO57Oc9hDrrTzQY77ie24FqVo2xIliCH9HZnW+IJLrLgPg8Hab5llzNzrjvN ygHd438a3lyAoPBnBvc2J1aiMlLBFiOcm/gHPiDRoYilpD3oeN5nxWMrXbYrMfhFqTMc /F1WxvFKU558juplj2PbV5bnhtLTt1imtDJYLivoUPgTmZ0Le1As6kunJg1djCh56e0i Gq9A== X-Gm-Message-State: ALyK8tL4TDLqM9x9Y8BGZVBOc86tOD5cmGPgsVoLrY4UQj/bJC2qPIg1WPDC3srA0n0rC+nT X-Received: by 10.25.156.83 with SMTP id f80mr984486lfe.141.1466069793016; Thu, 16 Jun 2016 02:36:33 -0700 (PDT) Received: from localhost.localdomain.localdomain (c-cc7c71d5.014-348-6c756e10.cust.bredbandsbolaget.se. [213.113.124.204]) by smtp.gmail.com with ESMTPSA id d8sm1884006lbc.29.2016.06.16.02.36.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 16 Jun 2016 02:36:27 -0700 (PDT) From: Linus Walleij To: linux-fbdev@vger.kernel.org, Tomi Valkeinen , Jean-Christophe Plagniol-Villard , Pawel Moll , Rob Herring , Russell King Cc: linux-arm-kernel@lists.infradead.org, Arnd Bergmann , Ray Jui , Linus Walleij Subject: [PATCH 1/6] video: ARM CLCD: backlight support for OF Date: Thu, 16 Jun 2016 11:36:13 +0200 Message-Id: <1466069778-16087-2-git-send-email-linus.walleij@linaro.org> X-Mailer: git-send-email 2.4.11 In-Reply-To: <1466069778-16087-1-git-send-email-linus.walleij@linaro.org> References: <1466069778-16087-1-git-send-email-linus.walleij@linaro.org> Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP If the device is probed from device tree, we can support backlight. This is used with some systems such as the ST Microelectronics Nomadik. We have to add HAS_IOMEM to the dependencies of CLCD since the backlight class device will now be selected, and if it gets selected on an arch that does not have IOMEM, compilation will fail. Cc: Pawel Moll Cc: Rob Herring Cc: Russell King Signed-off-by: Linus Walleij --- ChangeLog v2->v3: - Rebased, no other changes. ChangeLog v1->v2: - No changes. --- drivers/video/fbdev/Kconfig | 4 +++- drivers/video/fbdev/amba-clcd.c | 40 ++++++++++++++++++++++++++++++++++++++++ include/linux/amba/clcd.h | 3 +++ 3 files changed, 46 insertions(+), 1 deletion(-) diff --git a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig index 88b008fb8a4e..9b9a76b82c04 100644 --- a/drivers/video/fbdev/Kconfig +++ b/drivers/video/fbdev/Kconfig @@ -284,12 +284,14 @@ config FB_PM2_FIFO_DISCONNECT config FB_ARMCLCD tristate "ARM PrimeCell PL110 support" depends on ARM || ARM64 || COMPILE_TEST - depends on FB && ARM_AMBA + depends on FB && ARM_AMBA && HAS_IOMEM select FB_CFB_FILLRECT select FB_CFB_COPYAREA select FB_CFB_IMAGEBLIT select FB_MODE_HELPERS if OF select VIDEOMODE_HELPERS if OF + select BACKLIGHT_LCD_SUPPORT if OF + select BACKLIGHT_CLASS_DEVICE if OF help This framebuffer device driver is for the ARM PrimeCell PL110 Colour LCD controller. ARM PrimeCells provide the building diff --git a/drivers/video/fbdev/amba-clcd.c b/drivers/video/fbdev/amba-clcd.c index 9b158869cb89..52a33d3926ac 100644 --- a/drivers/video/fbdev/amba-clcd.c +++ b/drivers/video/fbdev/amba-clcd.c @@ -30,6 +30,7 @@ #include #include #include +#include #include