mbox series

[v8,0/7] Add support for LUT PPG

Message ID 20231221185838.28440-1-quic_amelende@quicinc.com (mailing list archive)
Headers show
Series Add support for LUT PPG | expand

Message

Anjelique Melendez Dec. 21, 2023, 6:58 p.m. UTC
In certain PMICs, LUT pattern and LPG configuration is stored in SDAM
modules instead of LUT peripheral. This feature is called PPG.

This change series adds support for PPG. Thanks!
Changes since v7:
  - Patch 4/7
    - Initialize hi/lo_pause variables in lpg_pattern_set()
Changes since v6:
  - Patch 2/7
    - Removed required by constraint on PPG dt properties
Changes since v5:
  - Patch 4/7
    - Update logic so that multicolor led device triggers pattern
      on all LEDs at the same time
    - Update nitpicks from Lee
  - Patch 5/7
    - Update nitpicks from Lee
Changes since v4:
  - Patch 3/7
    - Get rid of r/w helpers
    - Use regmap_read_poll_timeout() in qcom_pbs_wait_for_ack()
    - Update error path in qcom_pbs_trigger_event()
    - Fix reverse christmas tree
  - Patch 4/7
    - Get rid of r/w helpers
    - Update variables to use "sdam" instead of "nvmem"
    - Fix comments
    - Fix reverse christmas tree
    - Update lpg_pattern_set() logic
  - Patch 5/7
    - Removed sdam_lut_base from lpg_data
Changes since v3:
  - Patch 4/7
    - Fix function returns
    - Move register definition to top of file
    - Revert max_brightness and probe accidental changes
    - Combine init_sdam() and parse_sdam()
    - Change error prints in probe to use dev_err_probe
    - Remove ppg_en variable
    - Update when pbs triggers are set/cleared
  - Patch 6/7
    - Remove use of nvmem_count
    - Move register definition to top of file
    - Remove lpg_get_sdam_lut_idx()
Changes since v2:
  - Patch 1/7
    - Fix dt_binding_check error
    - Rename binding file to match compatible
    - Iclude SoC specific comptaibles
  - Patch 2/7
    - Update nvmem-names list
  - Patch 3/7
    - Update EXPORT_SYMBOL to EXPORT_SYMBOL_GPL
    - Fix return/break logic in qcom_pbs_wait_for_ack()
    - Update iterators to be int
    - Add constants
    - Fix function calls in qcom_pbs_trigger_event()
    - Remove unnessary comments
    - Return -EPROBE_DEFER from get_pbs_client_device()
Changes since v1:
  - Patch 1/7
    - Fix dt_binding_check errors
    - Update binding description
  - Path 2/7
    - Fix dt_binding_check errors
    - Update per variant constraints
    - Update nvmem description
  - Patch 3/7
    - Update get_pbs_client_device()
    - Drop use of printk
    - Remove unused function

Anjelique Melendez (7):
  dt-bindings: soc: qcom: Add qcom,pbs bindings
  dt-bindings: leds: leds-qcom-lpg: Add support for LPG PPG
  soc: qcom: add QCOM PBS driver
  leds: rgb: leds-qcom-lpg: Add support for PPG through single SDAM
  leds: rgb: leds-qcom-lpg: Update PMI632 lpg_data to support PPG
  leds: rgb: leds-qcom-lpg: Include support for PPG with dedicated LUT
    SDAM
  leds: rgb: Update PM8350C lpg_data to support two-nvmem PPG Scheme

 .../bindings/leds/leds-qcom-lpg.yaml          |  82 ++++-
 .../bindings/soc/qcom/qcom,pbs.yaml           |  46 +++
 drivers/leds/rgb/leds-qcom-lpg.c              | 348 ++++++++++++++++--
 drivers/soc/qcom/Kconfig                      |   9 +
 drivers/soc/qcom/Makefile                     |   1 +
 drivers/soc/qcom/qcom-pbs.c                   | 243 ++++++++++++
 include/linux/soc/qcom/qcom-pbs.h             |  30 ++
 7 files changed, 728 insertions(+), 31 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/soc/qcom/qcom,pbs.yaml
 create mode 100644 drivers/soc/qcom/qcom-pbs.c
 create mode 100644 include/linux/soc/qcom/qcom-pbs.h

Comments

