Re: [PATCH v9 09/10] leds: flash: mt6370: Add MediaTek MT6370 flashlight support

2022-09-20 Thread ChiaEn Wu
On Sun, Sep 18, 2022 at 3:22 AM Han Jingoo wrote: > > On Mon, Aug 29, 2022 ChiaEn Wu wrote: ... > > +#define MT6370_ITORCH_MIN_uA 25000 > > +#define MT6370_ITORCH_STEP_uA 12500 > > +#define MT6370_ITORCH_MAX_uA 40 > > +#defi

[PATCH v9 10/10] video: backlight: mt6370: Add MediaTek MT6370 support

2022-08-29 Thread ChiaEn Wu
From: ChiaEn Wu MediaTek MT6370 is a SubPMIC consisting of a single cell battery charger with ADC monitoring, RGB LEDs, dual channel flashlight, WLED backlight driver, display bias voltage supply, one general purpose LDO, and the USB Type-C & PD controller complies with the latest USB Ty

[PATCH v9 09/10] leds: flash: mt6370: Add MediaTek MT6370 flashlight support

2022-08-29 Thread ChiaEn Wu
play bias driver and a general LDO for portable devices. Add support for the MT6370 Flash LED driver. Flash LED in MT6370 has 2 channels and support torch/strobe mode. Signed-off-by: Alice Chen Signed-off-by: ChiaEn Wu --- v9 - Revise the format of the comments. --- drivers/leds/flash/Kco

[PATCH v9 08/10] leds: rgb: mt6370: Add MediaTek MT6370 current sink type LED Indicator support

2022-08-29 Thread ChiaEn Wu
lice Chen Signed-off-by: Alice Chen Signed-off-by: ChiYuan Huang Signed-off-by: ChiaEn Wu --- drivers/leds/rgb/Kconfig | 13 + drivers/leds/rgb/Makefile |1 + drivers/leds/rgb/leds-mt6370-rgb.c | 1010 3 files changed, 1024 insert

[PATCH v9 07/10] power: supply: mt6370: Add MediaTek MT6370 charger driver

2022-08-29 Thread ChiaEn Wu
From: ChiaEn Wu MediaTek MT6370 is a SubPMIC consisting of a single cell battery charger with ADC monitoring, RGB LEDs, dual channel flashlight, WLED backlight driver, display bias voltage supply, one general purpose LDO, and the USB Type-C & PD controller complies with the latest USB Ty

[PATCH v9 06/10] iio: adc: mt6370: Add MediaTek MT6370 support

2022-08-29 Thread ChiaEn Wu
From: ChiaEn Wu MediaTek MT6370 is a SubPMIC consisting of a single cell battery charger with ADC monitoring, RGB LEDs, dual channel flashlight, WLED backlight driver, display bias voltage supply, one general purpose LDO, and the USB Type-C & PD controller complies with the latest USB Ty

[PATCH v9 05/10] lib: add linear range index macro

2022-08-29 Thread ChiaEn Wu
From: ChiaEn Wu Add linear_range_idx macro for declaring the linear_range struct simply. Signed-off-by: ChiaEn Wu --- v9 - Revise LINEAR_RANGE() and LINEAR_RANGE_IDX() --- include/linux/linear_range.h | 11 +++ 1 file changed, 11 insertions(+) diff --git a/include/linux

[PATCH v9 04/10] dt-bindings: backlight: Add MediaTek MT6370 backlight

2022-08-29 Thread ChiaEn Wu
From: ChiYuan Huang Add MT6370 backlight binding documentation. Reviewed-by: Rob Herring Reviewed-by: Daniel Thompson Signed-off-by: ChiYuan Huang Signed-off-by: ChiaEn Wu --- .../leds/backlight/mediatek,mt6370-backlight.yaml | 121 + 1 file changed, 121 insertions

[PATCH v9 03/10] dt-bindings: leds: Add MediaTek MT6370 flashlight

2022-08-29 Thread ChiaEn Wu
From: Alice Chen Add MediaTek MT6370 flashlight binding documentation. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Alice Chen Signed-off-by: ChiaEn Wu --- .../bindings/leds/mediatek,mt6370-flashlight.yaml | 41 ++ 1 file changed, 41 insertions(+) create mode 100644

[PATCH v9 02/10] dt-bindings: leds: mt6370: Add MediaTek MT6370 current sink type LED indicator

2022-08-29 Thread ChiaEn Wu
From: ChiYuan Huang Add MediaTek MT6370 current sink type LED indicator binding documentation. Reviewed-by: Krzysztof Kozlowski Signed-off-by: ChiYuan Huang Signed-off-by: ChiaEn Wu --- .../bindings/leds/mediatek,mt6370-indicator.yaml | 81 ++ 1 file changed, 81

[PATCH v9 01/10] dt-bindings: power: supply: Add MediaTek MT6370 Charger

2022-08-29 Thread ChiaEn Wu
From: ChiaEn Wu Add MediaTek MT6370 Charger binding documentation. Reviewed-by: Krzysztof Kozlowski Signed-off-by: ChiaEn Wu --- .../power/supply/mediatek,mt6370-charger.yaml | 88 ++ 1 file changed, 88 insertions(+) create mode 100644 Documentation/devicetree

[PATCH v9 00/10] Add MediaTek MT6370 PMIC support

2022-08-29 Thread ChiaEn Wu
From: ChiaEn Wu This patch series add MediaTek MT6370 PMIC support and add a index macro to . The 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

[RESEND PATCH v8 07/12] usb: typec: tcpci_mt6370: Add MediaTek MT6370 tcpci driver

2022-08-24 Thread ChiaEn Wu
Signed-off-by: ChiaEn Wu --- drivers/usb/typec/tcpm/Kconfig| 11 ++ drivers/usb/typec/tcpm/Makefile | 1 + drivers/usb/typec/tcpm/tcpci_mt6370.c | 207 ++ 3 files changed, 219 insertions(+) create mode 100644 drivers/usb/typec/tcpm/tcpci_mt6370.c di

