Received: by 10.223.176.46 with SMTP id f43csp970879wra; Wed, 24 Jan 2018 08:37:50 -0800 (PST) X-Google-Smtp-Source: AH8x227hW7grdHzTss4i9u2Kb7yLn28/ZrNgId4Jv9v/Zd2z0o3qy4FMse69rMb/HMx7YquENnp1 X-Received: by 2002:a17:902:968b:: with SMTP id n11-v6mr8713903plp.168.1516811870737; Wed, 24 Jan 2018 08:37:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516811870; cv=none; d=google.com; s=arc-20160816; b=iR7kuWoJY+Th9fQAxVnhJiznznUqVpKkeVuteZGQn/+0O9ybK7mbsCbbW8oB5GyPBZ 3YLXcWtXgfHakgTn0YYKeHEbGu8AGi6Cme1Fmh+MKWWZIIyadhSDEIk8iHp0KA4uhGdD vTIuV/GXWzWBZ5Wx2pX0ozT/86/+LznRGOyD9Z1SwfH4N7RB3ynWYjBc1pij+xKL3BFg rY1JZ+T7Z/YhmLEzmc5xH+JgXHgtOu5+cvxXEa6RrtrXUnY16njkBpGKtd+4MtYBXN1O 4Sl3s7pl4FmvErYIoQiagmZgzFwJVk7udFcddMGNeO9Hf9pMboBj5orhN0fwwDKFrRqi 1CKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:to:from:date:dkim-signature :arc-authentication-results; bh=AMvEtpcvKdx/8xjl/CCwP/NV3HZPKT9xWDVFhirdE6M=; b=M7japrU4I0Qb2ekUh9uzZortrFrx6XTdJztHOOOJ/RqIoWOnnzHssJ45j4f4DsTdcl 1pqHIW5py5+4o/Ls1HblvPnpilbsY2y/GBOjyS7MK8Uc+UXvvgEEZWKB8klaXa4+ixIC 6nz2Y3czkMufWecYwe1zfQb8rP6fk2SxhY2wOF6/sYx2iDT8+1XuT5wMMEQ8kh5n3MAA I2OWXYZ8kuDjcb70o4YH/NNDNCZ6sVbg/SiFrGjjGMcPfG4/FK5ikDMMp3heK3D8pVht wrY1ysQGTaOmCRo+uSHu4KNYl5VkWuUCt17YxntaAKrEYM1460HdYv8KJLcYT3Y+Zq5+ jaUQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ek7Iu6cS; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o65si3148048pfg.18.2018.01.24.08.37.36; Wed, 24 Jan 2018 08:37:50 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ek7Iu6cS; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964886AbeAXQe6 (ORCPT + 99 others); Wed, 24 Jan 2018 11:34:58 -0500 Received: from mail-pg0-f65.google.com ([74.125.83.65]:43658 "EHLO mail-pg0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964867AbeAXQez (ORCPT ); Wed, 24 Jan 2018 11:34:55 -0500 Received: by mail-pg0-f65.google.com with SMTP id n17so3052677pgf.10 for ; Wed, 24 Jan 2018 08:34:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=AMvEtpcvKdx/8xjl/CCwP/NV3HZPKT9xWDVFhirdE6M=; b=ek7Iu6cStvain6Jz/E5ALHgsdWgKFLcdtKTfoAOsxg+nyHp53eZrfn18fHR3P5PNpK mv94+fjd6I2miebuJL0xawFEHlPS3LUjChygVbOm8iDhHhn2AbJ3ZggD1lBy/Ex/CqEb sGGomdvInjJnVKPAV6ShisDmPDVwZ9/yF/pcLht1SzOuR/dglNbZC9cb/T43JBeO8i11 6HPWkb/xNu6E03PYb0M8hhWN9EhYtxBclHIPqbCPXmrfU8Y11Mhq40Vepz2e07unJSsF hT1gK6x4EifAKh6+/IkUduXom+y68eX0F/jyDBFWRh71duhOO5ZOc2ge9XajW0XO85sP GooQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=AMvEtpcvKdx/8xjl/CCwP/NV3HZPKT9xWDVFhirdE6M=; b=C2txuoBWCdj7j/WBXMxmxClg5dn4sEiRsoUf0ZYOh37ehXAQFK+uWdCasr03xBs5fz wm5h/vCtzFlE/KMC6iPuks9TKMxD7NhVtbQZwngXGXSFOREL+0HLVElHlIWQNHEPWHOG g3+ua/lZ5pEpD+8OlzffDFy4k6uJflFfyGZAKODCVvELPxcZ0LdWGkvQr+pdh8IPuKKn BLivx0QEVeBEkmiRe+/cgbxD8bh51k9Fu6wJmAMfz7N5cx/lKMJKya9gUaAR2iTkhe2O 0mG21DprOfcMvKLvFOwDnXY7zKsD8ZSTprt4V4CgxFbKsBcUohY3Oo+pcSUBMJDJ/DXL FTRA== X-Gm-Message-State: AKwxyteoZ7ux0Hc3nWFpxB3r4ORyifTBKqKEgjpFR2h+sjj+zAarMNzd AYZOMjZvUQa8unTrtWQssKg= X-Received: by 2002:a17:902:34f:: with SMTP id 73-v6mr8638983pld.122.1516811694450; Wed, 24 Jan 2018 08:34:54 -0800 (PST) Received: from raspberrypi ([122.172.61.122]) by smtp.gmail.com with ESMTPSA id q24sm1250344pgn.15.2018.01.24.08.34.50 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 24 Jan 2018 08:34:53 -0800 (PST) Date: Wed, 24 Jan 2018 16:34:48 +0000 From: Meghana Madhyastha To: Lee Jones , Daniel Thompson , Jingoo Han , Thierry Reding , Noralf =?iso-8859-1?Q?Tr=F8nnes?= , Tomi Valkeinen , Daniel Vetter , Sean Paul , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH v19 02/10] drm/tinydrm: Convert tinydrm_enable/disable_backlight to backlight_enable/disable Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Remove tinydrm_enable/disable_backlight and let the callers call the more generic backlight_enable/disable helpers Reviewed-by: Noralf Tr?nnes Reviewed-by: Sean Paul Signed-off-by: Meghana Madhyastha --- drivers/gpu/drm/tinydrm/core/tinydrm-helpers.c | 55 -------------------------- drivers/gpu/drm/tinydrm/mipi-dbi.c | 4 +- include/drm/tinydrm/tinydrm-helpers.h | 2 - 3 files changed, 2 insertions(+), 59 deletions(-) diff --git a/drivers/gpu/drm/tinydrm/core/tinydrm-helpers.c b/drivers/gpu/drm/tinydrm/core/tinydrm-helpers.c index bf96072d1..7326e1758 100644 --- a/drivers/gpu/drm/tinydrm/core/tinydrm-helpers.c +++ b/drivers/gpu/drm/tinydrm/core/tinydrm-helpers.c @@ -276,61 +276,6 @@ struct backlight_device *tinydrm_of_find_backlight(struct device *dev) } EXPORT_SYMBOL(tinydrm_of_find_backlight); -/** - * tinydrm_enable_backlight - Enable backlight helper - * @backlight: Backlight device - * - * Returns: - * Zero on success, negative error code on failure. - */ -int tinydrm_enable_backlight(struct backlight_device *backlight) -{ - unsigned int old_state; - int ret; - - if (!backlight) - return 0; - - old_state = backlight->props.state; - backlight->props.state &= ~BL_CORE_FBBLANK; - DRM_DEBUG_KMS("Backlight state: 0x%x -> 0x%x\n", old_state, - backlight->props.state); - - ret = backlight_update_status(backlight); - if (ret) - DRM_ERROR("Failed to enable backlight %d\n", ret); - - return ret; -} -EXPORT_SYMBOL(tinydrm_enable_backlight); - -/** - * tinydrm_disable_backlight - Disable backlight helper - * @backlight: Backlight device - * - * Returns: - * Zero on success, negative error code on failure. - */ -int tinydrm_disable_backlight(struct backlight_device *backlight) -{ - unsigned int old_state; - int ret; - - if (!backlight) - return 0; - - old_state = backlight->props.state; - backlight->props.state |= BL_CORE_FBBLANK; - DRM_DEBUG_KMS("Backlight state: 0x%x -> 0x%x\n", old_state, - backlight->props.state); - ret = backlight_update_status(backlight); - if (ret) - DRM_ERROR("Failed to disable backlight %d\n", ret); - - return ret; -} -EXPORT_SYMBOL(tinydrm_disable_backlight); - #if IS_ENABLED(CONFIG_SPI) /** diff --git a/drivers/gpu/drm/tinydrm/mipi-dbi.c b/drivers/gpu/drm/tinydrm/mipi-dbi.c index 75dd65c57..9e903812b 100644 --- a/drivers/gpu/drm/tinydrm/mipi-dbi.c +++ b/drivers/gpu/drm/tinydrm/mipi-dbi.c @@ -286,7 +286,7 @@ void mipi_dbi_enable_flush(struct mipi_dbi *mipi) if (fb) fb->funcs->dirty(fb, NULL, 0, 0, NULL, 0); - tinydrm_enable_backlight(mipi->backlight); + backlight_enable(mipi->backlight); } EXPORT_SYMBOL(mipi_dbi_enable_flush); @@ -325,7 +325,7 @@ void mipi_dbi_pipe_disable(struct drm_simple_display_pipe *pipe) mipi->enabled = false; if (mipi->backlight) - tinydrm_disable_backlight(mipi->backlight); + backlight_disable(mipi->backlight); else mipi_dbi_blank(mipi); diff --git a/include/drm/tinydrm/tinydrm-helpers.h b/include/drm/tinydrm/tinydrm-helpers.h index d554ded60..f54fae03e 100644 --- a/include/drm/tinydrm/tinydrm-helpers.h +++ b/include/drm/tinydrm/tinydrm-helpers.h @@ -47,8 +47,6 @@ void tinydrm_xrgb8888_to_gray8(u8 *dst, void *vaddr, struct drm_framebuffer *fb, struct drm_clip_rect *clip); struct backlight_device *tinydrm_of_find_backlight(struct device *dev); -int tinydrm_enable_backlight(struct backlight_device *backlight); -int tinydrm_disable_backlight(struct backlight_device *backlight); size_t tinydrm_spi_max_transfer_size(struct spi_device *spi, size_t max_len); bool tinydrm_spi_bpw_supported(struct spi_device *spi, u8 bpw); -- 2.11.0