[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <201202221007.07600.arnd@arndb.de>
Date: Wed, 22 Feb 2012 10:07:07 +0000
From: Arnd Bergmann <arnd@...db.de>
To: MyungJoo Ham <myungjoo.ham@...sung.com>
Cc: linux-kernel@...r.kernel.org, NeilBrown <neilb@...e.de>,
Randy Dunlap <rdunlap@...otime.net>,
Mike Lockwood <lockwood@...roid.com>,
Arve Hjønnevag <arve@...roid.com>,
Kyungmin Park <kyungmin.park@...sung.com>,
Donggeun Kim <dg77.kim@...sung.com>, Greg KH <gregkh@...e.de>,
Linus Walleij <linus.walleij@...aro.org>,
Dmitry Torokhov <dmitry.torokhov@...il.com>,
Morten CHRISTIANSEN <morten.christiansen@...ricsson.com>,
Mark Brown <broonie@...nsource.wolfsonmicro.com>,
John Stultz <john.stultz@...aro.org>,
Joerg Roedel <joerg.roedel@....com>, myungjoo.ham@...il.com
Subject: Re: [PATCH v5 3/5] Extcon: support multiple states at a device.
On Friday 10 February 2012, MyungJoo Ham wrote:
> Date: December 2011
> Contact: MyungJoo Ham <myungjoo.ham@...sung.com>
> Description:
> - The /sys/class/extcon/.../state shows the cable attach/detach
> - information of the corresponding extcon object. If the extcon
> - objecct has an optional callback "show_state" defined, the
> - callback will provide the name with this sysfs node.
> + The /sys/class/extcon/.../state shows and stores the cable
> + attach/detach information of the corresponding extcon object.
> + If the extcon objecct has an optional callback "show_state"
> + defined, the showing function is overriden with the optional
> + callback.
> +
> + If the default callback for showing function is used, the
> + format is like this:
> + # cat state
> + USB_OTG=1
> + HDMI=0
> + TA=1
> + EAR_JACK=0
> + #
> + In this example, the extcon device have USB_OTG and TA
> + cables attached and HDMI and EAR_JACK cables detached.
> +
> + There are two methods to update state of extcon.
> + Method 1.
> + echo CABLE_NAME [0|1] > state
> + Method 2.
> + echo 0xHEX > state
> +
> + Method 1 updates the state (0 or 1) of the
> + corresponding cable (either the name or index of the cable).
> + Method 2 updates the whole state of the extcon dev.
I think having two ways to do the same thing is rather confusing, it would
be nice to provide only one way and make sure that it works for everyone.
Maybe the entire thing can be turned around into one attribute group
per cable and unified with the mutually-exclusive part, like
extcon/.../usb-otg/state # 0 or 1 for disable or enable
/mutually-exclusive # list of exclusive ports
/hdmi/...
/ta/...
Arnd
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists