Skip to contentSkip to conversation

mfd: mt6360: add pmic mt6360 driver

PATCH RESEND Superseded Gene Chen 3 participants 4 messages Apr 7, 2020 – Apr 17, 2020

Subsystems (2)

v8 of 10 Superseded Latest is v10 →

lore
Share & tools
lore

Gene Chen

author
#0 lore raw

PATCH RESEND v8 1/1 mfd: mt6360: add pmic mt6360 driver

Add mfd driver for mt6360 pmic chip include
Battery Charger/USB_PD/Flash LED/RGB LED/LDO/Buck

---
 drivers/mfd/Kconfig        |  12 ++
 drivers/mfd/Makefile       |   1 +
 drivers/mfd/mt6360-core.c  | 425 +++++++++++++++++++++++++++++++++++++++++++++
 include/linux/mfd/mt6360.h | 240 +++++++++++++++++++++++++
 4 files changed, 678 insertions(+)
 create mode 100644 drivers/mfd/mt6360-core.c
 create mode 100644 include/linux/mfd/mt6360.h

changelogs between v1 & v2
- include missing header file

changelogs between v2 & v3
- add changelogs

changelogs between v3 & v4
- fix Kconfig description
- replace mt6360_pmu_info with mt6360_pmu_data
- replace probe with probe_new
- remove unnecessary irq_chip variable
- remove annotation
- replace MT6360_MFD_CELL with OF_MFD_CELL

changelogs between v4 & v5
- remove unnecessary parse dt function
- use devm_i2c_new_dummy_device
- add base-commit message

changelogs between v5 & v6
- review return value
- remove i2c id_table
- use GPL license v2

changelogs between v6 & v7
- add author description
- replace MT6360_REGMAP_IRQ_REG by REGMAP_IRQ_REG_LINE
- remove mt6360-private.h

changelogs between v7 & v8
- fix kbuild auto reboot by include interrupt header

drivers/mfd/Kconfig +12 -0
index 2b20329..0f8c341 100644
@@ -857,6 +857,18 @@ config MFD_MAX8998
 	  additional drivers must be enabled in order to use the functionality
 	  of the device.
 
+config MFD_MT6360
+	tristate "Mediatek MT6360 SubPMIC"
+	select MFD_CORE
+	select REGMAP_I2C
+	select REGMAP_IRQ
+	depends on I2C
+	help
+	  Say Y here to enable MT6360 PMU/PMIC/LDO functional support.
+	  PMU part includes Charger, Flashlight, RGB LED
+	  PMIC part includes 2-channel BUCKs and 2-channel LDOs
+	  LDO part includes 4-channel LDOs
+
 config MFD_MT6397
 	tristate "MediaTek MT6397 PMIC Support"
 	select MFD_CORE
drivers/mfd/Makefile +1 -0
index b83f172..8c35816 100644
@@ -238,6 +238,7 @@ obj-$(CONFIG_INTEL_SOC_PMIC)	+= intel-soc-pmic.o
 obj-$(CONFIG_INTEL_SOC_PMIC_BXTWC)	+= intel_soc_pmic_bxtwc.o
 obj-$(CONFIG_INTEL_SOC_PMIC_CHTWC)	+= intel_soc_pmic_chtwc.o
 obj-$(CONFIG_INTEL_SOC_PMIC_CHTDC_TI)	+= intel_soc_pmic_chtdc_ti.o
+obj-$(CONFIG_MFD_MT6360)	+= mt6360-core.o
 mt6397-objs	:= mt6397-core.o mt6397-irq.o
 obj-$(CONFIG_MFD_MT6397)	+= mt6397.o
 obj-$(CONFIG_INTEL_SOC_PMIC_MRFLD)	+= intel_soc_pmic_mrfld.o
drivers/mfd/mt6360-core.c new file +425 -0

425 lines not on this page · raw message

include/linux/mfd/mt6360.h new file +240 -0

240 lines not on this page · raw message

Signature · 1 line
2.7.4
#1 lore raw

Hi Lee/Matthias,

I try to fix subject and update again, please help to review it, thanks

-----Original Message-----
From: Gene Chen [mailto:[email protected]]
Sent: Tuesday, April 07, 2020 11:37 PM
To: [email protected]; [email protected]
Cc: [email protected]; [email protected]; [email protected]; gene_chen(陳俊宇) <[email protected]>; [email protected]; shufan_lee(李書帆) <[email protected]>; cy_huang(黃啟原) <[email protected]>
Subject: [PATCH resend v8] mfd: mt6360: add pmic mt6360 driver

Add mfd driver for mt6360 pmic chip include Battery Charger/USB_PD/Flash LED/RGB LED/LDO/Buck

---
 drivers/mfd/Kconfig        |  12 ++
 drivers/mfd/Makefile       |   1 +
 drivers/mfd/mt6360-core.c  | 425 +++++++++++++++++++++++++++++++++++++++++++++
 include/linux/mfd/mt6360.h | 240 +++++++++++++++++++++++++
 4 files changed, 678 insertions(+)
 create mode 100644 drivers/mfd/mt6360-core.c  create mode 100644 include/linux/mfd/mt6360.h

