linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jacek Anaszewski <jacek.anaszewski@gmail.com>
To: ChiaEn Wu <chiaen@richtek.com>,
	pavel@ucw.cz, lee@kernel.org, matthias.bgg@gmail.com,
	andriy.shevchenko@linux.intel.com
Cc: peterwu.pub@gmail.com, cy_huang@richtek.com,
	linux-leds@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org,
	szunichen@gmail.com, Alice Chen <alice_chen@richtek.com>,
	ChiaEn Wu <chiaen_wu@richtek.com>
Subject: Re: [PATCH v16 1/2] leds: rgb: mt6370: Add MediaTek MT6370 current sink type LED Indicator support
Date: Sun, 29 Jan 2023 17:46:21 +0100	[thread overview]
Message-ID: <df0594dc-d3d6-2636-49e6-07488ec2b5c9@gmail.com> (raw)
In-Reply-To: <1c4cf50600bb0334bd03027f49d7511b394c6ced.1673886245.git.chiaen_wu@richtek.com>

Hi ChiaEn,

On 1/17/23 09:53, ChiaEn Wu wrote:
> From: ChiYuan Huang <cy_huang@richtek.com>
> 
> The MediaTek MT6370 is a highly-integrated smart power management IC,
> which includes a single cell Li-Ion/Li-Polymer switching battery
> charger, a USB Type-C & Power Delivery (PD) controller, dual
> Flash LED current sources, a RGB LED driver, a backlight WLED driver,
> a display bias driver and a general LDO for portable devices.
> 
> Add support for the MediaTek MT6370 Current Sink Type LED Indicator
> driver. It can control four channels current-sink RGB LEDs with 3 modes:
> constant current, PWM, and breath mode.
> 
> Co-developed-by: Alice Chen <alice_chen@richtek.com>
> Signed-off-by: Alice Chen <alice_chen@richtek.com>
> Signed-off-by: ChiYuan Huang <cy_huang@richtek.com>
> Signed-off-by: ChiaEn Wu <chiaen_wu@richtek.com>
> ---
> 
> v16
> - Remove blank line in the head text.
> - Move 'pwm_duty' to descrease the size of struct mt6370_pdata.
> - Move the field 'F_RGB_EN' write out from if/else in
>    'mt6370_isnk_brightness_set'.
> - Remove 'dev' in struct mt6370_priv.
> - Remove the proprety reading for 'linux,default-trigger', led core
>    already did it.
> - Change the module license from 'GPL v2' to 'GPL'
>    In the head text, already deslcred SPDX license as 'GPL-2.0-only'.
> ---
>   drivers/leds/rgb/Kconfig           |   13 +
>   drivers/leds/rgb/Makefile          |    1 +
>   drivers/leds/rgb/leds-mt6370-rgb.c | 1009 ++++++++++++++++++++++++++++++++++++
>   3 files changed, 1023 insertions(+)
>   create mode 100644 drivers/leds/rgb/leds-mt6370-rgb.c
[...]
> +static int mt6370_gen_breath_pattern(struct mt6370_priv *priv,
> +				     struct led_pattern *pattern, u32 len,
> +				     u8 *pattern_val, u32 val_len)
> +{
> +	enum mt6370_led_ranges sel_range;
> +	struct led_pattern *curr;
> +	unsigned int sel;
> +	u32 val = 0;
> +	int i;
> +
> +	if (len < P_MAX_PATTERNS && val_len < P_MAX_PATTERNS / 2)
> +		return -EINVAL;
> +
> +	/*
> +	 * Pattern list
> +	 * tr1:	 byte 0, b'[7: 4]
> +	 * tr2:	 byte 0, b'[3: 0]
> +	 * tf1:	 byte 1, b'[7: 4]
> +	 * tf2:	 byte 1, b'[3: 0]
> +	 * ton:	 byte 2, b'[7: 4]
> +	 * toff: byte 2, b'[3: 0]
> +	 */

Please provide documentation for the hardware pattern format.
Compare [0] and [1].

Otherwise looks good to me:

Acked-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>

[0] Documentation/leds/leds-sc27xx.rst
[1] Documentation/leds/leds-qcom-lpg.rst

-- 
Best regards,
Jacek Anaszewski

  parent reply	other threads:[~2023-01-29 16:46 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-17  8:53 [PATCH v16 0/2] Add MediaTek MT6370 PMIC support ChiaEn Wu
2023-01-17  8:53 ` [PATCH v16 1/2] leds: rgb: mt6370: Add MediaTek MT6370 current sink type LED Indicator support ChiaEn Wu
2023-01-27 10:21   ` Lee Jones
2023-01-27 10:40     ` Andy Shevchenko
2023-01-29 16:46   ` Jacek Anaszewski [this message]
2023-01-17  8:53 ` [PATCH v16 2/2] leds: flash: mt6370: Add MediaTek MT6370 flashlight support ChiaEn Wu
2023-01-27 10:20   ` Lee Jones
2023-01-27 10:39     ` Andy Shevchenko
2023-01-29 16:46   ` Jacek Anaszewski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=df0594dc-d3d6-2636-49e6-07488ec2b5c9@gmail.com \
    --to=jacek.anaszewski@gmail.com \
    --cc=alice_chen@richtek.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=chiaen@richtek.com \
    --cc=chiaen_wu@richtek.com \
    --cc=cy_huang@richtek.com \
    --cc=lee@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=matthias.bgg@gmail.com \
    --cc=pavel@ucw.cz \
    --cc=peterwu.pub@gmail.com \
    --cc=szunichen@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).