Re: [PATCH v2 3/7] leds: leds-mt6323: Specify registers and specs in platform data

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 12/04/2023 17:33, AngeloGioacchino Del Regno wrote:
In order to enhance the flexibility of this driver and let it support
more than just one MediaTek LEDs IP for more than just one PMIC,
add platform data structure specifying the register offsets and
data that commonly varies between different IPs.

This commit brings no functional changes.

Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@xxxxxxxxxxxxx>
---
  drivers/leds/leds-mt6323.c | 145 ++++++++++++++++++++++++++++---------
  1 file changed, 112 insertions(+), 33 deletions(-)

diff --git a/drivers/leds/leds-mt6323.c b/drivers/leds/leds-mt6323.c
index 17ee88043f52..a5b2d06e9d63 100644
--- a/drivers/leds/leds-mt6323.c
+++ b/drivers/leds/leds-mt6323.c
@@ -37,18 +37,16 @@
   * Register for MT6323_ISINK_CON0 to setup the

Comment should be changed.

   * duty cycle of the blink.
   */
-#define MT6323_ISINK_CON0(i)		(MT6323_ISINK0_CON0 + 0x8 * (i))
+#define MT6323_ISINK_CON(r, i)		(r + 0x8 * (i))
  #define MT6323_ISINK_DIM_DUTY_MASK	(0x1f << 8)
  #define MT6323_ISINK_DIM_DUTY(i)	(((i) << 8) & \
  					MT6323_ISINK_DIM_DUTY_MASK)


After that, it should be ok.

Reviewed-by: Alexandre Mergnat <amergnat@xxxxxxxxxxxx>

Regards,
Alexandre




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux