Commit graph

344 commits

Author SHA1 Message Date
Linus Torvalds
f5c31bcf60 - Core Frameworks
- Introduce ExpressWire library
 
  - New Drivers
    - Add support for ON Semiconductor NCP5623 RGB LED Driver
 
  - New Device Support
    - Add support for PM660L to Qualcomm's LPG driver
 
  - New Functionality
    - Dynamically load modules required for the default-trigger
    - Add some support for suspend and resume
    - Allow LEDs to remain lit during suspend
 
  - Fix-ups
    - Device Tree binding adaptions/conversions/creation
    - Fix include lists; alphabetise, remove unused, explicitly add used
    - Add new led_match_default_trigger to avoid duplication
    - Add module alias' to aid auto-loading
    - Default to hw_control if no others are specified
    - De-bloat the supported link speed attribute lists
    - Remove superfluous code and simplify overall
    - Constify some variables
 
  - Bug Fixes
    - Prevent kernel panic when renaming the net interface
    - Fix Kconfig related build errors
    - Ensure mutexes are unlocked prior to destroying them
    - Provide clean-up between state changes to avoid invalid state
    - Fix some broken kernel-doc headers
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEdrbJNaO+IJqU8IdIUa+KL4f8d2EFAmXzCvUACgkQUa+KL4f8
 d2Fh0A/+KQiuzluglEsnyG7gfb2771x9dQ9pIwaR68UkCwThNH8ico+NqUDs8Jur
 6jtfYfKcWIz3i5kbnWBDGJfEEiVuDGu8Zv9UFxzQViyWQqawkJWNMsYqL3KtfI4i
 Ujj2Ja1MsoqO7COngry9I+3sT6rEwdQJMrVfNAdvOYjlXwr3O8Z2NipPACEqutUr
 0gxKAEEbGOj3+s3UGInrGi9RGuOVBe9UNA2etmtie1kxkdowTxCNY94ukUf9tnvC
 WVXF8iOByUgVAxMh1ugSc27CTCV+VcDMYKKr9ABVhskI/pT3zMFoUCYY1EqhaOTF
 Q40+yFX8ERomNTgy1tbNf06PkzaN+NJ4P/SHFU79madfy4OM6QobpTSt7bBpaSEP
 gm3zuI1a353NPfAUZiIsTgv8jCh18w/adphTNsXY/4PnmkKF0+Pm57PJf8BDhlY3
 KiScK7WXhGS9G3wNpLH+7QBdWiON3oWYJhVK4ijEfgRpEDofv+W16GzcETkUsyQ1
 5DLu/W8wHN9zxHj1YXaitmnRjX3IMoltcIix8FI3YUKrx3m3twm2Vj5ZLziaPm83
 7rBBPyePXwIamLokiTPCfXOxygO7Qv6VAp1aCR6400R/rtjykziboqvT2o6OMpkS
 W/88631VIuL9jAaP/zdUHrle1NpKDiHs2MF0Rtj+0OOoMJyOC7k=
 =m2vY
 -----END PGP SIGNATURE-----

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

Pull LED updates from Lee Jones:
 "Core Framework:
   - Introduce ExpressWire library

  New Drivers:
   - Add support for ON Semiconductor NCP5623 RGB LED Driver

  New Device Support:
   - Add support for PM660L to Qualcomm's LPG driver

  New Functionality:
   - Dynamically load modules required for the default-trigger
   - Add some support for suspend and resume
   - Allow LEDs to remain lit during suspend

  Fix-ups:
   - Device Tree binding adaptions/conversions/creation
   - Fix include lists; alphabetise, remove unused, explicitly add used
   - Add new led_match_default_trigger to avoid duplication
   - Add module alias' to aid auto-loading
   - Default to hw_control if no others are specified
   - De-bloat the supported link speed attribute lists
   - Remove superfluous code and simplify overall
   - Constify some variables

  Bug Fixes:
   - Prevent kernel panic when renaming the net interface
   - Fix Kconfig related build errors
   - Ensure mutexes are unlocked prior to destroying them
   - Provide clean-up between state changes to avoid invalid state
   - Fix some broken kernel-doc headers"

* tag 'leds-next-6.9' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/leds: (41 commits)
  leds: ncp5623: Add MS suffix to time defines
  leds: Add NCP5623 multi-led driver
  dt-bindings: leds: Add NCP5623 multi-LED Controller
  leds: mlxreg: Drop an excess struct mlxreg_led_data member
  leds: leds-mlxcpld: Fix struct mlxcpld_led_priv member name
  leds: lm3601x: Fix struct lm3601_led kernel-doc warnings
  leds: Fix ifdef check for gpio_led_register_device()
  dt-bindings: leds: qcom-lpg: Narrow nvmem for other variants
  dt-bindings: leds: qcom-lpg: Drop redundant qcom,pm8550-pwm in if:then:
  dt-bindings: leds: Add LED_FUNCTION_WAN_ONLINE for Internet access
  leds: sgm3140: Add missing timer cleanup and flash gpio control
  leds: expresswire: Don't depend on NEW_LEDS
  Revert "leds: Only descend into leds directory when CONFIG_NEW_LEDS is set"
  leds: aw2013: Unlock mutex before destroying it
  leds: qcom-lpg: Add QCOM_PBS dependency
  leds: rgb: leds-group-multicolor: Allow LEDs to stay on in suspend
  leds: trigger: netdev: Fix kernel panic on interface rename trig notify
  leds: qcom-lpg: Add PM660L configuration and compatible
  leds: spi-byte: Use devm_led_classdev_register_ext()
  leds: pca963x: Add support for suspend and resume
  ...
2024-03-14 10:38:25 -07:00
Linus Torvalds
f3d8f29d1f - New Drivers
- Add support for Kinetic KTD2801 Backlight
 
  - Fix-ups
    - Fix include lists; alphabetise, remove unused, explicitly add used
    - Device Tree binding adaptions/conversions/creation
    - Use dev_err_probe() to clean-up error paths
    - Use/convert to new/better APIs/helpers/MACROs instead of hand-rolling implementations
 
  - Bug Fixes
    - Fix changes of NULL pointer dereference
    - Remedy a bunch of logic errors
    - Initialise (zero) Backlight properties data structures
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEdrbJNaO+IJqU8IdIUa+KL4f8d2EFAmXzCwMACgkQUa+KL4f8
 d2Ej3g//SVxd1ZF4OVe8VcfdeviormwL2cOvhsBNQHVtsPKYMSjH37Bf9O99GrL4
 IBrOza/6SQUTxuzZwkcn6Ryl9O2KalTIJahgTxpdwm4Yrd3TEUAyizbaMy+rG49s
 aW+bAbl+y4d6ag6XSrafrTVbDWESR8NsaU4pozbNS8HLjfCoT5RR0K6N5jPSTXhE
 /oxk1LoCdFFBAOfl6z0NRmyjCTy495bftACXMdpx+68P/jySHemwo2z10lei0Sai
 ucj89Q4SGvk/PMNTAYKpn+jPRzd+5OV3NZk79U0RaJvTaUwXDMw01ypFXPb3wacL
 5t6TKwMKeZLXtVbA9OIDi7eRUiJwLIm+fb2rWZEdrsLDFRoe6U6uSa7BmFOwhX+T
 6XznFtBbbRng+/VFE1Xaczm6uQAt5MuySWq/Wf+4tRH+MfsoFvoShSDok+KxRyo0
 8YKaH6GcmGtwwAnL+7rp6vjvNYNhO8/ui6rErXoeiFQlXoNF43DBmG82jeUfiOWJ
 9l/JaqbQnsYy5e2vUGR0GeJl+a5krR86yCoNzIkMBdRkcJqK6A1we7YPt8CMyUTy
 rLJzbF6zjqKK7uniXbSCsEM9VleR+Ex3zwTmKTR10rybU1eWbtYk/5ZrDjoX62xl
 CK/9N9f7vYhBh+xnHbchPQOLK6g7pZ227Y9ks4b54q6u042n2Zo=
 =SaGM
 -----END PGP SIGNATURE-----

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

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

  Fix-ups:
   - Fix include lists; alphabetise, remove unused, explicitly add used
   - Device Tree binding adaptions/conversions/creation
   - Use dev_err_probe() to clean-up error paths
   - Use/convert to new/better APIs/helpers/MACROs instead of hand-rolling implementations

  Bug Fixes:
   - Fix changes of NULL pointer dereference
   - Remedy a bunch of logic errors
   - Initialise (zero) Backlight properties data structures"

