<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/drivers/staging/greybus/interface.c, branch v4.9</title>
<subtitle>Linux kernel source tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/'/>
<entry>
<title>staging: greybus: remove CONFIG_PM_RUNTIME from kernel_ver.h</title>
<updated>2016-09-19T14:52:07+00:00</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@google.com</email>
</author>
<published>2016-09-09T07:47:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=948c6227e76ef2443b327a409dc8eced92b32bda'/>
<id>948c6227e76ef2443b327a409dc8eced92b32bda</id>
<content type='text'>
The last thing remaining in kernel_ver.h was the setting of
CONFIG_PM_RUNTIME, which isn't needed in a in-tree implementation.  So
remove the setting of this value, and the .h file entirely as that was
the last thing left in it.

Signed-off-by: Greg Kroah-Hartman &lt;gregkh@google.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The last thing remaining in kernel_ver.h was the setting of
CONFIG_PM_RUNTIME, which isn't needed in a in-tree implementation.  So
remove the setting of this value, and the .h file entirely as that was
the last thing left in it.

Signed-off-by: Greg Kroah-Hartman &lt;gregkh@google.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>greybus: interface: fix timesync registration sequencing</title>
<updated>2016-08-06T09:08:48+00:00</updated>
<author>
<name>David Lin</name>
<email>dtwlin@google.com</email>
</author>
<published>2016-08-05T22:08:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=4523eae6f8446e3943415683bc9a136ce11fb32b'/>
<id>4523eae6f8446e3943415683bc9a136ce11fb32b</id>
<content type='text'>
When enabling an interface, control device should be registered after
having successfully added the timesync. Similarly for the interface
disable path, control device should be removed first before removing
timesync.

Testing Done:
 - Enable and disable the interface

Reviewed-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
Reviewed-by: Johan Hovold &lt;johan@hovoldconsulting.com&gt;
Suggested-by: Johan Hovold &lt;johan@hovoldconsulting.com&gt;
Signed-off-by: David Lin &lt;dtwlin@google.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@google.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When enabling an interface, control device should be registered after
having successfully added the timesync. Similarly for the interface
disable path, control device should be removed first before removing
timesync.

Testing Done:
 - Enable and disable the interface

Reviewed-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
Reviewed-by: Johan Hovold &lt;johan@hovoldconsulting.com&gt;
Suggested-by: Johan Hovold &lt;johan@hovoldconsulting.com&gt;
Signed-off-by: David Lin &lt;dtwlin@google.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@google.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>greybus: interface: delete control device upon enable failure</title>
<updated>2016-08-03T08:52:20+00:00</updated>
<author>
<name>David Lin</name>
<email>dtwlin@google.com</email>
</author>
<published>2016-08-02T22:34:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=ea2ff95ab4e178559e63b1ab5a174dd4dd6b4019'/>
<id>ea2ff95ab4e178559e63b1ab5a174dd4dd6b4019</id>
<content type='text'>
There is an issue that when an interface failed to be enabled due to
timesync failure, a previously added control device is not deleted as
part of the error clean-up. This causes a leak in the sysfs file when
the interface is disabled. This would eventually cause this particular
interface to be unable to register future control device even after
unipro_reset. See failure logs below:

