From patchwork Mon Dec 8 22:21:16 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Paul X-Patchwork-Id: 5459271 Return-Path: X-Original-To: patchwork-linux-fbdev@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 1E4E89F1CD for ; Mon, 8 Dec 2014 22:21:48 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3FED3200E6 for ; Mon, 8 Dec 2014 22:21:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3FA032011D for ; Mon, 8 Dec 2014 22:21:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752696AbaLHWVh (ORCPT ); Mon, 8 Dec 2014 17:21:37 -0500 Received: from mail-qa0-f45.google.com ([209.85.216.45]:47605 "EHLO mail-qa0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752331AbaLHWVg (ORCPT ); Mon, 8 Dec 2014 17:21:36 -0500 Received: by mail-qa0-f45.google.com with SMTP id x12so4022941qac.18 for ; Mon, 08 Dec 2014 14:21:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=l/DfelOf9cRBgIIJxRzGVhMyILW21Xj7rzvv9SVwItQ=; b=HQNE66StJ6F43AMeSV62kfn1Ia/UGggNPfGxyKbWiYCN1ovO/9w10zzCp6OefQHqjA qseuDo4ktpBrGA7o/q/WqznkpfFO0IjxeUvLBAeEc1UDPItWlkGV5Wv907TKGeb0sQij 6Qe4KFvP8Zhals0p7UV9m/+umDxVDUOvlhbog= 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=l/DfelOf9cRBgIIJxRzGVhMyILW21Xj7rzvv9SVwItQ=; b=hZ+zO60+HhH2UockG/9OeOHmF9EBCwjJGddakPXFjYmnjYU0U8zhBe1lYcqtIr2PQV eHOm+AsPUDOAvFxv/e2Y2IdlEjJsiDe2NcaFC7DoHjmrS4p6jQ5ZcVBOntmez0qhbGS1 p1lD+NLLGzlmq3ndiz684zmD7KpSveaW5x67WtQXP/YNP+VKwXBb4yMJvwWw0t77klPc 6h0ksSVz/ngZwCS7KXmB0wBhZMCsbGW9zFJ3UmFUzuaakgRhWVpT5SKMenWY0dLxZ2lf z0nL27vsbQjucXTstQnPT6oJbZL5QIi/i8yCm+gu+n7RIZTnWHgRmIFydXhpfihLDg/6 KxiA== X-Gm-Message-State: ALoCoQmXjKKim7FmHnbqk/lFuOb5DuRkjdCYyDSv/VymxyO6G/w/q1UNtWip/vY6GIQmWvyNuKvn X-Received: by 10.140.104.169 with SMTP id a38mr55702240qgf.35.1418077295732; Mon, 08 Dec 2014 14:21:35 -0800 (PST) Received: from philcollins.nc.rr.com (cpe-173-095-180-236.nc.res.rr.com. [173.95.180.236]) by mx.google.com with ESMTPSA id 9sm22084410qah.46.2014.12.08.14.21.34 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 08 Dec 2014 14:21:35 -0800 (PST) From: Sean Paul To: milo.kim@ti.com, linux-fbdev@vger.kernel.org Cc: arnd@arndb.de, lee.jones@linaro.org, cooloney@gmail.com, jg1.han@samsung.com, Sean Paul Subject: [PATCH v2 2/4] backlight/lp855x: Remove platform_data header Date: Mon, 8 Dec 2014 17:21:16 -0500 Message-Id: <1418077278-14144-2-git-send-email-seanpaul@chromium.org> X-Mailer: git-send-email 2.1.1 In-Reply-To: <1418077278-14144-1-git-send-email-seanpaul@chromium.org> References: <1418077278-14144-1-git-send-email-seanpaul@chromium.org> Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID,T_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 No one uses lp855x platform data any longer, remove the header and move its contents into the driver. Signed-off-by: Sean Paul Acked-by: Jingoo Han --- Changes in v2: - Removed platform data description from Documentation Documentation/backlight/lp855x-driver.txt | 38 ----------------------- MAINTAINERS | 1 - drivers/video/backlight/lp855x_bl.c | 37 +++++++++++++++++++++- include/linux/platform_data/lp855x.h | 51 ------------------------------- 4 files changed, 36 insertions(+), 91 deletions(-) delete mode 100644 include/linux/platform_data/lp855x.h diff --git a/Documentation/backlight/lp855x-driver.txt b/Documentation/backlight/lp855x-driver.txt index 01bce24..33b83d9 100644 --- a/Documentation/backlight/lp855x-driver.txt +++ b/Documentation/backlight/lp855x-driver.txt @@ -26,41 +26,3 @@ Value : pwm based or register based 2) chip_id The lp855x chip id. Value : lp8550/lp8551/lp8552/lp8553/lp8555/lp8556/lp8557 - -Platform data for lp855x ------------------------- - -For supporting platform specific data, the lp855x platform data can be used. - -* name : Backlight driver name. If it is not defined, default name is set. -* device_control : Value of DEVICE CONTROL register. -* initial_brightness : Initial value of backlight brightness. -* period_ns : Platform specific PWM period value. unit is nano. - Only valid when brightness is pwm input mode. -* size_program : Total size of lp855x_rom_data. -* rom_data : List of new eeprom/eprom registers. - -example 1) lp8552 platform data : i2c register mode with new eeprom data - -#define EEPROM_A5_ADDR 0xA5 -#define EEPROM_A5_VAL 0x4f /* EN_VSYNC=0 */ - -static struct lp855x_rom_data lp8552_eeprom_arr[] = { - {EEPROM_A5_ADDR, EEPROM_A5_VAL}, -}; - -static struct lp855x_platform_data lp8552_pdata = { - .name = "lcd-bl", - .device_control = I2C_CONFIG(LP8552), - .initial_brightness = INITIAL_BRT, - .size_program = ARRAY_SIZE(lp8552_eeprom_arr), - .rom_data = lp8552_eeprom_arr, -}; - -example 2) lp8556 platform data : pwm input mode with default rom data - -static struct lp855x_platform_data lp8556_pdata = { - .device_control = PWM_CONFIG(LP8556), - .initial_brightness = INITIAL_BRT, - .period_ns = 1000000, -}; diff --git a/MAINTAINERS b/MAINTAINERS index 3c64271..4896edb 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -9318,7 +9318,6 @@ M: Milo Kim S: Maintained F: Documentation/backlight/lp855x-driver.txt F: drivers/video/backlight/lp855x_bl.c -F: include/linux/platform_data/lp855x.h TI LP8727 CHARGER DRIVER M: Milo Kim diff --git a/drivers/video/backlight/lp855x_bl.c b/drivers/video/backlight/lp855x_bl.c index a26d3bb..d19b61c 100644 --- a/drivers/video/backlight/lp855x_bl.c +++ b/drivers/video/backlight/lp855x_bl.c @@ -15,7 +15,6 @@ #include #include #include -#include #include #include @@ -63,6 +62,42 @@ struct lp855x_device_config { int (*post_init_device)(struct lp855x *); }; +enum lp855x_chip_id { + LP8550, + LP8551, + LP8552, + LP8553, + LP8555, + LP8556, + LP8557, +}; + +struct lp855x_rom_data { + u8 addr; + u8 val; +}; + +/** + * struct lp855x_platform_data + * @name : Backlight driver name. If it is not defined, default name is set. + * @device_control : value of DEVICE CONTROL register + * @initial_brightness : initial value of backlight brightness + * @period_ns : platform specific pwm period value. unit is nano. + Only valid when mode is PWM_BASED. + * @size_program : total size of lp855x_rom_data + * @rom_data : list of new eeprom/eprom registers + * @supply : regulator that supplies 3V input + */ +struct lp855x_platform_data { + const char *name; + u8 device_control; + u8 initial_brightness; + unsigned int period_ns; + int size_program; + struct lp855x_rom_data *rom_data; + struct regulator *supply; +}; + struct lp855x { const char *chipname; enum lp855x_chip_id chip_id; diff --git a/include/linux/platform_data/lp855x.h b/include/linux/platform_data/lp855x.h deleted file mode 100644 index 9e3ac3c..0000000 --- a/include/linux/platform_data/lp855x.h +++ /dev/null @@ -1,51 +0,0 @@ -/* - * LP855x Backlight Driver - * - * Copyright (C) 2011 Texas Instruments - * - * 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. - * - */ - -#ifndef _LP855X_H -#define _LP855X_H - -enum lp855x_chip_id { - LP8550, - LP8551, - LP8552, - LP8553, - LP8555, - LP8556, - LP8557, -}; - -struct lp855x_rom_data { - u8 addr; - u8 val; -}; - -/** - * struct lp855x_platform_data - * @name : Backlight driver name. If it is not defined, default name is set. - * @device_control : value of DEVICE CONTROL register - * @initial_brightness : initial value of backlight brightness - * @period_ns : platform specific pwm period value. unit is nano. - Only valid when mode is PWM_BASED. - * @size_program : total size of lp855x_rom_data - * @rom_data : list of new eeprom/eprom registers - * @supply : regulator that supplies 3V input - */ -struct lp855x_platform_data { - const char *name; - u8 device_control; - u8 initial_brightness; - unsigned int period_ns; - int size_program; - struct lp855x_rom_data *rom_data; - struct regulator *supply; -}; - -#endif