<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/include/linux/backlight.h, branch v4.6-rc6</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>backlight: Change the return type of backlight_update_status() to int</title>
<updated>2015-06-23T14:47:35+00:00</updated>
<author>
<name>Hyungwon Hwang</name>
<email>human.hwang@samsung.com</email>
</author>
<published>2015-05-28T07:25:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=cca0ba2df3d4000bacd9b7807d46ffafac62d53a'/>
<id>cca0ba2df3d4000bacd9b7807d46ffafac62d53a</id>
<content type='text'>
Backlight device returns the result of update_status(), but
backlight_update_status() ignores it. So the consumers cannot confirm the
result of their function call. This patch makes the result to be returned
back for consumers.

Signed-off-by: Hyungwon Hwang &lt;human.hwang@samsung.com&gt;
Acked-by: Jingoo Han &lt;jingoohan1@gmail.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>
Backlight device returns the result of update_status(), but
backlight_update_status() ignores it. So the consumers cannot confirm the
result of their function call. This patch makes the result to be returned
back for consumers.

Signed-off-by: Hyungwon Hwang &lt;human.hwang@samsung.com&gt;
Acked-by: Jingoo Han &lt;jingoohan1@gmail.com&gt;
Signed-off-by: Lee Jones &lt;lee.jones@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>backlight: Add backlight device (un)registration notification</title>
<updated>2014-05-26T23:29:01+00:00</updated>
<author>
<name>Hans de Goede</name>
<email>hdegoede@redhat.com</email>
</author>
<published>2014-05-21T13:39:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=3cc6919bd61315ea60baf95f3f9868aacfd1ace4'/>
<id>3cc6919bd61315ea60baf95f3f9868aacfd1ace4</id>
<content type='text'>
Some firmware drivers, ie acpi-video want to get themselves out of the
way (in some cases) when their also is a raw backlight device available.

Due to module loading ordering being unknown, acpi-video cannot be certain
that the backlight_device_registered(BACKLIGHT_RAW) it does for this is
the final verdict wrt there being a BACKLIGHT_RAW device.

By adding notification acpi-video can listen for backlight devices showing
up after it has loaded, and unregister its backlight device if desired.

Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Acked-by: Jingoo Han &lt;jg1.han@samsung.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>
Some firmware drivers, ie acpi-video want to get themselves out of the
way (in some cases) when their also is a raw backlight device available.

Due to module loading ordering being unknown, acpi-video cannot be certain
that the backlight_device_registered(BACKLIGHT_RAW) it does for this is
the final verdict wrt there being a BACKLIGHT_RAW device.

By adding notification acpi-video can listen for backlight devices showing
up after it has loaded, and unregister its backlight device if desired.

Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Acked-by: Jingoo Han &lt;jg1.han@samsung.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&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.toradex.cn/cgit/linux-toradex.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.toradex.cn/cgit/linux-toradex.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>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.toradex.cn/cgit/linux-toradex.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>backlight: add of_find_backlight_by_node()</title>
<updated>2012-12-18T01:15:16+00:00</updated>
<author>
<name>Thierry Reding</name>
<email>thierry.reding@avionic-design.de</email>
</author>
<published>2012-12-18T00:01:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=762a936fba7bd9225ca9a96e4860f6969b6b5670'/>
<id>762a936fba7bd9225ca9a96e4860f6969b6b5670</id>
<content type='text'>
This function finds the struct backlight_device for a given device tree
node.  A dummy function is provided so that it safely compiles out if OF
support is disabled.

