Skip to contentSkip to conversation

MAINTAINERS: Add Advantech embedded controller entry

PATCH Superseded Shihlun Lin 3 participants 11 messages Oct 29, 2020 – Nov 3, 2020 1 message not in the archive

Subsystems (2)

v3 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/6 MAINTAINERS: Add Advantech embedded controller entry

Add Advantech embedded controller entry

---
 MAINTAINERS | 11 +++++++++++
 1 file changed, 11 insertions(+)
MAINTAINERS +11 -0
index e73636b75f29..d59e051c3f9d 100644
@@ -562,6 +562,17 @@ S:	Maintained
 F:	Documentation/scsi/advansys.rst
 F:	drivers/scsi/advansys.c
 
+ADVANTECH EMBEDDED CONTROLLER DRIVER
+M:	Shihlun Lin <[email protected]>
+M:	Campion Kang <[email protected]>
+L:	[email protected]
+S:	Maintained
+F:	Documentation/devicetree/bindings/mfd/ahc1ec0.yaml
+F:	drivers/mfd/ahc1ec0-hwmon.c
+F:	drivers/mfd/ahc1ec0-wdt.c
+F:	drivers/mfd/ahc1ec0.c
+F:	include/dt-bindings/mfd/ahc1ec0.h
+
 ADXL34X THREE-AXIS DIGITAL ACCELEROMETER DRIVER (ADXL345/ADXL346)
 M:	Michael Hennerich <[email protected]>
 S:	Supported

base-commit: 23859ae44402f4d935b9ee548135dd1e65e2cbf4

Signature · 1 line
2.17.1
#1 lore raw

PATCH v3 2/6 mfd: ahc1ec0: Add Advantech EC include file used by dt-bindings

This files defines the sud-device types and hwmon profiles support by Advantech embedded controller.

---
 include/dt-bindings/mfd/ahc1ec0.h | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)
 create mode 100644 include/dt-bindings/mfd/ahc1ec0.h
include/dt-bindings/mfd/ahc1ec0.h new file +25 -0
new file mode 100644
index 000000000000..389a7a7f8f02
@@ -0,0 +1,25 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+/*
+ * Device Tree defines for Advantech Embedded Controller (AHC1EC0)
+ */
+
+#ifndef _DT_BINDINGS_MFD_AHC1EC0_H
+#define _DT_BINDINGS_MFD_AHC1EC0_H
+
+/* Sub-device Definitions */
+#define AHC1EC0_SUBDEV_BRIGHTNESS 0x0
+#define AHC1EC0_SUBDEV_EEPROM     0x1
+#define AHC1EC0_SUBDEV_GPIO       0x2
+#define AHC1EC0_SUBDEV_HWMON      0x3
+#define AHC1EC0_SUBDEV_LED        0x4
+#define AHC1EC0_SUBDEV_WDT        0x5
+
+/* HWMON Profile Definitions */
+#define AHC1EC0_HWMON_PRO_TEMPLATE 0x0
+#define AHC1EC0_HWMON_PRO_TPC5XXX  0x1
+#define AHC1EC0_HWMON_PRO_PRVR4    0x2
+#define AHC1EC0_HWMON_PRO_UNO2271G 0x3
+#define AHC1EC0_HWMON_PRO_UNO1172A 0x4
+#define AHC1EC0_HWMON_PRO_UNO1372G 0x5
+
+#endif /* _DT_BINDINGS_MFD_AHC1EC0_H */
Signature · 1 line
2.17.1
#2 lore raw

PATCH v3 3/6 dt-bindings: mfd: ahc1ec0.yaml: Add Advantech Embedded Controll - AHC1EC0

In reply to Shihlun Lin

Add DT binding schema for Advantech embedded controller AHC1EC0.

---
 .../devicetree/bindings/mfd/ahc1ec0.yaml      | 70 +++++++++++++++++++
 1 file changed, 70 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/mfd/ahc1ec0.yaml
