Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756043Ab2BXMyN (ORCPT ); Fri, 24 Feb 2012 07:54:13 -0500 Received: from moutng.kundenserver.de ([212.227.17.10]:61608 "EHLO moutng.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754719Ab2BXMyM (ORCPT ); Fri, 24 Feb 2012 07:54:12 -0500 From: Arnd Bergmann To: MyungJoo Ham Subject: Re: [PATCH v5 4/5] Extcon: support mutually exclusive relation between cables. Date: Fri, 24 Feb 2012 12:53:52 +0000 User-Agent: KMail/1.12.2 (Linux/3.3.0-rc1; KDE/4.3.2; x86_64; ; ) Cc: Mark Brown , linux-kernel@vger.kernel.org, NeilBrown , Randy Dunlap , Mike Lockwood , Arve =?iso-8859-1?q?Hj=F8nnevag?= , Kyungmin Park , Donggeun Kim , gregkh@linuxfoundation.org, Linus Walleij , Dmitry Torokhov , Morten CHRISTIANSEN , John Stultz , Joerg Roedel References: <1327021317-10222-1-git-send-email-myungjoo.ham@samsung.com> <201202221000.00810.arnd@arndb.de> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201202241253.52336.arnd@arndb.de> X-Provags-ID: V02:K0:J72Bs3fZLFXI0yJkVpbs+AWhFPQ+e9A1MxRkbB3q3qJ 2TkmIhlfB7pTli2z5SCfT3VCG/tyVTuaYvgfkhF0bCcy2cWC/L KJfv46ZHZnNyodjM9n5tuCJI8v97Uz7ut5XTtX32YbrXEWTB6i dQkSZV3LBIj/1PylPJdRAt5M8xOFreK7LUE945zx83DApRghoL PvLgJ+UIdLSEJ1tTngdqg5zn7msSe53MvAA1Zdl039jJZ8DOt4 0r4Ns8ERKz/JBaVmG6THh1MxLBkYpcQccfi85Vf6s+qiu8vZhM D52aYyim0ll1XdW3ilqBqNMit29UpdX34ixToQ7FkA7AIyIzml PRzFhX+mIU60kKi+h5WI= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1502 Lines: 40 On Friday 24 February 2012, MyungJoo Ham wrote: > Ok, here goes an example how it would look like in the next revision of Extcon. > I think this addresses your comments on multistate-support patch (3/5) > > /sys/class/extcon/max8997-muic.0/ > name: "max8997-muic.0" > state: 0x00000009 /* RW. 0xblahblah format > for both read and write */ > mutually_exclusive/ > rule.0: 0x3 > rule.1: 0x5 > rule.2: 0xC > cable.0/ > name: "VGA" > state: 1 /* RW: 0 or 1 */ > mutually_exclusive/ > cable.1 > cable.2 > cable.1/ > ... > > > How about this? > I would leave out the global mutually_exclusive/ directory because that is redundant and I see no benefit in it. Having the redundant "state" files is probably a good idea because the global one lets you make atomic changes of multiple cables and the other are very convenient. What kind of object is /sys/class/extcon/max8997-muic.0/cable.0/mutually_exclusive? Is that a file with two lines, a directory with two empty files or a directory with symlinks to the other directories? Arnd -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/