* tag 'backlight-next-6.9' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight: (32 commits)
  backlight: pandora_bl: Drop unneeded ENOMEM error message
  backlight: lm3630a_bl: Simplify probe return on gpio request error
  backlight: lm3630a_bl: Handle deferred probe
  backlight: as3711_bl: Handle deferred probe
  backlight: bd6107: Handle deferred probe
  backlight: l4f00242t03: Simplify with dev_err_probe()
  backlight: gpio: Simplify with dev_err_probe()
  backlight: lp8788: Fully initialize backlight_properties during probe
  backlight: lm3639: Fully initialize backlight_properties during probe
  backlight: da9052: Fully initialize backlight_properties during probe
  backlight: lm3630a: Use backlight_get_brightness helper in update_status
  backlight: lm3630a: Don't set bl->props.brightness in get_brightness
  backlight: lm3630a: Initialize backlight_properties on init
  backlight: mp3309c: Fully initialize backlight_properties during probe
  backlight: mp3309c: Utilise temporary variable for struct device
  backlight: mp3309c: Use dev_err_probe() instead of dev_err()
  backlight: mp3309c: Make use of device properties
  dt-bindings: backlight: qcom-wled: Fix bouncing email addresses
  backlight: hx8357: Utilise temporary variable for struct device
  backlight: hx8357: Make use of dev_err_probe()
  ...
2024-03-14 10:35:46 -07:00
Jeffrey Hugo
76fa2a1eff dt-bindings: backlight: qcom-wled: Fix bouncing email addresses
Bjorn is no longer at Linaro.  Update his email address to @kernel to
match the .mailmap entry.

The servers for @codeaurora are long retired and messages sent there
will bounce.  Update Kiran's email address to match the .mailmap entry.

This will help anyone that is looking to reach out about this binding
and is not using .mailmap to pre-process their message.

Signed-off-by: Jeffrey Hugo <quic_jhugo@quicinc.com>
Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>
Acked-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20240202180151.4116329-1-quic_jhugo@quicinc.com
Signed-off-by: Lee Jones <lee@kernel.org>
2024-03-07 09:03:28 +00:00
Abdel Alkuor
2c7c70f54f dt-bindings: leds: Add NCP5623 multi-LED Controller
NCP5623 is DC-DC multi-LED controller which can be used for RGB
illumination or backlight LCD display.

Signed-off-by: Abdel Alkuor <alkuor@gmail.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20240305042049.1533279-1-alkuor@gmail.com
Signed-off-by: Lee Jones <lee@kernel.org>
2024-03-07 08:48:17 +00:00
Krzysztof Kozlowski
6c27bf4c6d dt-bindings: leds: qcom-lpg: Narrow nvmem for other variants
Only few variants support PPG and store LPG per-channel data and pattern
in SDAM modules.  Disallow the nvmem for other variants to make the
binding precise.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Acked-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20240226073713.19045-2-krzysztof.kozlowski@linaro.org
Signed-off-by: Lee Jones <lee@kernel.org>
2024-03-07 08:48:14 +00:00
Krzysztof Kozlowski
615d49f552 dt-bindings: leds: qcom-lpg: Drop redundant qcom,pm8550-pwm in if:then:
"qcom,pm8550-pwm" is compatible with "qcom,pm8350c-pwm" (latter used as
fallback), thus it is enough for the "if:then:" clause to check for the
presence of the fallback "qcom,pm8350c-pwm".

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Acked-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20240226073713.19045-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Lee Jones <lee@kernel.org>
2024-03-07 08:48:13 +00:00
Anjelique Melendez
d7d0efaf52 dt-bindings: leds: leds-qcom-lpg: Add support for LPG PPG
Update leds-qcom-lpg binding to support LPG PPG.

Signed-off-by: Anjelique Melendez <quic_amelende@quicinc.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20231221185838.28440-3-quic_amelende@quicinc.com
Signed-off-by: Lee Jones <lee@kernel.org>
2024-03-07 08:47:50 +00:00
Duje Mihanović
922235a9b8 dt-bindings: backlight: Add Kinetic KTD2801 binding
KTD2801 is a LED backlight driver IC found in samsung,coreprimevelte.
The brightness can be set using PWM or the ExpressWire protocol. Add
a DT binding for the KTD2801.

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: Duje Mihanović <duje.mihanovic@skole.hr>
Link: https://lore.kernel.org/r/20240125-ktd2801-v5-3-e22da232a825@skole.hr
Signed-off-by: Lee Jones <lee@kernel.org>
2024-03-07 08:45:11 +00:00
Conor Dooley
df620d7fab dt-bindings: leds: pwm-multicolour: re-allow active-low
active-low was lifted to the common schema for leds, but it went
unnoticed that the leds-multicolour binding had "additionalProperties:
false" where the other users had "unevaluatedProperties: false", thereby
disallowing active-low for multicolour leds. Explicitly permit it again.

Fixes: c94d178313 ("dt-bindings: net: phy: Make LED active-low property common")
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
Acked-by: Lee Jones <lee@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2024-03-04 08:59:32 +00:00
Christian Marangi
355c6dc37e dt-bindings: net: phy: Document LED inactive high impedance mode
Document LED inactive high impedance mode to set the LED to require high
impedance configuration to be turned OFF.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Acked-by: Lee Jones <lee@kernel.org>
Reviewed-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20240125203702.4552-3-ansuelsmth@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2024-01-26 21:03:31 -08:00
Christian Marangi
c94d178313 dt-bindings: net: phy: Make LED active-low property common
Move LED active-low property to common.yaml. This property is currently
defined multiple times by bcm LEDs. This property will now be supported
in a generic way for PHY LEDs with the use of a generic function.