[RESNED PATCH v8 03/12] dt-bindings: leds: mt6370: Add MediaTek MT6370 current sink type LED indicator

2022-08-24 Thread ChiaEn Wu
From: ChiYuan Huang Add MediaTek MT6370 current sink type LED indicator binding documentation. Reviewed-by: Krzysztof Kozlowski Signed-off-by: ChiYuan Huang Signed-off-by: ChiaEn Wu --- .../leds/mediatek,mt6370-indicator.yaml | 81 +++ 1 file changed, 81 insertions

[RESEND PATCH v8 12/12] video: backlight: mt6370: Add MediaTek MT6370 support

2022-08-15 Thread ChiaEn Wu
From: ChiaEn Wu MediaTek MT6370 is a SubPMIC consisting of a single cell battery charger with ADC monitoring, RGB LEDs, dual channel flashlight, WLED backlight driver, display bias voltage supply, one general purpose LDO, and the USB Type-C & PD controller complies with the latest USB Ty

[RESEND PATCH v8 11/12] leds: flash: mt6370: Add MediaTek MT6370 flashlight support

2022-08-15 Thread ChiaEn Wu
play bias driver and a general LDO for portable devices. Add support for the MT6370 Flash LED driver. Flash LED in MT6370 has 2 channels and support torch/strobe mode. Signed-off-by: Alice Chen Signed-off-by: ChiaEn Wu --- v8 - Add missing 'dependency config' in Kconfig - Revise all multi-line comm

[RESEND PATCH v8 10/12] leds: rgb: mt6370: Add MediaTek MT6370 current sink type LED Indicator support

2022-08-15 Thread ChiaEn Wu
lice Chen Signed-off-by: Alice Chen Signed-off-by: ChiYuan Huang Signed-off-by: ChiaEn Wu --- v8 - Add include header file - Remove useless 'enum mt6370_state' because of using 'enum led_default_state' - Revise the calculation of 'val' in 'mt6370_gen_breath_pattern()' - Replace the med

[RESEND PATCH v8 08/12] iio: adc: mt6370: Add MediaTek MT6370 support

2022-08-15 Thread ChiaEn Wu
From: ChiaEn Wu MediaTek MT6370 is a SubPMIC consisting of a single cell battery charger with ADC monitoring, RGB LEDs, dual channel flashlight, WLED backlight driver, display bias voltage supply, one general purpose LDO, and the USB Type-C & PD controller complies with the latest USB Ty

[RESEND PATCH v8 06/12] lib: add linear range index macro

2022-08-15 Thread ChiaEn Wu
From: ChiaEn Wu Add linear_range_idx macro for declaring the linear_range struct simply. Signed-off-by: ChiaEn Wu --- include/linux/linear_range.h | 8 1 file changed, 8 insertions(+) diff --git a/include/linux/linear_range.h b/include/linux/linear_range.h index fd3d0b358f22

[RESEND PATCH v8 09/12] power: supply: mt6370: Add MediaTek MT6370 charger driver

2022-08-15 Thread ChiaEn Wu
From: ChiaEn Wu MediaTek MT6370 is a SubPMIC consisting of a single cell battery charger with ADC monitoring, RGB LEDs, dual channel flashlight, WLED backlight driver, display bias voltage supply, one general purpose LDO, and the USB Type-C & PD controller complies with the latest USB Ty

[RESEND PATCH v8 05/12] dt-bindings: backlight: Add MediaTek MT6370 backlight

2022-08-15 Thread ChiaEn Wu
From: ChiYuan Huang Add MT6370 backlight binding documentation. Reviewed-by: Rob Herring Signed-off-by: ChiYuan Huang Signed-off-by: ChiaEn Wu --- .../backlight/mediatek,mt6370-backlight.yaml | 121 ++ 1 file changed, 121 insertions(+) create mode 100644 Documentation

[RESEND v8 04/12] dt-bindings: leds: Add MediaTek MT6370 flashlight

2022-08-15 Thread ChiaEn Wu
From: Alice Chen Add MediaTek MT6370 flashlight binding documentation. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Alice Chen Signed-off-by: ChiaEn Wu --- .../leds/mediatek,mt6370-flashlight.yaml | 41 +++ 1 file changed, 41 insertions(+) create mode 100644

[RESEND PATCH v8 01/12] dt-bindings: usb: Add MediaTek MT6370 TCPC

2022-08-15 Thread ChiaEn Wu
From: ChiYuan Huang Add MediaTek MT6370 TCPC binding documentation. Reviewed-by: Krzysztof Kozlowski Signed-off-by: ChiYuan Huang Signed-off-by: ChiaEn Wu --- .../bindings/usb/mediatek,mt6370-tcpc.yaml| 36 +++ 1 file changed, 36 insertions(+) create mode 100644

[RESEND PATCH v8 02/12] dt-bindings: power: supply: Add MediaTek MT6370 Charger

2022-08-15 Thread ChiaEn Wu
From: ChiaEn Wu Add MediaTek MT6370 Charger binding documentation. Reviewed-by: Krzysztof Kozlowski Signed-off-by: ChiaEn Wu --- .../power/supply/mediatek,mt6370-charger.yaml | 88 +++ 1 file changed, 88 insertions(+) create mode 100644 Documentation/devicetree/bindings

[RESEND PATCH v8 00/12] Add MediaTek MT6370 PMIC support

2022-08-15 Thread ChiaEn Wu
From: ChiaEn Wu I apologize for using the wrong mail list to send the wrong emails for the last v8 patchset... This patch series add MediaTek MT6370 PMIC support and add a index macro to . The MT6370 is a highly-integrated smart power management IC, which includes a single cell Li-Ion/Li

