From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753279AbbCAW2n (ORCPT ); Sun, 1 Mar 2015 17:28:43 -0500 Received: from mailgw1.uni-kl.de ([131.246.120.220]:57874 "EHLO mailgw1.uni-kl.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752602AbbCAW2h (ORCPT ); Sun, 1 Mar 2015 17:28:37 -0500 From: =?UTF-8?q?Thomas=20Niederpr=C3=BCm?= To: plagnioj@jcrosoft.com, tomi.valkeinen@ti.com, maxime.ripard@free-electrons.com Cc: linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org, =?UTF-8?q?Thomas=20Niederpr=C3=BCm?= Subject: [PATCHv2 06/10] fbdev: ssd1307fb: Add support for SSD1305 Date: Sun, 1 Mar 2015 23:27:59 +0100 Message-Id: <1425248883-25367-7-git-send-email-niederp@physik.uni-kl.de> X-Mailer: git-send-email 2.3.0 In-Reply-To: <1425248883-25367-1-git-send-email-niederp@physik.uni-kl.de> References: <1423261694-5939-1-git-send-email-niederp@physik.uni-kl.de> <1425248883-25367-1-git-send-email-niederp@physik.uni-kl.de> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch adds support for the SSD1305 OLED controller. Signed-off-by: Thomas Niederprüm --- Documentation/devicetree/bindings/video/ssd1307fb.txt | 2 +- drivers/video/fbdev/ssd1307fb.c | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/video/ssd1307fb.txt b/Documentation/devicetree/bindings/video/ssd1307fb.txt index 6bdd69b..115cd43 100644 --- a/Documentation/devicetree/bindings/video/ssd1307fb.txt +++ b/Documentation/devicetree/bindings/video/ssd1307fb.txt @@ -2,7 +2,7 @@ Required properties: - compatible: Should be "solomon,fb-". The only supported bus for - now is i2c, and the supported chips are ssd1306 and ssd1307. + now is i2c, and the supported chips are ssd1305, ssd1306 and ssd1307. - reg: Should contain address of the controller on the I2C bus. Most likely 0x3c or 0x3d - pwm: Should contain the pwm to use according to the OF device tree PWM diff --git a/drivers/video/fbdev/ssd1307fb.c b/drivers/video/fbdev/ssd1307fb.c index b4880c0..c7ed287 100644 --- a/drivers/video/fbdev/ssd1307fb.c +++ b/drivers/video/fbdev/ssd1307fb.c @@ -17,6 +17,7 @@ #include #include +#define DEVID_SSD1305 5 #define DEVID_SSD1306 6 #define DEVID_SSD1307 7 @@ -431,6 +432,13 @@ static int ssd1307fb_init(struct ssd1307fb_par *par) return 0; } +static struct ssd1307fb_deviceinfo ssd1307fb_ssd1305_deviceinfo = { + .device_id = DEVID_SSD1305, + .default_vcomh = 0x34, + .default_dclk_div = 0, + .default_dclk_frq = 7, +}; + static struct ssd1307fb_deviceinfo ssd1307fb_ssd1306_deviceinfo = { .device_id = DEVID_SSD1306, .default_vcomh = 0x20, @@ -447,6 +455,10 @@ static struct ssd1307fb_deviceinfo ssd1307fb_ssd1307_deviceinfo = { static const struct of_device_id ssd1307fb_of_match[] = { { + .compatible = "solomon,ssd1305fb-i2c", + .data = (void *)&ssd1307fb_ssd1305_deviceinfo, + }, + { .compatible = "solomon,ssd1306fb-i2c", .data = (void *)&ssd1307fb_ssd1306_deviceinfo, }, @@ -618,6 +630,7 @@ static int ssd1307fb_remove(struct i2c_client *client) } static const struct i2c_device_id ssd1307fb_i2c_id[] = { + { "ssd1305fb", 0 }, { "ssd1306fb", 0 }, { "ssd1307fb", 0 }, { } -- 2.3.0