With active-low bool property not defined, active-high is always
assumed.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Acked-by: Lee Jones <lee@kernel.org>
Reviewed-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20240125203702.4552-2-ansuelsmth@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2024-01-26 21:03:31 -08:00
Linus Torvalds
21c91bb936 - New Drivers
- Add support for Monolithic Power Systems MP3309C WLED Step-up Converter
 
  - Fix-ups
    - Use/convert to new/better APIs/helpers/MACROs instead of hand-rolling implementations
    - Device Tree Binding updates
    - Demote non-kerneldoc header comments
    - Improve error handling; return proper error values, simplify, avoid duplicates, etc
    - Convert over to the new (kinda) GPIOD API
 
  - Bug Fixes
    - Fix uninitialised local variable
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEdrbJNaO+IJqU8IdIUa+KL4f8d2EFAmWmsY8ACgkQUa+KL4f8
 d2E+PQ/+LP2TiwChRYvz5jKA0ys4N4yR63dQU1s9dcp49D3RjMLgokevDjSswVEJ
 vGlSc3Ld50cuT6oLObI7z/ezK9/QMJ7yMFraSy+QnTOit8xdDAfJAgC6cM8GGoFU
 XKLT4JkkNyhc2NypHKG/hRkMMA6EoBPr+wZTBRpQvbbFOkalTDVtcQNUgsYNr4W6
 0fPT97oKgAmvzK/2KaihmfxtTE0vXon5XyZVpnTu28bqXQbQvbOgzKr5KWom022Y
 XxoMVUaobZn0v/WUC1KqPY1N0tM+xH2PoOD+4jss26oV0TyxYWH9nDorF46gcJpk
 CQkp5jCCra/WHR50fJx7y01GVswfKCNp2fjx9aRnhFsWfW9cu2Kdws3GfGRazPSW
 AN9MJ9Eyv9Xu689hcq0wYZspfMeJe7fyDdEyeUWHCD8mF4BZHiOjeiksz2eKIuTT
 Q4OykhGoh7svw2cA9EPWRvDFu4xyPA2usrDq/ClBEKVL6jE2gfSZjVmvLGGZ2Xmq
 oHRHiE0qK8kWOf3n6ModbMWTZA7D9Y6tGd+rpFe7GdOfPeH1A9uYXfxoJwaUaEAr
 TvcyyrsePUvHJHADwRx1SzHFuwfuNU1PgflkkdhnUopKLeDfeom0CA5a+YjP1M4Z
 lHongOEdL4xAssFZU2ZXgNZiYx8su2AcUfGgnkHF1frMuoxt5Gk=
 =SXS0
 -----END PGP SIGNATURE-----

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

Pull backlight updates from Lee Jones:
 "New Drivers:
   - Add support for Monolithic Power Systems MP3309C WLED Step-up Converter

  Fix-ups:
   - Use/convert to new/better APIs/helpers/MACROs instead of
     hand-rolling implementations
   - Device Tree Binding updates
   - Demote non-kerneldoc header comments
   - Improve error handling; return proper error values, simplify, avoid
     duplicates, etc
   - Convert over to the new (kinda) GPIOD API

  Bug Fixes:
   - Fix uninitialised local variable"

* tag 'backlight-next-6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight:
  backlight: hx8357: Convert to agnostic GPIO API
  backlight: ili922x: Add an error code check in ili922x_write()
  backlight: ili922x: Drop kernel-doc for local macros
  backlight: mp3309c: Fix uninitialized local variable
  backlight: pwm_bl: Use dev_err_probe
  backlight: mp3309c: Add support for MPS MP3309C
  dt-bindings: backlight: mp3309c: Remove two required properties
2024-01-18 16:53:35 -08:00
Johan Hovold
78da55c804 dt-bindings: leds: qcom,spmi-flash-led: Fix example node name
The led controller is a child of an SPMI PMIC, which in turn sits on an
SPMI bus.

While at it, add some newline separators to improve readability.

Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20231130171940.12391-1-johan+linaro@kernel.org
Signed-off-by: Lee Jones <lee@kernel.org>
2023-12-13 11:29:05 +00:00
Dmitry Rokosov
94d4090b61 dt-bindings: leds: aw200xx: Fix led pattern and add reg constraints
AW200XX controllers have the capability to declare more than 0xf LEDs,
therefore, it is necessary to accept LED names using an appropriate
regex pattern.

The register offsets can be adjusted within the specified range, with
the maximum value corresponding to the highest number of LEDs that can
be connected to the controller.

Fixes: e338a05e76 ("dt-bindings: leds: Add binding for AW200xx")
Signed-off-by: Dmitry Rokosov <ddrokosov@salutedevices.com>
Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
Link: https://lore.kernel.org/r/20231125200519.1750-12-ddrokosov@salutedevices.com
Signed-off-by: Lee Jones <lee@kernel.org>
2023-12-13 11:29:04 +00:00
George Stark
13b93b1dca dt-bindings: leds: awinic,aw200xx: Add AW20108 device
Add aw20108 compatible for Awinic AW20108 led controller.

Signed-off-by: George Stark <gnstark@salutedevices.com>
Signed-off-by: Dmitry Rokosov <ddrokosov@salutedevices.com>
Acked-by: Conor Dooley <conor.dooley@microchip.com>
Link: https://lore.kernel.org/r/20231125200519.1750-11-ddrokosov@salutedevices.com
Signed-off-by: Lee Jones <lee@kernel.org>
2023-12-13 11:29:03 +00:00
George Stark
aa4ed49f42 dt-bindings: leds: aw200xx: Remove property "awinic,display-rows"
Get rid of the property "awinic,display-rows" and calculate it
in the driver using led definition nodes.

Signed-off-by: George Stark <gnstark@salutedevices.com>
Signed-off-by: Dmitry Rokosov <ddrokosov@salutedevices.com>
Acked-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20231125200519.1750-6-ddrokosov@salutedevices.com
Signed-off-by: Lee Jones <lee@kernel.org>
2023-12-13 11:28:57 +00:00
Dmitry Rokosov
20dbf6d4a1 dt-bindings: leds: aw200xx: Introduce optional enable-gpios property
Property 'enable-gpios' is optional, it can be used by the board
developer to connect AW200XX LED controller with appropriate 'enable'
GPIO pad.

Signed-off-by: Dmitry Rokosov <ddrokosov@salutedevices.com>
Acked-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20231125200519.1750-4-ddrokosov@salutedevices.com
Signed-off-by: Lee Jones <lee@kernel.org>
2023-12-13 11:28:55 +00:00
Samuel Holland
65dcdf495a dt-bindings: leds: Add Allwinner A100 LED controller
The Allwinner A100, R329, and D1 SoCs contain an LED controller designed
to drive a series of RGB LED pixels. It supports PIO and DMA transfers,
and has configurable timing and pixel format. All three implementations
appear to be identical, so use the oldest as the fallback compatible.

Acked-by: Guo Ren <guoren@kernel.org>
Acked-by: Maxime Ripard <mripard@kernel.org>
Acked-by: Palmer Dabbelt <palmer@rivosinc.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Tested-by: Trevor Woerner <twoerner@gmail.com>
Signed-off-by: Samuel Holland <samuel@sholland.org>
Link: https://lore.kernel.org/r/20231029212738.7871-2-samuel@sholland.org
Signed-off-by: Lee Jones <lee@kernel.org>
2023-12-13 11:28:28 +00:00
Rob Herring
1de1da7b07 dt-bindings: leds: Fix JSON pointer in max-brightness
A valid JSON pointer should begin with a '/'. The json-schema package is
lax on this allowing either form, but that's changing in new versions.

Signed-off-by: Rob Herring <robh@kernel.org>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20231122205418.2482076-1-robh@kernel.org
Signed-off-by: Lee Jones <lee@kernel.org>
2023-12-13 11:28:27 +00:00
Flavio Suligoi
87f33a1b8f dt-bindings: backlight: mp3309c: Remove two required properties
The two properties:

- max-brightness
- default brightness