[PATCH v7 04/13] dt-bindings: leds: Add MediaTek MT6370 flashlight

2022-08-05 Thread ChiaEn Wu
From: Alice Chen Add MediaTek MT6370 flashlight binding documentation. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Alice Chen Signed-off-by: ChiaEn Wu --- .../bindings/leds/mediatek,mt6370-flashlight.yaml | 41 ++ 1 file changed, 41 insertions(+) create mode 100644

[PATCH v7 12/13] leds: flash: mt6370: Add MediaTek MT6370 flashlight support

2022-08-05 Thread ChiaEn Wu
play bias driver and a general LDO for portable devices. Add a support for the MT6370 Flash LED driver. Flash LED in MT6370 has 2 channels and support torch/strobe mode. Signed-off-by: Alice Chen Signed-off-by: ChiaEn Wu --- v7 - Fix the indentation. - For the well defined macro, the parenth

[PATCH v7 07/13] mfd: mt6370: Add MediaTek MT6370 support

2022-08-05 Thread ChiaEn Wu
& PD controller complies with the latest USB Type-C and PD standards. Reviewed-by: Andy Shevchenko Signed-off-by: ChiYuan Huang Signed-off-by: ChiaEn Wu --- v7 - Move '#define MT6370_REG_MAXADDR' to the next line of '#define MT6370_REG_CHG_MASK1' - Rename 'MT6370_REG_ADD

[PATCH v7 08/13] usb: typec: tcpci_mt6370: Add MediaTek MT6370 tcpci driver

2022-08-05 Thread ChiaEn Wu
play bias driver and a general LDO for portable devices. Add a support for the Type-C & Power Delivery controller in MediaTek MT6370 IC. Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Guenter Roeck Signed-off-by: ChiYuan Huang Signed-off-by: ChiaEn Wu --- v7

[PATCH v7 05/13] dt-bindings: backlight: Add MediaTek MT6370 backlight

2022-08-05 Thread ChiaEn Wu
From: ChiYuan Huang Add MT6370 backlight binding documentation. Reviewed-by: Rob Herring Signed-off-by: ChiYuan Huang Signed-off-by: ChiaEn Wu --- v7 - Add the second compatible string for 'mt6372' - Add 'mediatek,bled-exponential-mode-enable' property for enable the exponential mode

[PATCH v7 03/13] dt-bindings: leds: mt6370: Add MediaTek MT6370 current sink type LED indicator

2022-08-05 Thread ChiaEn Wu
From: ChiYuan Huang Add MediaTek MT6370 current sink type LED indicator binding documentation. Reviewed-by: Krzysztof Kozlowski Signed-off-by: ChiYuan Huang Signed-off-by: ChiaEn Wu --- .../bindings/leds/mediatek,mt6370-indicator.yaml | 81 ++ 1 file changed, 81

[PATCH v7 01/13] dt-bindings: usb: Add MediaTek MT6370 TCPC

2022-08-05 Thread ChiaEn Wu
From: ChiYuan Huang Add MediaTek MT6370 TCPC binding documentation. Reviewed-by: Krzysztof Kozlowski Signed-off-by: ChiYuan Huang Signed-off-by: ChiaEn Wu --- .../bindings/usb/mediatek,mt6370-tcpc.yaml | 36 ++ 1 file changed, 36 insertions(+) create mode 100644

[PATCH v7 06/13] dt-bindings: mfd: Add MediaTek MT6370

2022-08-05 Thread ChiaEn Wu
From: ChiYuan Huang Add MediaTek MT6370 binding documentation. Reviewed-by: Krzysztof Kozlowski Signed-off-by: ChiYuan Huang Signed-off-by: ChiaEn Wu --- .../devicetree/bindings/mfd/mediatek,mt6370.yaml | 280 + include/dt-bindings/iio/adc/mediatek,mt6370_adc.h | 18

[PATCH v7 02/13] dt-bindings: power: supply: Add MediaTek MT6370 Charger

2022-08-05 Thread ChiaEn Wu
From: ChiaEn Wu Add MediaTek MT6370 Charger binding documentation. Reviewed-by: Krzysztof Kozlowski Signed-off-by: ChiaEn Wu --- .../power/supply/mediatek,mt6370-charger.yaml | 88 ++ 1 file changed, 88 insertions(+) create mode 100644 Documentation/devicetree

[PATCH v7 00/13] Add MediaTek MT6370 PMIC support

2022-08-05 Thread ChiaEn Wu
From: ChiaEn Wu This patch series add MediaTek MT6370 PMIC support. The 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

[PATCH v7 11/13] leds: rgb: mt6370: Add MediaTek MT6370 current sink type LED Indicator support

2022-08-05 Thread ChiaEn Wu
oped-by: Alice Chen Signed-off-by: Alice Chen Signed-off-by: ChiYuan Huang Signed-off-by: ChiaEn Wu --- v7 - Add the comment for the union of 'struct mt6370_led' - Revise the wrong description of 'Authors' - Revise some typos (e.g. led --> LED) - Revise 'if (!fwnode_property_read_string())' to

[PATCH v7 09/13] iio: adc: mt6370: Add MediaTek MT6370 support

2022-08-05 Thread ChiaEn Wu
From: ChiaEn Wu MediaTek MT6370 is a SubPMIC consisting of a single cell battery charger with ADC monitoring, RGB LEDs, dual channel flashlight, WLED backlight driver, display bias voltage supply, one general purpose LDO, and the USB Type-C & PD controller complies with the latest USB Ty

[PATCH v7 10/13] power: supply: mt6370: Add MediaTek MT6370 charger driver

2022-08-05 Thread ChiaEn Wu
From: ChiaEn Wu MediaTek MT6370 is a SubPMIC consisting of a single cell battery charger with ADC monitoring, RGB LEDs, dual channel flashlight, WLED backlight driver, display bias voltage supply, one general purpose LDO, and the USB Type-C & PD controller complies with the latest USB Ty

