Commit Graph

1000 Commits

Author SHA1 Message Date
Mans Rullgard a33677b921 backlight: led_bl: Take led_access lock when required
The led_access lock must be held when calling led_sysfs_enable() and
led_sysfs_disable().  This fixes warnings such as this:

[    2.432495] ------------[ cut here ]------------
[    2.437316] WARNING: CPU: 0 PID: 22 at drivers/leds/led-core.c:349 led_sysfs_disable+0x54/0x58
[    2.446105] Modules linked in:
[    2.449218] CPU: 0 PID: 22 Comm: kworker/u2:1 Not tainted 6.3.8+ #1
[    2.456268] Hardware name: Generic AM3517 (Flattened Device Tree)
[    2.462402] Workqueue: events_unbound deferred_probe_work_func
[    2.468353]  unwind_backtrace from show_stack+0x10/0x14
[    2.473632]  show_stack from dump_stack_lvl+0x24/0x2c
[    2.478759]  dump_stack_lvl from __warn+0x9c/0xc4
[    2.483551]  __warn from warn_slowpath_fmt+0x64/0xc0
[    2.488586]  warn_slowpath_fmt from led_sysfs_disable+0x54/0x58
[    2.494567]  led_sysfs_disable from led_bl_probe+0x20c/0x3b0
[    2.500305]  led_bl_probe from platform_probe+0x5c/0xb8
[    2.505615]  platform_probe from really_probe+0xc8/0x2a0
[    2.510986]  really_probe from __driver_probe_device+0x88/0x19c
[    2.516967]  __driver_probe_device from driver_probe_device+0x30/0xcc
[    2.523498]  driver_probe_device from __device_attach_driver+0x94/0xc4
[    2.530090]  __device_attach_driver from bus_for_each_drv+0x80/0xcc
[    2.536437]  bus_for_each_drv from __device_attach+0xf8/0x19c
[    2.542236]  __device_attach from bus_probe_device+0x8c/0x90
[    2.547973]  bus_probe_device from deferred_probe_work_func+0x80/0xb0
[    2.554504]  deferred_probe_work_func from process_one_work+0x228/0x4c0
[    2.561187]  process_one_work from worker_thread+0x1fc/0x4d0
[    2.566925]  worker_thread from kthread+0xb4/0xd0
[    2.571685]  kthread from ret_from_fork+0x14/0x2c
[    2.576446] Exception stack(0xd0079fb0 to 0xd0079ff8)
[    2.581573] 9fa0:                                     00000000 00000000 00000000 00000000
[    2.589813] 9fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[    2.598052] 9fe0: 00000000 00000000 00000000 00000000 00000013 00000000
[    2.604888] ---[ end trace 0000000000000000 ]---

Signed-off-by: Mans Rullgard <mans@mansr.com>
Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>
Link: https://lore.kernel.org/r/20230619160249.10414-1-mans@mansr.com
Signed-off-by: Lee Jones <lee@kernel.org>
2023-06-26 16:29:42 +01:00
Artur Weber c1ff7da03e video: backlight: lp855x: Get PWM for PWM mode during probe
Also deprecate the pwm-period DT property, as it is now redundant
(pwms property already contains period value).