[  906.495261] greybus 1-3.3: failed to add to timesync: -19
[  906.516497] greybus 1-3.3: failed to re-enable interface: -19
[  907.016016] greybus 1-3.3: Interface removed
...
[ 1623.677343] ------------[ cut here ]------------
[ 1623.681116] WARNING: at kernel/arche/fs/sysfs/dir.c:530 sysfs_add_one+0x98/0xb4()
[ 1623.681128] sysfs: cannot create duplicate filename '/bus/greybus/devices/1-3.3.ctrl'
[ 1623.681252] Call trace:
[ 1623.681265] [&lt;ffffffc000207b40&gt;] dump_backtrace+0x0/0x268
[ 1623.681272] [&lt;ffffffc000207db8&gt;] show_stack+0x10/0x1c
[ 1623.681284] [&lt;ffffffc000ccb890&gt;] dump_stack+0x1c/0x28
[ 1623.681295] [&lt;ffffffc00021f9dc&gt;] warn_slowpath_common+0x74/0x9c
[ 1623.681301] [&lt;ffffffc00021fa60&gt;] warn_slowpath_fmt+0x5c/0x80
[ 1623.681307] [&lt;ffffffc000366624&gt;] sysfs_add_one+0x94/0xb4
[ 1623.681315] [&lt;ffffffc0003670b4&gt;] sysfs_do_create_link_sd+0x100/0x1c8
[ 1623.681320] [&lt;ffffffc0003671a8&gt;] sysfs_create_link+0x2c/0x38
[ 1623.681332] [&lt;ffffffc0005d5890&gt;] bus_add_device+0xd8/0x190
[ 1623.681338] [&lt;ffffffc0005d39ec&gt;] device_add+0x2b4/0x604
[ 1623.681349] [&lt;ffffffbffc006dfc&gt;] gb_control_add+0x10/0x40 [greybus]
[ 1623.681362] [&lt;ffffffbffc003dac&gt;] gb_interface_enable+0x20c/0x3b8 [greybus]
[ 1623.681373] [&lt;ffffffbffc002a30&gt;] gb_module_add+0x124/0x174 [greybus]
[ 1623.681385] [&lt;ffffffbffc0082cc&gt;] gb_svc_intf_set_power_mode+0xdd4/0xfe8 [greybus]
[ 1623.681394] [&lt;ffffffc00023888c&gt;] process_one_work+0x268/0x3c8
[ 1623.681400] [&lt;ffffffc000239a64&gt;] worker_thread+0x204/0x358
[ 1623.681410] [&lt;ffffffc00023f43c&gt;] kthread+0xb8/0xc4
[ 1623.681414] ---[ end trace 44489577dd9220db ]---
[ 1623.681818] greybus 1-3.3.ctrl: failed to register control device: -17

Testing Done:
 - Continuous unipro_reset stress test

Signed-off-by: David Lin &lt;dtwlin@google.com&gt;
Reviewed-by: Johan Hovold &lt;johan@hovoldconsulting.com&gt;
Reviewed-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
Reviewed-by: Jeffrey Carlyle &lt;jcarlyle@google.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@google.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There is an issue that when an interface failed to be enabled due to
timesync failure, a previously added control device is not deleted as
part of the error clean-up. This causes a leak in the sysfs file when
the interface is disabled. This would eventually cause this particular
interface to be unable to register future control device even after
unipro_reset. See failure logs below:

[  906.495261] greybus 1-3.3: failed to add to timesync: -19
[  906.516497] greybus 1-3.3: failed to re-enable interface: -19
[  907.016016] greybus 1-3.3: Interface removed
...
[ 1623.677343] ------------[ cut here ]------------
[ 1623.681116] WARNING: at kernel/arche/fs/sysfs/dir.c:530 sysfs_add_one+0x98/0xb4()
[ 1623.681128] sysfs: cannot create duplicate filename '/bus/greybus/devices/1-3.3.ctrl'
[ 1623.681252] Call trace:
[ 1623.681265] [&lt;ffffffc000207b40&gt;] dump_backtrace+0x0/0x268
[ 1623.681272] [&lt;ffffffc000207db8&gt;] show_stack+0x10/0x1c
[ 1623.681284] [&lt;ffffffc000ccb890&gt;] dump_stack+0x1c/0x28
[ 1623.681295] [&lt;ffffffc00021f9dc&gt;] warn_slowpath_common+0x74/0x9c
[ 1623.681301] [&lt;ffffffc00021fa60&gt;] warn_slowpath_fmt+0x5c/0x80
[ 1623.681307] [&lt;ffffffc000366624&gt;] sysfs_add_one+0x94/0xb4
[ 1623.681315] [&lt;ffffffc0003670b4&gt;] sysfs_do_create_link_sd+0x100/0x1c8
[ 1623.681320] [&lt;ffffffc0003671a8&gt;] sysfs_create_link+0x2c/0x38
[ 1623.681332] [&lt;ffffffc0005d5890&gt;] bus_add_device+0xd8/0x190
[ 1623.681338] [&lt;ffffffc0005d39ec&gt;] device_add+0x2b4/0x604
[ 1623.681349] [&lt;ffffffbffc006dfc&gt;] gb_control_add+0x10/0x40 [greybus]
[ 1623.681362] [&lt;ffffffbffc003dac&gt;] gb_interface_enable+0x20c/0x3b8 [greybus]
[ 1623.681373] [&lt;ffffffbffc002a30&gt;] gb_module_add+0x124/0x174 [greybus]
[ 1623.681385] [&lt;ffffffbffc0082cc&gt;] gb_svc_intf_set_power_mode+0xdd4/0xfe8 [greybus]
[ 1623.681394] [&lt;ffffffc00023888c&gt;] process_one_work+0x268/0x3c8
[ 1623.681400] [&lt;ffffffc000239a64&gt;] worker_thread+0x204/0x358
[ 1623.681410] [&lt;ffffffc00023f43c&gt;] kthread+0xb8/0xc4
[ 1623.681414] ---[ end trace 44489577dd9220db ]---
[ 1623.681818] greybus 1-3.3.ctrl: failed to register control device: -17