Documentation/devicetree/bindings/mfd/ahc1ec0.yaml new file +70 -0
new file mode 100644
index 000000000000..a73d1cf65a4c
@@ -0,0 +1,70 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/mfd/ahc1ec0.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Advantech Embedded Controller (AHC1EC0)
+
+maintainers:
+  - Shihlun Lin <[email protected]>
+  - Campion Kang <[email protected]>
+
+description: |
+  AHC1EC0 is one of the embedded controllers used by Advantech to provide several
+  functions such as watchdog, hwmon, brightness, etc. Advantech related applications
+  can control the whole system via these functions.
+
+properties:
+  compatible:
+    const: advantech,ahc1ec0
+
+  advantech,sub-dev-nb:
+    description:
+      The number of sub-devices specified in the platform.
+    $ref: /schemas/types.yaml#/definitions/uint32
+    maxItems: 1
+
+  advantech,sub-dev:
+    description:
+      A list of the sub-devices supported in the platform. Defines for the
+      appropriate values can found in dt-bindings/mfd/ahc1ec0.h.
+    $ref: "/schemas/types.yaml#/definitions/uint32-array"
+    minItems: 1
+    maxItems: 6
+
+  advantech,hwmon-profile:
+    description:
+      The number of sub-devices specified in the platform. Defines for the
+      hwmon profiles can found in dt-bindings/mfd/ahc1ec0.
+    $ref: /schemas/types.yaml#/definitions/uint32
+    maxItems: 1
+
+required:
+  - compatible
+  - advantech,sub-dev-nb
+  - advantech,sub-dev
+
+if:
+  properties:
+    advantech,sub-dev:
+      contains:
+        const: 0x3
+then:
+  required:
+    - advantech,hwmon-profile
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/mfd/ahc1ec0.h>
+    ahc1ec0 {
+        compatible = "advantech,ahc1ec0";
+
+        advantech,sub-dev-nb = <2>;
+        advantech,sub-dev = <AHC1EC0_SUBDEV_HWMON
+                             AHC1EC0_SUBDEV_WDT>;
+
+        advantech,hwmon-profile = <AHC1EC0_HWMON_PRO_UNO2271G>;
+    };
Signature · 1 line
2.17.1
#3 lore raw

PATCH v3 4/6 mfd: ahc1ec0: Add support for Advantech embedded controller

In reply to Shihlun Lin

AHC1EC0 is the embedded controller driver for Advantech industrial products. This provides sub-devices such as hwmon and watchdog, and also expose functions for sud-devices to read/write the value to embedded controller.

---
 drivers/mfd/Kconfig         |    9 +
 drivers/mfd/Makefile        |    2 +
 drivers/mfd/ahc1ec0.c       | 1418 +++++++++++++++++++++++++++++++++++
 include/linux/mfd/ahc1ec0.h |  338 +++++++++
 4 files changed, 1767 insertions(+)
 create mode 100644 drivers/mfd/ahc1ec0.c
 create mode 100644 include/linux/mfd/ahc1ec0.h
drivers/mfd/Kconfig +9 -0
index 8b99a13669bf..965bcafbe5b2 100644
@@ -2166,5 +2166,14 @@ config MFD_INTEL_M10_BMC
 	  additional drivers must be enabled in order to use the functionality
 	  of the device.
 
+config MFD_AHC1EC0
+	tristate "Advantech Embedded Controller Module"
+	select MFD_CORE
+	help
+	  This is the core function that for Advantech EC drivers. It
+	  includes the sub-devices such as hwmon, watchdog, etc. And also
+	  provides expose functions for sub-devices to read/write the value
+	  to embedded controller.
+
 endmenu
 endif
drivers/mfd/Makefile +2 -0
index 1780019d2474..80a9a2bdc3ba 100644
@@ -267,3 +267,5 @@ obj-$(CONFIG_MFD_KHADAS_MCU) 	+= khadas-mcu.o
 obj-$(CONFIG_SGI_MFD_IOC3)	+= ioc3.o
 obj-$(CONFIG_MFD_SIMPLE_MFD_I2C)	+= simple-mfd-i2c.o
 obj-$(CONFIG_MFD_INTEL_M10_BMC)   += intel-m10-bmc.o
+
+obj-$(CONFIG_MFD_AHC1EC0)	+= ahc1ec0.o
drivers/mfd/ahc1ec0.c new file +1418 -0

1,418 lines not on this page · raw message

include/linux/mfd/ahc1ec0.h new file +338 -0

338 lines not on this page · raw message