Signed-off-by: Artur Weber <aweber.kernel@gmail.com>
Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/20230519180728.2281-3-aweber.kernel@gmail.com
2023-06-08 16:49:11 +01:00
Geert Uytterhoeven e01134eb13 backlight: pwm_bl: Remove unneeded checks for valid GPIOs
All of gpiod_set_value_cansleep() and gpiod_direction_output() handle
NULL GPIO pointers just fine, so there is no need to check for that in
the caller.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/00be8237e0e2bc9b179177b5490f175d657261a2.1684856337.git.geert+renesas@glider.be
Signed-off-by: Lee Jones <lee@kernel.org>
2023-05-25 12:27:47 +01:00
Uwe Kleine-König 29554f2e91 backlight: Switch i2c drivers back to use .probe()
After commit b8a1a4cd5a ("i2c: Provide a temporary .probe_new()
call-back type"), all drivers being converted to .probe_new() and then
03c835f498 ("i2c: Switch .probe() to not take an id parameter") convert
back to (the new) .probe() to be able to eventually drop .probe_new() from
struct i2c_driver.

Also fix two indention inconsistencies in the neighbourhood.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20230521143844.375244-1-u.kleine-koenig@pengutronix.de
Signed-off-by: Lee Jones <lee@kernel.org>
2023-05-25 12:25:26 +01:00
Maximilian Weigand ae9c48087f backlight: lm3630a: Turn off both led strings when display is blank
Use backlight_is_blank() to determine if the led strings should be turned
off in the update_status() functions of both strings.

Signed-off-by: Maximilian Weigand <mweigand@mweigand.net>
Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Link: https://lore.kernel.org/r/20230510085239.1253896-1-mweigand2017@gmail.com
Signed-off-by: Lee Jones <lee@kernel.org>
2023-05-25 12:25:26 +01:00
Linus Torvalds d7b3ffe2d7 - Fix-ups
- Add / improve Device Tree bindings
    - Convert (int) .remove functions to (void) .remove_new
    - Rid 'defined but not used' warnings
    - Remove ineffective casts and pointer stubs
    - Use specifically crafted API for testing DT property presence
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEdrbJNaO+IJqU8IdIUa+KL4f8d2EFAmRROoEACgkQUa+KL4f8
 d2EVfg/+Jo98pBsZYdXFDgO7pbucan4c9KdybW+XCeTw6zGNVINjnB+6Ne+w57Mz
 YPRrWwUmSfKl0PUSF+xc2LoS9mLTLqpnvUPyppyEhNZOpHUdrgBcvzVfkZNk7gYF
 sRBCxCBbRauVcktixoNJsHWGntXz2XkKgOgOrcz8N7SoLAZdsHZ1YHcDwRy5z0ZX
 D18hGX2N8JD+5cKeEp2GiUCCymB9rwYUbNmot3JGyQ5WuDY65qgfZCM9ucWm/8OY
 44a7xT+MVIfxRUXifcvKetlJs9a/zDtUmsgblG8Un66hut2iz19110awB5hjm6qn
 2/4HmJU9nPn3gLN/lLqE8fMQWcvrngwm+xaeb/p0YhYdMFKa1EbuO/VMWSE3b0q6
 NQOq/eSaeRb+OK1tL7Hl2aRFmsTFtDZytNt3SPSJRJJs9XLDfHGqh5HtEcu+Y5Zm
 MQPqT12ruQXTIrxM6qo4Pc2lLDMCnLlfFYcDOf90ohAxzd1Jn/UWJhQDeAvlAZc5
 QegQXGNJgPs92ZP3ybHGoTcOttZ9Iq/ojn5m7Md5DcSG+XMe2pa+cLu6Mo5dWMs0
 xcMdmR+hXkjFDQTxBzi1QFrogSP5ghctH+6aihHRHS4+qcpw12jfAv6/VVN21jNB
 W2tguz5PuxkHEsTcrTDYQJhBOpVRuAFohGnZ3ivjPEoTZ6bJzpo=
 =rzcx
 -----END PGP SIGNATURE-----

Merge tag 'backlight-next-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight

Pull backlight updates from Lee Jones:
 "Fix-ups:
   - Add / improve Device Tree bindings
   - Convert (int) .remove functions to (void) .remove_new
   - Rid 'defined but not used' warnings
   - Remove ineffective casts and pointer stubs
   - Use specifically crafted API for testing DT property presence"

* tag 'backlight-next-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight:
  backlight: as3711: Use of_property_read_bool() for boolean properties
  backlight: hx8357: Use of_property_present() for testing DT property presence
  backlight: arcxcnn_bl: Drop of_match_ptr for ID table
  backlight: lp855x: Mark OF related data as maybe unused
  backlight: sky81452-backlight: Convert to platform remove callback returning void
  backlight: rt4831-backlight: Convert to platform remove callback returning void
  backlight: qcom-wled: Convert to platform remove callback returning void
  backlight: pwm_bl: Convert to platform remove callback returning void
  backlight: mt6370-backlight: Convert to platform remove callback returning void
  backlight: lp8788_bl: Convert to platform remove callback returning void
  backlight: lm3533_bl: Convert to platform remove callback returning void
  backlight: led_bl: Convert to platform remove callback returning void
  backlight: hp680_bl: Convert to platform remove callback returning void
  backlight: da9052_bl: Convert to platform remove callback returning void
  backlight: cr_bllcd: Convert to platform remove callback returning void
  backlight: adp5520_bl: Convert to platform remove callback returning void
  backlight: aat2870_bl: Convert to platform remove callback returning void
  backlight: qcom-wled: Add PMI8950 compatible
2023-05-02 10:46:11 -07:00
Linus Torvalds 556eb8b791 Driver core changes for 6.4-rc1
Here is the large set of driver core changes for 6.4-rc1.
 
 Once again, a busy development cycle, with lots of changes happening in
 the driver core in the quest to be able to move "struct bus" and "struct
 class" into read-only memory, a task now complete with these changes.
 
 This will make the future rust interactions with the driver core more
 "provably correct" as well as providing more obvious lifetime rules for
 all busses and classes in the kernel.
 
 The changes required for this did touch many individual classes and
 busses as many callbacks were changed to take const * parameters
 instead.  All of these changes have been submitted to the various
 subsystem maintainers, giving them plenty of time to review, and most of
 them actually did so.
 
 Other than those changes, included in here are a small set of other
 things:
   - kobject logging improvements
   - cacheinfo improvements and updates
   - obligatory fw_devlink updates and fixes
   - documentation updates
   - device property cleanups and const * changes
   - firwmare loader dependency fixes.
 
 All of these have been in linux-next for a while with no reported
 problems.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 
 iG0EABECAC0WIQT0tgzFv3jCIUoxPcsxR9QN2y37KQUCZEp7Sw8cZ3JlZ0Brcm9h
 aC5jb20ACgkQMUfUDdst+ykitQCfamUHpxGcKOAGuLXMotXNakTEsxgAoIquENm5
 LEGadNS38k5fs+73UaxV
 =7K4B
 -----END PGP SIGNATURE-----

Merge tag 'driver-core-6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core

Pull driver core updates from Greg KH:
 "Here is the large set of driver core changes for 6.4-rc1.

  Once again, a busy development cycle, with lots of changes happening
  in the driver core in the quest to be able to move "struct bus" and
  "struct class" into read-only memory, a task now complete with these
  changes.

  This will make the future rust interactions with the driver core more
  "provably correct" as well as providing more obvious lifetime rules
  for all busses and classes in the kernel.

  The changes required for this did touch many individual classes and
  busses as many callbacks were changed to take const * parameters
  instead. All of these changes have been submitted to the various
  subsystem maintainers, giving them plenty of time to review, and most
  of them actually did so.

  Other than those changes, included in here are a small set of other
  things:

   - kobject logging improvements

   - cacheinfo improvements and updates

   - obligatory fw_devlink updates and fixes

   - documentation updates

   - device property cleanups and const * changes

   - firwmare loader dependency fixes.

  All of these have been in linux-next for a while with no reported
  problems"

* tag 'driver-core-6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (120 commits)
  device property: make device_property functions take const device *
  driver core: update comments in device_rename()
  driver core: Don't require dynamic_debug for initcall_debug probe timing
  firmware_loader: rework crypto dependencies
  firmware_loader: Strip off \n from customized path
  zram: fix up permission for the hot_add sysfs file
  cacheinfo: Add use_arch[|_cache]_info field/function
  arch_topology: Remove early cacheinfo error message if -ENOENT
  cacheinfo: Check cache properties are present in DT
  cacheinfo: Check sib_leaf in cache_leaves_are_shared()
  cacheinfo: Allow early level detection when DT/ACPI info is missing/broken
  cacheinfo: Add arm64 early level initializer implementation
  cacheinfo: Add arch specific early level initializer
  tty: make tty_class a static const structure
  driver core: class: remove struct class_interface * from callbacks
  driver core: class: mark the struct class in struct class_interface constant
  driver core: class: make class_register() take a const *
  driver core: class: mark class_release() as taking a const *
  driver core: remove incorrect comment for device_create*
  MIPS: vpe-cmp: remove module owner pointer from struct class usage.
  ...
2023-04-27 11:53:57 -07:00
Greg Kroah-Hartman 1aaba11da9 driver core: class: remove module * from class_create()
The module pointer in class_create() never actually did anything, and it
shouldn't have been requred to be set as a parameter even if it did
something.  So just remove it and fix up all callers of the function in
the kernel tree at the same time.

Cc: "Rafael J. Wysocki" <rafael@kernel.org>
Acked-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Link: https://lore.kernel.org/r/20230313181843.1207845-4-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-03-17 15:16:33 +01:00
Rob Herring fb200218b4 backlight: as3711: Use of_property_read_bool() for boolean properties
It is preferred to use typed property access functions (i.e.
of_property_read_<type> functions) rather than low-level
of_get_property/of_find_property functions for reading properties.
Convert reading boolean properties to to of_property_read_bool().

Signed-off-by: Rob Herring <robh@kernel.org>
Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/20230310144731.1546190-1-robh@kernel.org
2023-03-16 16:12:53 +00:00
Rob Herring 796bf946c4 backlight: hx8357: Use of_property_present() for testing DT property presence
It is preferred to use typed property access functions (i.e.
of_property_read_<type> functions) rather than low-level
of_get_property/of_find_property functions for reading properties. As
part of this, convert of_get_property/of_find_property calls to the
recently added of_property_present() helper when we just want to test
for presence of a property and nothing more.

Signed-off-by: Rob Herring <robh@kernel.org>
Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/20230310144730.1546101-1-robh@kernel.org
2023-03-16 16:12:27 +00:00
Krzysztof Kozlowski a884cdf5dc backlight: arcxcnn_bl: Drop of_match_ptr for ID table
The driver will match mostly by DT table (even thought there is regular
ID table) so there is little benefit in of_match_ptr (this also allows
ACPI matching via PRP0001, even though it might not be relevant here).

  drivers/video/backlight/arcxcnn_bl.c:378:34: error: ‘arcxcnn_dt_ids’ defined but not used [-Werror=unused-const-variable=]

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/20230311173556.263086-2-krzysztof.kozlowski@linaro.org
2023-03-16 16:11:42 +00:00
Krzysztof Kozlowski c857b87202 backlight: lp855x: Mark OF related data as maybe unused
The driver can be compile tested with !CONFIG_OF making certain data
unused:

  drivers/video/backlight/lp855x_bl.c:551:34: error: ‘lp855x_dt_ids’ defined but not used [-Werror=unused-const-variable=]

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/20230311173556.263086-1-krzysztof.kozlowski@linaro.org
2023-03-16 16:11:14 +00:00
Uwe Kleine-König 541ec23c60 backlight: sky81452-backlight: Convert to platform remove callback returning void
The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/20230308073945.2336302-14-u.kleine-koenig@pengutronix.de
2023-03-16 15:08:37 +00:00
Uwe Kleine-König 20c111d2e1 backlight: rt4831-backlight: Convert to platform remove callback returning void
The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/20230308073945.2336302-13-u.kleine-koenig@pengutronix.de
2023-03-16 15:08:37 +00:00
Uwe Kleine-König ea379bc802 backlight: qcom-wled: Convert to platform remove callback returning void
The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/20230308073945.2336302-12-u.kleine-koenig@pengutronix.de
2023-03-16 15:08:36 +00:00
Uwe Kleine-König 0a4606a7a4 backlight: pwm_bl: Convert to platform remove callback returning void
The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/20230308073945.2336302-11-u.kleine-koenig@pengutronix.de
2023-03-16 15:08:36 +00:00
Uwe Kleine-König 519e5cc529 backlight: mt6370-backlight: Convert to platform remove callback returning void
The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/20230308073945.2336302-10-u.kleine-koenig@pengutronix.de
2023-03-16 15:08:36 +00:00
Uwe Kleine-König 1c708d346c backlight: lp8788_bl: Convert to platform remove callback returning void
The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/20230308073945.2336302-9-u.kleine-koenig@pengutronix.de
2023-03-16 15:08:36 +00:00
Uwe Kleine-König cba7dfe04f backlight: lm3533_bl: Convert to platform remove callback returning void
The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/20230308073945.2336302-8-u.kleine-koenig@pengutronix.de
2023-03-16 15:08:36 +00:00
Uwe Kleine-König c4c4fa57fd backlight: led_bl: Convert to platform remove callback returning void
The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/20230308073945.2336302-7-u.kleine-koenig@pengutronix.de
2023-03-16 15:08:36 +00:00
Uwe Kleine-König 7150f8c2aa backlight: hp680_bl: Convert to platform remove callback returning void
The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/20230308073945.2336302-6-u.kleine-koenig@pengutronix.de
2023-03-16 15:08:35 +00:00
Uwe Kleine-König 78a2bb4802 backlight: da9052_bl: Convert to platform remove callback returning void
The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Acked-by: Adam Ward <DLG-Adam.Ward.opensource@dm.renesas.com>
Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/20230308073945.2336302-5-u.kleine-koenig@pengutronix.de
2023-03-16 15:08:35 +00:00
Uwe Kleine-König f6672d7f0c backlight: cr_bllcd: Convert to platform remove callback returning void
The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/20230308073945.2336302-4-u.kleine-koenig@pengutronix.de
2023-03-16 15:08:35 +00:00
Uwe Kleine-König 6879039167 backlight: adp5520_bl: Convert to platform remove callback returning void
The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/20230308073945.2336302-3-u.kleine-koenig@pengutronix.de
2023-03-16 15:08:35 +00:00
Uwe Kleine-König 8b339caf42 backlight: aat2870_bl: Convert to platform remove callback returning void
The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/20230308073945.2336302-2-u.kleine-koenig@pengutronix.de
2023-03-16 15:08:35 +00:00
Luca Weiss 10258bf453 backlight: qcom-wled: Add PMI8950 compatible
PMI8950 contains WLED of version 4. Add support for it to the driver.

Signed-off-by: Luca Weiss <luca@z3ntu.xyz>
Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/20221226-msm8953-6-2-wled-v1-1-e318d4c71d05@z3ntu.xyz
2023-03-16 15:08:34 +00:00
Hans de Goede 3608a2cd81 backlight: apple_bl: Use acpi_video_get_backlight_type()
On some MacBooks both the apple_bl and the apple-gmux backlight drivers
may be able to export a /sys/class/backlight device.

To avoid having 2 backlight devices for one LCD panel until now
the apple-gmux driver has been calling apple_bl_unregister() to move
the apple_bl backlight device out of the way when it loads.

Similar problems exist on other x86 laptops and all backlight drivers
which may be used on x86 laptops have moved to using
acpi_video_get_backlight_type() to determine whether they should load
or not.

Switch apple_bl to this model too, so that it is consistent with all
the other x86 backlight drivers.

Besides code-simplification and consistency this has 2 other benefits:

1) It removes a race during boot where userspace will briefly see
   an apple_bl backlight and then have it disappear again, leading to e.g.:
   https://bbs.archlinux.org/viewtopic.php?id=269920