Testing Done:
 - Continuous unipro_reset stress test

Signed-off-by: David Lin &lt;dtwlin@google.com&gt;
Reviewed-by: Johan Hovold &lt;johan@hovoldconsulting.com&gt;
Reviewed-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
Reviewed-by: Jeffrey Carlyle &lt;jcarlyle@google.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@google.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>greybus: replace Ara references</title>
<updated>2016-07-28T14:30:13+00:00</updated>
<author>
<name>Johan Hovold</name>
<email>johan@hovoldconsulting.com</email>
</author>
<published>2016-07-28T09:40:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=23931ffb9ac892a51cdef4eefdfc255e3f810a8b'/>
<id>23931ffb9ac892a51cdef4eefdfc255e3f810a8b</id>
<content type='text'>
Replace all occurrences of the term "Ara" with "GMP" in core.

Signed-off-by: Johan Hovold &lt;johan@hovoldconsulting.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@google.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Replace all occurrences of the term "Ara" with "GMP" in core.

Signed-off-by: Johan Hovold &lt;johan@hovoldconsulting.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@google.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>greybus: interface: Add quirk for no PM for S2 Loader</title>
<updated>2016-07-26T22:29:00+00:00</updated>
<author>
<name>Viresh Kumar</name>
<email>viresh.kumar@linaro.org</email>
</author>
<published>2016-07-26T20:41:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=0c543f9bb2dfa4239a601bff70e66020c2daec59'/>
<id>0c543f9bb2dfa4239a601bff70e66020c2daec59</id>
<content type='text'>
S2 Loader doesn't support runtime PM operations currently and we will
fail to suspend/resume the bundle for firmware management protocols.

Once that happens, the bundle and its connections will be pretty much
useless as we would have tried to disable/enable all connections during
such an operation and the S2 loader doesn't expect the connections to go
away during normal operation (except in the case of mode-switch).

This patch defines a new quirk GB_INTERFACE_QUIRK_NO_PM and uses a new
interface init status value (GB_INIT_S2_LOADER_INITIALIZED) which will
be advertised by S2 Loader now in the init status.

After detecting the currently running stage as S2 Loader, the kernel
wouldn't attempt suspending or resuming the bundle.

Reviewed-by: David Lin &lt;dtwlin@google.com&gt;
Reviewed-by: Johan Hovold &lt;johan@hovoldconsulting.com&gt;
Signed-off-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@google.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
S2 Loader doesn't support runtime PM operations currently and we will
fail to suspend/resume the bundle for firmware management protocols.

Once that happens, the bundle and its connections will be pretty much
useless as we would have tried to disable/enable all connections during
such an operation and the S2 loader doesn't expect the connections to go
away during normal operation (except in the case of mode-switch).

This patch defines a new quirk GB_INTERFACE_QUIRK_NO_PM and uses a new
interface init status value (GB_INIT_S2_LOADER_INITIALIZED) which will
be advertised by S2 Loader now in the init status.

After detecting the currently running stage as S2 Loader, the kernel
wouldn't attempt suspending or resuming the bundle.

Reviewed-by: David Lin &lt;dtwlin@google.com&gt;
Reviewed-by: Johan Hovold &lt;johan@hovoldconsulting.com&gt;
Signed-off-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@google.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>greybus: interface: Rename *_NO_PM as *_NO_BUNDLE_ACTIVATE</title>
<updated>2016-07-26T22:29:00+00:00</updated>
<author>
<name>Viresh Kumar</name>
<email>viresh.kumar@linaro.org</email>
</author>
<published>2016-07-26T20:41:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=47cbaf5e55a6906f404da06cab652cd19aa37537'/>
<id>47cbaf5e55a6906f404da06cab652cd19aa37537</id>
<content type='text'>
Its a special quirk just for the bootrom as it doesn't have any PM
operations implemented. As the greybus bootrom bundle driver doesn't try
to do any PM stuff, this quirk is used only to skip bundle activate
operation currently.

Rename the GB_INTERFACE_QUIRK_NO_PM quirk to
GB_INTERFACE_QUIRK_NO_BUNDLE_ACTIVATE to suit its purpose better as the
GB_INTERFACE_QUIRK_NO_PM will be used for other quirk now.

Reviewed-by: Johan Hovold &lt;johan@hovoldconsulting.com&gt;
Signed-off-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@google.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Its a special quirk just for the bootrom as it doesn't have any PM
operations implemented. As the greybus bootrom bundle driver doesn't try
to do any PM stuff, this quirk is used only to skip bundle activate
operation currently.

