From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pw0-f51.google.com (mail-pw0-f51.google.com [209.85.160.51]) by ozlabs.org (Postfix) with ESMTP id 06580B70CD for ; Thu, 12 Aug 2010 00:19:42 +1000 (EST) Received: by pwi4 with SMTP id 4so59018pwi.38 for ; Wed, 11 Aug 2010 07:19:40 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: Date: Wed, 11 Aug 2010 19:49:40 +0530 Message-ID: Subject: Re: How to use mpc8xxx_gpio.c device driver From: Ravi Gupta To: linuxppc-dev@ozlabs.org, linuxppc-dev@lists.ozlabs.org Content-Type: multipart/alternative; boundary=0016e64cb288ba0ffc048d8cf013 List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , --0016e64cb288ba0ffc048d8cf013 Content-Type: text/plain; charset=ISO-8859-1 Also, when I try to export a gpio in sysfs echo 9 > /sys/class/gpio/export It gives me an error in dmesg gpio_request: gpio-9 (sysfs) status -22 export_store: status -22 Here is a look of sysfs on my machine # ls /sys/class/gpio/ -la drwxr-xr-x 4 root root 0 Jan 1 00:00 . drwxr-xr-x 24 root root 0 Jan 1 00:00 .. --w------- 1 root root 4096 Jan 1 00:10 export drwxr-xr-x 3 root root 0 Jan 1 00:00 gpiochip192 drwxr-xr-x 3 root root 0 Jan 1 00:00 gpiochip224 --w------- 1 root root 4096 Jan 1 00:00 unexport --0016e64cb288ba0ffc048d8cf013 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Also, when I try to export a gpio in sysfs

echo 9 > /sys/class/gp= io/export

It gives me an error in dmesg
gpio_request: gpio-9 (sys= fs) status -22
export_store: status -22

Here is a look of sysfs o= n my machine

# ls /sys/class/gpio/ -la
drwxr-xr-x=A0=A0=A0 4 root=A0=A0=A0=A0 roo= t=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 0 Jan=A0 1 00:00 .
drwxr-xr-x=A0=A0 2= 4 root=A0=A0=A0=A0 root=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 0 Jan=A0 1 00:00 .= .
--w-------=A0=A0=A0 1 root=A0=A0=A0=A0 root=A0=A0=A0=A0=A0=A0=A0=A0 40= 96 Jan=A0 1 00:10 export
drwxr-xr-x=A0=A0=A0 3 root=A0=A0=A0=A0 root=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0 0 Jan=A0 1 00:00 gpiochip192
drwxr-xr-x=A0=A0=A0 3 root=A0=A0=A0=A0 = root=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 0 Jan=A0 1 00:00 gpiochip224
--w--= -----=A0=A0=A0 1 root=A0=A0=A0=A0 root=A0=A0=A0=A0=A0=A0=A0=A0 4096 Jan=A0 = 1 00:00 unexport


--0016e64cb288ba0ffc048d8cf013--