2) This allows user to switch between the drivers by passing
   acpi_backlight=apple_gmux or acpi_backlight=vendor on the kernel
   commandline.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>
Acked-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/20230307120540.389920-1-hdegoede@redhat.com
2023-03-16 13:33:11 +01:00
Linus Torvalds 025cf4dc5d - New Drivers
- Add support for Kinetic KTZ8866 Backlight
 
  - Remove Drivers
    - Toshiba Sharp SL-6000 LCD and Backlight
 
  - Fix-ups
    - Provide some profiling optimisations with respect to pwm_get_state() and pwm_apply_state()
    - Make use of the dev_err_probe() API
    - Provide some Device Tree documentation additions / adaptions
    - Drop fall-back legacy PWM probing support
    - Convert over to new I2C probing API
    - Fix incorrect documentation
    - Make use of backlight_get_brightness() API
 
  - Bug Fixes
    - Fix disabling backlight on i.MX6 when inverted PWMs are used
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEdrbJNaO+IJqU8IdIUa+KL4f8d2EFAmP3KYoACgkQUa+KL4f8
 d2GfRQ/8C5/wWjQCokHIQ9c+Rw6F2rczyHiJK+xACOpVPXD5N3JE1NtpjSEf5gGB
 I33kBNqyfjSvOzb6peDLq+E6qcccg35sAox869Q+3sHAv5vIUpx0b1Dnnqg771KE
 bUggPIgvBd4H9uE+0vcSxZchx3jegzsWismJ8n1PYG8R8F/C8g/3gdRVblkKD8EG
 uLyvNmvFV2AfizctSvikdQzB4OzTvd6Ue6+motGP/4lmbw3sFxLRR8d23RcaZBND
 CfTJuF1LP9DW3DIUs0pI5KM3hQJ9gpnKLRP09Vs9ovz+d01wdSsCIXgTARtdZZ5X
 NH6N4GbPPb7smf3QHud0oVV92kOJd+Zls71LqqxSALjTpDMDFGt61eeob8gaFmDd
 OdMa0cuHxONhxK4AsIx4WpWz8A3eeXQpLcXmt0dW1V+236JdzI2LzohCAqUl71zo
 oua+Aju6s3cMy1iQpfLOUWtJLufqJl6CRLQs7GIDJMnNrTas8/3x0LEhdXce9WXr
 GH55ABtO/n/RIPONmM+ku19w0U191WtY2sVykTbxy+l4Yp781hqEHd83EDt8sloW
 LzD/5DJTnrQ45CFKbtANGSE6+98zdc8HIm4geshsOrZLLEFKlRPzjOPHlwk7e9Rn
 5kHE1IxUvNbP5p1zpS54oPOQfTv5Ti6UOkvbBiQguHc8U5gEe6o=
 =R7zl
 -----END PGP SIGNATURE-----