Rename the GB_INTERFACE_QUIRK_NO_PM quirk to
GB_INTERFACE_QUIRK_NO_BUNDLE_ACTIVATE to suit its purpose better as the
GB_INTERFACE_QUIRK_NO_PM will be used for other quirk now.

Reviewed-by: Johan Hovold &lt;johan@hovoldconsulting.com&gt;
Signed-off-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@google.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>greybus: control: suppress bundle_activate() for bootrom</title>
<updated>2016-07-21T23:36:48+00:00</updated>
<author>
<name>Johan Hovold</name>
<email>johan@hovoldconsulting.com</email>
</author>
<published>2016-07-21T12:24:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=2358024b67fccc07b95c5d8e637927acdb8e30fa'/>
<id>2358024b67fccc07b95c5d8e637927acdb8e30fa</id>
<content type='text'>
We always knew backward compatibility with the ES3 bootrom, which was
finalised about a year ago, would be a pain. Here we go again.

The bootrom does not support control requests added after it was burnt
into ROM for obvious reasons. This means that we need to suppress
sending the new bundle_activate() operation to any interface executing
the legacy bootrom.

Do so by adding a new NO_PM interface quirk (we can use the
control-protocol version for this later once we bump it).

Note that the interface-disable path (e.g. for power down) is already
handled by the FORCED_DISABLE quirk, and that the suspend/resume
paths are currently avoided by making sure that the bootrom bundle
never suspends.

Signed-off-by: Johan Hovold &lt;johan@hovoldconsulting.com&gt;
Reviewed-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
Acked-by: Bartosz Golaszewski &lt;bgolaszewski@baylibre.com&gt;
Tested-by: Bartosz Golaszewski &lt;bgolaszewski@baylibre.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@google.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We always knew backward compatibility with the ES3 bootrom, which was
finalised about a year ago, would be a pain. Here we go again.

The bootrom does not support control requests added after it was burnt
into ROM for obvious reasons. This means that we need to suppress
sending the new bundle_activate() operation to any interface executing
the legacy bootrom.

Do so by adding a new NO_PM interface quirk (we can use the
control-protocol version for this later once we bump it).

Note that the interface-disable path (e.g. for power down) is already
handled by the FORCED_DISABLE quirk, and that the suspend/resume
paths are currently avoided by making sure that the bootrom bundle
never suspends.

Signed-off-by: Johan Hovold &lt;johan@hovoldconsulting.com&gt;
Reviewed-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
Acked-by: Bartosz Golaszewski &lt;bgolaszewski@baylibre.com&gt;
Tested-by: Bartosz Golaszewski &lt;bgolaszewski@baylibre.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@google.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>greybus: interface: fix interface_id attribute group</title>
<updated>2016-07-21T17:07:00+00:00</updated>
<author>
<name>Johan Hovold</name>
<email>johan@hovoldconsulting.com</email>
</author>
<published>2016-07-21T10:48:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=b5d1d1282bbb318a67fdcfc8ef2615e93d1d1724'/>
<id>b5d1d1282bbb318a67fdcfc8ef2615e93d1d1724</id>
<content type='text'>
All interfaces, regardless of type, should have an interface_id
attribute reflecting its position on the frame.

This has been reported to cause an assertion failure in libmoduleutil
for dummy modules.

Testing done: Verified that the attribute is present for registered
dummy interfaces.

Reported-by: Gjorgji Rosikopulos &lt;grosikopulos@mm-sol.com&gt;
Tested-by: Gjorgji Rosikopulos &lt;grosikopulos@mm-sol.com&gt;
Reviewed-by: Patrick Titiano &lt;ptitiano@baylibre.com&gt;
Signed-off-by: Johan Hovold &lt;johan@hovoldconsulting.com&gt;
Reviewed-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@google.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
All interfaces, regardless of type, should have an interface_id
attribute reflecting its position on the frame.

This has been reported to cause an assertion failure in libmoduleutil
for dummy modules.

Testing done: Verified that the attribute is present for registered
dummy interfaces.