[PATCH v7 13/13] video: backlight: mt6370: Add MediaTek MT6370 support

2022-08-05 Thread ChiaEn Wu
From: ChiaEn Wu MediaTek MT6370 is a SubPMIC consisting of a single cell battery charger with ADC monitoring, RGB LEDs, dual channel flashlight, WLED backlight driver, display bias voltage supply, one general purpose LDO, and the USB Type-C & PD controller complies with the latest USB Ty

Re: [PATCH v6 11/13] leds: rgb: mt6370: Add MediaTek MT6370 current sink type LED Indicator support

2022-07-27 Thread ChiaEn Wu
e 'struct mt6370_led' is what you describe the information of which field of the union is in use? I will add the proper comment here to describe this thing. I'm so sorry for misunderstanding your mean last time. Thanks again for your review. -- Best Regards, ChiaEn Wu

Re: [PATCH v6 13/13] video: backlight: mt6370: Add MediaTek MT6370 support

2022-07-27 Thread ChiaEn Wu
s? > > > > > > I'd be curious what the compatiblity reasons are. In other words what > > > software breaks? > > > > The reason is as above. We just hope the users who use this series SubPMIC > > can > > directly apply this driver to drive the backlight device without > > knowing the underlying hardware. > > Not software breaks. > > As above, ignoring the max_brightness property is a bug in the > userspace. I'm still unclear why sending faked ranges to userspace > it a better solution than fixing the userspace. Ok, I got it! If I add a second compatible string (like 'mediatek,mt6372-backlight') in the DT section, and append 'if-then-else' to determine the correct maximum value of 'default-brightness' and 'max-brightness', Also, I will append 'bled exponential mode' to make user control using linear or exponential mode. These changes I will explain to DT's maintainer again. Back to the driver section, do I still need to use the register to confirm again whether this SubPMIC used now is MT6372 and record this information? (using 'mt6370_check_vendor_info()') I am afraid that the user who uses the MT6370 hardware, but the DT compatible string is set to 'mediatek,mt6372-backlight'. This may cause errors when update/get brightness values. So I hope the driver here can check again to make sure the 'default-brightness', 'max-brightness', can be updated/got correctly. I don't know if this will make you feel redundant if I do this?? Thank you so much! -- Best Regards, ChiaEn Wu

Re: [PATCH v6 11/13] leds: rgb: mt6370: Add MediaTek MT6370 current sink type LED Indicator support

2022-07-26 Thread ChiaEn Wu
e, > > +curr->delta_t, ); > > + > > + val[i / 2] |= sel << (4 * ((i + 1) % 2)); > > + } > > + > > + memcpy(pattern_val, val, 3); > > Isn't it something like put_unaligned_be24()/put_unaligned_le24()? OK, we will try to apply this method in the next patch. Thank you so much for reviewing our patches so many times and providing so many great suggestions! -- Best Regards, ChiaEn Wu

Re: [PATCH v6 13/13] video: backlight: mt6370: Add MediaTek MT6370 support

2022-07-26 Thread ChiaEn Wu
return; If I do this change, does this meet your requirements? > > > > Or, for the reasons, I have just explained (just one customer has this > > requirement), then we do not make any changes for compatibility > > reasons? > > I'd be curious what the compatiblity reasons are. In other words what > software breaks? The reason is as above. We just hope the users who use this series SubPMIC can directly apply this driver to drive the backlight device without knowing the underlying hardware. Not software breaks. Thanks! > > Normally the userspace backlight code reads the max_brightness property > and configures things accordingly (and therefore if you the component > that breaks is something like an Android HAL then fix the HAL instead). > > > Daniel. -- Best Regards, ChiaEn Wu

Re: [PATCH v6 13/13] video: backlight: mt6370: Add MediaTek MT6370 support

2022-07-25 Thread ChiaEn Wu
On Mon, Jul 25, 2022 at 6:31 PM Daniel Thompson wrote: > > On Fri, Jul 22, 2022 at 06:24:07PM +0800, ChiaEn Wu wrote: > > diff --git a/drivers/video/backlight/Kconfig > > b/drivers/video/backlight/Kconfig > > index a003e02..846dbe7 100644 > > --- a/drivers/vid

Re: [PATCH v6 07/13] mfd: mt6370: Add MediaTek MT6370 support

2022-07-25 Thread ChiaEn Wu
1C0 #define MT6370_REG_CHG_MASK1 0x1E0 #define MT6370_REG_MAXADDR 0x1FF // Move it to here #define MT6370_VENID_MASK GENMASK(7, 4) #define MT6370_NUM_IRQREGS 16 #define MT6370_USBC_I2CADDR0x4E #define MT6370_MAX_ADDRLEN 2// Rename --- Thanks! -- Best Regards, ChiaEn Wu

Re: [PATCH v6 07/13] mfd: mt6370: Add MediaTek MT6370 support

2022-07-25 Thread ChiaEn Wu
ne MT6370_REG_CHG_MASK1 0x1E0 #define MT6370_USBC_I2CADDR0x4E #define MT6370_REG_MAXADDR 0x1FF #define MT6370_VENID_MASK GENMASK(7, 4) #define MT6370_NUM_IRQREGS 16 #define MT6370_REG_ADDRLEN 2 --- Like this? > > -- > With Best Regards, > Andy Shevchenko -- Best Regards, ChiaEn Wu

Re: [PATCH v6 08/13] usb: typec: tcpci_mt6370: Add MediaTek MT6370 tcpci driver

2022-07-25 Thread ChiaEn Wu
On Mon, Jul 25, 2022 at 3:06 PM Chunfeng Yun wrote: > > On Fri, 2022-07-22 at 18:24 +0800, ChiaEn Wu wrote: > > From: ChiYuan Huang > > > > The MediaTek MT6370 is a highly-integrated smart power management IC, > > which includes a single cell Li-Ion/Li-Polymer

