From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757503Ab1K3JqQ (ORCPT ); Wed, 30 Nov 2011 04:46:16 -0500 Received: from cassiel.sirena.org.uk ([80.68.93.111]:59046 "EHLO cassiel.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753096Ab1K3JqP (ORCPT ); Wed, 30 Nov 2011 04:46:15 -0500 Date: Wed, 30 Nov 2011 09:46:09 +0000 From: Mark Brown To: MyungJoo Ham Cc: Greg KH , Dmitry Torokhov , NeilBrown , Linus Walleij , Arnd Bergmann , linux-kernel@vger.kernel.org, Mike Lockwood , Arve Hj?nnev?g , Kyungmin Park , Donggeun Kim , Grant Likely , Kalle Komierowski , Johan PALSSON , Daniel WILLERUD Subject: Re: [RFC PATCH 0/3] introduce: Multistate Switch Class Message-ID: <20111130094609.GA19839@sirena.org.uk> References: <201111251402.28016.arnd@arndb.de> <20111127230836.GA29728@suse.de> <20111128123114.2601bd7c@notabene.brown> <20111128072713.GA17724@suse.de> <20111128090446.GB18919@core.coreip.homeip.net> <20111130063500.GB12052@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Cookie: If rash develops, discontinue use. User-Agent: Mutt/1.5.20 (2009-06-14) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: broonie@sirena.org.uk X-SA-Exim-Scanned: No (on cassiel.sirena.org.uk); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Nov 30, 2011 at 03:58:54PM +0900, MyungJoo Ham wrote: > On Wed, Nov 30, 2011 at 3:35 PM, Greg KH wrote: > > Actually, why can't we just use gpio as-is here and just treat these > > devices as "generic" i/o "pins"? > For userspace, GPIO should work. > For device drivers, I'm not sure. > In order to work for device drives, a GPIO event (GPIO Input goes L->H > or H->L) should trigger events in other device drivers. The GPIO value > can be set by the external-connector/multistate-switch driver > (notifier) based on its own interrupts. We also need some way to group things together so that we can understand that we've got a single connector that can detect multiple things (eg, understanding that a cable hsa audio and video capability).