<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/video/backlight/backlight.c, branch v6.1.168</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.1.168</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.1.168'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2022-03-08T10:47:28+00:00</updated>
<entry>
<title>backlight: backlight: Slighly simplify devm_of_find_backlight()</title>
<updated>2022-03-08T10:47:28+00:00</updated>
<author>
<name>Christophe JAILLET</name>
<email>christophe.jaillet@wanadoo.fr</email>
</author>
<published>2022-02-13T07:41:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=023a8830a62846e1cecc8da07e00c801dd0d7598'/>
<id>urn:sha1:023a8830a62846e1cecc8da07e00c801dd0d7598</id>
<content type='text'>
Use devm_add_action_or_reset() instead of devm_add_action()+hand writing
what is done in the release function, should an error occur.

This is more straightforward and saves a few lines of code.

While at it, remove a useless test in devm_backlight_release(). 'data' is
known to be not NULL when this function is called.

Signed-off-by: Christophe JAILLET &lt;christophe.jaillet@wanadoo.fr&gt;
Reviewed-by: Daniel Thompson &lt;daniel.thompson@linaro.org&gt;
Signed-off-by: Lee Jones &lt;lee.jones@linaro.org&gt;
Link: https://lore.kernel.org/r/f998a4291d865273afa0d1f85764a9ac7fbc1b64.1644738084.git.christophe.jaillet@wanadoo.fr
</content>
</entry>
<entry>
<title>backlight: Propagate errors from get_brightness()</title>
<updated>2021-09-23T09:48:00+00:00</updated>
<author>
<name>Thomas Weißschuh</name>
<email>linux@weissschuh.net</email>
</author>
<published>2021-09-07T12:47:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=563edf85ce18a90dd0a7b39e279a691d937205f6'/>
<id>urn:sha1:563edf85ce18a90dd0a7b39e279a691d937205f6</id>
<content type='text'>
backlight.h documents "struct backlight_ops-&gt;get_brightness()" to return
a negative errno on failure.

So far these errors have not been handled in the backlight core.
This leads to negative values being exposed through sysfs although only
positive values are documented to be reported.