Merge tag 'backlight-next-6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight

Pull backlight updates from Lee Jones:
 "New Drivers:
   - Add support for Kinetic KTZ8866 Backlight

  Removed Drivers:
   - Toshiba Sharp SL-6000 LCD and Backlight

  Fix-ups:
   - Provide some profiling optimisations with respect to
     pwm_get_state() and pwm_apply_state()
   - Make use of the dev_err_probe() API
   - Provide some Device Tree documentation additions / adaptions
   - Drop fall-back legacy PWM probing support
   - Convert over to new I2C probing API
   - Fix incorrect documentation
   - Make use of backlight_get_brightness() API

  Bug Fixes:
   - Fix disabling backlight on i.MX6 when inverted PWMs are used"

* tag 'backlight-next-6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight:
  backlight: ktz8866: Convert to i2c's .probe_new()
  backlight: ktz8866: Add support for Kinetic KTZ8866 backlight
  dt-bindings: leds: backlight: Add Kinetic KTZ8866 backlight
  backlight: pwm_bl: Don't rely on a disabled PWM emiting inactive state
  backlight: pwm_bl: Configure pwm only once per backlight toggle
  backlight: Remove pxa tosa support
  backlight: aat2870: Use backlight helper
  backlight: ipaq_micro: Use backlight helper
  backlight: arcxcnn: Use backlight helper
  backlight: sky81452: Fix sky81452_bl_platform_data kernel-doc
  backlight: pwm_bl: Drop support for legacy PWM probing
  dt-bindings: backlight: qcom-wled: Add PMI8950 compatible
  backlight: ktd253: Switch to use dev_err_probe() helper
  backlight: backlight: Fix doc for backlight_device_get_by_name