changelogs between v1 & v2
- include missing header file

changelogs between v2 & v3
- add changelogs

changelogs between v3 & v4
- fix Kconfig description
- replace mt6360_pmu_info with mt6360_pmu_data
- replace probe with probe_new
- remove unnecessary irq_chip variable
- remove annotation
- replace MT6360_MFD_CELL with OF_MFD_CELL

changelogs between v4 & v5
- remove unnecessary parse dt function
- use devm_i2c_new_dummy_device
- add base-commit message

changelogs between v5 & v6
- review return value
- remove i2c id_table
- use GPL license v2

changelogs between v6 & v7
- add author description
- replace MT6360_REGMAP_IRQ_REG by REGMAP_IRQ_REG_LINE
- remove mt6360-private.h

changelogs between v7 & v8
- fix kbuild auto reboot by include interrupt header

drivers/mfd/Kconfig +12 -0
@@ -857,6 +857,18 @@ config MFD_MAX8998
   additional drivers must be enabled in order to use the functionality
   of the device.
 
+config MFD_MT6360
+tristate "Mediatek MT6360 SubPMIC"
+select MFD_CORE
+select REGMAP_I2C
+select REGMAP_IRQ
+depends on I2C
+help
+  Say Y here to enable MT6360 PMU/PMIC/LDO functional support.
+  PMU part includes Charger, Flashlight, RGB LED
+  PMIC part includes 2-channel BUCKs and 2-channel LDOs
+  LDO part includes 4-channel LDOs
+
 config MFD_MT6397
 tristate "MediaTek MT6397 PMIC Support"
 select MFD_CORE
drivers/mfd/Makefile +1 -0
@@ -238,6 +238,7 @@ obj-$(CONFIG_INTEL_SOC_PMIC)+= intel-soc-pmic.o
 obj-$(CONFIG_INTEL_SOC_PMIC_BXTWC)+= intel_soc_pmic_bxtwc.o
 obj-$(CONFIG_INTEL_SOC_PMIC_CHTWC)+= intel_soc_pmic_chtwc.o
 obj-$(CONFIG_INTEL_SOC_PMIC_CHTDC_TI)+= intel_soc_pmic_chtdc_ti.o
+obj-$(CONFIG_MFD_MT6360)+= mt6360-core.o
 mt6397-objs:= mt6397-core.o mt6397-irq.o
 obj-$(CONFIG_MFD_MT6397)+= mt6397.o
 obj-$(CONFIG_INTEL_SOC_PMIC_MRFLD)+= intel_soc_pmic_mrfld.o
drivers/mfd/mt6360-core.c new file +411 -0

411 lines not on this page · raw message

include/linux/mfd/mt6360.h new file +240 -0

240 lines not on this page · raw message

--
2.7.4

************* Email Confidentiality Notice ********************

The information contained in this e-mail message (including any attachments) may be confidential, proprietary, privileged, or otherwise exempt from disclosure under applicable laws. It is intended to be conveyed only to the designated recipient(s). Any use, dissemination, distribution, printing, retaining or copying of this e-mail (including its attachments) by unintended recipient(s) is strictly prohibited and may be unlawful. If you are not an intended recipient of this e-mail, or believe that you have received this e-mail in error, please notify the sender immediately (by replying to this e-mail), delete any and all copies of this e-mail (including any attachments) from your system, and do not disclose the content of this e-mail to any other person. Thank you!
_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

#2 lore raw
Quoted 3 lines · gene_chen(陳俊宇)

Hi Lee/Matthias,

I try to fix subject and update again, please help to review it, thanks

Few things wrong with this.

- Please don't top post
- Please snip the parts of the message you're not directly replying to
- Please do not send contentless pings