[PATCH v6 13/13] video: backlight: mt6370: Add MediaTek MT6370 support

2022-07-22 Thread ChiaEn Wu
From: ChiaEn Wu MediaTek MT6370 is a SubPMIC consisting of a single cell battery charger with ADC monitoring, RGB LEDs, dual channel flashlight, WLED backlight driver, display bias voltage supply, one general purpose LDO, and the USB Type-C & PD controller complies with the latest USB Ty

[PATCH v6 12/13] leds: flash: mt6370: Add MediaTek MT6370 flashlight support

2022-07-22 Thread ChiaEn Wu
From: Alice Chen 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

[PATCH v6 11/13] leds: rgb: mt6370: Add MediaTek MT6370 current sink type LED Indicator support

2022-07-22 Thread ChiaEn Wu
From: ChiYuan Huang 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

[PATCH v6 10/13] power: supply: mt6370: Add MediaTek MT6370 charger driver

2022-07-22 Thread ChiaEn Wu
From: ChiaEn Wu MediaTek MT6370 is a SubPMIC consisting of a single cell battery charger with ADC monitoring, RGB LEDs, dual channel flashlight, WLED backlight driver, display bias voltage supply, one general purpose LDO, and the USB Type-C & PD controller complies with the latest USB Ty

[PATCH v6 09/13] iio: adc: mt6370: Add MediaTek MT6370 support

2022-07-22 Thread ChiaEn Wu
From: ChiaEn Wu MediaTek MT6370 is a SubPMIC consisting of a single cell battery charger with ADC monitoring, RGB LEDs, dual channel flashlight, WLED backlight driver, display bias voltage supply, one general purpose LDO, and the USB Type-C & PD controller complies with the latest USB Ty

[PATCH v6 08/13] usb: typec: tcpci_mt6370: Add MediaTek MT6370 tcpci driver

2022-07-22 Thread ChiaEn Wu
From: ChiYuan Huang 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

[PATCH v6 07/13] mfd: mt6370: Add MediaTek MT6370 support

2022-07-22 Thread ChiaEn Wu
From: ChiYuan Huang This adds support for the MediaTek MT6370 SubPMIC. MediaTek MT6370 is a SubPMIC consisting of a single cell battery charger with ADC monitoring, RGB LEDs, dual channel flashlight, WLED backlight driver, display bias voltage supply, one general purpose LDO, and the USB Type-C

[PATCH v6 06/13] dt-bindings: mfd: Add MediaTek MT6370

2022-07-22 Thread ChiaEn Wu
From: ChiYuan Huang Add MediaTek MT6370 binding documentation. Signed-off-by: ChiYuan Huang Reviewed-by: Krzysztof Kozlowski --- .../devicetree/bindings/mfd/mediatek,mt6370.yaml | 280 + include/dt-bindings/iio/adc/mediatek,mt6370_adc.h | 18 ++ 2 files changed, 298

[PATCH v6 05/13] dt-bindings: backlight: Add MediaTek MT6370 backlight

2022-07-22 Thread ChiaEn Wu
# + +title: MediaTek MT6370 Backlight + +maintainers: + - ChiaEn Wu + +description: | + This module is part of the MT6370 MFD device. + The MT6370 Backlight WLED driver supports up to a 29V output voltage for + 4 channels of 8 series WLEDs. Each channel supports up to 30mA of current

[PATCH v6 04/13] dt-bindings: leds: Add MediaTek MT6370 flashlight

2022-07-22 Thread ChiaEn Wu
From: Alice Chen Add MediaTek MT6370 flashlight binding documentation. Signed-off-by: Alice Chen Reviewed-by: Krzysztof Kozlowski --- .../bindings/leds/mediatek,mt6370-flashlight.yaml | 41 ++ 1 file changed, 41 insertions(+) create mode 100644

[PATCH v6 03/13] dt-bindings: leds: mt6370: Add MediaTek MT6370 current sink type LED indicator

2022-07-22 Thread ChiaEn Wu
From: ChiYuan Huang Add MediaTek MT6370 current sink type LED indicator binding documentation. Signed-off-by: ChiYuan Huang Reviewed-by: Krzysztof Kozlowski --- v6 - Add 'reg' property of led of multi-led to prevent checking error. --- .../bindings/leds/mediatek,mt6370-indicator.yaml | 81

[PATCH v6 02/13] dt-bindings: power: supply: Add MediaTek MT6370 Charger

2022-07-22 Thread ChiaEn Wu
From: ChiaEn Wu Add MediaTek MT6370 Charger binding documentation. Signed-off-by: ChiaEn Wu Reviewed-by: Krzysztof Kozlowski --- .../power/supply/mediatek,mt6370-charger.yaml | 88 ++ 1 file changed, 88 insertions(+) create mode 100644 Documentation/devicetree

[PATCH v6 01/13] dt-bindings: usb: Add MediaTek MT6370 TCPC

2022-07-22 Thread ChiaEn Wu
From: ChiYuan Huang Add MediaTek MT6370 TCPC binding documentation. Signed-off-by: ChiYuan Huang Reviewed-by: Krzysztof Kozlowski --- .../bindings/usb/mediatek,mt6370-tcpc.yaml | 36 ++ 1 file changed, 36 insertions(+) create mode 100644

[PATCH v6 00/13] Add MediaTek MT6370 PMIC support

2022-07-22 Thread ChiaEn Wu
From: ChiaEn Wu This patch series add MediaTek MT6370 PMIC support. The 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

Re: [PATCH v5 13/13] video: backlight: mt6370: Add MediaTek MT6370 support