2023-02-23 15:06:28 -08:00
Uwe Kleine-König ad614f81d2 backlight: ktz8866: Convert to i2c's .probe_new()
The probe function doesn't make use of the i2c_device_id * parameter so
it can be trivially converted.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/20230127152639.1347229-1-u.kleine-koenig@pengutronix.de
2023-02-22 10:55:28 +00:00
Jianhua Lu f8449c8f73 backlight: ktz8866: Add support for Kinetic KTZ8866 backlight
Add support for Kinetic KTZ8866 backlight, which is used in
Xiaomi tablet, Mi Pad 5 series. This driver lightly based on
downstream implementation [1].
[1] https://github.com/MiCode/Xiaomi_Kernel_OpenSource/blob/elish-r-oss/drivers/video/backlight/ktz8866.c

Signed-off-by: Jianhua Lu <lujianhua000@gmail.com>
Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/20230120155018.15376-2-lujianhua000@gmail.com
2023-02-22 10:55:28 +00:00
Uwe Kleine-König deaeeda205 backlight: pwm_bl: Don't rely on a disabled PWM emiting inactive state
Most but not all PWMs drive the PWM pin to its inactive state when
disabled. However if there is no enable_gpio and no regulator the PWM
must drive the inactive state to actually disable the backlight.

So keep the PWM on in this case.

