From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932493AbbD0JFM (ORCPT ); Mon, 27 Apr 2015 05:05:12 -0400 Received: from mail-la0-f50.google.com ([209.85.215.50]:33824 "EHLO mail-la0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932169AbbD0JFJ (ORCPT ); Mon, 27 Apr 2015 05:05:09 -0400 Date: Mon, 27 Apr 2015 11:05:10 +0200 From: Johan Hovold To: Alexandre Courbot Cc: Johan Hovold , Linus Walleij , "linux-gpio@vger.kernel.org" , Linux Kernel Mailing List Subject: Re: [PATCH 07/23] gpio: sysfs: rename gpiochip registration functions Message-ID: <20150427090510.GE27877@localhost> References: <1429630951-27082-1-git-send-email-johan@kernel.org> <1429630951-27082-8-git-send-email-johan@kernel.org> <20150427082753.GB27877@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Apr 27, 2015 at 05:50:54PM +0900, Alexandre Courbot wrote: > On Mon, Apr 27, 2015 at 5:27 PM, Johan Hovold wrote: > > On Mon, Apr 27, 2015 at 12:54:36PM +0900, Alexandre Courbot wrote: > >> On Wed, Apr 22, 2015 at 12:42 AM, Johan Hovold wrote: > >> > Rename the gpio-chip export/unexport functions to the more descriptive > >> > names gpiochip_register and gpiochip_unregister. > >> > >> Since these functions are related to sysfs, wouldn't > >> gpiochip_sysfs_export (or gpiochip_sysfs_register, although the former > >> sounds better to me) be even more descriptive? > > > > I'm trying to get rid of the made up notion of "exporting" things. What > > we are doing is to register devices with driver core, and that involves > > a representation is sysfs. > > > > Eventually, a gpio chip should always be registered with driver core and > > this is not directly related to the (by then hopefully legacy) > > sysfs-interface. > > I understand and agree, but even after your patch series, registration > of a gpio chip with the driver core is still dependent on the > CONFIG_GPIO_SYSFS option. So maybe you could push the logic further > and either always register GPIO chips (effectively moving the call to > device_create into gpiolib.c) and only keep the legacy bits in > gpiolib-sysfs.c? That is the plan yes, but there's only so much I can do in one series. ;) The current crazy sysfs API also prevents the decoupling of the sysfs interface from chip device registration. Johan