<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/drivers/video/backlight/backlight.c, branch v3.15</title>
<subtitle>Linux kernel source tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/'/>
<entry>
<title>Merge tag 'backlight-for-linus-3.15' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight</title>
<updated>2014-04-10T15:52:35+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2014-04-10T15:52:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=edf2377c4776ce20ae990f27f0248e88a37e25c4'/>
<id>edf2377c4776ce20ae990f27f0248e88a37e25c4</id>
<content type='text'>
Pull backlight changes from Lee Jones:
 - core: call put_device() instead of kfree()
 - gpio-backlight: add DT support
 - lm3639_bl driver: use managed resources

* tag 'backlight-for-linus-3.15' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight:
  backlight: lm3639: Use devm_backlight_device_register()
  backlight: gpio-backlight: Add DT support
  backlight: core: Replace kfree with put_device
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Pull backlight changes from Lee Jones:
 - core: call put_device() instead of kfree()
 - gpio-backlight: add DT support
 - lm3639_bl driver: use managed resources

* tag 'backlight-for-linus-3.15' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight:
  backlight: lm3639: Use devm_backlight_device_register()
  backlight: gpio-backlight: Add DT support
  backlight: core: Replace kfree with put_device
</pre>
</div>
</content>
</entry>
<entry>
<title>backlight: core: Replace kfree with put_device</title>
<updated>2014-04-08T12:20:39+00:00</updated>
<author>
<name>Levente Kurusa</name>
<email>levex@linux.com</email>
</author>
<published>2014-02-07T08:43:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=35762a47c0a24072a689cbd98ecf8c62b037ef8a'/>
<id>35762a47c0a24072a689cbd98ecf8c62b037ef8a</id>
<content type='text'>
As per the comments on device_register, we shouldn't call kfree()
right after a device_register() failure. Instead call put_device(),
which in turn will call bl_device_release resulting in a kfree to the
full structure.

Signed-off-by: Levente Kurusa &lt;levex@linux.com&gt;
Acked-by: Jingoo Han &lt;jg1.han@samsung.com&gt;
Signed-off-by: Lee Jones &lt;lee.jones@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
As per the comments on device_register, we shouldn't call kfree()
right after a device_register() failure. Instead call put_device(),
which in turn will call bl_device_release resulting in a kfree to the
full structure.

Signed-off-by: Levente Kurusa &lt;levex@linux.com&gt;
Acked-by: Jingoo Han &lt;jg1.han@samsung.com&gt;
Signed-off-by: Lee Jones &lt;lee.jones@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>backlight: update backlight status when necessary</title>
<updated>2014-04-03T23:21:09+00:00</updated>
<author>
<name>Liu Ying</name>
<email>Ying.Liu@freescale.com</email>
</author>
<published>2014-04-03T21:48:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=8c16f3303c3410d4af19c8bdc73b74c83c042e87'/>
<id>8c16f3303c3410d4af19c8bdc73b74c83c042e87</id>
<content type='text'>
We don't have to update a backlight status every time a blanking or
unblanking event comes because the backlight status may have already
been what we want.  Another thought is that one backlight device may be
shared by multiple framebuffers.  We don't hope blanking one of the
framebuffers may turn the backlight off for all the other framebuffers,
since they are likely being active to display something.

This patch makes the backlight status be updated only when the relevant
backlight device's use count changes from zero to one or from one to
zero.

Signed-off-by: Liu Ying &lt;Ying.Liu@freescale.com&gt;
Cc: Jingoo Han &lt;jg1.han@samsung.com&gt;
Cc: Jean-Christophe PLAGNIOL-VILLARD &lt;plagnioj@jcrosoft.com&gt;
Cc: Tomi Valkeinen &lt;tomi.valkeinen@ti.com&gt;
Cc: Jani Nikula &lt;jani.nikula@linux.intel.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We don't have to update a backlight status every time a blanking or
unblanking event comes because the backlight status may have already
been what we want.  Another thought is that one backlight device may be
shared by multiple framebuffers.  We don't hope blanking one of the
framebuffers may turn the backlight off for all the other framebuffers,
since they are likely being active to display something.

This patch makes the backlight status be updated only when the relevant
backlight device's use count changes from zero to one or from one to
zero.

