From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756967AbbCMVgg (ORCPT ); Fri, 13 Mar 2015 17:36:36 -0400 Received: from mailgw1.uni-kl.de ([131.246.120.220]:59645 "EHLO mailgw1.uni-kl.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754779AbbCMVg3 convert rfc822-to-8bit (ORCPT ); Fri, 13 Mar 2015 17:36:29 -0400 Date: Fri, 13 Mar 2015 20:21:37 +0100 From: Thomas =?UTF-8?B?TmllZGVycHLDvG0=?= To: Tomi Valkeinen Cc: Maxime Ripard , , , Subject: Re: [PATCH 7/8] fbdev: ssd1307fb: Add sysfs handles to expose contrast and dim setting to userspace. Message-ID: <20150313202137.5957a23f@maestro.intranet> In-Reply-To: <54FECC2F.8080804@ti.com> References: <1423261694-5939-1-git-send-email-niederp@physik.uni-kl.de> <1423261694-5939-8-git-send-email-niederp@physik.uni-kl.de> <20150207114329.GQ2079@lukather> <20150207174244.25987977@maestro.intranet> <20150209085239.GX2079@lukather> <54FECC2F.8080804@ti.com> Organization: TU Kaiserslautern X-Mailer: Claws Mail 3.10.1 (GTK+ 2.24.26; i686-pc-linux-gnu) 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 Am Tue, 10 Mar 2015 12:49:19 +0200 schrieb Tomi Valkeinen : > On 09/02/15 10:52, Maxime Ripard wrote: > > On Sat, Feb 07, 2015 at 05:42:44PM +0100, Thomas Niederprüm wrote: > >>>> +static struct device_attribute device_attrs[] = { > >>>> + __ATTR(contrast, S_IRUGO|S_IWUSR, show_contrast, > >>>> store_contrast), > >>>> + __ATTR(dim, S_IRUGO|S_IWUSR, show_dim, store_dim), > >>>> + > >>>> +}; > >>>> + > >>> > >>> I would have thought this was something accessible through the > >>> framebuffer ioctl. > >>> > >>> Apparently it's not, at least for the contrast, so maybe it > >>> should be added there, instead of doing it for a single driver? > >> > >> I think the contrast setting for an OLED display is much like the > >> backlight setting for LCD panel. Since there is also no ioctl to > >> set the backlight of an LCD I wonder if the contrast of an OLED > >> should have one. > > > > It's too much of framebuffer interface debate for me here. Tomi? > > We have backlight and contrast already in backlight-class and > lcd-class (drivers/video/backlight/backlight.c and > drivers/video/backlight/lcd.c). Are those something that could be > used here instead of custom sysfs files? I just gave the backlight-class a try and it works like a charm. I will include it in v4 and drop the sysfs handles instead. Thanks for the hint! Thomas