Lee Jones Jan. 11, 2024, 10:05 a.m. UTC | #1
On Thu, 21 Dec 2023 10:58:30 -0800, Anjelique Melendez wrote:
> In certain PMICs, LUT pattern and LPG configuration is stored in SDAM
> modules instead of LUT peripheral. This feature is called PPG.
> 
> This change series adds support for PPG. Thanks!
> Changes since v7:
>   - Patch 4/7
>     - Initialize hi/lo_pause variables in lpg_pattern_set()
> Changes since v6:
>   - Patch 2/7
>     - Removed required by constraint on PPG dt properties
> Changes since v5:
>   - Patch 4/7
>     - Update logic so that multicolor led device triggers pattern
>       on all LEDs at the same time
>     - Update nitpicks from Lee
>   - Patch 5/7
>     - Update nitpicks from Lee
> Changes since v4:
>   - Patch 3/7
>     - Get rid of r/w helpers
>     - Use regmap_read_poll_timeout() in qcom_pbs_wait_for_ack()
>     - Update error path in qcom_pbs_trigger_event()
>     - Fix reverse christmas tree
>   - Patch 4/7
>     - Get rid of r/w helpers
>     - Update variables to use "sdam" instead of "nvmem"
>     - Fix comments
>     - Fix reverse christmas tree
>     - Update lpg_pattern_set() logic
>   - Patch 5/7
>     - Removed sdam_lut_base from lpg_data
> Changes since v3:
>   - Patch 4/7
>     - Fix function returns
>     - Move register definition to top of file
>     - Revert max_brightness and probe accidental changes
>     - Combine init_sdam() and parse_sdam()
>     - Change error prints in probe to use dev_err_probe
>     - Remove ppg_en variable
>     - Update when pbs triggers are set/cleared
>   - Patch 6/7
>     - Remove use of nvmem_count
>     - Move register definition to top of file
>     - Remove lpg_get_sdam_lut_idx()
> Changes since v2:
>   - Patch 1/7
>     - Fix dt_binding_check error
>     - Rename binding file to match compatible
>     - Iclude SoC specific comptaibles
>   - Patch 2/7
>     - Update nvmem-names list
>   - Patch 3/7
>     - Update EXPORT_SYMBOL to EXPORT_SYMBOL_GPL
>     - Fix return/break logic in qcom_pbs_wait_for_ack()
>     - Update iterators to be int
>     - Add constants
>     - Fix function calls in qcom_pbs_trigger_event()
>     - Remove unnessary comments
>     - Return -EPROBE_DEFER from get_pbs_client_device()
> Changes since v1:
>   - Patch 1/7
>     - Fix dt_binding_check errors
>     - Update binding description
>   - Path 2/7
>     - Fix dt_binding_check errors
>     - Update per variant constraints
>     - Update nvmem description
>   - Patch 3/7
>     - Update get_pbs_client_device()
>     - Drop use of printk
>     - Remove unused function
> 
> [...]

Applied, thanks!

[2/7] dt-bindings: leds: leds-qcom-lpg: Add support for LPG PPG
      commit: 2fdd08fec742e0c94a2a06a0c9ee0912b6f7ac39
[4/7] leds: rgb: leds-qcom-lpg: Add support for PPG through single SDAM
      commit: 07a1afc8fbb77cc893e2285112482902ac88a295
[5/7] leds: rgb: leds-qcom-lpg: Update PMI632 lpg_data to support PPG
      commit: f4f5f6a6f8d7bcc8efd0eee6751def22c9a38fd0
[6/7] leds: rgb: leds-qcom-lpg: Include support for PPG with dedicated LUT SDAM
      commit: 7399a927272de1fc42f4da8af1d8d60b65a15b84
[7/7] leds: rgb: Update PM8350C lpg_data to support two-nvmem PPG Scheme
      commit: 7b4066868689b1f341e61957611d252b6fa8cafc

--
Lee Jones [李琼斯]
Lee Jones Jan. 11, 2024, 10:07 a.m. UTC | #2
On Thu, 11 Jan 2024, Lee Jones wrote:

> On Thu, 21 Dec 2023 10:58:30 -0800, Anjelique Melendez wrote:
> > In certain PMICs, LUT pattern and LPG configuration is stored in SDAM
> > modules instead of LUT peripheral. This feature is called PPG.
> > 
> > This change series adds support for PPG. Thanks!
> > Changes since v7:
> >   - Patch 4/7
> >     - Initialize hi/lo_pause variables in lpg_pattern_set()
> > Changes since v6:
> >   - Patch 2/7
> >     - Removed required by constraint on PPG dt properties
> > Changes since v5:
> >   - Patch 4/7
> >     - Update logic so that multicolor led device triggers pattern
> >       on all LEDs at the same time
> >     - Update nitpicks from Lee
> >   - Patch 5/7
> >     - Update nitpicks from Lee
> > Changes since v4:
> >   - Patch 3/7
> >     - Get rid of r/w helpers
> >     - Use regmap_read_poll_timeout() in qcom_pbs_wait_for_ack()
> >     - Update error path in qcom_pbs_trigger_event()
> >     - Fix reverse christmas tree
> >   - Patch 4/7
> >     - Get rid of r/w helpers
> >     - Update variables to use "sdam" instead of "nvmem"
> >     - Fix comments
> >     - Fix reverse christmas tree
> >     - Update lpg_pattern_set() logic
> >   - Patch 5/7
> >     - Removed sdam_lut_base from lpg_data
> > Changes since v3:
> >   - Patch 4/7
> >     - Fix function returns
> >     - Move register definition to top of file
> >     - Revert max_brightness and probe accidental changes
> >     - Combine init_sdam() and parse_sdam()
> >     - Change error prints in probe to use dev_err_probe
> >     - Remove ppg_en variable
> >     - Update when pbs triggers are set/cleared
> >   - Patch 6/7
> >     - Remove use of nvmem_count
> >     - Move register definition to top of file
> >     - Remove lpg_get_sdam_lut_idx()
> > Changes since v2:
> >   - Patch 1/7
> >     - Fix dt_binding_check error
> >     - Rename binding file to match compatible
> >     - Iclude SoC specific comptaibles
> >   - Patch 2/7
> >     - Update nvmem-names list
> >   - Patch 3/7
> >     - Update EXPORT_SYMBOL to EXPORT_SYMBOL_GPL
> >     - Fix return/break logic in qcom_pbs_wait_for_ack()
> >     - Update iterators to be int
> >     - Add constants
> >     - Fix function calls in qcom_pbs_trigger_event()
> >     - Remove unnessary comments
> >     - Return -EPROBE_DEFER from get_pbs_client_device()
> > Changes since v1:
> >   - Patch 1/7
> >     - Fix dt_binding_check errors
> >     - Update binding description
> >   - Path 2/7
> >     - Fix dt_binding_check errors
> >     - Update per variant constraints
> >     - Update nvmem description
> >   - Patch 3/7
> >     - Update get_pbs_client_device()
> >     - Drop use of printk
> >     - Remove unused function
> > 
> > [...]
> 
> Applied, thanks!
> 
> [2/7] dt-bindings: leds: leds-qcom-lpg: Add support for LPG PPG
>       commit: 2fdd08fec742e0c94a2a06a0c9ee0912b6f7ac39
> [4/7] leds: rgb: leds-qcom-lpg: Add support for PPG through single SDAM
>       commit: 07a1afc8fbb77cc893e2285112482902ac88a295
> [5/7] leds: rgb: leds-qcom-lpg: Update PMI632 lpg_data to support PPG
>       commit: f4f5f6a6f8d7bcc8efd0eee6751def22c9a38fd0
> [6/7] leds: rgb: leds-qcom-lpg: Include support for PPG with dedicated LUT SDAM
>       commit: 7399a927272de1fc42f4da8af1d8d60b65a15b84
> [7/7] leds: rgb: Update PM8350C lpg_data to support two-nvmem PPG Scheme
>       commit: 7b4066868689b1f341e61957611d252b6fa8cafc

This set had a bunch of checkpatch.pl errors.