are not really required, so they can be removed from the "required"
section.
The "max-brightness" is no longer used in the current version
of the driver (it was used only in the first version).
The "default-brightness", if omitted in the DT, is managed by the
device driver, using a default value. This value depends on the dimming
mode used:

- for the "analog mode", via I2C commands, this value is fixed by
  hardware (=31)
- while in case of pwm mode the default used is the last value of the
  brightness-levels array.

Also the brightness-levels array is not required:

- in "analog mode", via I2C commands, the brightness-level array is
  fixed by hardware (0..31).;
- in pwm dimming mode, the driver uses a default array of 0..255 and
  the "default-brightness" is the last one, which is "255"

NOTE: there are no compatibility problems with the previous version,
      since the device driver has not yet been included in any kernel.
      Only this dt-binding yaml file is already included in the current
      v6.7.0-rc1 kernel version.
      No developer may have used it.

Other changes:

- improve the backlight working mode description, in the "description"
  section
- update the example, removing the "max-brightness" and introducing the
  "brightess-levels" property

Signed-off-by: Flavio Suligoi <f.suligoi@asem.it>
Acked-by: Conor Dooley <conor.dooley@microchip.com>
Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>
Link: https://lore.kernel.org/r/20231116105319.957600-2-f.suligoi@asem.it
Signed-off-by: Lee Jones <lee@kernel.org>
2023-11-23 14:54:18 +00:00
Linus Torvalds
be3ca57cfb media updates for v6.7-rc1
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEE+QmuaPwR3wnBdVwACF8+vY7k4RUFAmVF2z0ACgkQCF8+vY7k
 4RUyHBAAhO7ArWtie5SZZ2lYzeoQ2KWZJsiRUdl7ER+lXeKr5HIa23CqVG5+D3hA
 2VQAn/+2wJHMhfSZUcgS889iKGJMhdEj77JBehakTA0122wq/0NNMfbwN0ebHoIZ
 B5FqhXkU8NvQn+8MVyRSnmC7lzlZq7lUlDxbpjCkqOqm5t1TXuMCD81briZxuKWR
 N+STu3rsQ1Vq+HudAqLHcuQKCJjzqo5x2/MOk7DlI+FHtKPLn50CfizmZNiMIn/2
 lVfp6PoZhtBCJAlQFx3VHjYIir5ENvcmdj0ehsocVe4vYFFfBh0NrN8/ixcWyl0i
 z4BSC9/AQTJuAt2mxj2g/OE9ipFqGkhHspSy87GWqCSzIKIKuZYFRHB55e6h6/kA
 11MceDQ+VNmO6dkU4G6/dChaeXt+5omU9mlEaugzmtb/G0HbvYW5jJJuvVMmmGde
 Gy2F2SazGJsfLLBS+I7yKJRDhn5+m+9Q0gCsiKDbEcDoRLrwsi5zraRRVrsKI9q7
 CAFMrU5MCzniMh1UpJxdETPbuxjc54/Uwp3k3ieg7klIyx2rxvL6MzED9O67qkay
 1m0A8hRNpvi+gqS5Zd+V9YafgOEHDziL/KDypp1je+6KbLBvlBsH3YFBps2APJou
 +VgVElxZnwzas4kAkUC+RbCEmRXc/T96oL1mH8w1q4O3iDoaMVc=
 =RO+Y
 -----END PGP SIGNATURE-----

Merge tag 'media/v6.7-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media

Pull media updates from Mauro Carvalho Chehab:

 - the old V4L2 core videobuf kAPI was finally removed. All media
   drivers should now be using VB2 kAPI

 - new automotive driver: mgb4

 - new platform video driver: npcm-video

 - new sensor driver: mt9m114

 - new TI driver used in conjunction with Cadence CSI2RX IP to bridge
   TI-specific parts

 - ir-rx51 was removed and the N900 DT binding was moved to the
   pwm-ir-tx generic driver

 - drop atomisp-specific ov5693, using the upstream driver instead

 - the camss driver has gained RDI3 support for VFE 17x

 - the atomisp driver now detects ISP2400 or ISP2401 at run time. No
   need to set it up at build time anymore

 - lots of driver fixes, cleanups and improvements

* tag 'media/v6.7-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (377 commits)
  media: nuvoton: VIDEO_NPCM_VCD_ECE should depend on ARCH_NPCM
  media: venus: Fix firmware path for resources
  media: venus: hfi_cmds: Replace one-element array with flex-array member and use __counted_by
  media: venus: hfi_parser: Add check to keep the number of codecs within range
  media: venus: hfi: add checks to handle capabilities from firmware
  media: venus: hfi: fix the check to handle session buffer requirement
  media: venus: hfi: add checks to perform sanity on queue pointers
  media: platform: cadence: select MIPI_DPHY dependency
  media: MAINTAINERS: Fix path for J721E CSI2RX bindings
  media: cec: meson: always include meson sub-directory in Makefile
  media: videobuf2: Fix IS_ERR checking in vb2_dc_put_userptr()
  media: platform: mtk-mdp3: fix uninitialized variable in mdp_path_config()
  media: mediatek: vcodec: using encoder device to alloc/free encoder memory
  media: imx-jpeg: notify source chagne event when the first picture parsed
  media: cx231xx: Use EP5_BUF_SIZE macro
  media: siano: Drop unnecessary error check for debugfs_create_dir/file()
  media: mediatek: vcodec: Handle invalid encoder vsi
  media: aspeed: Drop unnecessary error check for debugfs_create_file()
  Documentation: media: buffer.rst: fix V4L2_BUF_FLAG_PREPARED
  Documentation: media: gen-errors.rst: fix confusing ENOTTY description
  ...
2023-11-06 15:06:06 -08:00
Linus Torvalds
431f105188 - Core Frameworks
- Add support for a bunch more colours
 
  - New Drivers
    - Add support for Kinetic KTD2026/7 RGB/White LEDs
 
  - New Functionality
    - Add support for device to enter HW Controlled Mode to Turris Omnia LEDs
    - Add support for HW Gamma Correction to Turris Omnia LEDs
 
  - Fix-ups
    - Apply new __counted_by() annotation to several data structures containing flexible arrays
    - Rid the return value from Platform's .remove() operation
    - Use *_cansleep() variants for instances were threads can sleep
    - Improve the semantics when setting the brightness
    - Generic clean-ups; code reduction, coding style, standard patterns
    - Replace strncpy() with strscpy()
    - Fix-up / add various documentation
    - Re-author the GPIO associated Trigger to use trigger-sources
    - Move to using standard APIs and helpers
    - Improve error checking
    - Stop using static GPIO bases
 
  - Bug Fixes
    - Fix Pointer to Enum casing warnings
    - Do not pretend that I2C backed device supports SMBUS
    - Ensure PWM LEDs are extinguished when disabled, rather than held in a state
    - Fix 'output may be truncated' warnings
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEdrbJNaO+IJqU8IdIUa+KL4f8d2EFAmVDsTgACgkQUa+KL4f8
 d2EQsg/+Jy2zYIpFXaj/sSZCB9gDToIpHNer2XUEgKMXCAF0Ar8SCHvdmIeb9exG
 rCLb86AxvE2trIcZBRITtRgU4YCAr6yiyNZHCYyLxN+WZLind3lL7mKB1x9gVFbw
 MKFmQjl9cWmJjI1Mk10NFzhgYJkMotKWZrQqAeggD5gYinieSVXE2RkrcV/zfQxh
 NqtijzDL0C9pWIXQtqpjic7PSgyC8mIGmD0Q9gyEOWOVbWzmR/vklwEsbirT4nEp
 7QIz/b5nwXVEEJ69WCTNeDBmXYeEKw4DMLJxJ6aTYHf62gramtfTH+d6izY3Hnrs
 EszgWmqmwSqXrwadtg7Zn6xrgec+yDuwj3rwQEQcveOsUJMENtVN6i2ZYO90Hpor
 XP6jzz+KBT/qLF4syfkO7Z9vV7em1zm/AuoiDieFVBy6vMQJmmCvIb+GE1l5CXUv
 myEYVu0P9Ir9/2W+z9rqzor2wtZ9OVXT1XCnV6UPU7mNhJIH8PXr9/cjJgsY5vYC
 H8kZcfaCRlwqPiVA0yucvfEeveptObVojZdkhCH/BnhRtIAWf1jlj5PglfSaOQaU
 jGy6s/8auS5ua0vX2UYFv0cXxSTZpX+7jDzpQcaIKqOPe/xqUSAeL/N4btY+TlfR
 zkQxWxksOtVdD2xaIZvGutcAMXRBEIjgDS61SZBLf/jh7N/iXlc=
 =XYXV
 -----END PGP SIGNATURE-----

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

