<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/phy/phy-core.c, branch v3.16</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v3.16</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v3.16'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2014-07-12T01:23:49Z</updated>
<entry>
<title>phy: core: Fix error path in phy_create()</title>
<updated>2014-07-12T01:23:49Z</updated>
<author>
<name>Roger Quadros</name>
<email>rogerq@ti.com</email>
</author>
<published>2014-07-10T06:25:02Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e73b49f1c4e75c44d62585cc3e5b9c7894b61c32'/>
<id>urn:sha1:e73b49f1c4e75c44d62585cc3e5b9c7894b61c32</id>
<content type='text'>
Prevent resources from being freed twice in case device_add() call
fails within phy_create(). Also use ida_simple_remove() instead of
ida_remove() as we had used ida_simple_get() to allocate the ida.

Cc: 3.13+ &lt;stable@vger.kernel.org&gt; # 3.13+
Signed-off-by: Roger Quadros &lt;rogerq@ti.com&gt;
Signed-off-by: Kishon Vijay Abraham I &lt;kishon@ti.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>phy: fix kernel oops in phy_lookup()</title>
<updated>2014-04-24T19:53:38Z</updated>
<author>
<name>Sergei Shtylyov</name>
<email>sergei.shtylyov@cogentembedded.com</email>
</author>
<published>2014-04-19T03:21:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=743bb387a1edbf1ebbba6cf77c1af3e488886c39'/>
<id>urn:sha1:743bb387a1edbf1ebbba6cf77c1af3e488886c39</id>
<content type='text'>
The kernel oopses in phy_lookup() due to 'phy-&gt;init_data' being NULL if we
register PHYs from a device tree probing driver and then call phy_get() on a
device that has no representation in the device tree (e.g. a PCI device).
Checking the pointer before dereferening it and skipping an interation if
it's NULL prevents this kernel oops.

Signed-off-by: Sergei Shtylyov &lt;sergei.shtylyov@cogentembedded.com&gt;
Signed-off-by: Kishon Vijay Abraham I &lt;kishon@ti.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>phy: core: Add devm_of_phy_get to phy-core</title>
<updated>2014-03-08T07:09:43Z</updated>
<author>
<name>Kamil Debski</name>
<email>k.debski@samsung.com</email>
</author>
<published>2014-03-06T11:16:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b5d682f4eb76c98f2ca5658926df43dd05cf2c37'/>
<id>urn:sha1:b5d682f4eb76c98f2ca5658926df43dd05cf2c37</id>
<content type='text'>
Adding devm_of_phy_get will allow to get phys by supplying a
pointer to the struct device_node instead of struct device.

Signed-off-by: Kamil Debski &lt;k.debski@samsung.com&gt;
Reviewed-by: Tomasz Figa &lt;t.figa@samsung.com&gt;
Signed-off-by: Kishon Vijay Abraham I &lt;kishon@ti.com&gt;
</content>
</entry>
<entry>
<title>phy: core: Add an exported of_phy_get function</title>
<updated>2014-03-08T07:09:42Z</updated>
<author>
<name>Kamil Debski</name>
<email>k.debski@samsung.com</email>
</author>
<published>2014-03-06T11:16:46Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0b3f3b2c777a2f7d20c9826a190ffd5bbd288f8f'/>
<id>urn:sha1:0b3f3b2c777a2f7d20c9826a190ffd5bbd288f8f</id>
<content type='text'>
Previously the of_phy_get function took a struct device * and
was declared static. It was impossible to call it from
another driver and thus it was impossible to get phy defined
for a given node. The old function was renamed to _of_phy_get
and was left for internal use. of_phy_get function was added
and it was exported. The function enables to get a phy for
a given device tree node.

Signed-off-by: Kamil Debski &lt;k.debski@samsung.com&gt;
Reviewed-by: Tomasz Figa &lt;t.figa@samsung.com&gt;
Signed-off-by: Kishon Vijay Abraham I &lt;kishon@ti.com&gt;
</content>
</entry>
<entry>
<title>phy-core: Don't propagate -ENOSUPP from phy_pm_runtime_get_sync to caller</title>
<updated>2014-02-18T20:13:16Z</updated>
<author>
<name>Hans de Goede</name>
<email>hdegoede@redhat.com</email>
</author>
<published>2014-02-17T08:59:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=767a1b5d6ec4ac5335dde17100880347ed154ce2'/>
<id>urn:sha1:767a1b5d6ec4ac5335dde17100880347ed154ce2</id>
<content type='text'>
The phy-core allows phy_init and phy_power_on to be called multiple times,
but before this patch -ENOSUPP from phy_pm_runtime_get_sync would be
propagated to the caller for the 2nd and later calls.

Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Signed-off-by: Kishon Vijay Abraham I &lt;kishon@ti.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>phy-core: phy_get: Leave error logging to the caller</title>
<updated>2014-02-18T20:13:15Z</updated>
<author>
<name>Hans de Goede</name>
<email>hdegoede@redhat.com</email>
</author>
<published>2014-02-17T08:59:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f40037fd3677ae240978f469cc4155bf3ca7c076'/>
<id>urn:sha1:f40037fd3677ae240978f469cc4155bf3ca7c076</id>
<content type='text'>
In various cases errors may be expected, ie probe-deferral or a call to
phy_get from a driver where the use of a phy is optional.