Note that to determine if there is a regulator some effort is required
because it might happen that there isn't actually one but the regulator
core gave us a dummy. (A nice side effect is that this makes the
regulator actually optional even on fully constrained systems.)

This fixes backlight disabling e.g. on i.MX6 when an inverted PWM is
used.

Hint for the future: If this change results in a regression, the bug is
in the lowlevel PWM driver.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/20230120120018.161103-3-u.kleine-koenig@pengutronix.de
2023-02-22 10:55:28 +00:00
Uwe Kleine-König 00e7e698bf backlight: pwm_bl: Configure pwm only once per backlight toggle
When the function pwm_backlight_update_status() was called with
brightness > 0, pwm_get_state() was called twice (once directly and once
in compute_duty_cycle). Also pwm_apply_state() was called twice (once in
pwm_backlight_power_on() and once directly).

Optimize this to do both calls only once.

Note that with this affects the order of regulator and PWM setup. It's
not expected to have a relevant effect on hardware. The rationale for
this is that the regulator (and the GPIO) are reasonable to switch in
pwm_backlight_power_on()/pwm_backlight_power_off() but the PWM has
nothing to do with power. (The post_pwm_on_delay and pwm_off_delay are
still there though.)

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/20230120120018.161103-2-u.kleine-koenig@pengutronix.de
2023-02-22 10:55:28 +00:00
Arnd Bergmann 744fc2dada backlight: Remove pxa tosa support
The PXA tosa machine was removed, so this backlight driver is no
longer needed.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/20230105134622.254560-10-arnd@kernel.org
2023-02-22 10:55:27 +00:00
Stephen Kitt 32fb2588ce backlight: aat2870: Use backlight helper
Instead of retrieving the backlight brightness in struct
backlight_properties manually, and then checking whether the backlight
should be on at all, use backlight_get_brightness() which does all
this and insulates this from future changes.