2022-07-18 Thread ChiaEn Wu
; drivers like led_bl > and/or pwm_bl as to get some "standardization" around with all the benefits > that this carries. > > > Come to think of it I'm also a little worried also about the whole linear > > versus exponential curve thing since I thought LED drivers were required > > to use exponential curves. > > > > That probably depends on how the controller interprets the data, I guess, > but I agree with you on this thought. Hi Angelo, MT6370 is just a SubPMIC, not an SoC, and is applied in cellular telephones, tablet PCs, and portable instruments. And the PWM mode of the MT6370 backlight driver is optional, and not must be enabled. >From our perspective, this MT6370 backlight driver is not the same as mtk-pwm-disp related driver. Thanks! > > Regards, > Angelo -- Best Regards, ChiaEn Wu

[PATCH v5 13/13] video: backlight: mt6370: Add MediaTek MT6370 support

2022-07-15 Thread ChiaEn Wu
From: ChiaEn Wu MediaTek MT6370 is a SubPMIC consisting of a single cell battery charger with ADC monitoring, RGB LEDs, dual channel flashlight, WLED backlight driver, display bias voltage supply, one general purpose LDO, and the USB Type-C & PD controller complies with the latest USB Ty

[PATCH v5 12/13] leds: flashlight: mt6370: Add MediaTek MT6370 flashlight support

2022-07-15 Thread ChiaEn Wu
From: Alice Chen The MediaTek MT6370 is a highly-integrated smart power management IC, whichincludes 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

[PATCH v5 11/13] leds: mt6370: Add MediaTek MT6370 current sink type LED Indicator support

2022-07-15 Thread ChiaEn Wu
From: ChiYuan Huang 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

[PATCH v5 10/13] power: supply: mt6370: Add MediaTek MT6370 charger driver

2022-07-15 Thread ChiaEn Wu
From: ChiaEn Wu MediaTek MT6370 is a SubPMIC consisting of a single cell battery charger with ADC monitoring, RGB LEDs, dual channel flashlight, WLED backlight driver, display bias voltage supply, one general purpose LDO, and the USB Type-C & PD controller complies with the latest USB Ty

[PATCH v5 09/13] iio: adc: mt6370: Add MediaTek MT6370 support

2022-07-15 Thread ChiaEn Wu
From: ChiaEn Wu MediaTek MT6370 is a SubPMIC consisting of a single cell battery charger with ADC monitoring, RGB LEDs, dual channel flashlight, WLED backlight driver, display bias voltage supply, one general purpose LDO, and the USB Type-C & PD controller complies with the latest USB Ty

[PATCH v5 08/13] usb: typec: tcpci_mt6370: Add MediaTek MT6370 tcpci driver

2022-07-15 Thread ChiaEn Wu
From: ChiYuan Huang The 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

[PATCH v5 07/13] mfd: mt6370: Add MediaTek MT6370 support

2022-07-15 Thread ChiaEn Wu
From: ChiYuan Huang This adds support for the MediaTek MT6370 SubPMIC. MediaTek MT6370 is a SubPMIC consisting of a single cell battery charger with ADC monitoring, RGB LEDs, dual channel flashlight, WLED backlight driver, display bias voltage supply, one general purpose LDO, and the USB Type-C

[PATCH v5 06/13] dt-bindings: mfd: Add MediaTek MT6370

2022-07-15 Thread ChiaEn Wu
From: ChiYuan Huang Add MediaTek MT6370 binding documentation. Signed-off-by: ChiYuan Huang Reviewed-by: Krzysztof Kozlowski --- .../devicetree/bindings/mfd/mediatek,mt6370.yaml | 280 + include/dt-bindings/iio/adc/mediatek,mt6370_adc.h | 18 ++ 2 files changed, 298

[PATCH v5 05/13] dt-bindings: backlight: Add MediaTek MT6370 backlight

2022-07-15 Thread ChiaEn Wu
# + +title: MediaTek MT6370 Backlight + +maintainers: + - ChiaEn Wu + +description: | + This module is part of the MT6370 MFD device. + The MT6370 Backlight WLED driver supports up to a 29V output voltage for + 4 channels of 8 series WLEDs. Each channel supports up to 30mA of current

[PATCH v5 04/13] dt-bindings: leds: Add MediaTek MT6370 flashlight

2022-07-15 Thread ChiaEn Wu
From: Alice Chen Add MediaTek MT6370 flashlight binding documentation. Signed-off-by: Alice Chen Reviewed-by: Krzysztof Kozlowski --- .../bindings/leds/mediatek,mt6370-flashlight.yaml | 41 ++ 1 file changed, 41 insertions(+) create mode 100644

[PATCH v5 03/13] dt-bindings: leds: mt6370: Add MediaTek MT6370 current sink type LED indicator

2022-07-15 Thread ChiaEn Wu
From: ChiYuan Huang Add MediaTek MT6370 current sink type LED indicator binding documentation. Signed-off-by: ChiYuan Huang Reviewed-by: Krzysztof Kozlowski --- .../bindings/leds/mediatek,mt6370-indicator.yaml | 77 ++ 1 file changed, 77 insertions(+) create mode

[PATCH v5 02/13] dt-bindings: power: supply: Add MediaTek MT6370 Charger

2022-07-15 Thread ChiaEn Wu
From: ChiaEn Wu Add MediaTek MT6370 Charger binding documentation. Signed-off-by: ChiaEn Wu Reviewed-by: Krzysztof Kozlowski --- .../power/supply/mediatek,mt6370-charger.yaml | 88 ++ 1 file changed, 88 insertions(+) create mode 100644 Documentation/devicetree

[PATCH v5 01/13] dt-bindings: usb: Add MediaTek MT6370 TCPC

2022-07-15 Thread ChiaEn Wu
From: ChiYuan Huang Add MediaTek MT6370 TCPC binding documentation. Signed-off-by: ChiYuan Huang Reviewed-by: Krzysztof Kozlowski --- .../bindings/usb/mediatek,mt6370-tcpc.yaml | 36 ++ 1 file changed, 36 insertions(+) create mode 100644