Signed-off-by: Liu Ying &lt;Ying.Liu@freescale.com&gt;
Cc: Jingoo Han &lt;jg1.han@samsung.com&gt;
Cc: Jean-Christophe PLAGNIOL-VILLARD &lt;plagnioj@jcrosoft.com&gt;
Cc: Tomi Valkeinen &lt;tomi.valkeinen@ti.com&gt;
Cc: Jani Nikula &lt;jani.nikula@linux.intel.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>backlight: update bd state &amp; fb_blank properties when necessary</title>
<updated>2014-04-03T23:21:09+00:00</updated>
<author>
<name>Liu Ying</name>
<email>Ying.Liu@freescale.com</email>
</author>
<published>2014-04-03T21:48:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=a55944ca82d287ca099ca90413af857af9086773'/>
<id>a55944ca82d287ca099ca90413af857af9086773</id>
<content type='text'>
We don't have to update the state and fb_blank properties of a backlight
device every time a blanking or unblanking event comes because they may
have already been what we want.  Another thought is that one backlight
device may be shared by multiple framebuffers.  The backlight driver
should take the backlight device as a resource shared by all the
associated framebuffers.

This patch adds some logic to record each framebuffer's backlight usage
to determine the backlight device use count and whether the two
properties should be updated or not.  To be more specific, only one
unblank operation on a certain blanked framebuffer may increase the
backlight device's use count by one, while one blank operation on a
certain unblanked framebuffer may decrease the use count by one, because
the userspace is likely to unblank an unblanked framebuffer or blank a
blanked framebuffer.

Signed-off-by: Liu Ying &lt;Ying.Liu@freescale.com&gt;
Cc: Jingoo Han &lt;jg1.han@samsung.com&gt;
Cc: Jean-Christophe PLAGNIOL-VILLARD &lt;plagnioj@jcrosoft.com&gt;
Cc: Tomi Valkeinen &lt;tomi.valkeinen@ti.com&gt;
Cc: Jani Nikula &lt;jani.nikula@linux.intel.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We don't have to update the state and fb_blank properties of a backlight
device every time a blanking or unblanking event comes because they may
have already been what we want.  Another thought is that one backlight
device may be shared by multiple framebuffers.  The backlight driver
should take the backlight device as a resource shared by all the
associated framebuffers.

This patch adds some logic to record each framebuffer's backlight usage
to determine the backlight device use count and whether the two
properties should be updated or not.  To be more specific, only one
unblank operation on a certain blanked framebuffer may increase the
backlight device's use count by one, while one blank operation on a
certain unblanked framebuffer may decrease the use count by one, because
the userspace is likely to unblank an unblanked framebuffer or blank a
blanked framebuffer.

Signed-off-by: Liu Ying &lt;Ying.Liu@freescale.com&gt;
Cc: Jingoo Han &lt;jg1.han@samsung.com&gt;
Cc: Jean-Christophe PLAGNIOL-VILLARD &lt;plagnioj@jcrosoft.com&gt;
Cc: Tomi Valkeinen &lt;tomi.valkeinen@ti.com&gt;
Cc: Jani Nikula &lt;jani.nikula@linux.intel.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>backlight: introduce backlight_device_registered</title>
<updated>2013-10-15T23:16:04+00:00</updated>
<author>
<name>Aaron Lu</name>
<email>aaron.lu@intel.com</email>
</author>
<published>2013-10-11T13:27:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=5915a3db0c3983f1cd5e046bf70086c7d0c686d2'/>
<id>5915a3db0c3983f1cd5e046bf70086c7d0c686d2</id>
<content type='text'>
Introduce a new API for modules to query if a specific type of backlight
device has been registered. This is useful for some backlight device
provider module (e.g. ACPI video) to know if a native control
interface(e.g. the interface created by i915) is available and then do
things accordingly (e.g. avoid registering its own on Win8 systems).

Signed-off-by: Aaron Lu &lt;aaron.lu@intel.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Introduce a new API for modules to query if a specific type of backlight
device has been registered. This is useful for some backlight device
provider module (e.g. ACPI video) to know if a native control
interface(e.g. the interface created by i915) is available and then do
things accordingly (e.g. avoid registering its own on Win8 systems).

Signed-off-by: Aaron Lu &lt;aaron.lu@intel.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>video: backlight: convert class code to use dev_groups</title>
<updated>2013-07-25T23:34:40+00:00</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2013-07-24T22:05:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=ea1bb7064fd6972ef00a93ba882a2f38450b273e'/>
<id>ea1bb7064fd6972ef00a93ba882a2f38450b273e</id>
<content type='text'>
The dev_attrs field of struct class is going away soon, dev_groups
should be used instead.  This converts the video backlight class code to
use the correct field.

Cc: Richard Purdie &lt;rpurdie@rpsys.net&gt;
Acked-by: Jingoo Han &lt;jg1.han@samsung.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The dev_attrs field of struct class is going away soon, dev_groups
should be used instead.  This converts the video backlight class code to
use the correct field.