Signed-off-by: Stephen Kitt <steve@sk2.org>
Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/20230106164856.1453819-2-steve@sk2.org
2023-02-22 10:55:27 +00:00
Stephen Kitt e3b2ac4088 backlight: ipaq_micro: Use backlight helper
Instead of retrieving the backlight brightness in struct
backlight_properties manually, and then checking whether the backlight
should be on at all, use backlight_get_brightness() which does all
this and insulates this from future changes.

Signed-off-by: Stephen Kitt <steve@sk2.org>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/20230106164856.1453819-4-steve@sk2.org
2023-02-22 10:55:27 +00:00
Stephen Kitt fef0b89a45 backlight: arcxcnn: Use backlight helper
Instead of retrieving the backlight brightness in struct
backlight_properties manually, and then checking whether the backlight
should be on at all, use backlight_get_brightness() which does all
this and insulates this from future changes.

Signed-off-by: Stephen Kitt <steve@sk2.org>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/20230106164856.1453819-3-steve@sk2.org
2023-02-22 10:55:27 +00:00
Randy Dunlap 3a396f9859 backlight: sky81452: Fix sky81452_bl_platform_data kernel-doc
Correct the struct name and add a short struct description to fix the
kernel-doc notation.

Prevents this kernel-doc warning:
drivers/video/backlight/sky81452-backlight.c:64: warning: expecting prototype for struct sky81452_platform_data. Prototype was for struct sky81452_bl_platform_data instead

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/20230113064118.30169-1-rdunlap@infradead.org
2023-02-22 10:55:26 +00:00
Uwe Kleine-König 5a7fbe452a backlight: pwm_bl: Drop support for legacy PWM probing
There is no in-tree user left which relies on legacy probing. So drop
support for it which removes another user of the deprecated
pwm_request() function.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/20221117072151.3789691-1-u.kleine-koenig@pengutronix.de
2023-02-22 10:55:22 +00:00
Yang Yingliang 81bc9eada9 backlight: ktd253: Switch to use dev_err_probe() helper
In the probe path, dev_err() can be replaced with dev_err_probe()
which will check if error code is -EPROBE_DEFER and prints the
error name. It also sets the defer probe reason which can be
checked later through debugfs. It's more simple in error path.

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/20220926142059.2294282-1-yangyingliang@huawei.com
2023-02-22 10:54:59 +00:00
Miaoqian Lin 3755b46a1b backlight: backlight: Fix doc for backlight_device_get_by_name
backlight_put() has been dropped, we should call put_device() to drop
the reference taken by backlight_device_get_by_name().

Fixes: 0f6a3256fd ("backlight: backlight: Drop backlight_put()")
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/20221215071902.424005-1-linmq006@gmail.com
2023-02-22 10:53:26 +00:00
Arnd Bergmann d6df7df7ae ARM: pxa: remove unused board files
The majority of all pxa board files has not been touched in a long time,
and no users have spoken up in favor of keeping them around. This leaves
only support for the platforms that were already converted to DT, as
well as the gumstix and spitz/akita/borzoi machines that work in qemu
and can still be converted to DT later.

Cc: Ales Bardorfer <ales@i-tech.si>
Cc: Ales Snuparek <snuparek@atlas.cz>
Cc: Alex Osborne <ato@meshy.org>
Cc: Alex Osborne <bobofdoom@gmail.com>
Cc: Dirk Opfer <dirk@opfer-online.de>
Cc: Ian Molton <spyro@f2s.com>
Cc: Lennert Buytenhek <kernel@wantstofly.org>
Cc: Marek Vasut <marek.vasut@gmail.com>
Cc: Michael Petchkovsky <mkpetch@internode.on.net>
Cc: Nick Bane <nick@cecomputing.co.uk>
Cc: Paul Parsons <lost.distance@yahoo.com>
Cc: Philipp Zabel <philipp.zabel@gmail.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Cc: Sergey Lapin <slapin@ossfans.org>
Cc: Tomas Cech <sleep_walker@suse.cz>
Acked-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Acked-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2023-01-20 11:23:44 +01:00
Linus Torvalds ec34c2b4ec - Fix-ups
- Convert a bunch of I2C class drivers over to .probe_new()
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEdrbJNaO+IJqU8IdIUa+KL4f8d2EFAmOhmzYACgkQUa+KL4f8
 d2HwCw//T2WbB8K82gGV/lIJsasixahl9QRKgN9JOOTfNhKQPRiKTbnt5dsAdx5U
 zYzNElCeYbuL3qRKKfmlv8DVAjjqiYIbFwJc7u+NnrCWOBCPfzkukPapxO1tSWr7
 kMIN0wkt1gyFwpRadx40vMuTlYpHLCVl7MIlY9yvvaO8OcfTnzghzVQVSHU7LcR3
 oLat8/5xO+kPkoMP9WWgdbvqCGyd9jv7aQ51235gkEHesYtC8whIx8xsdjVTfPsF
 s8uiodw9l87AJ9+CfDkP5q32HUlnnAOqehHezT89N4iWTMpcYVdDjdSah4WijIxO
 HDVIfRJpgFtUm54mrwFWkUPzRtiPUWlO5pDi8bxb6F60LouB5cQD8/b3neNNO5+Q
 gveykHjPo1sM17ST2UHEz+vIuU5fZ4QtKhlaldu6vzymAd/Jt7cSnvHB+FWxPqJ1
 ZK/JhiXSBOBm7CtSItma02jn2vDfTYPG65Z5zaaeUnJ2MutiWoHtoiGOrjGvIvYL
 xxbUgGh5CIrpjxKJoR8Btne0pB4IOloefdaRaTHM+5+8fsQZy3klsRPm+VCcQksz
 XczcjHUMs3SMLQj/JjO79Jv9QCz8pZzslswNNLY2ir7ROBUyY84RbcMSu06z6Sd7
 ZqylRb8hWMGaWq0pg7iJ4kRYTAbFMncs27pBuTUOLO6ysisNoLE=
 =m+13
 -----END PGP SIGNATURE-----