With regards to the latter point; you sent this patch during the merge-window (please pay attention to the release cycle). Not a great deal of reviewing happens during this period. If ~2 weeks have passed (they haven't), you may assume that your patch has been missed and submit a [RESEND], but whatever happens, do not ping.

FYI, your patch is on the list - you do not need to send a [RESEND].

Quoted 17 lines

-----Original Message-----
From: Gene Chen [mailto:[email protected]]
Sent: Tuesday, April 07, 2020 11:37 PM
To: [email protected]; [email protected]
Cc: [email protected]; [email protected]; [email protected]; gene_chen(陳俊宇) <[email protected]>; [email protected]; shufan_lee(李書帆) <[email protected]>; cy_huang(黃啟原) <[email protected]>
Subject: [PATCH resend v8] mfd: mt6360: add pmic mt6360 driver

Add mfd driver for mt6360 pmic chip include Battery Charger/USB_PD/Flash LED/RGB LED/LDO/Buck

---
 drivers/mfd/Kconfig        |  12 ++
 drivers/mfd/Makefile       |   1 +
 drivers/mfd/mt6360-core.c  | 425 +++++++++++++++++++++++++++++++++++++++++++++
 include/linux/mfd/mt6360.h | 240 +++++++++++++++++++++++++
 4 files changed, 678 insertions(+)
 create mode 100644 drivers/mfd/mt6360-core.c  create mode 100644 include/linux/mfd/mt6360.h
Signature · 4 lines
Lee Jones [李琼斯]
Linaro Services Technical Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
#3 lore raw
In reply to Gene Chen
Quoted 86 lines · Gene Chen

Add mfd driver for mt6360 pmic chip include
Battery Charger/USB_PD/Flash LED/RGB LED/LDO/Buck

---
 drivers/mfd/Kconfig        |  12 ++
 drivers/mfd/Makefile       |   1 +
 drivers/mfd/mt6360-core.c  | 425 +++++++++++++++++++++++++++++++++++++++++++++
 include/linux/mfd/mt6360.h | 240 +++++++++++++++++++++++++
 4 files changed, 678 insertions(+)
 create mode 100644 drivers/mfd/mt6360-core.c
 create mode 100644 include/linux/mfd/mt6360.h

changelogs between v1 & v2
- include missing header file

changelogs between v2 & v3
- add changelogs

changelogs between v3 & v4
- fix Kconfig description
- replace mt6360_pmu_info with mt6360_pmu_data
- replace probe with probe_new
- remove unnecessary irq_chip variable
- remove annotation
- replace MT6360_MFD_CELL with OF_MFD_CELL

changelogs between v4 & v5
- remove unnecessary parse dt function
- use devm_i2c_new_dummy_device
- add base-commit message

changelogs between v5 & v6
- review return value
- remove i2c id_table
- use GPL license v2

changelogs between v6 & v7
- add author description
- replace MT6360_REGMAP_IRQ_REG by REGMAP_IRQ_REG_LINE
- remove mt6360-private.h

changelogs between v7 & v8
- fix kbuild auto reboot by include interrupt header

drivers/mfd/Kconfig +12 -0
index 2b20329..0f8c341 100644
@@ -857,6 +857,18 @@ config MFD_MAX8998
 	  additional drivers must be enabled in order to use the functionality
 	  of the device.
 
+config MFD_MT6360
+	tristate "Mediatek MT6360 SubPMIC"
+	select MFD_CORE
+	select REGMAP_I2C
+	select REGMAP_IRQ
+	depends on I2C
+	help
+	  Say Y here to enable MT6360 PMU/PMIC/LDO functional support.
+	  PMU part includes Charger, Flashlight, RGB LED
+	  PMIC part includes 2-channel BUCKs and 2-channel LDOs
+	  LDO part includes 4-channel LDOs
+
 config MFD_MT6397
 	tristate "MediaTek MT6397 PMIC Support"
 	select MFD_CORE
drivers/mfd/Makefile +1 -0
index b83f172..8c35816 100644
@@ -238,6 +238,7 @@ obj-$(CONFIG_INTEL_SOC_PMIC)	+= intel-soc-pmic.o
 obj-$(CONFIG_INTEL_SOC_PMIC_BXTWC)	+= intel_soc_pmic_bxtwc.o
 obj-$(CONFIG_INTEL_SOC_PMIC_CHTWC)	+= intel_soc_pmic_chtwc.o
 obj-$(CONFIG_INTEL_SOC_PMIC_CHTDC_TI)	+= intel_soc_pmic_chtdc_ti.o
+obj-$(CONFIG_MFD_MT6360)	+= mt6360-core.o
 mt6397-objs	:= mt6397-core.o mt6397-irq.o
 obj-$(CONFIG_MFD_MT6397)	+= mt6397.o
 obj-$(CONFIG_INTEL_SOC_PMIC_MRFLD)	+= intel_soc_pmic_mrfld.o
drivers/mfd/mt6360-core.c new file +0 -0
new file mode 100644
index 0000000..d1168f8

drivers/mfd/mt6360-core.c line 3

Quoted 3 lines
drivers/mfd/mt6360-core.c new file +3 -0
@@ -0,0 +1,425 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (c) 2019 MediaTek Inc.

This is out of date.

Quoted 2 lines
drivers/mfd/mt6360-core.c new file +2 -0
+ * Author: Gene Chen <[email protected]>
+ */

[...]

include/linux/mfd/mt6360.h line 3

Quoted 10 lines
drivers/mfd/mt6360-core.c new file +1 -0
+MODULE_LICENSE("GPL v2");
include/linux/mfd/mt6360.h new file +3 -0
new file mode 100644
index 0000000..c03e6d1
@@ -0,0 +1,240 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * Copyright (c) 2019 MediaTek Inc.

Also out of date.

include/linux/mfd/mt6360.h line 4

Quoted 1 line
include/linux/mfd/mt6360.h new file +1 -0
+ */

Once fixed, please resubmit with my:

For my own reference (apply this as-is to your sign-off block):

Signature · 4 lines
Lee Jones [李琼斯]
Linaro Services Technical Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog