Skip to content

mfd: lm3533: convert to OF bindings, improve support

Svyatoslav Ryhel dri-devel linux-devicetree linux-fbdev linux-iio linux-leds lkml mfd 6 versions – Applied

Status from this message: Applied, thanks!

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v6 Latest13 of 14 patches 10 repliesApplied
  2. v514 patches 36 repliesSuperseded
  3. v414 patches 22 repliesSuperseded
Earlier versions · 3
VersionPostedPatchesRepliesStatus
v311 patches22 repliesSuperseded
v26 patches17 repliesSuperseded
v16 patches13 repliesSuperseded

Changes in v6 from the cover letter

- expanded commit message in OF conversion commit
- restored original comment regarding PWM mode of ALS
- switched to FIELD_PREP macro in core for helper flattening
---

13 of 14 patches are in this archive. The cover letter announces 14.

Patches in v6 Applied

#Subject and filesSizeRepliesApplied
1/14dt-bindings: leds: Document TI LM3533 LED controllerDocumentation/devicetree/bindings/leds/backlight/ti,lm3533-backlight.yaml Documentation/devicetree/bindings/leds/ti,lm3533-leds.yaml Documentation/devicetree/bindings/leds/ti,lm3533.yaml+305 -00 replies
2/14mfd: lm3533: Remove driver specific regmap wrappersdrivers/iio/light/lm3533-als.c drivers/leds/leds-lm3533.c drivers/mfd/lm3533-core.c +3 more+100 -1941 reply
3/14mfd: lm3533: Remove extern from shared functions in the headerinclude/linux/mfd/lm3533.h+8 -80 replies
4/14mfd: lm3533: Pass only regmap and light sensor presence to child devicesdrivers/iio/light/lm3533-als.c drivers/leds/leds-lm3533.c drivers/mfd/lm3533-ctrlbank.c +2 more+53 -462 replies
5/14iio: light: lm3533-als: Remove redundant pdata helpersdrivers/iio/light/lm3533-als.c+16 -400 replies
6/14mfd: lm3533-core: Remove redundant pdata helpersdrivers/mfd/lm3533-core.c+15 -460 replies
7/14mfd: lm3533: Use dev_groups in struct device_driverdrivers/mfd/lm3533-core.c drivers/video/backlight/lm3533_bl.c+14 -240 replies
8/14mfd: lm3533: Convert to use OF bindingsdrivers/iio/light/lm3533-als.c drivers/leds/leds-lm3533.c drivers/mfd/lm3533-core.c +3 more+217 -2443 replies
9/14mfd: lm3533: Add support for VIN power supplydrivers/mfd/lm3533-core.c include/linux/mfd/lm3533.h+23 -20 replies
10/14mfd: lm3533: Set DMA maskdrivers/mfd/lm3533-core.c+4 -00 replies
11/14video: backlight: lm3533_bl: Improve logic of sysfs functionsdrivers/video/backlight/lm3533_bl.c+22 -400 replies
12/14video: backlight: lm3533_bl: Set initial mapping mode from DTdrivers/video/backlight/lm3533_bl.c+10 -00 replies
13/14video: backlight: lm3533_bl: Implement backlight_scale propertydrivers/video/backlight/lm3533_bl.c+6 -00 replies

Reviews trailers per patch

10 of 13 patches have a Reviewed-by or Acked-by.

PatchJonathan CameronDaniel Thompson (RISCstar)Rob Herring (Arm)Andy ShevchenkoJohan Hovold
1/14R-b R-b R-b
2/14A-b R-b
3/14R-b
4/14A-b R-b
5/14R-b
6/14
7/14R-b
8/14A-b R-b
9/14
10/14
11/14R-b
12/14R-b
13/14R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 5 reviewers.

Read the v6 thread

Cover letter [PATCH v6 00/14] mfd: lm3533: convert to OF bindings, improve support

Convert LM3533 to OF bindings, add missing VIN supply, add support for setting mapping mode and LED sources based on device tree.

---
Changes in v2:

schema
- maximum led sources for leds set to 4
- anyOf > oneOf in ALS
- improved ALS descriptions
- adjusted example
drivers
- dropped devm convertion of irq and mfd helpers
- all als configuration moved into lm3533_als_setup
- added regulator/consumer.h
- lm3533_bl_setup set before sysfs_create_group in backlight
- added check if LVLED is valid
- LM3533_REG_OUTPUT_CONF1 > LM3533_REG_OUTPUT_CONF2 for LVLED4 and LVLED5

Changes in v3:

- ohm -> ohms
- added default PWM mask to schema
- added commit removing driver regmap wrappers
- added commits which flatten pdata helpers
- adjusted check if als->irq > 0 since als->irq can be negative if error/missing
- added count for children defined in device tree and mfd_cell is allocated via devm_kcalloc to be able to contain all of them
- fixed backlight boundary check
- fixed count increased unconditionally
- dev_err returns node name instead of reg value
- LM3533_MAX_CURRENT_* defines moved to common header since they are used to clamp current values read from the tree
- mapping mode commit splitted into 2 (sysfs logic improvement > mode from DT)
- backlight mode configuration set before sysfs group is created
- fixed LVLED check on LEDs setup
- added check if HVLED is valid
- fixed wrong err_sysfs_remove goto in lm3533_bl
- added commit implementing backlight_scale property

Changes in v4:

- fixed regmap_update_bits val and mask swap in lm3533_als_set_int_mode
- fixed als->irq check in store_thresh_either_en
- removed clamping of r_select in als driver
- added use_of_reg and of_reg for backlight and leds registration
- added intermediate step in asigning props.brightness
- fixed HVLED/LVLED configuration overwriting
- added bounds check for num_leds in leds and backlight driver
- switched to regmap_clean/set/assign/test_bits helpers where appropriate
- dropped extern from header function declartions
- switched lm3533 pointer in cell structures to regmap
- sysfs_create_group > device_add_group
- changes in backlight sysfs were expanded to all properties

Changes in v5:

- aligned driver helpers to use u32
- child nodes parsing linked with 'else if' to ensure there is one call per node
- removed redundant pwm var init for leds
- fixed regmap_test_bits return check
- fixed leds and backlight counting handling
- iterator variables made scoped
- lm3533_als_setup() set to exit after mode set if m0de is pwm

Changes in v6:

- expanded commit message in OF conversion commit
- restored original comment regarding PWM mode of ALS
- switched to FIELD_PREP macro in core for helper flattening
---

Svyatoslav Ryhel (14):
dt-bindings: leds: Document TI LM3533 LED controller
mfd: lm3533: Remove driver specific regmap wrappers
mfd: lm3533: Remove extern from shared functions in the header
mfd: lm3533: Pass only regmap and light sensor presence to child
devices
iio: light: lm3533-als: Remove redundant pdata helpers
mfd: lm3533-core: Remove redundant pdata helpers
mfd: lm3533: Use dev_groups in struct device_driver
mfd: lm3533: Convert to use OF bindings
mfd: lm3533: Add support for VIN power supply
mfd: lm3533: Set DMA mask
video: backlight: lm3533_bl: Improve logic of sysfs functions
video: backlight: lm3533_bl: Set initial mapping mode from DT
video: backlight: lm3533_bl: Implement backlight_scale property
video: leds: backlight: lm3533: Support getting LED sources from DT

 .../leds/backlight/ti,lm3533-backlight.yaml   |  69 ++++
 .../bindings/leds/ti,lm3533-leds.yaml         |  67 ++++
 .../devicetree/bindings/leds/ti,lm3533.yaml   | 169 ++++++++
 drivers/iio/light/lm3533-als.c                | 179 ++++-----
 drivers/leds/leds-lm3533.c                    | 181 ++++++---
 drivers/mfd/lm3533-core.c                     | 378 +++++++-----------
 drivers/mfd/lm3533-ctrlbank.c                 |  33 +-
 drivers/video/backlight/lm3533_bl.c           | 231 ++++++-----
 include/linux/mfd/lm3533.h                    |  75 +---
 9 files changed, 818 insertions(+), 564 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/leds/backlight/ti,lm3533-backlight.yaml
 create mode 100644 Documentation/devicetree/bindings/leds/ti,lm3533-leds.yaml
 create mode 100644 Documentation/devicetree/bindings/leds/ti,lm3533.yaml
Signature · 1 line
2.53.0