Signature · 1 line
2.17.1
#4 lore raw

PATCH v3 5/6 mfd: ahc1ec0-hwmon: Add sub-device hwmon for Advantech embedded controller

In reply to Shihlun Lin

This is one of sub-device driver for Advantech embedded controller AHC1EC0. This driver provides sysfs ABI for Advantech related applications to monitor the system status.

---
 drivers/mfd/Kconfig         |    8 +
 drivers/mfd/Makefile        |    1 +
 drivers/mfd/ahc1ec0-hwmon.c | 1514 +++++++++++++++++++++++++++++++++++
 3 files changed, 1523 insertions(+)
 create mode 100644 drivers/mfd/ahc1ec0-hwmon.c
drivers/mfd/Kconfig +8 -0
index 965bcafbe5b2..52ca49b211fc 100644
@@ -2175,5 +2175,13 @@ config MFD_AHC1EC0
 	  provides expose functions for sub-devices to read/write the value
 	  to embedded controller.
 
+config MFD_AHC1EC0_HWMON
+	tristate "Advantech EC Hareware Monitor Function"
+	depends on MFD_AHC1EC0
+	help
+	  This is sub-device for Advantech embedded controller AHC1EC0. This
+	  driver provides the sysfs attribues for applications to monitor
+	  the system status.
+
 endmenu
 endif
drivers/mfd/Makefile +1 -0
index 80a9a2bdc3ba..eb645db817b5 100644
@@ -269,3 +269,4 @@ obj-$(CONFIG_MFD_SIMPLE_MFD_I2C)	+= simple-mfd-i2c.o
 obj-$(CONFIG_MFD_INTEL_M10_BMC)   += intel-m10-bmc.o
 
 obj-$(CONFIG_MFD_AHC1EC0)	+= ahc1ec0.o
+obj-$(CONFIG_MFD_AHC1EC0_HWMON)	+= ahc1ec0-hwmon.o
drivers/mfd/ahc1ec0-hwmon.c new file +1514 -0

1,514 lines not on this page · raw message

Signature · 1 line
2.17.1
#5 lore raw

Re: [PATCH v3 5/6] mfd: ahc1ec0-hwmon: Add sub-device hwmon for Advantech embedded controller

Quoted 6 lines · Shihlun Lin

This is one of sub-device driver for Advantech embedded controller AHC1EC0. This driver provides sysfs ABI for Advantech related applications to monitor the system status.

LKP reported that your driver needed upstreaming?

I'm confused!

Quoted 4 lines
---
 drivers/mfd/Kconfig         |    8 +
 drivers/mfd/Makefile        |    1 +
 drivers/mfd/ahc1ec0-hwmon.c | 1514 +++++++++++++++++++++++++++++++++++

This obviously belongs in drivers/hwmon.

Quoted 36 lines
 3 files changed, 1523 insertions(+)
 create mode 100644 drivers/mfd/ahc1ec0-hwmon.c
drivers/mfd/Kconfig +8 -0
index 965bcafbe5b2..52ca49b211fc 100644
@@ -2175,5 +2175,13 @@ config MFD_AHC1EC0
 	  provides expose functions for sub-devices to read/write the value
 	  to embedded controller.
 
+config MFD_AHC1EC0_HWMON
+	tristate "Advantech EC Hareware Monitor Function"
+	depends on MFD_AHC1EC0
+	help
+	  This is sub-device for Advantech embedded controller AHC1EC0. This
+	  driver provides the sysfs attribues for applications to monitor
+	  the system status.
+
 endmenu
 endif
drivers/mfd/Makefile +1 -0
index 80a9a2bdc3ba..eb645db817b5 100644
@@ -269,3 +269,4 @@ obj-$(CONFIG_MFD_SIMPLE_MFD_I2C)	+= simple-mfd-i2c.o
 obj-$(CONFIG_MFD_INTEL_M10_BMC)   += intel-m10-bmc.o
 
 obj-$(CONFIG_MFD_AHC1EC0)	+= ahc1ec0.o
+obj-$(CONFIG_MFD_AHC1EC0_HWMON)	+= ahc1ec0-hwmon.o
drivers/mfd/ahc1ec0-hwmon.c new file +0 -0
new file mode 100644
index 000000000000..3e493b040b4a