Reported-by: Gjorgji Rosikopulos &lt;grosikopulos@mm-sol.com&gt;
Tested-by: Gjorgji Rosikopulos &lt;grosikopulos@mm-sol.com&gt;
Reviewed-by: Patrick Titiano &lt;ptitiano@baylibre.com&gt;
Signed-off-by: Johan Hovold &lt;johan@hovoldconsulting.com&gt;
Reviewed-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@google.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>greybus: interface: hibernate UniPro link in activation error path</title>
<updated>2016-07-20T17:16:54+00:00</updated>
<author>
<name>Johan Hovold</name>
<email>johan@hovoldconsulting.com</email>
</author>
<published>2016-07-20T14:40:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=4f7e413b2d2d2825dbb36b73f06e69514022b132'/>
<id>4f7e413b2d2d2825dbb36b73f06e69514022b132</id>
<content type='text'>
To be well-behaved, we should hibernate the link before disabling UniPro
in case the link has already been established (i.e. when the interface
type has been detected as UniPro or Greybus).

Signed-off-by: Johan Hovold &lt;johan@hovoldconsulting.com&gt;
Reviewed-by: Alex Elder &lt;elder@linaro.org&gt;
Reviewed-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
Reviewed-by: Sandeep Patil &lt;sspatil@google.com&gt;
Reviewed-by: Patrick Titiano &lt;ptitiano@baylibre.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@google.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
To be well-behaved, we should hibernate the link before disabling UniPro
in case the link has already been established (i.e. when the interface
type has been detected as UniPro or Greybus).

Signed-off-by: Johan Hovold &lt;johan@hovoldconsulting.com&gt;
Reviewed-by: Alex Elder &lt;elder@linaro.org&gt;
Reviewed-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
Reviewed-by: Sandeep Patil &lt;sspatil@google.com&gt;
Reviewed-by: Patrick Titiano &lt;ptitiano@baylibre.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@google.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>greybus: interface: add power_state attribute</title>
<updated>2016-07-20T17:16:54+00:00</updated>
<author>
<name>Viresh Kumar</name>
<email>viresh.kumar@linaro.org</email>
</author>
<published>2016-07-20T14:40:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=93e29c8530881766837e62088d54ffb733f8bc2a'/>
<id>93e29c8530881766837e62088d54ffb733f8bc2a</id>
<content type='text'>
User space needs the capability of powering ON or OFF an Interface for
multiple use cases. For example, userspace may want an Interface
currently in its S3 boot stage, to boot into its S2 Loader stage to
update the bridge SPI flash. Or the Interface is running its S2 Loader
stage and updated the SPI flash with the new S2 Loader firmware and
wants to boot into the new S2 Loader firmware.

Another use case can be, Android wants to disable (not eject) a
misbehaving module.

Add a 'power_state' sysfs file within the interface directory. It can be
read to know the current power state of the Interface and can be written
to power ON or power OFF an Interface. Possible values that can be
written or read from it are: "on" and "off".

Testing Done: Tested by enabling/disabling camera module on EVT 2.0.

Signed-off-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
CC: David Lin &lt;dtwlin@google.com&gt;
Reviewed-by: Johan Hovold &lt;johan@hovoldconsulting.com&gt;
[johan: drop es3-quirk duplication, add to power attribute group, fix
return value, drop tags ]
Signed-off-by: Johan Hovold &lt;johan@hovoldconsulting.com&gt;
Reviewed-by: Alex Elder &lt;elder@linaro.org&gt;
Reviewed-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
Reviewed-by: Sandeep Patil &lt;sspatil@google.com&gt;
Reviewed-by: Patrick Titiano &lt;ptitiano@baylibre.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@google.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
User space needs the capability of powering ON or OFF an Interface for
multiple use cases. For example, userspace may want an Interface
currently in its S3 boot stage, to boot into its S2 Loader stage to
update the bridge SPI flash. Or the Interface is running its S2 Loader
stage and updated the SPI flash with the new S2 Loader firmware and
wants to boot into the new S2 Loader firmware.

Another use case can be, Android wants to disable (not eject) a
misbehaving module.

Add a 'power_state' sysfs file within the interface directory. It can be
read to know the current power state of the Interface and can be written
to power ON or power OFF an Interface. Possible values that can be
written or read from it are: "on" and "off".

Testing Done: Tested by enabling/disabling camera module on EVT 2.0.

Signed-off-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
CC: David Lin &lt;dtwlin@google.com&gt;
Reviewed-by: Johan Hovold &lt;johan@hovoldconsulting.com&gt;
[johan: drop es3-quirk duplication, add to power attribute group, fix
return value, drop tags ]
Signed-off-by: Johan Hovold &lt;johan@hovoldconsulting.com&gt;
Reviewed-by: Alex Elder &lt;elder@linaro.org&gt;
Reviewed-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
Reviewed-by: Sandeep Patil &lt;sspatil@google.com&gt;
Reviewed-by: Patrick Titiano &lt;ptitiano@baylibre.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@google.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