Rather then adding all sort of complicated checks for this, and/or adding
special functions like devm_phy_get_optional, simply don't log an error,
and let deciding if get_phy returning an error really should result in a
dev_err up to the caller.

Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Signed-off-by: Kishon Vijay Abraham I &lt;kishon@ti.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>drivers: phy: Add support for optional phys</title>
<updated>2014-02-05T05:48:43Z</updated>
<author>
<name>Andrew Lunn</name>
<email>andrew@lunn.ch</email>
</author>
<published>2014-02-04T17:33:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=788a4d56ff378bff0b8e685d03a962b36903a149'/>
<id>urn:sha1:788a4d56ff378bff0b8e685d03a962b36903a149</id>
<content type='text'>
Add devm_phy_optional_get and phy_optional_get, which should be used
when the phy is optional. They does not return an error when the phy
does not exist, rather they returns NULL, which is considered as a valid
phy, but results in NOPs when used with the consumer API.

Signed-off-by: Andrew Lunn &lt;andrew@lunn.ch&gt;
Tested-by: Gregory CLEMENT &lt;gregory.clement@free-electrons.com&gt;
Acked-by: Kishon Vijay Abraham I &lt;kishon@ti.com&gt;
Signed-off-by: Jason Cooper &lt;jason@lakedaemon.net&gt;
</content>
</entry>
<entry>
<title>drivers: phy: Make NULL a valid phy reference</title>
<updated>2014-02-05T05:27:54Z</updated>
<author>
<name>Andrew Lunn</name>
<email>andrew@lunn.ch</email>
</author>
<published>2014-02-04T17:33:11Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=04c2facad8fee66c981a51852806d8923336f362'/>
<id>urn:sha1:04c2facad8fee66c981a51852806d8923336f362</id>
<content type='text'>
The common clock framework considers NULL a valid clock
reference. This makes handling optional clocks simple, in that if the
optional clock is not available, a NULL reference can be used in the
place of a real clock, simplifying the clock consumer.

Extend this concept to the phy consumer API. A NULL can be passed to
the release calls, the phy_init() and phy_exit() calls, and
phy_power_on() and phy_power_off() and a NOP is performed.

Signed-off-by: Andrew Lunn &lt;andrew@lunn.ch&gt;
Tested-by: Gregory CLEMENT &lt;gregory.clement@free-electrons.com&gt;
Acked-by: Kishon Vijay Abraham I &lt;kishon@ti.com&gt;
Signed-off-by: Jason Cooper &lt;jason@lakedaemon.net&gt;
</content>
</entry>
<entry>
<title>phy: phy-core.c: remove unnecessary initialization of local variables</title>
<updated>2013-12-24T18:22:58Z</updated>
<author>
<name>Kishon Vijay Abraham I</name>
<email>kishon@ti.com</email>
</author>
<published>2013-12-19T14:31:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d18c960430ca341e5c12a023c805ff8fd10032a6'/>
<id>urn:sha1:d18c960430ca341e5c12a023c805ff8fd10032a6</id>
<content type='text'>
There were a few places where variables are initialized unncessarily.
Remove those initializations.

Signed-off-by: Kishon Vijay Abraham I &lt;kishon@ti.com&gt;
</content>
</entry>
<entry>
<title>phy: phy-core: increment refcounting variables only on 'success'</title>
<updated>2013-12-24T18:22:58Z</updated>
<author>
<name>Kishon Vijay Abraham I</name>
<email>kishon@ti.com</email>
</author>
<published>2013-12-20T05:06:49Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=637d378cea0b463c466a61a6564cdd541d689af5'/>
<id>urn:sha1:637d378cea0b463c466a61a6564cdd541d689af5</id>
<content type='text'>
Increment 'init_count' only if the 'init' callback succeeded and decrement
'init_count' only if the 'exit' callback succeded. Increment 'power_count'
only if 'power_on' callback succeded and if it failed disable the clocks using
phy_pm_runtime_put_sync(). Also decrement 'power_count' only if 'power_off'
callback succeded and if it failed do not disable the clocks.

Reported-by: George Cherian &lt;george.cherian@ti.com&gt;
Signed-off-by: Kishon Vijay Abraham I &lt;kishon@ti.com&gt;
</content>
</entry>
</feed>