[akpm@linux-foundation.org: Don't use IS_ENABLED(CONFIG_OF)]
Signed-off-by: Thierry Reding &lt;thierry.reding@avionic-design.de&gt;
Acked-by: Jingoo Han &lt;jg1.han@samsung.com&gt;
Reviewed-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;
Cc: Thierry Reding &lt;thierry.reding@avionic-design.de&gt;
Reviewed-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;
Acked-by: Jingoo Han &lt;jg1.han@samsung.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>
This function finds the struct backlight_device for a given device tree
node.  A dummy function is provided so that it safely compiles out if OF
support is disabled.

[akpm@linux-foundation.org: Don't use IS_ENABLED(CONFIG_OF)]
Signed-off-by: Thierry Reding &lt;thierry.reding@avionic-design.de&gt;
Acked-by: Jingoo Han &lt;jg1.han@samsung.com&gt;
Reviewed-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;
Cc: Thierry Reding &lt;thierry.reding@avionic-design.de&gt;
Reviewed-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;
Acked-by: Jingoo Han &lt;jg1.han@samsung.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: add backlight type</title>
<updated>2011-03-23T00:43:59+00:00</updated>
<author>
<name>Matthew Garrett</name>
<email>mjg@redhat.com</email>
</author>
<published>2011-03-22T23:30:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=bb7ca747f8d6243b3943c5b133048652020f4a50'/>
<id>bb7ca747f8d6243b3943c5b133048652020f4a50</id>
<content type='text'>
There may be multiple ways of controlling the backlight on a given
machine.  Allow drivers to expose the type of interface they are
providing, making it possible for userspace to make appropriate policy
decisions.

Signed-off-by: Matthew Garrett &lt;mjg@redhat.com&gt;
Cc: Richard Purdie &lt;rpurdie@rpsys.net&gt;
Cc: Chris Wilson &lt;chris@chris-wilson.co.uk&gt;
Cc: David Airlie &lt;airlied@linux.ie&gt;
Cc: Alex Deucher &lt;alexdeucher@gmail.com&gt;
Cc: Ben Skeggs &lt;bskeggs@redhat.com&gt;
Cc: Zhang Rui &lt;rui.zhang@intel.com&gt;
Cc: Len Brown &lt;lenb@kernel.org&gt;
Cc: Jesse Barnes &lt;jbarnes@virtuousgeek.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>
There may be multiple ways of controlling the backlight on a given
machine.  Allow drivers to expose the type of interface they are
providing, making it possible for userspace to make appropriate policy
decisions.

Signed-off-by: Matthew Garrett &lt;mjg@redhat.com&gt;
Cc: Richard Purdie &lt;rpurdie@rpsys.net&gt;
Cc: Chris Wilson &lt;chris@chris-wilson.co.uk&gt;
Cc: David Airlie &lt;airlied@linux.ie&gt;
Cc: Alex Deucher &lt;alexdeucher@gmail.com&gt;
Cc: Ben Skeggs &lt;bskeggs@redhat.com&gt;
Cc: Zhang Rui &lt;rui.zhang@intel.com&gt;
Cc: Len Brown &lt;lenb@kernel.org&gt;
Cc: Jesse Barnes &lt;jbarnes@virtuousgeek.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: Allow properties to be passed at registration</title>
<updated>2010-03-16T19:47:54+00:00</updated>
<author>
<name>Matthew Garrett</name>
<email>mjg@redhat.com</email>
</author>
<published>2010-02-17T21:39:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=a19a6ee6cad2b20292a774c2f56ba8039b0fac9c'/>
<id>a19a6ee6cad2b20292a774c2f56ba8039b0fac9c</id>
<content type='text'>
Values such as max_brightness should be set before backlights are
registered, but the current API doesn't allow that. Add a parameter to
backlight_device_register and update drivers to ensure that they
set this correctly.

Signed-off-by: Matthew Garrett &lt;mjg@redhat.com&gt;
Signed-off-by: Richard Purdie &lt;rpurdie@linux.intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Values such as max_brightness should be set before backlights are
registered, but the current API doesn't allow that. Add a parameter to
backlight_device_register and update drivers to ensure that they
set this correctly.

Signed-off-by: Matthew Garrett &lt;mjg@redhat.com&gt;
Signed-off-by: Richard Purdie &lt;rpurdie@linux.intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>backlight: Add backlight_device parameter to check_fb</title>
<updated>2010-03-16T19:47:54+00:00</updated>
<author>
<name>Bruno Prémont</name>
<email>bonbons@linux-vserver.org</email>
</author>
<published>2010-02-20T23:20:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=57e148b6a975980944f4466ccb669b1d02dfc6a1'/>
<id>57e148b6a975980944f4466ccb669b1d02dfc6a1</id>
<content type='text'>
check_fb from backlight_ops lacks a reference to the backlight_device
that's being referred to. Add this parameter so a backlight_device
can be mapped to a single framebuffer, especially if the same driver
handles multiple devices on a single system.

Signed-off-by: Bruno Prémont &lt;bonbons@linux-vserver.org&gt;
Signed-off-by: Richard Purdie &lt;rpurdie@linux.intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
check_fb from backlight_ops lacks a reference to the backlight_device
that's being referred to. Add this parameter so a backlight_device
can be mapped to a single framebuffer, especially if the same driver
handles multiple devices on a single system.

Signed-off-by: Bruno Prémont &lt;bonbons@linux-vserver.org&gt;
Signed-off-by: Richard Purdie &lt;rpurdie@linux.intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>backlight: Revert some const qualifiers</title>
<updated>2010-03-16T19:47:53+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>rpurdie@linux.intel.com</email>
</author>
<published>2010-01-18T14:16:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=b4144e4f6e3b448d322095ca08af393682a69e33'/>
<id>b4144e4f6e3b448d322095ca08af393682a69e33</id>
<content type='text'>
9905a43b2d563e6f89e4c63c4278ada03f2ebb14 went a little to far with const
qualifiers as there are legitiment cases where the function pointers
can change (machine specific setup code for example).

Signed-off-by: Richard Purdie &lt;rpurdie@linux.intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
9905a43b2d563e6f89e4c63c4278ada03f2ebb14 went a little to far with const
qualifiers as there are legitiment cases where the function pointers
can change (machine specific setup code for example).

Signed-off-by: Richard Purdie &lt;rpurdie@linux.intel.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