Pull LED updates from Lee Jones:
 "Core Frameworks:
   - Add support for a bunch more colours

  New Drivers:
   - Add support for Kinetic KTD2026/7 RGB/White LEDs

  New Functionality:
   - Add support for device to enter HW Controlled Mode to Turris Omnia
     LEDs
   - Add support for HW Gamma Correction to Turris Omnia LEDs

  Fix-ups:
   - Apply new __counted_by() annotation to several data structures
     containing flexible arrays
   - Rid the return value from Platform's .remove() operation
   - Use *_cansleep() variants for instances were threads can sleep
   - Improve the semantics when setting the brightness
   - Generic clean-ups; code reduction, coding style, standard patterns
   - Replace strncpy() with strscpy()
   - Fix-up / add various documentation
   - Re-author the GPIO associated Trigger to use trigger-sources
   - Move to using standard APIs and helpers
   - Improve error checking
   - Stop using static GPIO bases

  Bug Fixes:
   - Fix Pointer to Enum casing warnings
   - Do not pretend that I2C backed device supports SMBUS
   - Ensure PWM LEDs are extinguished when disabled, rather than held in
     a state
   - Fix 'output may be truncated' warnings"

* tag 'leds-next-6.7' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/leds: (43 commits)
  leds: lp5521: Add an error check in lp5521_post_init_device
  leds: gpio: Update headers
  leds: gpio: Remove unneeded assignment
  leds: gpio: Move temporary variable for struct device to gpio_led_probe()
  leds: gpio: Refactor code to use devm_gpiod_get_index_optional()
  leds: gpio: Utilise PTR_ERR_OR_ZERO()
  leds: gpio: Keep driver firmware interface agnostic
  leds: core: Refactor led_update_brightness() to use standard pattern
  leds: turris-omnia: Fix brightness setting and trigger activating
  leds: sc27xx: Move mutex_init() down
  leds: trigger: netdev: Move size check in set_device_name
  leds: Add ktd202x driver
  dt-bindings: leds: Add Kinetic KTD2026/2027 LED
  leds: core: Add more colors from DT bindings to led_colors
  dt-bindings: leds: Last color ID is now 14 (LED_COLOR_ID_LIME)
  leds: tca6507: Don't use fixed GPIO base
  leds: lp3952: Convert to use maple tree register cache
  leds: lm392x: Convert to use maple tree register cache
  leds: aw200xx: Convert to use maple tree register cache
  leds: lm3601x: Convert to use maple tree register cache
  ...
2023-11-02 14:53:19 -10:00
Linus Torvalds
38984d7872 - New Functionality
- Add new Device Tree binding for Monolithic Power (MPS) MP3309C step-up converter
    - Document brightness-levels in bindings for; generic, LED and PWM
 
  - Bug Fixes
    - Ensure PWMs are disabled on; .shutdown(), .suspend() and .remove()
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEdrbJNaO+IJqU8IdIUa+KL4f8d2EFAmVDsVMACgkQUa+KL4f8
 d2GsxA//WWkGqltN3lcsG29nANUMsBE2QqCSp8sW/iH8frqkk2tnZ+UIEReNMhKt
 Q03DnB5HQ/gyydsg0XAvW9bkvh0salIpMdMXXLPeI+Rdl/D3bkuPiutyNQIbjPvC
 o7debl9rE+eVcJCZBieO/VfY9HFVP6lfBstjjR+Y2PpnxcCTDmXa1KJiiDsUHQ3b
 /u+PYYdLnwvX1AgbjrqJk4n1qs39a023zOhVfB0JDKO0XXJ8WAkFvEa9FfUQYLAB
 zZmERCIx1fsSTyfdAXxuRG4CX99abMK92wKWWQjDAv7gbkF6041uQ6CyqgLZMI/T
 ++xt3kDUhvm4UtOo4O6gkTOu3siTWLoI4D8tX0gYY3Ks9LykQ9r+wjfSikXpor+a
 Wdg83r/wAyp3vU7ti3Wz/+2b6NwZKCY5WtcN413gjl1tY48+JcaHnUxyjQOZOKkJ
 ZfmzAhJkbEdeyu0LT6MOGEnPY8ToWzPu2bKsviy8sl6hCxXIP/8PG2Mz3sVz+W6F
 cXwmtbFnALLI2cuYimWeHgseBf4qUVqFB5/spLm2UI0a3glM7G8zhRzAn5jEpVfS
 MmFPDzdlU3jKOwC69RrRye2aLtD3Aq101vYbNOTdbQgiab02ARojprDfc7CnDtnt
 +TOHN6tNzBf/w319mz9yS8KbdZ4So8zO/ifHcEpbgYdtR846jA4=
 =djoj
 -----END PGP SIGNATURE-----

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

Pull backlight updates from Lee Jones:
 "New Functionality:

   - Add new Device Tree binding for Monolithic Power (MPS) MP3309C
     step-up converter

   - Document brightness-levels in bindings for; generic, LED and PWM

  Bug Fixes:

   - Ensure PWMs are disabled on .shutdown(), .suspend() and .remove()"

* tag 'backlight-next-6.7' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight:
  dt-bindings: backlight: Add brightness-levels related common properties
  backlight: pwm_bl: Disable PWM on shutdown, suspend and remove
  dt-bindings: backlight: Add MPS MP3309C
2023-11-02 14:46:31 -10:00
André Apitzsch
000b1eab4f dt-bindings: leds: Add Kinetic KTD2026/2027 LED
Document Kinetic KTD2026/2027 LED driver devicetree bindings.

Signed-off-by: André Apitzsch <git@apitzsch.eu>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20231002-ktd202x-v6-1-26be8eefeb88@apitzsch.eu
Signed-off-by: Lee Jones <lee@kernel.org>
2023-11-01 11:29:07 +00:00
Ondrej Jirman
43962eb5de dt-bindings: leds: Last color ID is now 14 (LED_COLOR_ID_LIME)
Increase the limit to match available values in dt-bindings/leds/common.h

