From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755390Ab0KVMAm (ORCPT ); Mon, 22 Nov 2010 07:00:42 -0500 Received: from devils.ext.ti.com ([198.47.26.153]:43068 "EHLO devils.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755241Ab0KVMAl convert rfc822-to-8bit (ORCPT ); Mon, 22 Nov 2010 07:00:41 -0500 From: "Nori, Sekhar" To: Ben Gardiner CC: Kevin Hilman , "davinci-linux-open-source@linux.davincidsp.com" , "linux-input@vger.kernel.org" , Dmitry Torokhov , "Govindarajan, Sriramakrishnan" , Paul Mundt , "linux-kernel@vger.kernel.org" , Alexander Clouter , Chris Cordahi Date: Mon, 22 Nov 2010 17:30:09 +0530 Subject: RE: [PATCH v2 4/4] da850-evm: add baseboard UI expander buttons, switches and LEDs Thread-Topic: [PATCH v2 4/4] da850-evm: add baseboard UI expander buttons, switches and LEDs Thread-Index: AcuIADiWe80zCTUaQiqwSyDccpMpiACO5LmA Message-ID: References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Ben, On Fri, Nov 19, 2010 at 21:10:50, Ben Gardiner wrote: > >> [...] > > > > How does gpio_request prevent sysfs control? > > To obtain access to a gpio through the sysfs interface the user must > first write the gpio number to 'export'. When the gpio has been > gpio_request()'d the result of writing to 'export' is nothing; whereas > writing to export would normally result in the appearance of a named > gpio line alongside 'export'. > > I hope the following commands and their output illustrate my point: > > $ cd /sys/class/gpio/ > $ ls > export gpiochip128 gpiochip160 gpiochip64 unexport > gpiochip0 gpiochip144 gpiochip32 gpiochip96 > $ echo 160 > export > $ ls > export gpiochip128 gpiochip160 gpiochip64 unexport > gpiochip0 gpiochip144 gpiochip32 gpiochip96 > $ echo 163 > export > $ ls > export gpiochip128 gpiochip160 gpiochip64 tp_22 > gpiochip0 gpiochip144 gpiochip32 gpiochip96 unexport Thanks for the explanation. I should have probably asked earlier, why do we need to prevent sysfs access of deep sleep enable and sw reset pins? We don't seem to be using them in the kernel either. Thanks, Sekhar From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Nori, Sekhar" Subject: RE: [PATCH v2 4/4] da850-evm: add baseboard UI expander buttons, switches and LEDs Date: Mon, 22 Nov 2010 17:30:09 +0530 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7BIT Return-path: In-Reply-To: Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org To: Ben Gardiner Cc: Kevin Hilman , "davinci-linux-open-source@linux.davincidsp.com" , "linux-input@vger.kernel.org" , Dmitry Torokhov , "Govindarajan, Sriramakrishnan" , Paul Mundt , "linux-kernel@vger.kernel.org" , Alexander Clouter , Chris Cordahi List-Id: linux-input@vger.kernel.org Hi Ben, On Fri, Nov 19, 2010 at 21:10:50, Ben Gardiner wrote: > >> [...] > > > > How does gpio_request prevent sysfs control? > > To obtain access to a gpio through the sysfs interface the user must > first write the gpio number to 'export'. When the gpio has been > gpio_request()'d the result of writing to 'export' is nothing; whereas > writing to export would normally result in the appearance of a named > gpio line alongside 'export'. > > I hope the following commands and their output illustrate my point: > > $ cd /sys/class/gpio/ > $ ls > export gpiochip128 gpiochip160 gpiochip64 unexport > gpiochip0 gpiochip144 gpiochip32 gpiochip96 > $ echo 160 > export > $ ls > export gpiochip128 gpiochip160 gpiochip64 unexport > gpiochip0 gpiochip144 gpiochip32 gpiochip96 > $ echo 163 > export > $ ls > export gpiochip128 gpiochip160 gpiochip64 tp_22 > gpiochip0 gpiochip144 gpiochip32 gpiochip96 unexport Thanks for the explanation. I should have probably asked earlier, why do we need to prevent sysfs access of deep sleep enable and sw reset pins? We don't seem to be using them in the kernel either. Thanks, Sekhar