Signed-off-by: Thomas Weißschuh &lt;linux@weissschuh.net&gt;
Reviewed-by: Daniel Thompson &lt;daniel.thompson@linaro.org&gt;
Signed-off-by: Lee Jones &lt;lee.jones@linaro.org&gt;
</content>
</entry>
<entry>
<title>video: backlight: Drop maximum brightness override for brightness zero</title>
<updated>2021-09-22T07:32:48+00:00</updated>
<author>
<name>Marek Vasut</name>
<email>marex@denx.de</email>
</author>
<published>2021-09-21T17:35:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=33a5471f8da976bf271a1ebbd6b9d163cb0cb6aa'/>
<id>urn:sha1:33a5471f8da976bf271a1ebbd6b9d163cb0cb6aa</id>
<content type='text'>
The note in c2adda27d202f ("video: backlight: Add of_find_backlight helper
in backlight.c") says that gpio-backlight uses brightness as power state.
This has been fixed since in ec665b756e6f7 ("backlight: gpio-backlight:
Correct initial power state handling") and other backlight drivers do not
require this workaround. Drop the workaround.

This fixes the case where e.g. pwm-backlight can perfectly well be set to
brightness 0 on boot in DT, which without this patch leads to the display
brightness to be max instead of off.

Fixes: c2adda27d202f ("video: backlight: Add of_find_backlight helper in backlight.c")
Cc: &lt;stable@vger.kernel.org&gt; # 5.4+
Cc: &lt;stable@vger.kernel.org&gt; # 4.19.x: ec665b756e6f7: backlight: gpio-backlight: Correct initial power state handling
Signed-off-by: Marek Vasut &lt;marex@denx.de&gt;
Acked-by: Noralf Trønnes &lt;noralf@tronnes.org&gt;
Reviewed-by: Daniel Thompson &lt;daniel.thompson@linaro.org&gt;
Signed-off-by: Lee Jones &lt;lee.jones@linaro.org&gt;
</content>
</entry>
<entry>
<title>backlight: backlight: Make of_find_backlight static</title>
<updated>2020-07-20T09:27:11+00:00</updated>
<author>
<name>Sam Ravnborg</name>
<email>sam@ravnborg.org</email>
</author>
<published>2020-07-19T08:07:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b6539a11e807c531e51ff7ad9a25c3a1b6ff7340'/>
<id>urn:sha1:b6539a11e807c531e51ff7ad9a25c3a1b6ff7340</id>
<content type='text'>
There are no external users of of_find_backlight, as they have all
changed to use the managed version. Make of_find_backlight static to
prevent new external users.

Signed-off-by: Sam Ravnborg &lt;sam@ravnborg.org&gt;
Reviewed-by: Daniel Thompson &lt;daniel.thompson@linaro.org&gt;
Signed-off-by: Lee Jones &lt;lee.jones@linaro.org&gt;
</content>
</entry>
<entry>
<title>backlight: backlight: Drop backlight_put()</title>
<updated>2020-07-20T09:27:09+00:00</updated>
<author>
<name>Sam Ravnborg</name>
<email>sam@ravnborg.org</email>
</author>
<published>2020-07-19T08:07:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=0f6a3256fd810eeca9c56cccafee46359d995138'/>
<id>urn:sha1:0f6a3256fd810eeca9c56cccafee46359d995138</id>
<content type='text'>
There are no external users of backlight_put(). Drop it and open code
the two users in backlight.c.

Signed-off-by: Sam Ravnborg &lt;sam@ravnborg.org&gt;
Reviewed-by: Daniel Thompson &lt;daniel.thompson@linaro.org&gt;
Signed-off-by: Lee Jones &lt;lee.jones@linaro.org&gt;
</content>
</entry>
<entry>
<title>backlight: backlight: Add overview and update existing doc</title>
<updated>2020-07-20T09:26:20+00:00</updated>
<author>
<name>Sam Ravnborg</name>
<email>sam@ravnborg.org</email>
</author>
<published>2020-07-19T08:07:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a1230eb2e3f44ebd1b59c547491e0c480b44aff3'/>
<id>urn:sha1:a1230eb2e3f44ebd1b59c547491e0c480b44aff3</id>
<content type='text'>
Add overview chapter to backlight.c.

Update existing kernel-doc to follow a more consistent style and drop
kernel-doc for deprecated functions.

Signed-off-by: Sam Ravnborg &lt;sam@ravnborg.org&gt;
Reviewed-by: Daniel Thompson &lt;daniel.thompson@linaro.org&gt;
Reviewed-by: Emil Velikov &lt;emil.l.velikov@gmail.com&gt;
Signed-off-by: Lee Jones &lt;lee.jones@linaro.org&gt;
</content>
</entry>
<entry>
<title>backlight: backlight: Refactor fb_notifier_callback()</title>
<updated>2020-07-20T09:17:04+00:00</updated>
<author>
<name>Sam Ravnborg</name>
<email>sam@ravnborg.org</email>
</author>
<published>2020-07-19T08:07:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=4edfe2248d21d661dbcd735e5d28a36cfa826e11'/>
<id>urn:sha1:4edfe2248d21d661dbcd735e5d28a36cfa826e11</id>
<content type='text'>
Increase readability of fb_notifier_callback() by removing
a few indent levels.

No functional change.

Signed-off-by: Sam Ravnborg &lt;sam@ravnborg.org&gt;
Reviewed-by: Daniel Thompson &lt;daniel.thompson@linaro.org&gt;
Reviewed-by: Emil Velikov &lt;emil.l.velikov@gmail.com&gt;
Signed-off-by: Lee Jones &lt;lee.jones@linaro.org&gt;
</content>
</entry>
<entry>
<title>backlight: backlight: Supply description for function args in existing Kerneldocs</title>
<updated>2020-07-06T07:11:42+00:00</updated>
<author>
<name>Lee Jones</name>
<email>lee.jones@linaro.org</email>
</author>
<published>2020-06-23T14:04:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6c05632d6341ced4c2cb431ed0e5f617cc83f5bb'/>
<id>urn:sha1:6c05632d6341ced4c2cb431ed0e5f617cc83f5bb</id>
<content type='text'>
Kerneldoc syntax is used, but not complete.  Descriptions required.

Prevents warnings like:

 drivers/video/backlight/backlight.c:329: warning: Function parameter or member 'reason' not described in 'backlight_force_update'
 drivers/video/backlight/backlight.c:354: warning: Function parameter or member 'props' not described in 'backlight_device_register'

Cc: Bartlomiej Zolnierkiewicz &lt;b.zolnierkie@samsung.com&gt;
Cc: Jamey Hicks &lt;jamey.hicks@hp.com&gt;
Cc: Andrew Zabolotny &lt;zap@homelink.ru&gt;
Signed-off-by: Lee Jones &lt;lee.jones@linaro.org&gt;
Reviewed-by: Daniel Thompson &lt;daniel.thompson@linaro.org&gt;
Reviewed-by: Sam Ravnborg &lt;sam@ravnborg.org&gt;
Signed-off-by: Lee Jones &lt;lee.jones@linaro.org&gt;
</content>
</entry>
<entry>
<title>backlight: Add backlight_device_get_by_name()</title>
<updated>2020-05-11T06:39:16+00:00</updated>
<author>
<name>Noralf Trønnes</name>
<email>noralf@tronnes.org</email>
</author>
<published>2020-05-09T14:16:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=479da1f538a2f3547e15f9d5922c611b69ec2fbc'/>
<id>urn:sha1:479da1f538a2f3547e15f9d5922c611b69ec2fbc</id>
<content type='text'>
Add a way to lookup a backlight device based on its name.
Will be used by a USB display gadget getting the name from configfs.

Signed-off-by: Noralf Trønnes &lt;noralf@tronnes.org&gt;
Reviewed-by: Sam Ravnborg &lt;sam@ravnborg.org&gt;
Reviewed-by: Daniel Thompson &lt;daniel.thompson@linaro.org&gt;
Acked-by: Jingoo Han &lt;jingoohan1@gmail.com&gt;
Signed-off-by: Lee Jones &lt;lee.jones@linaro.org&gt;
</content>
</entry>
<entry>
<title>backlight: Expose brightness curve type through sysfs</title>
<updated>2019-09-02T14:55:03+00:00</updated>
<author>
<name>Matthias Kaehlcke</name>
<email>mka@chromium.org</email>
</author>
<published>2019-07-09T19:00:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d55c028f8b25bdaaba9ae08026052b5b44d031b0'/>
<id>urn:sha1:d55c028f8b25bdaaba9ae08026052b5b44d031b0</id>
<content type='text'>
Backlight brightness curves can have different shapes. The two main
types are linear and non-linear curves. The human eye doesn't
perceive linearly increasing/decreasing brightness as linear (see
also 88ba95bedb79 "backlight: pwm_bl: Compute brightness of LED
linearly to human eye"), hence many backlights use non-linear (often
logarithmic) brightness curves. The type of curve currently is opaque
to userspace, so userspace often uses more or less reliable heuristics
(like the number of brightness levels) to decide whether to treat a
backlight device as linear or non-linear.

Export the type of the brightness curve via the new sysfs attribute
'scale'. The value of the attribute can be 'linear', 'non-linear' or
'unknown'. For devices that don't provide information about the scale
of their brightness curve the value of the 'scale' attribute is 'unknown'.

Signed-off-by: Matthias Kaehlcke &lt;mka@chromium.org&gt;
Reviewed-by: Daniel Thompson &lt;daniel.thompson@linaro.org&gt;
Signed-off-by: Lee Jones &lt;lee.jones@linaro.org&gt;
</content>
</entry>
</feed>
