Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758626AbbBFWhx (ORCPT ); Fri, 6 Feb 2015 17:37:53 -0500 Received: from mailgw1.uni-kl.de ([131.246.120.220]:50101 "EHLO mailgw1.uni-kl.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755486AbbBFWfw (ORCPT ); Fri, 6 Feb 2015 17:35:52 -0500 X-Greylist: delayed 584 seconds by postgrey-1.27 at vger.kernel.org; Fri, 06 Feb 2015 17:35:48 EST From: niederp@physik.uni-kl.de To: linux-fbdev@vger.kernel.org, plagnioj@jcrosoft.com, tomi.valkeinen@ti.com, maxime.ripard@free-electrons.com Cc: linux-kernel@vger.kernel.org, =?UTF-8?q?Thomas=20Niederpr=C3=BCm?= Subject: [PATCH 6/8] fbdev: ssd1307fb: Add module parameter to set update delay of the deffered io. Date: Fri, 6 Feb 2015 23:28:12 +0100 Message-Id: <1423261694-5939-7-git-send-email-niederp@physik.uni-kl.de> X-Mailer: git-send-email 2.1.1 In-Reply-To: <1423261694-5939-1-git-send-email-niederp@physik.uni-kl.de> References: <1423261694-5939-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 Content-Length: 1735 Lines: 55 From: Thomas Niederprüm This patch adds the module parameter "delaydivider" to set delay for the deferred io. Effectively this is setting the refresh rate for mmap access to the framebuffer. The delay for the deferred io is HZ/delaydivider. Signed-off-by: Thomas Niederprüm --- drivers/video/fbdev/ssd1307fb.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/video/fbdev/ssd1307fb.c b/drivers/video/fbdev/ssd1307fb.c index 1d81877..b38315d 100644 --- a/drivers/video/fbdev/ssd1307fb.c +++ b/drivers/video/fbdev/ssd1307fb.c @@ -44,10 +44,14 @@ #define SSD1307FB_SET_VCOMH 0xdb #define BITSPERPIXEL 1 +#define DELAYDIVIDER 20 static u_int bitsperpixel = BITSPERPIXEL; module_param(bitsperpixel, uint, 0); +static u_int delaydivider = DELAYDIVIDER; +module_param(delaydivider, uint, 0); + struct ssd1307fb_par; struct ssd1307fb_deviceinfo { @@ -312,7 +316,7 @@ static void ssd1307fb_deferred_io(struct fb_info *info, } static struct fb_deferred_io ssd1307fb_defio = { - .delay = HZ, + .delay = HZ/DELAYDIVIDER, .deferred_io = ssd1307fb_deferred_io, }; @@ -601,6 +605,7 @@ static int ssd1307fb_probe(struct i2c_client *client, info->fix = ssd1307fb_fix; info->fix.line_length = par->width * bitsperpixel / 8; info->fbdefio = &ssd1307fb_defio; + info->fbdefio->delay = HZ/delaydivider; info->var = ssd1307fb_var; info->var.bits_per_pixel = bitsperpixel; -- 2.1.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/