Cc: Richard Purdie &lt;rpurdie@rpsys.net&gt;
Acked-by: Jingoo Han &lt;jg1.han@samsung.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>backlight: convert from legacy pm ops to dev_pm_ops</title>
<updated>2013-07-03T23:07:43+00:00</updated>
<author>
<name>Shuah Khan</name>
<email>shuah.kh@samsung.com</email>
</author>
<published>2013-07-03T22:05:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=3601792e7b68150420ea8dc129e26e167c0484d8'/>
<id>3601792e7b68150420ea8dc129e26e167c0484d8</id>
<content type='text'>
Convert drivers/video/backlight/class to use dev_pm_ops for power
management and remove Legacy PM ops hooks.

With this change, backlight class registers suspend/resume callbacks via
class-&gt;pm (dev_pm_ops) instead of Legacy class-&gt;suspend/resume.  When
__device_suspend() runs call-backs, it will find class-&gt;pm ops for the
backlight class.

[jg1.han@samsung.com: add CONFIG_PM_SLEEP to suspend/resume functions]
Signed-off-by: Shuah Khan &lt;shuah.kh@samsung.com&gt;
Signed-off-by: Jingoo Han &lt;jg1.han@samsung.com&gt;
Cc: Shuah Khan &lt;shuahkhan@gmail.com&gt;
Cc: Jingoo Han &lt;jg1.han@samsung.com&gt;
Cc: Shuah Khan &lt;shuahkhan@gmail.com&gt;
Cc: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Convert drivers/video/backlight/class to use dev_pm_ops for power
management and remove Legacy PM ops hooks.

With this change, backlight class registers suspend/resume callbacks via
class-&gt;pm (dev_pm_ops) instead of Legacy class-&gt;suspend/resume.  When
__device_suspend() runs call-backs, it will find class-&gt;pm ops for the
backlight class.

[jg1.han@samsung.com: add CONFIG_PM_SLEEP to suspend/resume functions]
Signed-off-by: Shuah Khan &lt;shuah.kh@samsung.com&gt;
Signed-off-by: Jingoo Han &lt;jg1.han@samsung.com&gt;
Cc: Shuah Khan &lt;shuahkhan@gmail.com&gt;
Cc: Jingoo Han &lt;jg1.han@samsung.com&gt;
Cc: Shuah Khan &lt;shuahkhan@gmail.com&gt;
Cc: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>backlight: add devm_backlight_device_{register,unregister}()</title>
<updated>2013-07-03T23:07:43+00:00</updated>
<author>
<name>Jingoo Han</name>
<email>jg1.han@samsung.com</email>
</author>
<published>2013-07-03T22:05:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=8318fde4ac78f6793b1cbaf57659902253a61617'/>
<id>8318fde4ac78f6793b1cbaf57659902253a61617</id>
<content type='text'>
These functions allow the driver core to automatically clean up any
allocation made by backlight drivers.  Thus it simplifies the error
paths.

Signed-off-by: Jingoo Han &lt;jg1.han@samsung.com&gt;
Cc: Tejun Heo &lt;tj@kernel.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
These functions allow the driver core to automatically clean up any
allocation made by backlight drivers.  Thus it simplifies the error
paths.

Signed-off-by: Jingoo Han &lt;jg1.han@samsung.com&gt;
Cc: Tejun Heo &lt;tj@kernel.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>drivers: avoid format string in dev_set_name</title>
<updated>2013-07-03T23:07:41+00:00</updated>
<author>
<name>Kees Cook</name>
<email>keescook@chromium.org</email>
</author>
<published>2013-07-03T22:04:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=02aa2a37636c8fa4fb9322d91be46ff8225b7de0'/>
<id>02aa2a37636c8fa4fb9322d91be46ff8225b7de0</id>
<content type='text'>
Calling dev_set_name with a single paramter causes it to be handled as a
format string.  Many callers are passing potentially dynamic string
content, so use "%s" in those cases to avoid any potential accidents,
including wrappers like device_create*() and bdi_register().

Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Calling dev_set_name with a single paramter causes it to be handled as a
format string.  Many callers are passing potentially dynamic string
content, so use "%s" in those cases to avoid any potential accidents,
including wrappers like device_create*() and bdi_register().

Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>backlight: fix class_find_device() arguments</title>
<updated>2013-02-07T00:43:02+00:00</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2013-02-07T00:43:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=3213f631da786bee317363d251a0cc54b74bc827'/>
<id>3213f631da786bee317363d251a0cc54b74bc827</id>
<content type='text'>
Michał's previous patch missed this backlight check to fix up the
class_find_device() arguments.

Reported-by: kbuild test robot &lt;fengguang.wu@intel.com&gt;
Cc: Michał Mirosław &lt;mirq-linux@rere.qmqm.pl&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Michał's previous patch missed this backlight check to fix up the
class_find_device() arguments.

Reported-by: kbuild test robot &lt;fengguang.wu@intel.com&gt;
Cc: Michał Mirosław &lt;mirq-linux@rere.qmqm.pl&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
