From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754561Ab2DZLwI (ORCPT ); Thu, 26 Apr 2012 07:52:08 -0400 Received: from mail-lb0-f174.google.com ([209.85.217.174]:53729 "EHLO mail-lb0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752111Ab2DZLwF (ORCPT ); Thu, 26 Apr 2012 07:52:05 -0400 Date: Thu, 26 Apr 2012 13:52:00 +0200 From: Johan Hovold To: Greg Kroah-Hartman Cc: Richard Purdie , Samuel Ortiz , Arnd Bergmann , Florian Tobias Schandinat , Andrew Morton , linux-kernel@vger.kernel.org, linux-fbdev@vger.kernel.org Subject: Re: [PATCH 2/4] misc: add LM3533 ambient light sensor driver Message-ID: <20120426115200.GA22245@localhost> References: <1334935826-12527-1-git-send-email-jhovold@gmail.com> <1334935826-12527-3-git-send-email-jhovold@gmail.com> <20120420155734.GE8327@kroah.com> <20120420172849.GB12376@localhost> <20120420173754.GA22222@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20120420173754.GA22222@kroah.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Apr 20, 2012 at 10:37:54AM -0700, Greg Kroah-Hartman wrote: > On Fri, Apr 20, 2012 at 07:28:49PM +0200, Johan Hovold wrote: > > On Fri, Apr 20, 2012 at 08:57:34AM -0700, Greg Kroah-Hartman wrote: > > > On Fri, Apr 20, 2012 at 05:30:24PM +0200, Johan Hovold wrote: > > > > Add sub-driver for the ambient light sensor in National Semiconductor / > > > > TI LM3533 lighting power chips. > > > > > > > > Raw ADC values as well as current ALS zone can be retrieved through > > > > sysfs. The ALS zone can also be read using a character device > > > > (/dev/lm3533-als) which is updated on zone changes (interrupt driven or > > > > polled). > > > > > > > > The driver provides a configuration interface through sysfs. > > > > > > Which seems to not be documented at all :( > > > > There are the following sysfs entries for configuring ALS control: > > > > That's fine, but you need a Documentation/ABI entry for any new sysfs > file you create. > > > What about using the iio interface for this instead? Doesn't that > > > already provide this standard interface you are looking for? > > > > I had a look at iio last fall and decided not to use it at the time. I > > can't remember exactly what the reasons were right now, so I'll have > > to get back to you on this. > > Please look into this, the iio framework is about to move out of the > staging tree for 3.5, so there should not be any reason for you to > create yet-another user api for this type of thing. We had an initial requirement to support fairly old kernels, but this have since been relaxed (and has of course never in itself been a valid reason to not use iio for upstream). As iio is moving out of staging, I see no problems using it, and the required changes appear quite small. I'll submit a v2 against iio and make sure to document the sysfs-entries. Thanks, Johan From mboxrd@z Thu Jan 1 00:00:00 1970 From: Johan Hovold Date: Thu, 26 Apr 2012 11:52:00 +0000 Subject: Re: [PATCH 2/4] misc: add LM3533 ambient light sensor driver Message-Id: <20120426115200.GA22245@localhost> List-Id: References: <1334935826-12527-1-git-send-email-jhovold@gmail.com> <1334935826-12527-3-git-send-email-jhovold@gmail.com> <20120420155734.GE8327@kroah.com> <20120420172849.GB12376@localhost> <20120420173754.GA22222@kroah.com> In-Reply-To: <20120420173754.GA22222@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Greg Kroah-Hartman Cc: Richard Purdie , Samuel Ortiz , Arnd Bergmann , Florian Tobias Schandinat , Andrew Morton , linux-kernel@vger.kernel.org, linux-fbdev@vger.kernel.org On Fri, Apr 20, 2012 at 10:37:54AM -0700, Greg Kroah-Hartman wrote: > On Fri, Apr 20, 2012 at 07:28:49PM +0200, Johan Hovold wrote: > > On Fri, Apr 20, 2012 at 08:57:34AM -0700, Greg Kroah-Hartman wrote: > > > On Fri, Apr 20, 2012 at 05:30:24PM +0200, Johan Hovold wrote: > > > > Add sub-driver for the ambient light sensor in National Semiconductor / > > > > TI LM3533 lighting power chips. > > > > > > > > Raw ADC values as well as current ALS zone can be retrieved through > > > > sysfs. The ALS zone can also be read using a character device > > > > (/dev/lm3533-als) which is updated on zone changes (interrupt driven or > > > > polled). > > > > > > > > The driver provides a configuration interface through sysfs. > > > > > > Which seems to not be documented at all :( > > > > There are the following sysfs entries for configuring ALS control: > > > > That's fine, but you need a Documentation/ABI entry for any new sysfs > file you create. > > > What about using the iio interface for this instead? Doesn't that > > > already provide this standard interface you are looking for? > > > > I had a look at iio last fall and decided not to use it at the time. I > > can't remember exactly what the reasons were right now, so I'll have > > to get back to you on this. > > Please look into this, the iio framework is about to move out of the > staging tree for 3.5, so there should not be any reason for you to > create yet-another user api for this type of thing. We had an initial requirement to support fairly old kernels, but this have since been relaxed (and has of course never in itself been a valid reason to not use iio for upstream). As iio is moving out of staging, I see no problems using it, and the required changes appear quite small. I'll submit a v2 against iio and make sure to document the sysfs-entries. Thanks, Johan