<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/drivers/video/backlight/backlight.c, branch v4.10</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>video / backlight: remove the backlight_device_registered API</title>
<updated>2016-05-04T21:41:14+00:00</updated>
<author>
<name>Aaron Lu</name>
<email>aaron.lu@intel.com</email>
</author>
<published>2016-04-27T12:45:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=01c3664de62f89f6777e59173ad8e20b5a4c267f'/>
<id>01c3664de62f89f6777e59173ad8e20b5a4c267f</id>
<content type='text'>
Since we will need the backlight_device_get_by_type API, we can use it
instead of the backlight_device_registered API whenever necessary so
remove the backlight_device_registered API.

Signed-off-by: Aaron Lu &lt;aaron.lu@intel.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>
Since we will need the backlight_device_get_by_type API, we can use it
instead of the backlight_device_registered API whenever necessary so
remove the backlight_device_registered API.

Signed-off-by: Aaron Lu &lt;aaron.lu@intel.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>video / backlight: add two APIs for drivers to use</title>
<updated>2016-05-04T21:41:14+00:00</updated>
<author>
<name>Aaron Lu</name>
<email>aaron.lu@intel.com</email>
</author>
<published>2016-04-27T12:45:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=f6a4790a5471d7cba406d87f6b41323f40bb93d2'/>
<id>f6a4790a5471d7cba406d87f6b41323f40bb93d2</id>
<content type='text'>
It is useful to get the backlight device's pointer and use it to set
backlight in some cases(the following patch will make use of it) so add
the two APIs and export them.

Signed-off-by: Aaron Lu &lt;aaron.lu@intel.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>
It is useful to get the backlight device's pointer and use it to set
backlight in some cases(the following patch will make use of it) so add
the two APIs and export them.

Signed-off-by: Aaron Lu &lt;aaron.lu@intel.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: Show brightness even if get_brightness is not implemented</title>
<updated>2014-06-23T12:26:02+00:00</updated>
<author>
<name>Andrzej Hajda</name>
<email>a.hajda@samsung.com</email>
</author>
<published>2014-05-30T10:10:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=b3de3402e5ab8edfbbdbbb86393692431522f6d3'/>
<id>b3de3402e5ab8edfbbdbbb86393692431522f6d3</id>
<content type='text'>
Many implementations of get_brightness operation returns only value
of props.brightness field. This change makes such implementations
unnecessary.

Acked-by: Jingoo Han &lt;jg1.han@samsung.com&gt;
Signed-off-by: Andrzej Hajda &lt;a.hajda@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>
Many implementations of get_brightness operation returns only value
of props.brightness field. This change makes such implementations
unnecessary.

Acked-by: Jingoo Han &lt;jg1.han@samsung.com&gt;
Signed-off-by: Andrzej Hajda &lt;a.hajda@samsung.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>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.toradex.cn/cgit/linux-toradex.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.toradex.cn/cgit/linux-toradex.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.toradex.cn/cgit/linux-toradex.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.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>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.toradex.cn/cgit/linux-toradex.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>
</feed>