Fixes: 472d7b9e81 ("dt-bindings: leds: Expand LED_COLOR_ID definitions")
Signed-off-by: Ondrej Jirman <megi@xff.cz>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20231008142103.1174028-1-megi@xff.cz
Signed-off-by: Lee Jones <lee@kernel.org>
2023-11-01 11:29:05 +00:00
Linus Walleij
f9be4d5bb6 dt-bindings: leds: Mention GPIO triggers
We reuse the trigger-sources phandle to just point to
GPIOs we may want to use as LED triggers.

Example:

gpio: gpio@0 {
    compatible "my-gpio";
    gpio-controller;
    #gpio-cells = <2>;
    interrupt-controller;
    #interrupt-cells = <2>;
    #trigger-source-cells = <2>;
};

leds {
    compatible = "gpio-leds";
    led-my-gpio {
        label = "device:blue:myled";
        gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;
        default-state = "off";
        linux,default-trigger = "gpio";
        trigger-sources = <&gpio 1 GPIO_ACTIVE_HIGH>;
    };
};

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Conor Dooley <conor.dooley@microchip.com>
Link: https://lore.kernel.org/r/20230926-gpio-led-trigger-dt-v2-2-e06e458b788e@linaro.org
Signed-off-by: Lee Jones <lee@kernel.org>
2023-11-01 11:28:57 +00:00
Rob Herring
36af195f7f dt-bindings: mfd: armltd: Move Arm board syscon's to separate schema
The Arm Ltd board bindings are a bit unusual in that they define child
nodes for various syscon's. The schemas are also incomplete as they lack
constraints on having additional properties and some properties are
missing. As the bindings for the different platforms only vary by
compatibles, combine them into a single schema doc.

Add the "arm,im-pd1-syscon" compatible which was not documented. Add
"ranges", "#address-cells", and "#size-cells properties which were
missing.

With this, fix the error exposed in the register-bit-led binding.

Signed-off-by: Rob Herring <robh@kernel.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
Link: https://lore.kernel.org/r/20231020142252.3113716-2-robh@kernel.org
Signed-off-by: Lee Jones <lee@kernel.org>
2023-11-01 10:02:18 +00:00
Sebastian Reichel
93fae36e03 dt-bindings: mfd: max8925: Convert to DT schema format
Convert the binding to DT schema format.

The sub-functions of this MFD device do not have their own compatible
string and are thus described directly in the MFD binding document
after being converted to YAML.

Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20231023131409.1796451-1-sebastian.reichel@collabora.com
Signed-off-by: Lee Jones <lee@kernel.org>
2023-11-01 10:02:17 +00:00
Flavio Suligoi
d5272d3999 dt-bindings: backlight: Add brightness-levels related common properties
Both files pwm-backlight.yaml and led-backlight.yaml contain properties
in common with each other, regarding the brightness levels:

- brightness-levels
- default-brightness-level

These properties can then be moved to backlight/common.yaml.

Signed-off-by: Flavio Suligoi <f.suligoi@asem.it>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20231016150554.27144-1-f.suligoi@asem.it
Signed-off-by: Lee Jones <lee@kernel.org>
2023-10-19 13:27:36 +01:00
Flavio Suligoi
02c4e66165 dt-bindings: backlight: Add MPS MP3309C
The Monolithic Power (MPS) MP3309C is a WLED step-up converter, featuring a
programmable switching frequency to optimize efficiency.
The brightness can be controlled either by I2C commands (called "analog"
mode) or by a PWM input signal (PWM mode).
This driver supports both modes.

For device driver details, please refer to:
- drivers/video/backlight/mp3309c_bl.c

The datasheet is available at:
- https://www.monolithicpower.com/en/mp3309c.html

Signed-off-by: Flavio Suligoi <f.suligoi@asem.it>
Reviewed-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20230925122609.78849-1-f.suligoi@asem.it
Signed-off-by: Lee Jones <lee@kernel.org>
2023-09-28 15:03:06 +01:00
Sean Young
da923feefe dt-bindings: media: remove nokia,n900-ir as pwm-ir-tx is compatible
The generic pwm-ir-tx driver works for the Nokia n900, so nokia,n900-ir
can be removed.

Acked-by: Conor Dooley <conor.dooley@microchip.com>
Acked-by: Lee Jones <lee@kernel.org>
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2023-09-27 09:40:02 +02:00
Linus Torvalds
2be6bc48df - Core Frameworks
- Add new framework to support Group Multi-Color (GMC) LEDs
    - Offer an 'optional' API for non-essential LEDs
    - Support obtaining 'max brightness' values from Device Tree
    - Provide new led_classdev member 'color' (settable via DT and SYFS)
    - Stop TTY Trigger from using the old LED_ON constraints
    - Statically allocate leds_class
 
  - New Drivers
    - Add support for NXP PCA995x I2C Constant Current LED Driver
 
  - New Device Support
    - Add support for Siemens Simatic IPC BX-21 to Simatic IPC
 
  - Fix-ups
    - Some dependency / Kconfig tweaking
    - Move final probe() functions back over from .probe_new()
    - Simplify obtaining resources (memory, device data) using unified API helpers
    - Bunch of Device Tree additions, conversions and adaptions
    - Fix trivial styling issues; comments
    - Ensure correct includes are present and remove some that are not required
    - Omit the use of redundant casts and if relevant replace with better ones
    - Use purpose-built APIs for various actions; sysfs_emit(), module_led_trigger()
    - Remove a bunch of superfluous locking
 
  - Bug Fixes
    - Ensure error codes are correctly propagated back up the call chain
    - Fix incorrect error values from being returned (missing '-')
    - Ensure get'ed resources are put'ed to prevent leaks
    - Use correct class when exporting module resources
    - Fixing rounding (or lack there of) issues
    - Fix 'always false' LED_COLOR_ID_MULTI BUG() check
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEdrbJNaO+IJqU8IdIUa+KL4f8d2EFAmT15DUACgkQUa+KL4f8
 d2ER0BAAoejCCnb24JOrYQy7Pq3/ZaaT6PWOB+/U+6s5jyj9ikwHqqH+g/E+FqkE
 AHvhkBalgw1l+QRCvrZMEcsiQmjK5ZR010Ju3lCbvUDa1tsm2Fn/K2IZZxI1j9O8
 mGnPjYrX3FRfejscw0a+MA75o3DuN97V9mHNk6lyRnm/d0ronu+vv/fRYFON04iY
 v2e166/9wfJWvDwOLo+phDS2aCkjLkxzj2lcTtcvuzYqQjOPDqiFTJsft9gOpC9r
 hKOqUkexKebShbi08A+x0fmiB9LNs5kZ3xWWLaxVDT58Plkqv905oLVrWARTGhIG
 BDAhW2/TLV30bhSiTb/bX0eNEMCU6q6WIPwc3otUYpkDeLgbxLD7Rlhp49oud7j9
 5vWX8bxSczIYRir42TKZ+s/d6pKKSvMrsNRDplFb1ahZTv3ssDxuxAA/FY2UPqTt
 C83j0hJOwVfj6ric01R+yedPSW8Po8xqEIzjoxzYtsu3IYGiz6ddjd2ZnhNF5YfP
 AN7GDuja9r7+Fa8JcTFssHe6HtuzkfpJvrpjV3BxL79q6s1z+lT9szTw5Z65zGmO
 k/z4xz95RHUTbpR4rVT+A1pdbQ8OsbVthdy1XnJoYK3NJYJrPldj3Ur3W4wRecP6
 32RWF8ZF6WARsSyyACLo/MP6qxwAE2xk5TjmpLqCeK0ObVmlwDM=
 =wNmv
 -----END PGP SIGNATURE-----

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