[PATCH v5 00/13] Add MediaTek MT6370 PMIC support

2022-07-15 Thread ChiaEn Wu
From: ChiaEn Wu This patch series add MediaTek MT6370 PMIC support. The 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

Re: [PATCH v4 13/13] video: backlight: mt6370: Add Mediatek MT6370 support

2022-07-14 Thread ChiaEn Wu
Andy Shevchenko 於 2022年7月13日 週三 晚上8:07寫道: > > On Wed, Jul 13, 2022 at 12:53 PM ChiaEn Wu wrote: > > Andy Shevchenko 於 2022年7月5日 週二 清晨5:14寫道: > > > On Mon, Jul 4, 2022 at 7:43 AM ChiaEn Wu wrote: > > Please, remove unneeded context when replying! > > ... > &g

Re: [PATCH v4 13/13] video: backlight: mt6370: Add Mediatek MT6370 support

2022-07-13 Thread ChiaEn Wu
Hi Andy, Thanks for your reply! I have some questions want to ask you below. Andy Shevchenko 於 2022年7月5日 週二 清晨5:14寫道: > > On Mon, Jul 4, 2022 at 7:43 AM ChiaEn Wu wrote: > > > > From: ChiaEn Wu > > > > Add Mediatek MT6370 Backlight support. > > ... > >

Re: [PATCH v3 07/14] mfd: mt6370: Add Mediatek MT6370 support

2022-07-13 Thread ChiaEn Wu
Hi Lee, Lee Jones 於 2022年7月13日 週三 下午4:04寫道: > > On Wed, 13 Jul 2022, ChiaEn Wu wrote: > > > Hi Lee, > > > > Thanks for your reply. > > > > Lee Jones 於 2022年7月12日 週二 晚上11:29寫道: > > > > > > On Thu, 23 Jun 2022, ChiaEn Wu wrote: > &

Re: [PATCH v3 07/14] mfd: mt6370: Add Mediatek MT6370 support

2022-07-12 Thread ChiaEn Wu
Hi Lee, Thanks for your reply. Lee Jones 於 2022年7月12日 週二 晚上11:29寫道: > > On Thu, 23 Jun 2022, ChiaEn Wu wrote: > > > From: ChiYuan Huang > > > > Add Mediatek MT6370 MFD support. > > No such thing as "MFD support". > > And you're not getting away

[PATCH v4 01/13] dt-bindings: usb: Add Mediatek MT6370 TCPC

2022-07-04 Thread ChiaEn Wu
From: ChiYuan Huang Add Mediatek MT6370 TCPC binding documentation. Signed-off-by: ChiYuan Huang Reviewed-by: Krzysztof Kozlowski --- .../bindings/usb/mediatek,mt6370-tcpc.yaml | 36 ++ 1 file changed, 36 insertions(+) create mode 100644

[PATCH v4 13/13] video: backlight: mt6370: Add Mediatek MT6370 support

2022-07-04 Thread ChiaEn Wu
From: ChiaEn Wu Add Mediatek MT6370 Backlight support. Signed-off-by: ChiaEn Wu --- v4: - Replace text "Mediatek" with "MediaTek" in Kconfig - Add Copyright in the source code - Revise the comment of "PWM HYS STEPS" --- drivers/video/backlight/Kconfig

[PATCH v4 08/13] usb: typec: tcpci_mt6370: Add Mediatek MT6370 tcpci driver

2022-07-04 Thread ChiaEn Wu
From: ChiYuan Huang Add chip level mt6370 tcpci driver. Signed-off-by: ChiYuan Huang --- v4: - Replace text "Mediatek" with "MediaTek" in Kconfig - Replace "first ret=regulator_(dis/en)able and then return" with "return directly" in "mt6370_tcpc_set_vbus()" - Replace header file with -

[PATCH v4 02/13] dt-bindings: power: supply: Add Mediatek MT6370 Charger

2022-07-04 Thread ChiaEn Wu
From: ChiaEn Wu Add Mediatek MT6370 Charger binding documentation. Signed-off-by: ChiaEn Wu --- v4: - Add minItems of "io-channel-names" - Replace text "Mediatek" with "MediaTek" --- .../power/supply/mediatek,mt6370-charger.yaml | 88 ++

[PATCH v4 03/13] dt-bindings: leds: mt6370: Add Mediatek mt6370 current sink type LED indicator

2022-07-04 Thread ChiaEn Wu
From: ChiYuan Huang Add Mediatek mt6370 current sink type LED indicator binding documentation. Signed-off-by: ChiYuan Huang Reviewed-by: Krzysztof Kozlowski --- .../bindings/leds/mediatek,mt6370-indicator.yaml | 77 ++ 1 file changed, 77 insertions(+) create mode

[PATCH v4 12/13] leds: flashlight: mt6370: Add Mediatek MT6370 flashlight support

2022-07-04 Thread ChiaEn Wu
From: Alice Chen Add Mediatek MT6370 flashlight support. Signed-off-by: Alice Chen --- v4: - Replace text "Mediatek" with "MediaTek" in Kconfig - Add Copyright in the source code --- drivers/leds/flash/Kconfig | 12 + drivers/leds/flash/Makefile| 1 +

[PATCH v4 07/13] mfd: mt6370: Add Mediatek MT6370 support

2022-07-04 Thread ChiaEn Wu
From: ChiYuan Huang Add Mediatek MT6370 MFD support. Signed-off-by: ChiYuan Huang --- v4 - Replace text "Mediatek" with "MediaTek" in Kconfig - Replace "first break and then return" with "return directly" in "mt6370_check_vendor_info()" - Add module name related description in Kconfig

[PATCH v4 10/13] power: supply: mt6370: Add Mediatek MT6370 charger driver

2022-07-04 Thread ChiaEn Wu
From: ChiaEn Wu Add Mediatek MT6370 charger driver. Signed-off-by: ChiaEn Wu --- v4: - Replace text "Mediatek" with "MediaTek" in Kconfig and MODULE_DESCRIPTION() - Replace "mt6370_chg_val_to_reg" and "mt6370_chg_reg_to_val" with "linear_rang

[PATCH v4 06/13] dt-bindings: mfd: Add Mediatek MT6370

2022-07-04 Thread ChiaEn Wu
From: ChiYuan Huang Add Mediatek MT6370 binding documentation. Signed-off-by: ChiYuan Huang --- v4 - Roll back all "$ref: " to v2 patch style (using "/schemas/...") --- .../devicetree/bindings/mfd/mediatek,mt6370.yaml | 280 +

[PATCH v4 04/13] dt-bindings: leds: Add Mediatek MT6370 flashlight

2022-07-04 Thread ChiaEn Wu
From: Alice Chen Add Mediatek MT6370 flashlight binding documentation. Signed-off-by: Alice Chen Reviewed-by: Krzysztof Kozlowski --- .../bindings/leds/mediatek,mt6370-flashlight.yaml | 41 ++ 1 file changed, 41 insertions(+) create mode 100644

[PATCH v4 09/13] iio: adc: mt6370: Add Mediatek MT6370 support

2022-07-04 Thread ChiaEn Wu
From: ChiaEn Wu Add Mediatek MT6370 ADC support. Signed-off-by: ChiaEn Wu --- v4: - Replace text "Mediatek" with "MediaTek" - Replace all "first dev_err() and then return" with "return dev_err_probe()" - Add Copyright in the source code - Add module n

[PATCH v4 05/13] dt-bindings: backlight: Add Mediatek MT6370 backlight

2022-07-04 Thread ChiaEn Wu
# + +title: MediaTek MT6370 Backlight + +maintainers: + - ChiaEn Wu + +description: | + This module is part of the MT6370 MFD device. + The MT6370 Backlight WLED driver supports up to a 29V output voltage for + 4 channels of 8 series WLEDs. Each channel supports up to 30mA of current

[PATCH v4 11/13] leds: mt6370: Add Mediatek MT6370 current sink type LED Indicator support

2022-07-04 Thread ChiaEn Wu
From: ChiYuan Huang Add Mediatek MT6370 current sink type LED Indicator driver. Signed-off-by: ChiYuan Huang --- v4: - Replace text "Mediatek" with "MediaTek" in Kconfig - Replace text "const" with "constant" in Kconfig - Add Copyright in the source code --- drivers/leds/Kconfig | 14

[PATCH v4 00/13] Add Mediatek MT6370 PMIC support

2022-07-04 Thread ChiaEn Wu
From: ChiaEn Wu This patch series add Mediatek MT6370 PMIC support. The 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

Re: [PATCH v3 11/14] power: supply: mt6370: Add Mediatek MT6370 charger driver

2022-06-29 Thread ChiaEn Wu
Hi Andy, Sorry for the late reply, I have some questions to ask you below. Thanks! Andy Shevchenko 於 2022年6月24日 週五 凌晨2:56寫道: > > On Thu, Jun 23, 2022 at 2:00 PM ChiaEn Wu wrote: > > > > From: ChiaEn Wu > > > > Add Mediatek MT6370 charger driver. > &

Re: [PATCH v2 08/15] mfd: mt6370: Add Mediatek MT6370 support

2022-06-27 Thread ChiaEn Wu
Hi Lee, Thanks for your reply! Lee Jones 於 2022年6月27日 週一 晚上10:14寫道: > > On Sat, 18 Jun 2022, ChiaEn Wu wrote: > > > Hi Lee, > > > > Thanks for your helpful comments, we have some questions and replies below. > > > > Lee Jones 於 2022年6月16日 週四 清晨6:49

Re: [PATCH v3 09/14] regulator: mt6370: Add mt6370 DisplayBias and VibLDO support

2022-06-24 Thread ChiaEn Wu
Hi Andy, Thanks for your helpful comments! Andy Shevchenko 於 2022年6月24日 週五 凌晨2:19寫道: > > On Thu, Jun 23, 2022 at 2:00 PM ChiaEn Wu wrote: > > > > From: ChiYuan Huang > > > > Add mt6370 DisplayBias and VibLDO support. > > ... > > > +#include

Re: [PATCH v3 07/14] mfd: mt6370: Add Mediatek MT6370 support

2022-06-24 Thread ChiaEn Wu
Hi Andy, Thanks for your helpful comments! We have some questions below. Andy Shevchenko 於 2022年6月24日 週五 凌晨2:01寫道: > > On Thu, Jun 23, 2022 at 1:59 PM ChiaEn Wu wrote: > > > > From: ChiYuan Huang > > > > Add Mediatek MT6370 MFD support. > > ... > >

Re: [PATCH v3 14/14] video: backlight: mt6370: Add Mediatek MT6370 support

2022-06-24 Thread ChiaEn Wu
Hi Daniel, Thanks for your comments! Daniel Thompson 於 2022年6月23日 週四 晚上9:43寫道: > > On Thu, Jun 23, 2022 at 07:56:31PM +0800, ChiaEn Wu wrote: > > From: ChiaEn Wu > > > > Add Mediatek MT6370 Backlight support. > > > > Signed-off-by: ChiaEn Wu > > >

Re: [PATCH v3 05/14] dt-bindings: backlight: Add Mediatek MT6370 backlight

2022-06-24 Thread ChiaEn Wu
Hi Joe, Joe Simmons-Talbott 於 2022年6月23日 週四 晚上9:17寫道: > > On Thu, Jun 23, 2022 at 07:56:22PM +0800, ChiaEn Wu wrote: > > From: ChiYuan Huang > > > > Add mt6370 backlight binding documentation. > > > > Signed-off-by: ChiYuan Huang > > --- > >

  1   2   >