drivers/mfd/ahc1ec0-hwmon.c line 3

Quoted 3 lines
drivers/mfd/ahc1ec0-hwmon.c new file +3 -0
@@ -0,0 +1,1514 @@
+// SPDX-License-Identifier: GPL-2.0-only
+/*****************************************************************************
+ * Copyright (c) 2018, Advantech Automation Corp.

You can't just lift a whole driver from downstream code and send it to the mailing list as-is.

drivers/mfd/ahc1ec0-hwmon.c line 9

Quoted 6 lines
drivers/mfd/ahc1ec0-hwmon.c new file +6 -0
+ * THIS IS AN UNPUBLISHED WORK CONTAINING CONFIDENTIAL AND PROPRIETARY
+ * INFORMATION WHICH IS THE PROPERTY OF ADVANTECH AUTOMATION CORP.
+ *
+ * ANY DISCLOSURE, USE, OR REPRODUCTION, WITHOUT WRITTEN AUTHORIZATION FROM
+ * ADVANTECH AUTOMATION CORP., IS STRICTLY PROHIBITED.
+ *****************************************************************************

This warning is in contradiction to the licence you are proposing.

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

A message that is not in the archive (sent off-list or not yet received): [email protected]

#7 lore raw

Re: [PATCH v3 5/6] mfd: ahc1ec0-hwmon: Add sub-device hwmon for Advantech embedded controller

Quoted 18 lines · Shihlun.Lin

Hi Lee,

Thank you for your time for checking my submission.

Quoted 6 lines · Shihlun Lin
Quoted 5 lines

This is one of sub-device driver for Advantech embedded controller AHC1EC0. This driver provides sysfs ABI for Advantech related applications to monitor the system status.

Quoted 7 lines
Quoted 2 lines

LKP reported that your driver needed upstreaming?

I'm confused!

Quoted 6 lines

When I submitted the driver first time, LKP reported some warning to me and ask me to add the tag.

If you fix the issue, kindly add following tag as appropriate

That would only be for the fix.

Having a test robot report a missing driver seems odd.

Quoted 52 lines
Quoted 8 lines
Quoted 4 lines
---
 drivers/mfd/Kconfig         |    8 +
 drivers/mfd/Makefile        |    1 +
 drivers/mfd/ahc1ec0-hwmon.c | 1514

+++++++++++++++++++++++++++++++++++

This obviously belongs in drivers/hwmon.

Thank you so much, I will do it.

Quoted 41 lines

drivers/mfd/Makefile obj-$(CONFIG_MFD_SIMPLE_MFD_I2C) +=

Quoted 26 lines
 3 files changed, 1523 insertions(+)
 create mode 100644 drivers/mfd/ahc1ec0-hwmon.c
drivers/mfd/Kconfig +8 -0
index 965bcafbe5b2..52ca49b211fc 100644
@@ -2175,5 +2175,13 @@ config MFD_AHC1EC0
 	  provides expose functions for sub-devices to read/write the value
 	  to embedded controller.
 
+config MFD_AHC1EC0_HWMON
+	tristate "Advantech EC Hareware Monitor Function"
+	depends on MFD_AHC1EC0
+	help
+	  This is sub-device for Advantech embedded controller AHC1EC0. This
+	  driver provides the sysfs attribues for applications to monitor
+	  the system status.
+
 endmenu
 endif
drivers/mfd/Makefile +0 -0
index 80a9a2bdc3ba..eb645db817b5 100644
@@ -269,3 +269,4 @@ obj-$(CONFIG_MFD_SIMPLE_MFD_I2C)	+=

simple-mfd-i2c.o

drivers/mfd/ahc1ec0-hwmon.c line 1

Quoted 12 lines
drivers/mfd/Makefile +1 -0
 obj-$(CONFIG_MFD_INTEL_M10_BMC)   += intel-m10-bmc.o
 
 obj-$(CONFIG_MFD_AHC1EC0)	+= ahc1ec0.o
+obj-$(CONFIG_MFD_AHC1EC0_HWMON)	+= ahc1ec0-hwmon.o
drivers/mfd/ahc1ec0-hwmon.c new file +1 -0
new file mode 100644
index 000000000000..3e493b040b4a
@@ -0,0 +1,1514 @@
+// SPDX-License-Identifier: GPL-2.0-only

+/**************************************************************
***************

Quoted 8 lines
Quoted 5 lines

drivers/mfd/ahc1ec0-hwmon.c line 3

Quoted 1 line
drivers/mfd/ahc1ec0-hwmon.c new file +1 -0
+ * Copyright (c) 2018, Advantech Automation Corp.

You can't just lift a whole driver from downstream code and send it to the mailing list as-is.

Could you give me more advice about how to submit the whole driver? Is there any website to guide me?

There is lots of documentation on how to upstream code/drivers in the /Documentation folder.

Start here:

https://www.kernel.org/doc/html/latest/process/submitting-patches.html

Note, this online document, along with all of the others you will required are actually contained in /Documentation, in the kernel source tree.

Quoted 9 lines

Thank you so much.

Quoted 7 lines

drivers/mfd/ahc1ec0-hwmon.c line 3

Quoted 1 line
drivers/mfd/ahc1ec0-hwmon.c new file +1 -0
+ * THIS IS AN UNPUBLISHED WORK CONTAINING CONFIDENTIAL AND

PROPRIETARY

drivers/mfd/ahc1ec0-hwmon.c line 4

Quoted 1 line
drivers/mfd/ahc1ec0-hwmon.c new file +1 -0
+ * INFORMATION WHICH IS THE PROPERTY OF ADVANTECH AUTOMATION

CORP.

drivers/mfd/ahc1ec0-hwmon.c line 6

Quoted 2 lines
drivers/mfd/ahc1ec0-hwmon.c new file +2 -0
+ *
+ * ANY DISCLOSURE, USE, OR REPRODUCTION, WITHOUT WRITTEN

AUTHORIZATION FROM

Quoted 8 lines
Quoted 6 lines

drivers/mfd/ahc1ec0-hwmon.c line 56

Quoted 2 lines
drivers/mfd/ahc1ec0-hwmon.c new file +2 -0
+ * ADVANTECH AUTOMATION CORP., IS STRICTLY PROHIBITED.
+

****************************************************************
*************

This warning is in contradiction to the licence you are proposing.

Thank you so much, I will remove it.

You'd better seek proper permission from your legal department before doing so. Subverting licence agreements can land you in heaps of trouble if you're not careful.

Signature · 4 lines
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog
#8 lore raw

Re: [PATCH v3 5/6] mfd: ahc1ec0-hwmon: Add sub-device hwmon for Advantech embedded controller

In reply to Lee Jones

Hi Lee,

One question for you.

Lee Jones <[email protected]> 於 2020年10月29日 週四 下午9:14寫道:

Quoted 49 lines · Shihlun Lin
Quoted 7 lines

This is one of sub-device driver for Advantech embedded controller AHC1EC0. This driver provides sysfs ABI for Advantech related applications to monitor the system status.

LKP reported that your driver needed upstreaming?

I'm confused!

Quoted 4 lines
---
 drivers/mfd/Kconfig         |    8 +
 drivers/mfd/Makefile        |    1 +
 drivers/mfd/ahc1ec0-hwmon.c | 1514 +++++++++++++++++++++++++++++++++++

This obviously belongs in drivers/hwmon.

Quoted 28 lines
 3 files changed, 1523 insertions(+)
 create mode 100644 drivers/mfd/ahc1ec0-hwmon.c
drivers/mfd/Kconfig +8 -0
index 965bcafbe5b2..52ca49b211fc 100644
@@ -2175,5 +2175,13 @@ config MFD_AHC1EC0
        provides expose functions for sub-devices to read/write the value
        to embedded controller.
 
+config MFD_AHC1EC0_HWMON
+     tristate "Advantech EC Hareware Monitor Function"
+     depends on MFD_AHC1EC0
+     help
+       This is sub-device for Advantech embedded controller AHC1EC0. This
+       driver provides the sysfs attribues for applications to monitor
+       the system status.
+
 endmenu
 endif
drivers/mfd/Makefile +0 -0
index 80a9a2bdc3ba..eb645db817b5 100644
@@ -269,3 +269,4 @@ obj-$(CONFIG_MFD_SIMPLE_MFD_I2C)  += simple-mfd-i2c.o
 obj-$(CONFIG_MFD_INTEL_M10_BMC)   += intel-m10-bmc.o
 
Quoted 14 lines

drivers/mfd/ahc1ec0-hwmon.c line 3

Quoted 11 lines
drivers/mfd/Makefile +1 -0
 obj-$(CONFIG_MFD_AHC1EC0)    += ahc1ec0.o
+obj-$(CONFIG_MFD_AHC1EC0_HWMON)      += ahc1ec0-hwmon.o
drivers/mfd/ahc1ec0-hwmon.c new file +3 -0
new file mode 100644
index 000000000000..3e493b040b4a
@@ -0,0 +1,1514 @@
+// SPDX-License-Identifier: GPL-2.0-only
+/*****************************************************************************
+ * Copyright (c) 2018, Advantech Automation Corp.

You can't just lift a whole driver from downstream code and send it to the mailing list as-is.

Could you elaborate more about which part should be fixed, and how it should look like?

Quoted 14 lines

drivers/mfd/ahc1ec0-hwmon.c line 9

Quoted 6 lines
drivers/mfd/ahc1ec0-hwmon.c new file +6 -0
+ * THIS IS AN UNPUBLISHED WORK CONTAINING CONFIDENTIAL AND PROPRIETARY
+ * INFORMATION WHICH IS THE PROPERTY OF ADVANTECH AUTOMATION CORP.
+ *
+ * ANY DISCLOSURE, USE, OR REPRODUCTION, WITHOUT WRITTEN AUTHORIZATION FROM
+ * ADVANTECH AUTOMATION CORP., IS STRICTLY PROHIBITED.
+ *****************************************************************************

This warning is in contradiction to the licence you are proposing.

--
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services

Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog
#9 lore raw

Re: [PATCH v3 5/6] mfd: ahc1ec0-hwmon: Add sub-device hwmon for Advantech embedded controller

Quoted 68 lines · AceLan Kao

Hi Lee,

One question for you.

Lee Jones <[email protected]> 於 2020年10月29日 週四 下午9:14寫道:

Quoted 49 lines · Shihlun Lin
Quoted 7 lines

This is one of sub-device driver for Advantech embedded controller AHC1EC0. This driver provides sysfs ABI for Advantech related applications to monitor the system status.

LKP reported that your driver needed upstreaming?

I'm confused!

Quoted 4 lines
---
 drivers/mfd/Kconfig         |    8 +
 drivers/mfd/Makefile        |    1 +
 drivers/mfd/ahc1ec0-hwmon.c | 1514 +++++++++++++++++++++++++++++++++++

This obviously belongs in drivers/hwmon.

Quoted 28 lines
 3 files changed, 1523 insertions(+)
 create mode 100644 drivers/mfd/ahc1ec0-hwmon.c
drivers/mfd/Kconfig +8 -0
index 965bcafbe5b2..52ca49b211fc 100644
@@ -2175,5 +2175,13 @@ config MFD_AHC1EC0
        provides expose functions for sub-devices to read/write the value
        to embedded controller.
 
+config MFD_AHC1EC0_HWMON
+     tristate "Advantech EC Hareware Monitor Function"
+     depends on MFD_AHC1EC0
+     help
+       This is sub-device for Advantech embedded controller AHC1EC0. This
+       driver provides the sysfs attribues for applications to monitor
+       the system status.
+
 endmenu
 endif
drivers/mfd/Makefile +0 -0
index 80a9a2bdc3ba..eb645db817b5 100644
@@ -269,3 +269,4 @@ obj-$(CONFIG_MFD_SIMPLE_MFD_I2C)  += simple-mfd-i2c.o
 obj-$(CONFIG_MFD_INTEL_M10_BMC)   += intel-m10-bmc.o
 
Quoted 14 lines

drivers/mfd/ahc1ec0-hwmon.c line 3

Quoted 11 lines
drivers/mfd/Makefile +1 -0
 obj-$(CONFIG_MFD_AHC1EC0)    += ahc1ec0.o
+obj-$(CONFIG_MFD_AHC1EC0_HWMON)      += ahc1ec0-hwmon.o
drivers/mfd/ahc1ec0-hwmon.c new file +3 -0
new file mode 100644
index 000000000000..3e493b040b4a
@@ -0,0 +1,1514 @@
+// SPDX-License-Identifier: GPL-2.0-only
+/*****************************************************************************
+ * Copyright (c) 2018, Advantech Automation Corp.

You can't just lift a whole driver from downstream code and send it to the mailing list as-is.

Quoted 2 lines

Could you elaborate more about which part should be fixed, and how it should look like?

Frankly, no.

I would expect a contributor of a several thousand line patch-set to at least read the documentation and adhere to it prior to anyone conducting a full review. Simply plucking a very old driver set from a BSP kernel and dumping it on the upstream mailing list is not the way to gain the right kind of attention.

At the very least (this is not an exhaustive list);

- all of the copyrights need to be up-to-date
- the drivers need to be located in their correct subsystems
- any internal references/comment headers need to be removed
- licences should be compatible with upstreaming
- hacks removed
- builds without errors or warnings
- checkpatch.pl passed
- submission should tick all of the boxes in SubmittingPatches
- removal of changelogs/versions
- this is the first version as far as the kernel is concerned

Quoted 9 lines
Quoted 9 lines

drivers/mfd/ahc1ec0-hwmon.c line 9

Quoted 6 lines
drivers/mfd/ahc1ec0-hwmon.c new file +6 -0
+ * THIS IS AN UNPUBLISHED WORK CONTAINING CONFIDENTIAL AND PROPRIETARY
+ * INFORMATION WHICH IS THE PROPERTY OF ADVANTECH AUTOMATION CORP.
+ *
+ * ANY DISCLOSURE, USE, OR REPRODUCTION, WITHOUT WRITTEN AUTHORIZATION FROM
+ * ADVANTECH AUTOMATION CORP., IS STRICTLY PROHIBITED.
+ *****************************************************************************

This warning is in contradiction to the licence you are proposing.

Signature · 4 lines
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog
#10 lore raw

Re: [PATCH v3 5/6] mfd: ahc1ec0-hwmon: Add sub-device hwmon for Advantech embedded controller

Quoted 83 lines · Lee Jones
Quoted 68 lines · AceLan Kao

Hi Lee,

One question for you.

Lee Jones <[email protected]> 於 2020年10月29日 週四 下午9:14寫道:

Quoted 49 lines · Shihlun Lin
Quoted 7 lines

This is one of sub-device driver for Advantech embedded controller AHC1EC0. This driver provides sysfs ABI for Advantech related applications to monitor the system status.

LKP reported that your driver needed upstreaming?

I'm confused!

Quoted 4 lines
---
 drivers/mfd/Kconfig         |    8 +
 drivers/mfd/Makefile        |    1 +
 drivers/mfd/ahc1ec0-hwmon.c | 1514 +++++++++++++++++++++++++++++++++++

This obviously belongs in drivers/hwmon.

Quoted 28 lines
 3 files changed, 1523 insertions(+)
 create mode 100644 drivers/mfd/ahc1ec0-hwmon.c
drivers/mfd/Kconfig +8 -0
index 965bcafbe5b2..52ca49b211fc 100644
@@ -2175,5 +2175,13 @@ config MFD_AHC1EC0
        provides expose functions for sub-devices to read/write the value
        to embedded controller.
 
+config MFD_AHC1EC0_HWMON
+     tristate "Advantech EC Hareware Monitor Function"
+     depends on MFD_AHC1EC0
+     help
+       This is sub-device for Advantech embedded controller AHC1EC0. This
+       driver provides the sysfs attribues for applications to monitor
+       the system status.
+
 endmenu
 endif
drivers/mfd/Makefile +0 -0
index 80a9a2bdc3ba..eb645db817b5 100644
@@ -269,3 +269,4 @@ obj-$(CONFIG_MFD_SIMPLE_MFD_I2C)  += simple-mfd-i2c.o
 obj-$(CONFIG_MFD_INTEL_M10_BMC)   += intel-m10-bmc.o
 
Quoted 14 lines

drivers/mfd/ahc1ec0-hwmon.c line 3

Quoted 11 lines
drivers/mfd/Makefile +1 -0
 obj-$(CONFIG_MFD_AHC1EC0)    += ahc1ec0.o
+obj-$(CONFIG_MFD_AHC1EC0_HWMON)      += ahc1ec0-hwmon.o
drivers/mfd/ahc1ec0-hwmon.c new file +3 -0
new file mode 100644
index 000000000000..3e493b040b4a
@@ -0,0 +1,1514 @@
+// SPDX-License-Identifier: GPL-2.0-only
+/*****************************************************************************
+ * Copyright (c) 2018, Advantech Automation Corp.

You can't just lift a whole driver from downstream code and send it to the mailing list as-is.

Quoted 2 lines

Could you elaborate more about which part should be fixed, and how it should look like?

Frankly, no.

I would expect a contributor of a several thousand line patch-set to at least read the documentation and adhere to it prior to anyone conducting a full review. Simply plucking a very old driver set from a BSP kernel and dumping it on the upstream mailing list is not the way to gain the right kind of attention.

At the very least (this is not an exhaustive list);

Quoted 10 lines

- all of the copyrights need to be up-to-date
- the drivers need to be located in their correct subsystems
- any internal references/comment headers need to be removed
- licences should be compatible with upstreaming
- hacks removed
- builds without errors or warnings
- checkpatch.pl passed
- submission should tick all of the boxes in SubmittingPatches
- removal of changelogs/versions
- this is the first version as far as the kernel is concerned

Also spell-check. Literally the 2nd line:

config MFD_AHC1EC0_HWMON
tristate "Advantech EC Hareware Monitor Function"

I don't know what Hareware is, but is sounds fast! ;)

Quoted 10 lines
Quoted 9 lines
Quoted 9 lines

drivers/mfd/ahc1ec0-hwmon.c line 9

Quoted 6 lines
drivers/mfd/ahc1ec0-hwmon.c new file +6 -0
+ * THIS IS AN UNPUBLISHED WORK CONTAINING CONFIDENTIAL AND PROPRIETARY
+ * INFORMATION WHICH IS THE PROPERTY OF ADVANTECH AUTOMATION CORP.
+ *
+ * ANY DISCLOSURE, USE, OR REPRODUCTION, WITHOUT WRITTEN AUTHORIZATION FROM
+ * ADVANTECH AUTOMATION CORP., IS STRICTLY PROHIBITED.
+ *****************************************************************************

This warning is in contradiction to the licence you are proposing.

Signature · 4 lines
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog
#11 lore raw

PATCH v3 6/6 mfd: ahc1ec0-wdt: Add sub-device watchdog for Advantech embedded controller

In reply to Shihlun Lin

This is one of sub-device driver for Advantech embedded controller AHC1EC0. This driver provide watchdog functionality for Advantech related applications to restart the system.

---
 drivers/mfd/Kconfig       |   4 +
 drivers/mfd/Makefile      |   1 +
 drivers/mfd/ahc1ec0-wdt.c | 502 ++++++++++++++++++++++++++++++++++++++
 3 files changed, 507 insertions(+)
 create mode 100644 drivers/mfd/ahc1ec0-wdt.c
drivers/mfd/Kconfig +4 -0
index 52ca49b211fc..b6b2122fb757 100644
@@ -2183,5 +2183,9 @@ config MFD_AHC1EC0_HWMON
 	  driver provides the sysfs attribues for applications to monitor
 	  the system status.
 
+config MFD_AHC1EC0_WDT
+	tristate "Advantech EC Watchdog Function"
+	depends on MFD_AHC1EC0
+
 endmenu
 endif
drivers/mfd/Makefile +1 -0
index eb645db817b5..263e6273729c 100644
@@ -270,3 +270,4 @@ obj-$(CONFIG_MFD_INTEL_M10_BMC)   += intel-m10-bmc.o
 
 obj-$(CONFIG_MFD_AHC1EC0)	+= ahc1ec0.o
 obj-$(CONFIG_MFD_AHC1EC0_HWMON)	+= ahc1ec0-hwmon.o
+obj-$(CONFIG_MFD_AHC1EC0_WDT)	+= ahc1ec0-wdt.o
drivers/mfd/ahc1ec0-wdt.c new file +502 -0

502 lines not on this page · raw message

Signature · 1 line
2.17.1