Pull LED updates from Lee Jones:
 "Core Frameworks:
   - Add new framework to support Group Multi-Color (GMC) LEDs
   - Offer an 'optional' API for non-essential LEDs
   - Support obtaining 'max brightness' values from Device Tree
   - Provide new led_classdev member 'color' (settable via DT and SYFS)
   - Stop TTY Trigger from using the old LED_ON constraints
   - Statically allocate leds_class

  New Drivers:
   - Add support for NXP PCA995x I2C Constant Current LED Driver

  New Device Support:
   - Add support for Siemens Simatic IPC BX-21 to Simatic IPC

  Fix-ups:
   - Some dependency / Kconfig tweaking
   - Move final probe() functions back over from .probe_new()
   - Simplify obtaining resources (memory, device data) using unified
     API helpers
   - Bunch of Device Tree additions, conversions and adaptions
   - Fix trivial styling issues; comments
   - Ensure correct includes are present and remove some that are not
     required
   - Omit the use of redundant casts and if relevant replace with better
     ones
   - Use purpose-built APIs for various actions; sysfs_emit(),
     module_led_trigger()
   - Remove a bunch of superfluous locking

  Bug Fixes:
   - Ensure error codes are correctly propagated back up the call chain
   - Fix incorrect error values from being returned (missing '-')
   - Ensure get'ed resources are put'ed to prevent leaks
   - Use correct class when exporting module resources
   - Fixing rounding (or lack there of) issues
   - Fix 'always false' LED_COLOR_ID_MULTI BUG() check"

* tag 'leds-next-6.6' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/leds: (40 commits)
  leds: aw2013: Enable pull-up supply for interrupt and I2C
  dt-bindings: leds: Document pull-up supply for interrupt and I2C
  dt-bindings: leds: aw2013: Document interrupt
  leds: uleds: Use module_misc_device macro to simplify the code
  leds: trigger: netdev: Use module_led_trigger macro to simplify the code
  dt-bindings: leds: Fix reference to definition of default-state
  leds: turris-omnia: Drop unnecessary mutex locking
  leds: turris-omnia: Use sysfs_emit() instead of sprintf()
  leds: Make leds_class a static const structure
  leds: Remove redundant of_match_ptr()
  dt-bindings: leds: Add gpio-line-names to PCA9532 GPIO
  leds: trigger: tty: Do not use LED_ON/OFF constants, use led_blink_set_oneshot instead
  dt-bindings: leds: rohm,bd71828: Drop select:false
  leds: Fix BUG_ON check for LED_COLOR_ID_MULTI that is always false
  leds: multicolor: Use rounded division when calculating color components
  leds: rgb: Add a multicolor LED driver to group monochromatic LEDs
  dt-bindings: leds: Add binding for a multicolor group of LEDs
  leds: class: Store the color index in struct led_classdev
  leds: Provide devm_of_led_get_optional()
  leds: pca995x: Fix MODULE_DEVICE_TABLE for OF
  ...
2023-09-04 13:52:58 -07:00
Bjorn Helgaas
47aab53331 dt-bindings: Fix typos
Fix typos in Documentation/devicetree/bindings.  The changes are in
descriptions or comments where they shouldn't affect functionality.

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Link: https://lore.kernel.org/r/20230814212822.193684-3-helgaas@kernel.org
Signed-off-by: Rob Herring <robh@kernel.org>
2023-08-18 11:32:25 -05:00
Stephan Gerhold
2cccb179ad dt-bindings: leds: Document pull-up supply for interrupt and I2C
Since the interrupt and I2C lines of AW2013 operate in open drain low
active mode a pull-up supply is needed for correct operation.
Unfortunately there is no ideal place to describe it in the DT: The
pull-up needed for the I2C lines could be described on the I2C bus.
However, the pull-up needed for the interrupt line belongs neither
directly to the interrupt controller nor to AW2013. Since the AW2013
driver will be typically in control of the power management and
interrupt masking it makes more sense to describe it inside the AW2013
device tree node.

Add it to the AW2013 DT schema together with a comment that makes it
clear what exactly it represents.

Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Nikita Travkin <nikita@trvn.ru>
Link: https://lore.kernel.org/r/20230815-aw2013-vio-v3-2-2505296b0856@gerhold.net
Signed-off-by: Lee Jones <lee@kernel.org>
2023-08-18 16:47:21 +01:00
Stephan Gerhold
9422bcf125 dt-bindings: leds: aw2013: Document interrupt
AW2013 has an optional interrupt pin "INTN" which is used to report
completion of started operations (e.g. power up or LED breath effects).
The driver does not use it (yet) but it should be described for
completeness inside the DT schema.

Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Nikita Travkin <nikita@trvn.ru>
Link: https://lore.kernel.org/r/20230815-aw2013-vio-v3-1-2505296b0856@gerhold.net
Signed-off-by: Lee Jones <lee@kernel.org>
2023-08-18 16:47:21 +01:00
Jonathan Neuschäfer
d3679199f6 dt-bindings: leds: Fix reference to definition of default-state
At least since the YAML conversion, the default-state property is
described in leds/common.yaml, so there's no need to point to another
file for its definition.

Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
Acked-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20230814163116.1696092-1-j.neuschaefer@gmx.net
Signed-off-by: Lee Jones <lee@kernel.org>
2023-08-18 11:30:46 +01:00
Alexander Stein
4aa8f7e24f dt-bindings: leds: Add gpio-line-names to PCA9532 GPIO
This is a gpio-controller, so gpio-line-names should be allowed as well.

pca9532 supports up to 16 GPIOs.

Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20230724063520.182888-2-alexander.stein@ew.tq-group.com
Signed-off-by: Lee Jones <lee@kernel.org>
2023-08-17 12:49:19 +01:00
Krzysztof Kozlowski
f044ae6b5a dt-bindings: leds: rohm,bd71828: Drop select:false
select:false makes the schema basically ignored (not selected for given
compatible), unless some other binding references it.  It's not really
useful nor needed for device bindings, even if they are part of other
binding (like MFD).

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Matti Vaittinen <mazziesaccount@gmail.com>
Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
Link: https://lore.kernel.org/r/20230728171123.110489-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Lee Jones <lee@kernel.org>
2023-08-17 11:29:07 +01:00
Jean-Jacques Hiblot
099c52d944 dt-bindings: leds: Add binding for a multicolor group of LEDs
This allows to group multiple monochromatic LEDs into a multicolor
LED, e.g. RGB LEDs.

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@traphandler.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20230728153731.3742339-4-jjhiblot@traphandler.com
Signed-off-by: Lee Jones <lee@kernel.org>
2023-08-17 09:00:47 +01:00
Rob Herring
02a3fa1ede dt-bindings: leds: Convert Panasonic AN30259A to DT schema
Convert the Panasonic AN30259A 3-channel LED controller binding to DT
schema format.

Signed-off-by: Rob Herring <robh@kernel.org>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20230724230258.1017258-1-robh@kernel.org
Signed-off-by: Lee Jones <lee@kernel.org>
2023-07-28 12:15:32 +01:00
Marek Vasut
a4789089b7 dt-bindings: leds: pca995x: Add binding document for PCA995X chips
The PCA995x chips are I2C controlled LED drivers. Each chip has
up to 16 outputs, each one with an individual 8-bit resolution
PWM for brightness control. Add binding document.

Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20230713163516.21644-1-marex@denx.de
Signed-off-by: Lee Jones <lee@kernel.org>
2023-07-28 09:26:26 +01:00
Marek Vasut
51c8be0c58 dt-bindings: leds: bd2606mvv: Fix maximum register value
Since the chip can drive up to 6 lines, the maximum
register number should be only 5, not 6.