Merge tag 'backlight-next-6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight

Pull backlight update from Lee Jones:
 "Convert a bunch of I2C class drivers over to .probe_new()"

* tag 'backlight-next-6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight:
  backlight: tosa: Convert to i2c's .probe_new()
  backlight: lv5207lp: Convert to i2c's .probe_new()
  backlight: lp855x: Convert to i2c's .probe_new()
  backlight: lm3639: Convert to i2c's .probe_new()
  backlight: lm3630a: Convert to i2c's .probe_new()
  backlight: bd6107: Convert to i2c's .probe_new()
  backlight: arcxcnn: Convert to i2c's .probe_new()
  backlight: adp8870: Convert to i2c's .probe_new()
  backlight: adp8860: Convert to i2c's .probe_new()
2022-12-21 09:24:39 -08:00
Uwe Kleine-König 0de796b604 backlight: tosa: Convert to i2c's .probe_new()
The probe function doesn't make use of the i2c_device_id * parameter so it
can be trivially converted.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/20221118224540.619276-594-uwe@kleine-koenig.org
2022-12-07 13:33:03 +00:00
Uwe Kleine-König 5867af29c8 backlight: lv5207lp: Convert to i2c's .probe_new()
The probe function doesn't make use of the i2c_device_id * parameter so it
can be trivially converted.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/20221118224540.619276-593-uwe@kleine-koenig.org
2022-12-07 13:33:03 +00:00
Uwe Kleine-König 60aa101b2f backlight: lp855x: Convert to i2c's .probe_new()
.probe_new() doesn't get the i2c_device_id * parameter, so determine
that explicitly in the probe function.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/20221118224540.619276-592-uwe@kleine-koenig.org
2022-12-07 13:33:03 +00:00
Uwe Kleine-König 3065efe8af backlight: lm3639: Convert to i2c's .probe_new()
The probe function doesn't make use of the i2c_device_id * parameter so it
can be trivially converted.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/20221118224540.619276-591-uwe@kleine-koenig.org
2022-12-07 13:33:02 +00:00
Uwe Kleine-König b2d4f93f89 backlight: lm3630a: Convert to i2c's .probe_new()
The probe function doesn't make use of the i2c_device_id * parameter so it
can be trivially converted.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/20221118224540.619276-590-uwe@kleine-koenig.org
2022-12-07 13:33:02 +00:00
Uwe Kleine-König 58d2b900c7 backlight: bd6107: Convert to i2c's .probe_new()
The probe function doesn't make use of the i2c_device_id * parameter so it
can be trivially converted.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/20221118224540.619276-589-uwe@kleine-koenig.org
2022-12-07 13:33:02 +00:00
Uwe Kleine-König 64ec276981 backlight: arcxcnn: Convert to i2c's .probe_new()
The probe function doesn't make use of the i2c_device_id * parameter so it
can be trivially converted.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/20221118224540.619276-588-uwe@kleine-koenig.org
2022-12-07 13:33:02 +00:00
Uwe Kleine-König e78b28b8ab backlight: adp8870: Convert to i2c's .probe_new()
.probe_new() doesn't get the i2c_device_id * parameter, so determine
that explicitly in the probe function.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/20221118224540.619276-587-uwe@kleine-koenig.org
2022-12-07 13:33:02 +00:00