Please fix them up subsequently.
Anjelique Melendez Jan. 16, 2024, 6:49 p.m. UTC | #3
On 1/11/2024 2:07 AM, Lee Jones wrote:
> On Thu, 11 Jan 2024, Lee Jones wrote:
> 
>> On Thu, 21 Dec 2023 10:58:30 -0800, Anjelique Melendez wrote:
>>> In certain PMICs, LUT pattern and LPG configuration is stored in SDAM
>>> modules instead of LUT peripheral. This feature is called PPG.
>>>
>>> This change series adds support for PPG. Thanks!
>>> Changes since v7:
>>>   - Patch 4/7
>>>     - Initialize hi/lo_pause variables in lpg_pattern_set()
>>> Changes since v6:
>>>   - Patch 2/7
>>>     - Removed required by constraint on PPG dt properties
>>> Changes since v5:
>>>   - Patch 4/7
>>>     - Update logic so that multicolor led device triggers pattern
>>>       on all LEDs at the same time
>>>     - Update nitpicks from Lee
>>>   - Patch 5/7
>>>     - Update nitpicks from Lee
>>> Changes since v4:
>>>   - Patch 3/7
>>>     - Get rid of r/w helpers
>>>     - Use regmap_read_poll_timeout() in qcom_pbs_wait_for_ack()
>>>     - Update error path in qcom_pbs_trigger_event()
>>>     - Fix reverse christmas tree
>>>   - Patch 4/7
>>>     - Get rid of r/w helpers
>>>     - Update variables to use "sdam" instead of "nvmem"
>>>     - Fix comments
>>>     - Fix reverse christmas tree
>>>     - Update lpg_pattern_set() logic
>>>   - Patch 5/7
>>>     - Removed sdam_lut_base from lpg_data
>>> Changes since v3:
>>>   - Patch 4/7
>>>     - Fix function returns
>>>     - Move register definition to top of file
>>>     - Revert max_brightness and probe accidental changes
>>>     - Combine init_sdam() and parse_sdam()
>>>     - Change error prints in probe to use dev_err_probe
>>>     - Remove ppg_en variable
>>>     - Update when pbs triggers are set/cleared
>>>   - Patch 6/7
>>>     - Remove use of nvmem_count
>>>     - Move register definition to top of file
>>>     - Remove lpg_get_sdam_lut_idx()
>>> Changes since v2:
>>>   - Patch 1/7
>>>     - Fix dt_binding_check error
>>>     - Rename binding file to match compatible
>>>     - Iclude SoC specific comptaibles
>>>   - Patch 2/7
>>>     - Update nvmem-names list
>>>   - Patch 3/7
>>>     - Update EXPORT_SYMBOL to EXPORT_SYMBOL_GPL
>>>     - Fix return/break logic in qcom_pbs_wait_for_ack()
>>>     - Update iterators to be int
>>>     - Add constants
>>>     - Fix function calls in qcom_pbs_trigger_event()
>>>     - Remove unnessary comments
>>>     - Return -EPROBE_DEFER from get_pbs_client_device()
>>> Changes since v1:
>>>   - Patch 1/7
>>>     - Fix dt_binding_check errors
>>>     - Update binding description
>>>   - Path 2/7
>>>     - Fix dt_binding_check errors
>>>     - Update per variant constraints
>>>     - Update nvmem description
>>>   - Patch 3/7
>>>     - Update get_pbs_client_device()
>>>     - Drop use of printk
>>>     - Remove unused function
>>>
>>> [...]
>>
>> Applied, thanks!
>>
>> [2/7] dt-bindings: leds: leds-qcom-lpg: Add support for LPG PPG
>>       commit: 2fdd08fec742e0c94a2a06a0c9ee0912b6f7ac39
>> [4/7] leds: rgb: leds-qcom-lpg: Add support for PPG through single SDAM
>>       commit: 07a1afc8fbb77cc893e2285112482902ac88a295
>> [5/7] leds: rgb: leds-qcom-lpg: Update PMI632 lpg_data to support PPG
>>       commit: f4f5f6a6f8d7bcc8efd0eee6751def22c9a38fd0
>> [6/7] leds: rgb: leds-qcom-lpg: Include support for PPG with dedicated LUT SDAM
>>       commit: 7399a927272de1fc42f4da8af1d8d60b65a15b84
>> [7/7] leds: rgb: Update PM8350C lpg_data to support two-nvmem PPG Scheme
>>       commit: 7b4066868689b1f341e61957611d252b6fa8cafc
> 
> This set had a bunch of checkpatch.pl errors.
> 
> Please fix them up subsequently.
> 
Hi Lee,

Just wanted to get some quick clarification. Would you like checkpatch.pl issues fixed in a new version
of this series or would you like a new patch to fix all the issues? Looks like these patches are in your
for-leds-next-next branch so I am guessing you would like a new follow up patch
but I just wanted to double check.

Thanks,
Anjelique
Lee Jones Jan. 18, 2024, 2:49 p.m. UTC | #4
On Tue, 16 Jan 2024, Anjelique Melendez wrote:

> 
> 
> On 1/11/2024 2:07 AM, Lee Jones wrote:
> > On Thu, 11 Jan 2024, Lee Jones wrote:
> > 
> >> On Thu, 21 Dec 2023 10:58:30 -0800, Anjelique Melendez wrote:
> >>> In certain PMICs, LUT pattern and LPG configuration is stored in SDAM
> >>> modules instead of LUT peripheral. This feature is called PPG.
> >>>
> >>> This change series adds support for PPG. Thanks!
> >>> Changes since v7:
> >>>   - Patch 4/7
> >>>     - Initialize hi/lo_pause variables in lpg_pattern_set()
> >>> Changes since v6:
> >>>   - Patch 2/7
> >>>     - Removed required by constraint on PPG dt properties
> >>> Changes since v5:
> >>>   - Patch 4/7
> >>>     - Update logic so that multicolor led device triggers pattern
> >>>       on all LEDs at the same time
> >>>     - Update nitpicks from Lee
> >>>   - Patch 5/7
> >>>     - Update nitpicks from Lee
> >>> Changes since v4:
> >>>   - Patch 3/7
> >>>     - Get rid of r/w helpers
> >>>     - Use regmap_read_poll_timeout() in qcom_pbs_wait_for_ack()
> >>>     - Update error path in qcom_pbs_trigger_event()
> >>>     - Fix reverse christmas tree
> >>>   - Patch 4/7
> >>>     - Get rid of r/w helpers
> >>>     - Update variables to use "sdam" instead of "nvmem"
> >>>     - Fix comments
> >>>     - Fix reverse christmas tree
> >>>     - Update lpg_pattern_set() logic
> >>>   - Patch 5/7
> >>>     - Removed sdam_lut_base from lpg_data
> >>> Changes since v3:
> >>>   - Patch 4/7
> >>>     - Fix function returns
> >>>     - Move register definition to top of file
> >>>     - Revert max_brightness and probe accidental changes
> >>>     - Combine init_sdam() and parse_sdam()
> >>>     - Change error prints in probe to use dev_err_probe
> >>>     - Remove ppg_en variable
> >>>     - Update when pbs triggers are set/cleared
> >>>   - Patch 6/7
> >>>     - Remove use of nvmem_count
> >>>     - Move register definition to top of file
> >>>     - Remove lpg_get_sdam_lut_idx()
> >>> Changes since v2:
> >>>   - Patch 1/7
> >>>     - Fix dt_binding_check error
> >>>     - Rename binding file to match compatible
> >>>     - Iclude SoC specific comptaibles
> >>>   - Patch 2/7
> >>>     - Update nvmem-names list
> >>>   - Patch 3/7
> >>>     - Update EXPORT_SYMBOL to EXPORT_SYMBOL_GPL
> >>>     - Fix return/break logic in qcom_pbs_wait_for_ack()
> >>>     - Update iterators to be int
> >>>     - Add constants
> >>>     - Fix function calls in qcom_pbs_trigger_event()
> >>>     - Remove unnessary comments
> >>>     - Return -EPROBE_DEFER from get_pbs_client_device()
> >>> Changes since v1:
> >>>   - Patch 1/7
> >>>     - Fix dt_binding_check errors
> >>>     - Update binding description
> >>>   - Path 2/7
> >>>     - Fix dt_binding_check errors
> >>>     - Update per variant constraints
> >>>     - Update nvmem description
> >>>   - Patch 3/7
> >>>     - Update get_pbs_client_device()
> >>>     - Drop use of printk
> >>>     - Remove unused function
> >>>
> >>> [...]
> >>
> >> Applied, thanks!
> >>
> >> [2/7] dt-bindings: leds: leds-qcom-lpg: Add support for LPG PPG
> >>       commit: 2fdd08fec742e0c94a2a06a0c9ee0912b6f7ac39
> >> [4/7] leds: rgb: leds-qcom-lpg: Add support for PPG through single SDAM
> >>       commit: 07a1afc8fbb77cc893e2285112482902ac88a295
> >> [5/7] leds: rgb: leds-qcom-lpg: Update PMI632 lpg_data to support PPG
> >>       commit: f4f5f6a6f8d7bcc8efd0eee6751def22c9a38fd0
> >> [6/7] leds: rgb: leds-qcom-lpg: Include support for PPG with dedicated LUT SDAM
> >>       commit: 7399a927272de1fc42f4da8af1d8d60b65a15b84
> >> [7/7] leds: rgb: Update PM8350C lpg_data to support two-nvmem PPG Scheme
> >>       commit: 7b4066868689b1f341e61957611d252b6fa8cafc
> > 
> > This set had a bunch of checkpatch.pl errors.
> > 
> > Please fix them up subsequently.
> > 
> Hi Lee,
> 
> Just wanted to get some quick clarification. Would you like checkpatch.pl issues fixed in a new version
> of this series or would you like a new patch to fix all the issues? Looks like these patches are in your
> for-leds-next-next branch so I am guessing you would like a new follow up patch
> but I just wanted to double check.

A follow-up please.