Signed-off-by: Marek Vasut <marex@denx.de>
Acked-by: Rob Herring <robh@kernel.org>
Reviewed-by: Andreas Kemnade <andreas@kemnade.info>
Link: https://lore.kernel.org/r/20230704202929.91962-1-marex@denx.de
Signed-off-by: Lee Jones <lee@kernel.org>
2023-07-28 09:26:23 +01:00
Astrid Rost
713899c062 dt-bindings: leds: Read max-brightness from device tree
Normally, the maximum brightness is determined by the hardware, and this
property is not required. This property is used to set a software limit.
It could happen that an LED is made so bright that it gets damaged or
causes damage due to restrictions in a specific system, such as mounting
conditions.
Note that this flag is mainly used for PWM-LEDs, where it is not possible
to map brightness to current. Drivers for other controllers should use
led-max-microamp.

Signed-off-by: Astrid Rost <astrid.rost@axis.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Rob Herring <robh@kernel.org>
Acked-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>
Link: https://lore.kernel.org/r/20230703130313.548519-2-astrid.rost@axis.com
Signed-off-by: Lee Jones <lee@kernel.org>
2023-07-28 09:26:21 +01:00
Linus Torvalds
0a8d6c9c71 - New Functionality
- Add lots of Device Tree bindings / support
    - Turn off LED strings when display is blank
    - Switch I2C drivers from .probe_new() to .probe()
    - Remove superfluous NULL checks
    - Only obtain PWM information once and do it in .probe()
 
  - Fix-ups
    - Ensure locks are obtained and held when required
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEdrbJNaO+IJqU8IdIUa+KL4f8d2EFAmSinqoACgkQUa+KL4f8
 d2HvRQ//XGzNTwl3T67PJCbNjsmgYGZ7ilfsilblNtkaQVO832uv9/qT24a/EbHC
 +tBPoMJ5KeOWhqyn03Whafl375BLbjWRpzeHM7haVgG97lQLpEpfQpKlFq7GtyGm
 Bsp2Cc87mvws6XDltTyLuegOexYT8JRuqFUkUA+t1sU7sHkm4XIGOx12r2mKCA8k
 JRw7qHn39JaKcd7TYbRJ51h7jPZ24HU5Ve5toITL8W6Qi6xI3vNJU8CqxbCa7nKu
 OKsJ7o/yp2oOacVFK/vfT79A4r7j2nXIdF4DWHi5CGdH/SJi4c5Bpw8zixtGO+gh
 A7f0nkdIWkJyXUKSa8YWXoXQuLfT5ZjZTr+q6TtfzLly1g/CMtKRIieEZCIhkSyg
 P4OnsgV5HrMeHzIrYupO2j9Dvb7N/PsRCR4bM6l+osS9b4sbXixCqw2tGhIcPhka
 jq/d9Zbtxg8gSlhz25HeHa/q4MEWUj8ITpYfgov/wBmHW/CLf4k7be7zOjvMfy1T
 8oj03fVnCQwzYggcxQknRUND8mnueJHFoQXGbc8iYLcPQ0kiRGp52/PyzJwLJKCP
 Def4uUtJ9+9M6OCCBO2JuHT//waz+I5TJ2hiRhjz4AeDFxV/SBsgpDKKYnwzKaZm
 6J5p+dYUsc/VW995QrEt199g9lMRaBI1raSxIBBEAV6Hd10Ju2g=
 =pKT7
 -----END PGP SIGNATURE-----

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

Pull backlight updates from Lee Jones:
 "New Functionality:
   - Add lots of Device Tree bindings / support
   - Turn off LED strings when display is blank
   - Switch I2C drivers from .probe_new() to .probe()
   - Remove superfluous NULL checks
   - Only obtain PWM information once and do it in .probe()

  Fix-ups:
   - Ensure locks are obtained and held when required"

* tag 'backlight-next-6.5' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight:
  backlight: led_bl: Take led_access lock when required
  video: backlight: lp855x: Get PWM for PWM mode during probe
  dt-bindings: backlight: lp855x: Convert to YAML and modernize
  dt-bindings: backlight: pwm: Make power-supply not required
  backlight: pwm_bl: Remove unneeded checks for valid GPIOs
  backlight: Switch i2c drivers back to use .probe()
  backlight: lm3630a: Turn off both led strings when display is blank
  dt-bindings: leds: backlight: ktz8866: Add reg property and update example
2023-07-03 11:31:01 -07:00
Raymond Hackley
2a5724a0a7 dt-bindings: leds: sgm3140: Document richtek,rt5033 compatible
Add devicetree binding for Richtek RT5033 Flash LED charge pump used for
camera flash LEDs.

Signed-off-by: Raymond Hackley <raymondhackley@protonmail.com>
Link: https://lore.kernel.org/r/20230602131009.260239-1-raymondhackley@protonmail.com
Signed-off-by: Lee Jones <lee@kernel.org>
2023-06-21 19:08:31 +01:00
Rob Herring
f0fb7651ba dt-bindings: backlight: kinetic,ktz8866: Add missing type for "current-num-sinks"
"current-num-sinks" is missing a type, add it.

Signed-off-by: Rob Herring <robh@kernel.org>
Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
Link: https://lore.kernel.org/r/20230613201022.2823392-1-robh@kernel.org
Signed-off-by: Lee Jones <lee@kernel.org>
2023-06-21 18:18:50 +01:00
Krzysztof Kozlowski
177f76ce42 dt-bindings: leds: Drop unneeded quotes
Cleanup bindings dropping unneeded quotes. Once all these are fixed,
checking for this can be enabled in yamllint.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20230609140725.64771-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Lee Jones <lee@kernel.org>
2023-06-15 15:07:49 +01:00
AngeloGioacchino Del Regno
0642b7e838 dt-bindings: leds: leds-mt6323: Document mt6332 compatible
Add support for MT6332 LEDs/WLEDs with compatible "mediatek,mt6332-led".

Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Alexandre Mergnat <amergnat@baylibre.com>
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/20230601110813.2373764-3-angelogioacchino.delregno@collabora.com
2023-06-09 07:41:01 +01:00
AngeloGioacchino Del Regno
020378ab90 dt-bindings: leds: leds-mt6323: Document mt6331 compatible
Add mediatek,mt6331-led compatible for the LED controller found
in the MT6331 PMIC.

Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Alexandre Mergnat <amergnat@baylibre.com>
Signed-off-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/20230601110813.2373764-2-angelogioacchino.delregno@collabora.com
2023-06-09 07:40:34 +01:00
Artur Weber
24b8ae3e2e dt-bindings: backlight: lp855x: Convert to YAML and modernize
Notable changes:
- ROM child nodes use dashes instead of underscores; the driver
  reads all child nodes regardless of their names, so this doesn't
  break ABI.
- pwm-period argument is deprecated, as it effectively duplicates
  the period value provided in pwms. The driver continues to accept
  the property, so this should not break ABI.

Signed-off-by: Artur Weber <aweber.kernel@gmail.com>
Reviewed-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/20230519180728.2281-2-aweber.kernel@gmail.com
2023-06-08 16:46:18 +01:00