aboutsummaryrefslogtreecommitdiff
path: root/drivers/edac/i82860_edac.c
diff options
context:
space:
mode:
authorMarijn Suijten2021-11-15 21:34:59 +0100
committerLee Jones2021-12-22 11:18:46 +0000
commitec961cf3241153e0f27d850f1bf0f172e7d27a21 (patch)
tree0a1efad5c5fd60745ea81e06ab50eb09ad824b62 /drivers/edac/i82860_edac.c
parentb7002cd5e9d80b790349b0a77a2eba34dc0471c0 (diff)
backlight: qcom-wled: Respect enabled-strings in set_brightness
The hardware is capable of controlling any non-contiguous sequence of LEDs specified in the DT using qcom,enabled-strings as u32 array, and this also follows from the DT-bindings documentation. The numbers specified in this array represent indices of the LED strings that are to be enabled and disabled. Its value is appropriately used to setup and enable string modules, but completely disregarded in the set_brightness paths which only iterate over the number of strings linearly. Take an example where only string 2 is enabled with qcom,enabled_strings=<2>: this string is appropriately enabled but subsequent brightness changes would have only touched the zero'th brightness register because num_strings is 1 here. This is simply addressed by looking up the string for this index in the enabled_strings array just like the other codepaths that iterate over num_strings. Likewise enabled_strings is now also used in the autodetection path for consistent behaviour: when a list of strings is specified in DT only those strings will be probed for autodetection, analogous to how the number of strings that need to be probed is already bound by qcom,num-strings. After all autodetection uses the set_brightness helpers to set an initial value, which could otherwise end up changing brightness on a different set of strings. Fixes: 775d2ffb4af6 ("backlight: qcom-wled: Restructure the driver for WLED3") Fixes: 03b2b5e86986 ("backlight: qcom-wled: Add support for WLED4 peripheral") Signed-off-by: Marijn Suijten <marijn.suijten@somainline.org> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@somainline.org> Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org> Signed-off-by: Lee Jones <lee.jones@linaro.org> Link: https://lore.kernel.org/r/20211115203459.1634079-10-marijn.suijten@somainline.org
Diffstat (limited to 'drivers/edac/i82860_edac.c')
0 files changed, 0 insertions, 0 deletions